Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/lint-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ jobs:
cache: yarn
- run: yarn --immutable
- run: yarn build
# Due to our use of Node16 module resolution, we have to build before running type checks.
- name: Check for TypeScript issues
run: yarn lint:ts
- name: Require clean working directory
shell: bash
run: |
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
"changelog:update": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run changelog:update",
"changelog:validate": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run changelog:validate",
"clean": "rimraf --glob './*.tsbuildinfo' && yarn workspaces foreach --all --parallel --interlaced --verbose run clean",
"lint": "yarn constraints && yarn lint:eslint && yarn lint:misc --check && yarn lint:dependencies",
"lint": "yarn constraints && yarn lint:ts && yarn lint:eslint && yarn lint:misc --check && yarn lint:dependencies",
"lint:dependencies": "yarn dedupe --check && yarn depcheck && yarn workspaces foreach --all --parallel --verbose run lint:dependencies",
"lint:dependencies:fix": "yarn dedupe && yarn depcheck && yarn workspaces foreach --all --parallel --verbose run lint:dependencies",
"lint:eslint": "yarn eslint . --cache",
"lint:fix": "yarn constraints --fix && yarn lint:eslint --fix && yarn lint:misc --write && yarn lint:dependencies:fix",
"lint:fix": "yarn constraints --fix && yarn lint:ts && yarn lint:eslint --fix && yarn lint:misc --write && yarn lint:dependencies:fix",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path .gitignore",
"lint:ts": "yarn workspaces foreach --all --parallel --verbose run lint:ts",
"postinstall": "simple-git-hooks",
Expand Down
6 changes: 3 additions & 3 deletions packages/errors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
"build:docs": "typedoc",
"changelog:validate": "../../scripts/validate-changelog.sh utils",
"clean": "rimraf --glob ./dist './*.tsbuildinfo'",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies",
"lint": "yarn lint:ts && yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies",
"lint:dependencies": "depcheck",
"lint:eslint": "eslint . --cache",
"lint:fix": "yarn constraints --fix && yarn lint:eslint --fix && yarn lint:misc --write",
"lint:fix": "yarn lint:ts && yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix && yarn lint:dependencies",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore",
"lint:ts": "tsc --project tsconfig.test.json --noEmit",
"lint:ts": "tsc --project tsconfig.lint.json",
"publish:preview": "yarn npm publish --tag preview",
"test": "vitest run --config vitest.config.ts",
"test:clean": "yarn test --no-cache --coverage.clean",
Expand Down
7 changes: 6 additions & 1 deletion packages/errors/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
"types": ["ses", "vitest", "vitest/jsdom"]
},
"references": [{ "path": "../test-utils" }],
"include": ["./src", "./vite.config.ts", "./vitest.config.ts"]
"include": [
"../../vitest.config.packages.ts",
"./src",
"./vite.config.ts",
"./vitest.config.ts"
]
}
10 changes: 10 additions & 0 deletions packages/errors/tsconfig.lint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"composite": false,
"noEmit": true,
"skipLibCheck": true
},
"include": ["./src"],
"exclude": []
}
10 changes: 0 additions & 10 deletions packages/errors/tsconfig.test.json

This file was deleted.

6 changes: 3 additions & 3 deletions packages/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
"build:vite:dev": "yarn build:vite --mode development",
"changelog:validate": "../../scripts/validate-changelog.sh @ocap/extension",
"clean": "rimraf --glob ./dist './*.tsbuildinfo'",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies",
"lint": "yarn lint:ts && yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies",
"lint:dependencies": "depcheck",
"lint:eslint": "eslint . --cache",
"lint:fix": "yarn constraints --fix && yarn lint:eslint --fix && yarn lint:misc --write",
"lint:fix": "yarn lint:ts && yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix && yarn lint:dependencies",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore",
"lint:ts": "tsc --project tsconfig.test.json --noEmit",
"lint:ts": "tsc --project tsconfig.lint.json",
"publish:preview": "yarn npm publish --tag preview",
"start": "yarn build:vite:dev --watch",
"test": "vitest run --config vitest.config.ts",
Expand Down
7 changes: 4 additions & 3 deletions packages/extension/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@
{ "path": "../utils" }
],
"include": [
"../../vitest.config.packages.ts",
"./scripts/build-constants.mjs",
"./src/**/*.ts",
"./src/**/*-trusted-prelude.js",
"./src/dev-console.js",
"./vite-plugins/*.ts",
"./test/**/*.ts",
"./vite-plugins/*.ts",
"./vite.config.ts",
"./vitest.config.ts",
"./scripts/build-constants.mjs"
"./vitest.config.ts"
]
}
10 changes: 10 additions & 0 deletions packages/extension/tsconfig.lint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"composite": false,
"noEmit": true,
"skipLibCheck": true
},
"include": ["./src", "./test", "./scripts"],
"exclude": []
}
10 changes: 0 additions & 10 deletions packages/extension/tsconfig.test.json

