diff --git a/package.json b/package.json index c4783c7..80baa37 100644 --- a/package.json +++ b/package.json @@ -13,21 +13,22 @@ "lint-staged": { "*": "prettier --write --ignore-unknown" }, + "prettier": "@workspace/prettier-config", "devDependencies": { "@types/node": "^20.14.2", "@workspace/eslint-config": "workspace:*", "@workspace/jest": "workspace:*", + "@workspace/prettier-config": "workspace:*", "@workspace/tsconfig": "workspace:*", "eslint": "^8.57.0", "husky": "^9.0.11", "jest": "29.7.0", "lint-staged": "^15.2.7", "prettier": "^3.3.2", - "prettier-plugin-packagejson": "^2.5.0", "turbo": "^2.0.4", "typescript": "5.4.5" }, - "packageManager": "pnpm@9.3.0", + "packageManager": "pnpm@9.4.0", "engines": { "node": "^20 <21" } diff --git a/packages/chainfile-solana/package.json b/packages/chainfile-solana/package.json index cda1ba0..1db4020 100644 --- a/packages/chainfile-solana/package.json +++ b/packages/chainfile-solana/package.json @@ -17,6 +17,6 @@ "preset": "@workspace/jest" }, "devDependencies": { - "@chainfile/testcontainers": "^0.6.1" + "@chainfile/testcontainers": "^0.8.0" } } diff --git a/packages/chainfile-solana/test-validator.json b/packages/chainfile-solana/test-validator.json index 28797e4..4aa78e5 100644 --- a/packages/chainfile-solana/test-validator.json +++ b/packages/chainfile-solana/test-validator.json @@ -2,7 +2,7 @@ "$schema": "https://chainfile.org/schema.json", "caip2": "solana:00000000000000000000000000000000", "name": "Solana Test Validator", - "values": { + "params": { "version": { "description": "Solana test validator version to use, the container image is built in the chainfile-solana repository. Published in to ghcr.io/vetumorg/solana-test-validator, to see the available versions check github.com/vetumorg/chainfile-solana/pkgs/container/solana-test-validator", "default": "1.18.15" @@ -13,7 +13,7 @@ "solana": { "image": "ghcr.io/vetumorg/solana-test-validator", "tag": { - "$value": "version" + "$param": "version" }, "source": "https://github.com/vetumorg/chainfile-solana", "resources": { diff --git a/packages/chainfile-solana/test-validator.test.ts b/packages/chainfile-solana/test-validator.test.ts index 94b2c2e..8c9e875 100644 --- a/packages/chainfile-solana/test-validator.test.ts +++ b/packages/chainfile-solana/test-validator.test.ts @@ -1,9 +1,9 @@ -import { ChainfileTestcontainers } from '@chainfile/testcontainers'; +import { CFTestcontainers } from '@chainfile/testcontainers'; import { afterAll, beforeAll, describe, expect, it } from '@workspace/jest/globals'; import test from './test-validator.json'; -const testcontainers = new ChainfileTestcontainers(test); +const testcontainers = new CFTestcontainers(test); beforeAll(async () => { await testcontainers.start(); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9e75df9..975f89d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,6 +17,9 @@ importers: '@workspace/jest': specifier: workspace:* version: link:workspace/jest + '@workspace/prettier-config': + specifier: workspace:* + version: link:workspace/prettier-config '@workspace/tsconfig': specifier: workspace:* version: link:workspace/tsconfig @@ -35,9 +38,6 @@ importers: prettier: specifier: ^3.3.2 version: 3.3.2 - prettier-plugin-packagejson: - specifier: ^2.5.0 - version: 2.5.0(prettier@3.3.2) turbo: specifier: ^2.0.4 version: 2.0.4 @@ -48,8 +48,8 @@ importers: packages/chainfile-solana: devDependencies: '@chainfile/testcontainers': - specifier: ^0.6.1 - version: 0.6.1 + specifier: ^0.8.0 + version: 0.8.0 packages/solana-docker: {} @@ -105,6 +105,12 @@ importers: specifier: ^3.0.2 version: 3.0.2 + workspace/prettier-config: + devDependencies: + prettier-plugin-packagejson: + specifier: ^2.5.0 + version: 2.5.0(prettier@3.3.2) + workspace/tsconfig: {} packages: @@ -291,14 +297,14 @@ packages: '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} - '@chainfile/docker@0.6.1': - resolution: {integrity: sha512-Ev6uPnzMjyAJ77DqBOORHqKz82y3je7AhyXAy6eb2xaTpLg96zo5J9ICaQYJxnblREaJqtp4MgNOkAxMVx/qIQ==} + '@chainfile/docker@0.8.0': + resolution: {integrity: sha512-kisNfhBygOXQPGMkV7Xw5dlv8UyrpmhJ0iRdjLl1az6N3UB9FmHThw7t7wVDOnK5rroor1grXc06r0j9tm6Uaw==} - '@chainfile/schema@0.6.1': - resolution: {integrity: sha512-128om1RxNYaiPBTspr952l6EPxLSUXaPUj0hNlB5B+DInhLiHxYTbBsCRklwXBBgLACPaCHzsnPTwCzPDvW5xA==} + '@chainfile/schema@0.8.0': + resolution: {integrity: sha512-kSqgXXsVelIFi5jU7uRgDS6y24rwajCzjlz7fO/sUb7dt/WFGMVweITsmTrU1MIWT/XupTW44mgMt/bXzajH1Q==} - '@chainfile/testcontainers@0.6.1': - resolution: {integrity: sha512-ivBXCow97Xx5eASA7pXkuYw1C+5lKR/ZXWFmb5jFfRpuKHTPAaJqO2zofGY7RzMwNojkopjUhd85FnERXR+S+A==} + '@chainfile/testcontainers@0.8.0': + resolution: {integrity: sha512-RaG32/8dZaabDiS0hkt2wGQZurIE6ohZaoUd4MOkA0GtmPZHjo9kNR3unmBoyC8qYan+1Yso3t2QZceq3+5jKQ==} '@eslint-community/eslint-utils@4.4.0': resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} @@ -2998,20 +3004,20 @@ snapshots: '@bcoe/v8-coverage@0.2.3': {} - '@chainfile/docker@0.6.1': + '@chainfile/docker@0.8.0': dependencies: - '@chainfile/schema': 0.6.1 + '@chainfile/schema': 0.8.0 js-yaml: 4.1.0 - '@chainfile/schema@0.6.1': + '@chainfile/schema@0.8.0': dependencies: ajv: 8.16.0 ajv-formats: 3.0.1(ajv@8.16.0) - '@chainfile/testcontainers@0.6.1': + '@chainfile/testcontainers@0.8.0': dependencies: - '@chainfile/docker': 0.6.1 - '@chainfile/schema': 0.6.1 + '@chainfile/docker': 0.8.0 + '@chainfile/schema': 0.8.0 testcontainers: 10.9.0 transitivePeerDependencies: - encoding diff --git a/workspace/prettier-config/index.js b/workspace/prettier-config/index.js new file mode 100644 index 0000000..a192187 --- /dev/null +++ b/workspace/prettier-config/index.js @@ -0,0 +1,12 @@ +/** @type {import('prettier').Config} */ +const config = { + printWidth: 120, + trailingComma: 'all', + singleQuote: true, + endOfLine: 'lf', + tabWidth: 2, + useTabs: false, + plugins: [import('prettier-plugin-packagejson')], +}; + +module.exports = config; diff --git a/workspace/prettier-config/package.json b/workspace/prettier-config/package.json new file mode 100644 index 0000000..112e149 --- /dev/null +++ b/workspace/prettier-config/package.json @@ -0,0 +1,7 @@ +{ + "name": "@workspace/prettier-config", + "private": true, + "devDependencies": { + "prettier-plugin-packagejson": "^2.5.0" + } +}