From 5fbc89dadb027f14dd56862bf1176ca3de275817 Mon Sep 17 00:00:00 2001 From: Dimitris Marlagkoutsos Date: Wed, 23 Oct 2024 20:15:53 +0200 Subject: [PATCH 1/5] enable vitest typecheck --- packages/errors/vitest.config.ts | 1 + vitest.config.packages.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/packages/errors/vitest.config.ts b/packages/errors/vitest.config.ts index de9febbf4..fd90b7b79 100644 --- a/packages/errors/vitest.config.ts +++ b/packages/errors/vitest.config.ts @@ -4,6 +4,7 @@ import path from 'path'; import { defineConfig, mergeConfig } from 'vite'; +// @ts-expect-error - no declaration for module import { getDefaultConfig } from '../../vitest.config.packages.js'; const defaultConfig = getDefaultConfig(); diff --git a/vitest.config.packages.js b/vitest.config.packages.js index 641438644..49df1cb1b 100644 --- a/vitest.config.packages.js +++ b/vitest.config.packages.js @@ -37,5 +37,8 @@ export const getDefaultConfig = (projectRoot = './src') => reporters: ['basic'], silent: true, testTimeout: 2000, + typecheck: { + enabled: true, + }, }, }); From 3196d6a15cca22dadb968fbc8a6fbe468d330764 Mon Sep 17 00:00:00 2001 From: Dimitris Marlagkoutsos Date: Wed, 23 Oct 2024 20:18:25 +0200 Subject: [PATCH 2/5] use createConfig on eslint --- eslint.config.mjs | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 28fa8118a..b96ef3449 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,30 +1,22 @@ // @ts-check -import metamaskConfig from '@metamask/eslint-config'; +import metamaskConfig, { createConfig } from '@metamask/eslint-config'; import metamaskNodeConfig from '@metamask/eslint-config-nodejs'; import metamaskTypescriptConfig from '@metamask/eslint-config-typescript'; import metamaskVitestConfig from '@metamask/eslint-config-vitest'; import globals from 'globals'; -/** @type {import('eslint').Linter.Config[]} */ -const config = [ - ...metamaskConfig, - ...metamaskNodeConfig, - ...metamaskTypescriptConfig.map((options) => ({ - ...options, - files: ['**/*.{ts,mts,cts}'], - })), - ...metamaskVitestConfig.map((options) => ({ - ...options, - files: ['**/*.test.{ts,js}'], - })), +const config = createConfig([ + { + extends: [metamaskConfig, metamaskNodeConfig], + }, { ignores: ['node_modules', '**/dist', '**/docs', '**/coverage'], }, { - files: ['**/*.{js,mjs}'], + files: ['**/*.js', '**/*.mjs'], languageOptions: { sourceType: 'module', }, @@ -40,7 +32,8 @@ const config = [ { languageOptions: { parserOptions: { - tsconfigRootDir: new URL('.', import.meta.url).pathname, + projectService: true, + tsconfigRootDir: import.meta.dirname, }, globals: { ...globals['shared-node-browser'], @@ -74,7 +67,8 @@ const config = [ }, { - files: ['**/*.{ts,mts,cts}'], + files: ['**/*.ts', '**/*.mts', '**/*.cts'], + extends: [metamaskTypescriptConfig], rules: { '@typescript-eslint/explicit-function-return-type': [ 'error', @@ -96,6 +90,7 @@ const config = [ { files: ['**/*.test.ts'], + extends: [metamaskVitestConfig], rules: { // This causes false positives in tests especially. '@typescript-eslint/unbound-method': 'off', @@ -125,6 +120,6 @@ const config = [ globals: { lockdown: 'readonly' }, }, }, -]; +]); export default config; From 92810b0c005331c1bd06d2333d71da0f9cda8767 Mon Sep 17 00:00:00 2001 From: Dimitris Marlagkoutsos Date: Wed, 23 Oct 2024 20:18:41 +0200 Subject: [PATCH 3/5] fix test method call --- packages/errors/src/BaseError.test.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/errors/src/BaseError.test.ts b/packages/errors/src/BaseError.test.ts index 29f1c75dc..dcc98f343 100644 --- a/packages/errors/src/BaseError.test.ts +++ b/packages/errors/src/BaseError.test.ts @@ -2,6 +2,7 @@ import { describe, it, expect } from 'vitest'; import { BaseError } from './BaseError.js'; import { ErrorCode } from './constants.js'; +import { unmarshalErrorOptions } from './marshal/unmarshalError.js'; import type { MarshaledOcapError } from './types.js'; describe('BaseError', () => { @@ -57,9 +58,9 @@ describe('BaseError', () => { }); it('throws an error when unmarshal is called', () => { - expect(() => BaseError.unmarshal({} as MarshaledOcapError)).toThrow( - 'Unmarshal method not implemented', - ); + expect(() => + BaseError.unmarshal({} as MarshaledOcapError, unmarshalErrorOptions), + ).toThrow('Unmarshal method not implemented'); }); it('initializes the stack property automatically if not provided', () => { From 67981fc1db67e1cf4588c4c1ee3e5b3043d5d5db Mon Sep 17 00:00:00 2001 From: Dimitris Marlagkoutsos Date: Wed, 23 Oct 2024 22:04:55 +0200 Subject: [PATCH 4/5] Test typescript before vitest and commit --- eslint.config.mjs | 61 +++++++++++++++------------ package.json | 3 +- packages/errors/package.json | 3 +- packages/errors/tsconfig.test.json | 8 ++++ packages/extension/package.json | 3 +- packages/extension/tsconfig.json | 3 +- packages/extension/tsconfig.test.json | 8 ++++ packages/extension/vite.config.ts | 4 +- packages/kernel/package.json | 3 +- packages/kernel/tsconfig.test.json | 8 ++++ packages/shims/package.json | 3 +- packages/shims/tsconfig.test.json | 8 ++++ packages/streams/package.json | 3 +- packages/streams/tsconfig.test.json | 8 ++++ packages/utils/package.json | 3 +- packages/utils/tsconfig.test.json | 8 ++++ vitest.config.packages.js | 3 -- yarn.config.cjs | 6 +-- 18 files changed, 102 insertions(+), 44 deletions(-) create mode 100644 packages/errors/tsconfig.test.json create mode 100644 packages/extension/tsconfig.test.json create mode 100644 packages/kernel/tsconfig.test.json create mode 100644 packages/shims/tsconfig.test.json create mode 100644 packages/streams/tsconfig.test.json create mode 100644 packages/utils/tsconfig.test.json diff --git a/eslint.config.mjs b/eslint.config.mjs index b96ef3449..da976a22b 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -35,34 +35,6 @@ const config = createConfig([ projectService: true, tsconfigRootDir: import.meta.dirname, }, - globals: { - ...globals['shared-node-browser'], - }, - }, - rules: { - 'import-x/no-useless-path-segments': [ - 'error', - { - // Enabling this causes false errors in ESM files. - noUselessIndex: false, - }, - ], - - // We have been hoisted by our own petard in the past. - 'import-x/no-cycle': ['error', { ignoreExternal: true, maxDepth: 3 }], - - // This is not compatible with ESM. - 'import-x/extensions': 'off', - - // We use unassigned imports for e.g. `import '@ocap/shims/endoify'`. - 'import-x/no-unassigned-import': 'off', - - // This prevents pretty formatting of comments with multi-line lists entries. - 'jsdoc/check-indentation': 'off', - - // This prevents using Node.js and/or browser specific globals. We - // currently use both in our codebase, so this rule is disabled. - 'no-restricted-globals': 'off', }, }, @@ -110,6 +82,39 @@ const config = createConfig([ }, }, + { + languageOptions: { + globals: { + ...globals['shared-node-browser'], + }, + }, + rules: { + 'import-x/no-useless-path-segments': [ + 'error', + { + // Enabling this causes false errors in ESM files. + noUselessIndex: false, + }, + ], + + // We have been hoisted by our own petard in the past. + 'import-x/no-cycle': ['error', { ignoreExternal: true, maxDepth: 3 }], + + // This is not compatible with ESM. + 'import-x/extensions': 'off', + + // We use unassigned imports for e.g. `import '@ocap/shims/endoify'`. + 'import-x/no-unassigned-import': 'off', + + // This prevents pretty formatting of comments with multi-line lists entries. + 'jsdoc/check-indentation': 'off', + + // This prevents using Node.js and/or browser specific globals. We + // currently use both in our codebase, so this rule is disabled. + 'no-restricted-globals': 'off', + }, + }, + // ////////////////////////// // // Package-specific overrides // // ////////////////////////// // diff --git a/package.json b/package.json index 644642021..43b21e7fb 100644 --- a/package.json +++ b/package.json @@ -29,12 +29,13 @@ "postinstall": "simple-git-hooks", "prepack": "./scripts/prepack.sh", "test": "yarn workspaces foreach --all --parallel --verbose run test", + "test:ts": "yarn workspaces foreach --all --parallel --verbose run test:ts", "test:clean": "yarn workspaces foreach --all --parallel --verbose run test:clean && yarn test", "test:verbose": "yarn workspaces foreach --all --parallel --verbose run test:verbose", "why:batch": "./scripts/why-batch.sh" }, "simple-git-hooks": { - "pre-commit": "yarn lint-staged && yarn dedupe --check" + "pre-commit": "yarn lint-staged && yarn test:ts && yarn dedupe --check" }, "lint-staged": { "*.{js,mjs,cjs,ts,mts,cts}": [ diff --git a/packages/errors/package.json b/packages/errors/package.json index bb358bcf2..50963fb17 100644 --- a/packages/errors/package.json +++ b/packages/errors/package.json @@ -35,7 +35,8 @@ "lint:fix": "yarn constraints --fix && yarn lint:eslint --fix && yarn lint:misc --write", "lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore", "publish:preview": "yarn npm publish --tag preview", - "test": "vitest run --config vitest.config.ts", + "test": "yarn test:ts && vitest run --config vitest.config.ts", + "test:ts": "tsc --project tsconfig.test.json --noEmit", "test:clean": "yarn test --no-cache --coverage.clean", "test:dev": "yarn test --coverage false", "test:verbose": "yarn test --reporter verbose", diff --git a/packages/errors/tsconfig.test.json b/packages/errors/tsconfig.test.json new file mode 100644 index 000000000..0715ce811 --- /dev/null +++ b/packages/errors/tsconfig.test.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "skipLibCheck": true + }, + "include": ["./src"], + "exclude": ["./vite.config.ts", "./vitest.config.ts"] +} diff --git a/packages/extension/package.json b/packages/extension/package.json index 8347bf599..cd071c502 100644 --- a/packages/extension/package.json +++ b/packages/extension/package.json @@ -25,7 +25,8 @@ "lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore", "publish:preview": "yarn npm publish --tag preview", "start": "yarn build:vite:dev --watch", - "test": "vitest run --config vitest.config.ts", + "test": "yarn test:ts && vitest run --config vitest.config.ts", + "test:ts": "tsc --project tsconfig.test.json --noEmit", "test:build": "node ./test/build-tests.mjs", "test:clean": "yarn test --no-cache --coverage.clean", "test:dev": "yarn test --coverage false", diff --git a/packages/extension/tsconfig.json b/packages/extension/tsconfig.json index 8b114952a..02f4dbb59 100644 --- a/packages/extension/tsconfig.json +++ b/packages/extension/tsconfig.json @@ -22,6 +22,7 @@ "./vite-plugins/*.ts", "./test/**/*.ts", "./vite.config.ts", - "./vitest.config.ts" + "./vitest.config.ts", + "./scripts/build-constants.mjs" ] } diff --git a/packages/extension/tsconfig.test.json b/packages/extension/tsconfig.test.json new file mode 100644 index 000000000..86c6aa360 --- /dev/null +++ b/packages/extension/tsconfig.test.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "skipLibCheck": true + }, + "include": ["./src", "./test", "./scripts"], + "exclude": ["./vite.config.ts", "./vitest.config.ts"] +} diff --git a/packages/extension/vite.config.ts b/packages/extension/vite.config.ts index bd911ee9a..06ef1af18 100644 --- a/packages/extension/vite.config.ts +++ b/packages/extension/vite.config.ts @@ -11,8 +11,8 @@ import { buildDir, jsTrustedPreludes, } from './scripts/build-constants.mjs'; -import { htmlTrustedPrelude } from './vite-plugins/html-trusted-prelude'; -import { jsTrustedPrelude } from './vite-plugins/js-trusted-prelude'; +import { htmlTrustedPrelude } from './vite-plugins/html-trusted-prelude.js'; +import { jsTrustedPrelude } from './vite-plugins/js-trusted-prelude.js'; /** * Files that need to be statically copied to the destination directory. diff --git a/packages/kernel/package.json b/packages/kernel/package.json index 862f25257..23b0a5185 100644 --- a/packages/kernel/package.json +++ b/packages/kernel/package.json @@ -35,7 +35,8 @@ "lint:fix": "yarn constraints --fix && yarn lint:eslint --fix && yarn lint:misc --write", "lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore", "publish:preview": "yarn npm publish --tag preview", - "test": "vitest run --config vitest.config.ts", + "test": "yarn test:ts && vitest run --config vitest.config.ts", + "test:ts": "tsc --project tsconfig.test.json --noEmit", "test:clean": "yarn test --no-cache --coverage.clean", "test:dev": "yarn test --coverage false", "test:verbose": "yarn test --reporter verbose", diff --git a/packages/kernel/tsconfig.test.json b/packages/kernel/tsconfig.test.json new file mode 100644 index 000000000..4bfedb895 --- /dev/null +++ b/packages/kernel/tsconfig.test.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "skipLibCheck": true + }, + "include": ["./src", "./test"], + "exclude": ["./vite.config.ts", "./vitest.config.ts"] +} diff --git a/packages/shims/package.json b/packages/shims/package.json index e14fd93aa..ffebb3dd2 100644 --- a/packages/shims/package.json +++ b/packages/shims/package.json @@ -29,7 +29,8 @@ "lint:fix": "yarn constraints --fix && yarn lint:eslint --fix && yarn lint:misc --write", "lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore", "publish:preview": "yarn npm publish --tag preview", - "test": "vitest run --config vitest.config.ts", + "test": "yarn test:ts && vitest run --config vitest.config.ts", + "test:ts": "tsc --project tsconfig.test.json --noEmit", "test:clean": "yarn test --no-cache --coverage.clean", "test:dev": "yarn test --coverage false", "test:verbose": "yarn test --reporter verbose", diff --git a/packages/shims/tsconfig.test.json b/packages/shims/tsconfig.test.json new file mode 100644 index 000000000..0715ce811 --- /dev/null +++ b/packages/shims/tsconfig.test.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "skipLibCheck": true + }, + "include": ["./src"], + "exclude": ["./vite.config.ts", "./vitest.config.ts"] +} diff --git a/packages/streams/package.json b/packages/streams/package.json index cc5000eca..98a27aeee 100644 --- a/packages/streams/package.json +++ b/packages/streams/package.json @@ -39,7 +39,8 @@ "lint:fix": "yarn constraints --fix && yarn lint:eslint --fix && yarn lint:misc --write", "lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore", "publish:preview": "yarn npm publish --tag preview", - "test": "vitest run --config vitest.config.ts", + "test": "yarn test:ts && vitest run --config vitest.config.ts", + "test:ts": "tsc --project tsconfig.test.json --noEmit", "test:clean": "yarn test --no-cache --coverage.clean", "test:dev": "yarn test --coverage false", "test:verbose": "yarn test --reporter verbose", diff --git a/packages/streams/tsconfig.test.json b/packages/streams/tsconfig.test.json new file mode 100644 index 000000000..4bfedb895 --- /dev/null +++ b/packages/streams/tsconfig.test.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "skipLibCheck": true + }, + "include": ["./src", "./test"], + "exclude": ["./vite.config.ts", "./vitest.config.ts"] +} diff --git a/packages/utils/package.json b/packages/utils/package.json index fb3a34a70..09e5441f9 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -35,7 +35,8 @@ "lint:fix": "yarn constraints --fix && yarn lint:eslint --fix && yarn lint:misc --write", "lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore", "publish:preview": "yarn npm publish --tag preview", - "test": "vitest run --config vitest.config.ts", + "test": "yarn test:ts && vitest run --config vitest.config.ts", + "test:ts": "tsc --project tsconfig.test.json --noEmit", "test:clean": "yarn test --no-cache --coverage.clean", "test:dev": "yarn test --coverage false", "test:verbose": "yarn test --reporter verbose", diff --git a/packages/utils/tsconfig.test.json b/packages/utils/tsconfig.test.json new file mode 100644 index 000000000..0715ce811 --- /dev/null +++ b/packages/utils/tsconfig.test.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "skipLibCheck": true + }, + "include": ["./src"], + "exclude": ["./vite.config.ts", "./vitest.config.ts"] +} diff --git a/vitest.config.packages.js b/vitest.config.packages.js index 49df1cb1b..641438644 100644 --- a/vitest.config.packages.js +++ b/vitest.config.packages.js @@ -37,8 +37,5 @@ export const getDefaultConfig = (projectRoot = './src') => reporters: ['basic'], silent: true, testTimeout: 2000, - typecheck: { - enabled: true, - }, }, }); diff --git a/yarn.config.cjs b/yarn.config.cjs index 5baf49ce6..f138c2bd4 100644 --- a/yarn.config.cjs +++ b/yarn.config.cjs @@ -229,12 +229,12 @@ module.exports = defineConfig({ expectWorkspaceField( workspace, 'scripts.test', - 'vitest run --config vitest.config.ts', + 'yarn test:ts && vitest run --config vitest.config.ts', ); expectWorkspaceField( workspace, - 'scripts.test', - 'vitest run --config vitest.config.ts', + 'scripts.test:ts', + 'tsc --project tsconfig.test.json --noEmit', ); expectWorkspaceField( workspace, From 71c6bfabcb05b10d437cf218b9c9e89552cd8a63 Mon Sep 17 00:00:00 2001 From: Dimitris Marlagkoutsos Date: Wed, 23 Oct 2024 22:15:35 +0200 Subject: [PATCH 5/5] remove running tsc before tests --- packages/errors/package.json | 2 +- packages/extension/package.json | 2 +- packages/kernel/package.json | 2 +- packages/shims/package.json | 2 +- packages/streams/package.json | 2 +- packages/utils/package.json | 2 +- yarn.config.cjs | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/errors/package.json b/packages/errors/package.json index 50963fb17..da92c1d64 100644 --- a/packages/errors/package.json +++ b/packages/errors/package.json @@ -35,7 +35,7 @@ "lint:fix": "yarn constraints --fix && yarn lint:eslint --fix && yarn lint:misc --write", "lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore", "publish:preview": "yarn npm publish --tag preview", - "test": "yarn test:ts && vitest run --config vitest.config.ts", + "test": "vitest run --config vitest.config.ts", "test:ts": "tsc --project tsconfig.test.json --noEmit", "test:clean": "yarn test --no-cache --coverage.clean", "test:dev": "yarn test --coverage false", diff --git a/packages/extension/package.json b/packages/extension/package.json index cd071c502..f221296bb 100644 --- a/packages/extension/package.json +++ b/packages/extension/package.json @@ -25,7 +25,7 @@ "lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore", "publish:preview": "yarn npm publish --tag preview", "start": "yarn build:vite:dev --watch", - "test": "yarn test:ts && vitest run --config vitest.config.ts", + "test": "vitest run --config vitest.config.ts", "test:ts": "tsc --project tsconfig.test.json --noEmit", "test:build": "node ./test/build-tests.mjs", "test:clean": "yarn test --no-cache --coverage.clean", diff --git a/packages/kernel/package.json b/packages/kernel/package.json index 23b0a5185..2c3ba8cc1 100644 --- a/packages/kernel/package.json +++ b/packages/kernel/package.json @@ -35,7 +35,7 @@ "lint:fix": "yarn constraints --fix && yarn lint:eslint --fix && yarn lint:misc --write", "lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore", "publish:preview": "yarn npm publish --tag preview", - "test": "yarn test:ts && vitest run --config vitest.config.ts", + "test": "vitest run --config vitest.config.ts", "test:ts": "tsc --project tsconfig.test.json --noEmit", "test:clean": "yarn test --no-cache --coverage.clean", "test:dev": "yarn test --coverage false", diff --git a/packages/shims/package.json b/packages/shims/package.json index ffebb3dd2..538f4f175 100644 --- a/packages/shims/package.json +++ b/packages/shims/package.json @@ -29,7 +29,7 @@ "lint:fix": "yarn constraints --fix && yarn lint:eslint --fix && yarn lint:misc --write", "lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore", "publish:preview": "yarn npm publish --tag preview", - "test": "yarn test:ts && vitest run --config vitest.config.ts", + "test": "vitest run --config vitest.config.ts", "test:ts": "tsc --project tsconfig.test.json --noEmit", "test:clean": "yarn test --no-cache --coverage.clean", "test:dev": "yarn test --coverage false", diff --git a/packages/streams/package.json b/packages/streams/package.json index 98a27aeee..ecf070e3d 100644 --- a/packages/streams/package.json +++ b/packages/streams/package.json @@ -39,7 +39,7 @@ "lint:fix": "yarn constraints --fix && yarn lint:eslint --fix && yarn lint:misc --write", "lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore", "publish:preview": "yarn npm publish --tag preview", - "test": "yarn test:ts && vitest run --config vitest.config.ts", + "test": "vitest run --config vitest.config.ts", "test:ts": "tsc --project tsconfig.test.json --noEmit", "test:clean": "yarn test --no-cache --coverage.clean", "test:dev": "yarn test --coverage false", diff --git a/packages/utils/package.json b/packages/utils/package.json index 09e5441f9..30dd0f373 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -35,7 +35,7 @@ "lint:fix": "yarn constraints --fix && yarn lint:eslint --fix && yarn lint:misc --write", "lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore", "publish:preview": "yarn npm publish --tag preview", - "test": "yarn test:ts && vitest run --config vitest.config.ts", + "test": "vitest run --config vitest.config.ts", "test:ts": "tsc --project tsconfig.test.json --noEmit", "test:clean": "yarn test --no-cache --coverage.clean", "test:dev": "yarn test --coverage false", diff --git a/yarn.config.cjs b/yarn.config.cjs index f138c2bd4..06e1a0523 100644 --- a/yarn.config.cjs +++ b/yarn.config.cjs @@ -229,7 +229,7 @@ module.exports = defineConfig({ expectWorkspaceField( workspace, 'scripts.test', - 'yarn test:ts && vitest run --config vitest.config.ts', + 'vitest run --config vitest.config.ts', ); expectWorkspaceField( workspace,