This file was deleted.

6 changes: 3 additions & 3 deletions packages/kernel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
"build:docs": "typedoc",
"changelog:validate": "../../scripts/validate-changelog.sh @ocap/kernel",
"clean": "rimraf --glob ./dist './*.tsbuildinfo'",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies",
"lint": "yarn lint:ts && yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies",
"lint:dependencies": "depcheck",
"lint:eslint": "eslint . --cache",
"lint:fix": "yarn constraints --fix && yarn lint:eslint --fix && yarn lint:misc --write",
"lint:fix": "yarn lint:ts && yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix && yarn lint:dependencies",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore",
"lint:ts": "tsc --project tsconfig.test.json --noEmit",
"lint:ts": "tsc --project tsconfig.lint.json",
"publish:preview": "yarn npm publish --tag preview",
"test": "vitest run --config vitest.config.ts",
"test:clean": "yarn test --no-cache --coverage.clean",
Expand Down
10 changes: 10 additions & 0 deletions packages/kernel/tsconfig.lint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"composite": false,
"noEmit": true,
"skipLibCheck": true
},
"include": ["./src", "./test"],
"exclude": []
}
10 changes: 0 additions & 10 deletions packages/kernel/tsconfig.test.json

This file was deleted.

6 changes: 3 additions & 3 deletions packages/shims/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
"build:docs": "typedoc",
"changelog:validate": "../../scripts/validate-changelog.sh @ocap/shims",
"clean": "rimraf --glob ./dist './*.tsbuildinfo'",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies",
"lint": "yarn lint:ts && yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies",
"lint:dependencies": "depcheck",
"lint:eslint": "eslint . --cache",
"lint:fix": "yarn constraints --fix && yarn lint:eslint --fix && yarn lint:misc --write",
"lint:fix": "yarn lint:ts && yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix && yarn lint:dependencies",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore",
"lint:ts": "tsc --project tsconfig.test.json --noEmit",
"lint:ts": "tsc --project tsconfig.lint.json",
"publish:preview": "yarn npm publish --tag preview",
"test": "vitest run --config vitest.config.ts",
"test:clean": "yarn test --no-cache --coverage.clean",
Expand Down
7 changes: 6 additions & 1 deletion packages/shims/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,10 @@
"outDir": "./dist"
},
"references": [],
"include": ["./src", "./vite.config.ts", "./vitest.config.ts"]
"include": [
"../../vitest.config.packages.ts",
"./src",
"./vite.config.ts",
"./vitest.config.ts"
]
}
10 changes: 10 additions & 0 deletions packages/shims/tsconfig.lint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"composite": false,
"noEmit": true,
"skipLibCheck": true
},
"include": ["./src"],
"exclude": []
}
10 changes: 0 additions & 10 deletions packages/shims/tsconfig.test.json

This file was deleted.

6 changes: 3 additions & 3 deletions packages/streams/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
"build:docs": "typedoc",
"changelog:validate": "../../scripts/validate-changelog.sh streams",
"clean": "rimraf --glob ./dist './*.tsbuildinfo'",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies",
"lint": "yarn lint:ts && yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies",
"lint:dependencies": "depcheck",
"lint:eslint": "eslint . --cache",
"lint:fix": "yarn constraints --fix && yarn lint:eslint --fix && yarn lint:misc --write",
"lint:fix": "yarn lint:ts && yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix && yarn lint:dependencies",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore",
"lint:ts": "tsc --project tsconfig.test.json --noEmit",
"lint:ts": "tsc --project tsconfig.lint.json",
"publish:preview": "yarn npm publish --tag preview",
"test": "vitest run --config vitest.config.ts",
"test:clean": "yarn test --no-cache --coverage.clean",
Expand Down
1 change: 1 addition & 0 deletions packages/streams/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
},
"references": [{ "path": "../test-utils" }, { "path": "../errors" }],
"include": [
"../../vitest.config.packages.ts",
"./src",
"./src/chrome.d.ts",
"./test/*.ts",
Expand Down
10 changes: 10 additions & 0 deletions packages/streams/tsconfig.lint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"composite": false,
"noEmit": true,
"skipLibCheck": true
},
"include": ["./src", "./test"],
"exclude": []
}
10 changes: 0 additions & 10 deletions packages/streams/tsconfig.test.json

This file was deleted.

7 changes: 4 additions & 3 deletions packages/test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
},
"scripts": {
"clean": "rimraf --glob ./dist './*.tsbuildinfo'",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies",
"lint": "yarn lint:ts && yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies",
"lint:dependencies": "depcheck",
"lint:eslint": "eslint . --cache",
"lint:fix": "yarn constraints --fix && yarn lint:eslint --fix && yarn lint:misc --write",
"lint:fix": "yarn lint:ts && yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix && yarn lint:dependencies",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore",
"test": "echo 'No tests.' && exit 0"
"test": "echo 'No tests.' && exit 0",
"lint:ts": "tsc --project tsconfig.lint.json"
},
"devDependencies": {
"@metamask/eslint-config": "^14.0.0",
Expand Down
10 changes: 10 additions & 0 deletions packages/test-utils/tsconfig.lint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"composite": false,
"noEmit": true,
"skipLibCheck": true
},
"include": ["./src"],
"exclude": []
}
6 changes: 3 additions & 3 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
"build:docs": "typedoc",
"changelog:validate": "../../scripts/validate-changelog.sh utils",
"clean": "rimraf --glob ./dist './*.tsbuildinfo'",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies",
"lint": "yarn lint:ts && yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies",
"lint:dependencies": "depcheck",
"lint:eslint": "eslint . --cache",
"lint:fix": "yarn constraints --fix && yarn lint:eslint --fix && yarn lint:misc --write",
"lint:fix": "yarn lint:ts && yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix && yarn lint:dependencies",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore",
"lint:ts": "tsc --project tsconfig.test.json --noEmit",
"lint:ts": "tsc --project tsconfig.lint.json",
"publish:preview": "yarn npm publish --tag preview",
"test": "vitest run --config vitest.config.ts",
"test:clean": "yarn test --no-cache --coverage.clean",
Expand Down
7 changes: 6 additions & 1 deletion packages/utils/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
"types": ["ses", "vitest", "vitest/jsdom"]
},
"references": [{ "path": "../test-utils" }, { "path": "../errors" }],
"include": ["./src", "./vite.config.ts", "./vitest.config.ts"]
"include": [
"../../vitest.config.packages.ts",
"./src",
"./vite.config.ts",
"./vitest.config.ts"
]
}
10 changes: 10 additions & 0 deletions packages/utils/tsconfig.lint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"composite": false,
"noEmit": true,
"skipLibCheck": true
},
"include": ["./src"],
"exclude": []
}
10 changes: 0 additions & 10 deletions packages/utils/tsconfig.test.json

This file was deleted.

4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"compilerOptions": {
"esModuleInterop": true,
"module": "Node16",
"moduleResolution": "Node16",
"module": "Preserve",
"moduleResolution": "Node10",
"noEmit": true,
"resolveJsonModule": true,
"verbatimModuleSyntax": true
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"exactOptionalPropertyTypes": true,
"forceConsistentCasingInFileNames": true,
"lib": ["ES2022"],
"moduleResolution": "Node",
"module": "Preserve",
"moduleResolution": "Node10",
"noErrorTruncation": true,
"noUncheckedIndexedAccess": true,
/**
Expand Down
7 changes: 4 additions & 3 deletions vitest.config.packages.js → vitest.config.packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@

import path from 'path';
import { defineConfig } from 'vite';
import type { UserConfig } from 'vite';
import tsconfigPathsPlugin from 'vite-tsconfig-paths';

/**
* Get the default vitest config. See https://vitest.dev/config/ for details.
*
* @param {string} projectRoot - The vite project root directory.
* @returns {import('vite').UserConfig} The default vitest config.
* @param projectRoot - The vite project root directory.
* @returns The default vitest config.
*/
export const getDefaultConfig = (projectRoot = './src') =>
export const getDefaultConfig = (projectRoot = './src'): UserConfig =>
defineConfig({
root: projectRoot,

Expand Down
Loading