From ce2f6cc63b3a130c31fa560067d56fc3d838b908 Mon Sep 17 00:00:00 2001 From: Dimitris Marlagkoutsos Date: Tue, 10 Sep 2024 14:11:38 +0100 Subject: [PATCH 01/15] Add lint commands on package/extension --- packages/extension/.eslintrc.cjs | 6 +++--- packages/extension/package.json | 25 +++++++++++++++++++++---- packages/extension/src/background.ts | 2 -- packages/extension/src/endoify.test.ts | 1 - packages/extension/src/endoify.ts | 2 -- 5 files changed, 24 insertions(+), 12 deletions(-) diff --git a/packages/extension/.eslintrc.cjs b/packages/extension/.eslintrc.cjs index c747e0b88..8dea78f23 100644 --- a/packages/extension/.eslintrc.cjs +++ b/packages/extension/.eslintrc.cjs @@ -5,9 +5,9 @@ module.exports = { { files: ['src/**/*.ts'], globals: { - chrome: 'readonly', - clients: 'readonly', - Compartment: 'readonly', + // chrome: 'readonly', + // clients: 'readonly', + // Compartment: 'readonly', }, }, diff --git a/packages/extension/package.json b/packages/extension/package.json index b3cce458e..ac5e4398d 100644 --- a/packages/extension/package.json +++ b/packages/extension/package.json @@ -17,6 +17,12 @@ "build:vite": "vite build --config vite.config.ts", "changelog:validate": "../../scripts/validate-changelog.sh @ocap/extension", "clean": "rimraf --glob ./dist './*.tsbuildinfo'", + "lint": "yarn lint:eslint && yarn lint:misc --check && yarn lint:dependencies", + "lint:ci": "yarn lint", + "lint:dependencies": "depcheck", + "lint:eslint": "eslint . --cache --ext js,mjs,cjs,ts,mts,cts", + "lint: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", "start": "vite --config vite.config.ts & vite build --watch --config vite.config.ts", "test": "vitest run --config vitest.config.ts", @@ -26,7 +32,7 @@ "test:watch": "vitest --config vitest.config.ts" }, "dependencies": { - "@endo/lockdown": "^1.0.9", + "@endo/eventual-send": "^1.2.4", "@endo/promise-kit": "^1.1.4", "@metamask/snaps-utils": "^7.8.0", "@metamask/utils": "^9.1.0", @@ -37,16 +43,27 @@ "devDependencies": { "@arethetypeswrong/cli": "^0.15.3", "@metamask/auto-changelog": "^3.4.4", + "@metamask/eslint-config": "^13.0.0", + "@metamask/eslint-config-nodejs": "^13.0.0", + "@metamask/eslint-config-typescript": "^13.0.0", "@ocap/test-utils": "workspace:^", "@types/chrome": "^0.0.268", - "@vitest/coverage-v8": "^2.0.5", + "@typescript-eslint/eslint-plugin": "^8.1.0", + "@typescript-eslint/parser": "^8.1.0", "cheerio": "^1.0.0-rc.12", - "deepmerge": "^4.3.1", + "depcheck": "^1.4.7", + "eslint": "^8.57.0", + "eslint-config-prettier": "^8.8.0", + "eslint-plugin-import-x": "^0.5.1", + "eslint-plugin-jsdoc": "^47.0.2", + "eslint-plugin-n": "^16.6.2", + "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-promise": "^6.1.1", + "eslint-plugin-vitest": "^0.4.1", "jsdom": "^24.1.1", "prettier": "^2.7.1", "rimraf": "^6.0.1", "typedoc": "^0.24.8", - "typedoc-plugin-missing-exports": "^2.0.0", "typescript": "~5.5.4", "vite": "^5.3.5", "vite-plugin-static-copy": "^1.0.6", diff --git a/packages/extension/src/background.ts b/packages/extension/src/background.ts index eff0c6b8e..ddf252964 100644 --- a/packages/extension/src/background.ts +++ b/packages/extension/src/background.ts @@ -1,7 +1,5 @@ -/* eslint-disable import-x/no-unassigned-import */ import './dev-console.js'; import './endoify.js'; -/* eslint-enable import-x/no-unassigned-import */ import type { ExtensionMessage } from './shared.js'; import { Command, makeHandledCallback } from './shared.js'; diff --git a/packages/extension/src/endoify.test.ts b/packages/extension/src/endoify.test.ts index fae8b293b..9caf358c8 100644 --- a/packages/extension/src/endoify.test.ts +++ b/packages/extension/src/endoify.test.ts @@ -1,5 +1,4 @@ import './endoify.js'; -// eslint-disable-next-line n/no-extraneous-import import type { HandledPromiseConstructor } from '@endo/eventual-send'; import { describe, expect, it } from 'vitest'; diff --git a/packages/extension/src/endoify.ts b/packages/extension/src/endoify.ts index 11479b6c9..58ad152ae 100644 --- a/packages/extension/src/endoify.ts +++ b/packages/extension/src/endoify.ts @@ -1,3 +1 @@ -/* eslint-disable import-x/extensions */ -/* eslint-disable import-x/no-unassigned-import */ import '@ocap/shims/endoify'; From 9f9573f483fb73f6627cb8bde89402e2770c4364 Mon Sep 17 00:00:00 2001 From: Dimitris Marlagkoutsos Date: Tue, 10 Sep 2024 14:16:18 +0100 Subject: [PATCH 02/15] Add lint commands on package/shims --- packages/shims/package.json | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/packages/shims/package.json b/packages/shims/package.json index 6ac347bfc..fb5c3ce39 100644 --- a/packages/shims/package.json +++ b/packages/shims/package.json @@ -23,6 +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 lint:dependencies", + "lint:ci": "yarn lint", + "lint:dependencies": "depcheck", + "lint:eslint": "eslint . --cache --ext js,mjs,cjs,ts,mts,cts", + "lint: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:clean": "yarn test --no-cache --coverage.clean", @@ -38,7 +44,21 @@ "devDependencies": { "@endo/bundle-source": "^3.3.0", "@metamask/auto-changelog": "^3.4.4", - "deepmerge": "^4.3.1", + "@metamask/eslint-config": "^13.0.0", + "@metamask/eslint-config-nodejs": "^13.0.0", + "@metamask/eslint-config-typescript": "^13.0.0", + "@typescript-eslint/eslint-plugin": "^8.1.0", + "@typescript-eslint/parser": "^8.1.0", + "depcheck": "^1.4.7", + "eslint": "^8.57.0", + "eslint-config-prettier": "^8.8.0", + "eslint-plugin-import-x": "^0.5.1", + "eslint-plugin-jsdoc": "^47.0.2", + "eslint-plugin-n": "^16.6.2", + "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-promise": "^6.1.1", + "eslint-plugin-vitest": "^0.4.1", + "prettier": "^2.7.1", "rimraf": "^6.0.1", "typescript": "~5.5.4", "vite": "^5.3.5", From bf3e9e878998613a5ec794090b8722394fcc8f1f Mon Sep 17 00:00:00 2001 From: Dimitris Marlagkoutsos Date: Tue, 10 Sep 2024 14:19:23 +0100 Subject: [PATCH 03/15] Fix endoify file type --- packages/shims/src/{endoify.js => endoify.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/shims/src/{endoify.js => endoify.ts} (100%) diff --git a/packages/shims/src/endoify.js b/packages/shims/src/endoify.ts similarity index 100% rename from packages/shims/src/endoify.js rename to packages/shims/src/endoify.ts From 8d4a113c000c4cfd50f620da0605c2885659a86d Mon Sep 17 00:00:00 2001 From: Dimitris Marlagkoutsos Date: Tue, 10 Sep 2024 14:25:42 +0100 Subject: [PATCH 04/15] Add lint commands on packages/streams --- packages/streams/.eslintrc.cjs | 23 +++++++++++++++++++++++ packages/streams/package.json | 27 +++++++++++++++++++++++---- 2 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 packages/streams/.eslintrc.cjs diff --git a/packages/streams/.eslintrc.cjs b/packages/streams/.eslintrc.cjs new file mode 100644 index 000000000..2b4878843 --- /dev/null +++ b/packages/streams/.eslintrc.cjs @@ -0,0 +1,23 @@ +module.exports = { + extends: ['../../.eslintrc.cjs'], + + // overrides: [ + // { + // files: ['src/**/*.ts'], + // globals: { + // chrome: 'readonly', + // clients: 'readonly', + // Compartment: 'readonly', + // }, + // }, + + // { + // files: ['vite.config.ts'], + // parserOptions: { + // sourceType: 'module', + // tsconfigRootDir: __dirname, + // project: ['./tsconfig.scripts.json'], + // }, + // }, + // ], +}; diff --git a/packages/streams/package.json b/packages/streams/package.json index b5d4e971e..7f74a77d8 100644 --- a/packages/streams/package.json +++ b/packages/streams/package.json @@ -33,6 +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 lint:dependencies", + "lint:ci": "yarn lint", + "lint:dependencies": "depcheck", + "lint:eslint": "eslint . --cache --ext js,mjs,cjs,ts,mts,cts", + "lint: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:clean": "yarn test --no-cache --coverage.clean", @@ -43,21 +49,34 @@ "dependencies": { "@endo/promise-kit": "^1.1.4", "@endo/stream": "^1.2.2", - "@metamask/utils": "^9.1.0" + "@metamask/utils": "^9.1.0", + "ses": "^1.7.0" }, "devDependencies": { "@arethetypeswrong/cli": "^0.15.3", "@metamask/auto-changelog": "^3.4.4", + "@metamask/eslint-config": "^13.0.0", + "@metamask/eslint-config-nodejs": "^13.0.0", + "@metamask/eslint-config-typescript": "^13.0.0", "@ocap/test-utils": "workspace:^", "@ts-bridge/cli": "^0.3.0", "@ts-bridge/shims": "^0.1.1", "@types/jsdom": "^21.1.7", - "@vitest/coverage-v8": "^2.0.5", - "deepmerge": "^4.3.1", + "@typescript-eslint/eslint-plugin": "^8.1.0", + "@typescript-eslint/parser": "^8.1.0", + "depcheck": "^1.4.7", + "eslint": "^8.57.0", + "eslint-config-prettier": "^8.8.0", + "eslint-plugin-import-x": "^0.5.1", + "eslint-plugin-jsdoc": "^47.0.2", + "eslint-plugin-n": "^16.6.2", + "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-promise": "^6.1.1", + "eslint-plugin-vitest": "^0.4.1", "jsdom": "^24.1.1", + "prettier": "^2.7.1", "rimraf": "^6.0.1", "typedoc": "^0.24.8", - "typedoc-plugin-missing-exports": "^2.0.0", "typescript": "~5.5.4", "vite": "^5.3.5", "vitest": "^2.0.5" From f3c1f0859508fa9333a653b56cb2335b8d920dc1 Mon Sep 17 00:00:00 2001 From: Dimitris Marlagkoutsos Date: Tue, 10 Sep 2024 14:27:36 +0100 Subject: [PATCH 05/15] Move ses to dev deps --- packages/streams/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/streams/package.json b/packages/streams/package.json index 7f74a77d8..53d9adafc 100644 --- a/packages/streams/package.json +++ b/packages/streams/package.json @@ -49,8 +49,7 @@ "dependencies": { "@endo/promise-kit": "^1.1.4", "@endo/stream": "^1.2.2", - "@metamask/utils": "^9.1.0", - "ses": "^1.7.0" + "@metamask/utils": "^9.1.0" }, "devDependencies": { "@arethetypeswrong/cli": "^0.15.3", @@ -76,6 +75,7 @@ "jsdom": "^24.1.1", "prettier": "^2.7.1", "rimraf": "^6.0.1", + "ses": "^1.7.0", "typedoc": "^0.24.8", "typescript": "~5.5.4", "vite": "^5.3.5", From 376836f022ad78e3e6baf3be4b292328839ca2b6 Mon Sep 17 00:00:00 2001 From: Dimitris Marlagkoutsos Date: Tue, 10 Sep 2024 14:30:35 +0100 Subject: [PATCH 06/15] Add lint commands on packages/test-utils --- packages/test-utils/.eslintrc.cjs | 23 +++++++++++++++++++++++ packages/test-utils/package.json | 22 +++++++++++++++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 packages/test-utils/.eslintrc.cjs diff --git a/packages/test-utils/.eslintrc.cjs b/packages/test-utils/.eslintrc.cjs new file mode 100644 index 000000000..2b4878843 --- /dev/null +++ b/packages/test-utils/.eslintrc.cjs @@ -0,0 +1,23 @@ +module.exports = { + extends: ['../../.eslintrc.cjs'], + + // overrides: [ + // { + // files: ['src/**/*.ts'], + // globals: { + // chrome: 'readonly', + // clients: 'readonly', + // Compartment: 'readonly', + // }, + // }, + + // { + // files: ['vite.config.ts'], + // parserOptions: { + // sourceType: 'module', + // tsconfigRootDir: __dirname, + // project: ['./tsconfig.scripts.json'], + // }, + // }, + // ], +}; diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index b4d43eb12..040a332bb 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -14,11 +14,31 @@ }, "scripts": { "clean": "rimraf --glob ./dist './*.tsbuildinfo'", + "lint": "yarn lint:eslint && yarn lint:misc --check && yarn lint:dependencies", + "lint:ci": "yarn lint", + "lint:dependencies": "depcheck", + "lint:eslint": "eslint . --cache --ext js,mjs,cjs,ts,mts,cts", + "lint: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", "test": "echo 'No tests.' && exit 0" }, "devDependencies": { + "@metamask/eslint-config": "^13.0.0", + "@metamask/eslint-config-nodejs": "^13.0.0", + "@metamask/eslint-config-typescript": "^13.0.0", + "@typescript-eslint/eslint-plugin": "^8.1.0", + "@typescript-eslint/parser": "^8.1.0", + "depcheck": "^1.4.7", + "eslint": "^8.57.0", + "eslint-config-prettier": "^8.8.0", + "eslint-plugin-import-x": "^0.5.1", + "eslint-plugin-jsdoc": "^47.0.2", + "eslint-plugin-n": "^16.6.2", + "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-promise": "^6.1.1", + "eslint-plugin-vitest": "^0.4.1", + "prettier": "^2.7.1", "rimraf": "^6.0.1", - "ses": "^1.7.0", "typescript": "~5.5.4", "vitest": "^2.0.5" }, From 3b8bd370e4f72c890103565069b9fff3d6ab3031 Mon Sep 17 00:00:00 2001 From: Dimitris Marlagkoutsos Date: Tue, 10 Sep 2024 14:37:50 +0100 Subject: [PATCH 07/15] Update root lint commands to call package specific --- package.json | 12 +-- vitest.config.packages.js | 2 +- yarn.lock | 204 +++++++++++++------------------------- 3 files changed, 74 insertions(+), 144 deletions(-) diff --git a/package.json b/package.json index 8a7e6c75f..15dd5cba3 100644 --- a/package.json +++ b/package.json @@ -21,12 +21,12 @@ "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 lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies", - "lint:dependencies": "depcheck && yarn dedupe --check", - "lint:dependencies:fix": "depcheck && yarn dedupe", + "lint": "yarn workspaces foreach --all --parallel run lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies", + "lint:ci": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies", + "lint:dependencies": "yarn workspaces foreach --all --parallel --verbose run lint:dependencies && yarn dedupe --check", "lint:eslint": "eslint . --cache --ext js,mjs,cjs,ts,mts,cts", - "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix && yarn lint:dependencies:fix", - "lint:misc": "prettier '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path .gitignore", + "lint:fix": "yarn workspaces foreach --all --parallel run lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix && yarn dedupe", + "lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path .gitignore", "prepack": "./scripts/prepack.sh", "test": "yarn workspaces foreach --all --parallel --verbose run test", "test:clean": "yarn workspaces foreach --all --parallel --verbose run test:clean && yarn test", @@ -47,7 +47,7 @@ "@typescript-eslint/eslint-plugin": "^8.1.0", "@typescript-eslint/parser": "^8.1.0", "@yarnpkg/types": "^4.0.0", - "depcheck": "^1.4.3", + "depcheck": "^1.4.7", "eslint": "^8.57.0", "eslint-config-prettier": "^8.8.0", "eslint-plugin-import-x": "^0.5.1", diff --git a/vitest.config.packages.js b/vitest.config.packages.js index 530e6be21..67711d0ad 100644 --- a/vitest.config.packages.js +++ b/vitest.config.packages.js @@ -2,8 +2,8 @@ // eslint-disable-next-line spaced-comment /// -/* eslint-disable jsdoc/valid-types, import-x/namespace */ import path from 'path'; +// eslint-disable-next-line import-x/namespace import { defineConfig } from 'vite'; import tsconfigPathsPlugin from 'vite-tsconfig-paths'; diff --git a/yarn.lock b/yarn.lock index 7587fa559..5b11628d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -206,7 +206,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.6, @babel/parser@npm:^7.24.4, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.25.0, @babel/parser@npm:^7.25.3": +"@babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.6, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.25.0, @babel/parser@npm:^7.25.3": version: 7.25.3 resolution: "@babel/parser@npm:7.25.3" dependencies: @@ -254,13 +254,6 @@ __metadata: languageName: node linkType: hard -"@bcoe/v8-coverage@npm:^0.2.3": - version: 0.2.3 - resolution: "@bcoe/v8-coverage@npm:0.2.3" - checksum: 10/1a1f0e356a3bb30b5f1ced6f79c413e6ebacf130421f15fac5fcd8be5ddf98aedb4404d7f5624e3285b700e041f9ef938321f3ca4d359d5b716f96afa120d88d - languageName: node - linkType: hard - "@colors/colors@npm:1.5.0": version: 1.5.0 resolution: "@colors/colors@npm:1.5.0" @@ -706,13 +699,6 @@ __metadata: languageName: node linkType: hard -"@istanbuljs/schema@npm:^0.1.2": - version: 0.1.3 - resolution: "@istanbuljs/schema@npm:0.1.3" - checksum: 10/a9b1e49acdf5efc2f5b2359f2df7f90c5c725f2656f16099e8b2cd3a000619ecca9fc48cf693ba789cf0fd989f6e0df6a22bc05574be4223ecdbb7997d04384b - languageName: node - linkType: hard - "@jridgewell/gen-mapping@npm:^0.3.5": version: 0.3.5 resolution: "@jridgewell/gen-mapping@npm:0.3.5" @@ -745,7 +731,7 @@ __metadata: languageName: node linkType: hard -"@jridgewell/trace-mapping@npm:^0.3.23, @jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": +"@jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": version: 0.3.25 resolution: "@jridgewell/trace-mapping@npm:0.3.25" dependencies: @@ -1251,24 +1237,35 @@ __metadata: resolution: "@ocap/extension@workspace:packages/extension" dependencies: "@arethetypeswrong/cli": "npm:^0.15.3" - "@endo/lockdown": "npm:^1.0.9" + "@endo/eventual-send": "npm:^1.2.4" "@endo/promise-kit": "npm:^1.1.4" "@metamask/auto-changelog": "npm:^3.4.4" + "@metamask/eslint-config": "npm:^13.0.0" + "@metamask/eslint-config-nodejs": "npm:^13.0.0" + "@metamask/eslint-config-typescript": "npm:^13.0.0" "@metamask/snaps-utils": "npm:^7.8.0" "@metamask/utils": "npm:^9.1.0" "@ocap/shims": "workspace:^" "@ocap/streams": "workspace:^" "@ocap/test-utils": "workspace:^" "@types/chrome": "npm:^0.0.268" - "@vitest/coverage-v8": "npm:^2.0.5" + "@typescript-eslint/eslint-plugin": "npm:^8.1.0" + "@typescript-eslint/parser": "npm:^8.1.0" cheerio: "npm:^1.0.0-rc.12" - deepmerge: "npm:^4.3.1" + depcheck: "npm:^1.4.7" + eslint: "npm:^8.57.0" + eslint-config-prettier: "npm:^8.8.0" + eslint-plugin-import-x: "npm:^0.5.1" + eslint-plugin-jsdoc: "npm:^47.0.2" + eslint-plugin-n: "npm:^16.6.2" + eslint-plugin-prettier: "npm:^4.2.1" + eslint-plugin-promise: "npm:^6.1.1" + eslint-plugin-vitest: "npm:^0.4.1" jsdom: "npm:^24.1.1" prettier: "npm:^2.7.1" rimraf: "npm:^6.0.1" ses: "npm:^1.7.0" typedoc: "npm:^0.24.8" - typedoc-plugin-missing-exports: "npm:^2.0.0" typescript: "npm:~5.5.4" vite: "npm:^5.3.5" vite-plugin-static-copy: "npm:^1.0.6" @@ -1294,7 +1291,7 @@ __metadata: "@typescript-eslint/eslint-plugin": "npm:^8.1.0" "@typescript-eslint/parser": "npm:^8.1.0" "@yarnpkg/types": "npm:^4.0.0" - depcheck: "npm:^1.4.3" + depcheck: "npm:^1.4.7" eslint: "npm:^8.57.0" eslint-config-prettier: "npm:^8.8.0" eslint-plugin-import-x: "npm:^0.5.1" @@ -1324,7 +1321,21 @@ __metadata: "@endo/eventual-send": "npm:^1.2.4" "@endo/lockdown": "npm:^1.0.9" "@metamask/auto-changelog": "npm:^3.4.4" - deepmerge: "npm:^4.3.1" + "@metamask/eslint-config": "npm:^13.0.0" + "@metamask/eslint-config-nodejs": "npm:^13.0.0" + "@metamask/eslint-config-typescript": "npm:^13.0.0" + "@typescript-eslint/eslint-plugin": "npm:^8.1.0" + "@typescript-eslint/parser": "npm:^8.1.0" + depcheck: "npm:^1.4.7" + eslint: "npm:^8.57.0" + eslint-config-prettier: "npm:^8.8.0" + eslint-plugin-import-x: "npm:^0.5.1" + eslint-plugin-jsdoc: "npm:^47.0.2" + eslint-plugin-n: "npm:^16.6.2" + eslint-plugin-prettier: "npm:^4.2.1" + eslint-plugin-promise: "npm:^6.1.1" + eslint-plugin-vitest: "npm:^0.4.1" + prettier: "npm:^2.7.1" rimraf: "npm:^6.0.1" ses: "npm:^1.7.0" typescript: "npm:~5.5.4" @@ -1341,17 +1352,30 @@ __metadata: "@endo/promise-kit": "npm:^1.1.4" "@endo/stream": "npm:^1.2.2" "@metamask/auto-changelog": "npm:^3.4.4" + "@metamask/eslint-config": "npm:^13.0.0" + "@metamask/eslint-config-nodejs": "npm:^13.0.0" + "@metamask/eslint-config-typescript": "npm:^13.0.0" "@metamask/utils": "npm:^9.1.0" "@ocap/test-utils": "workspace:^" "@ts-bridge/cli": "npm:^0.3.0" "@ts-bridge/shims": "npm:^0.1.1" "@types/jsdom": "npm:^21.1.7" - "@vitest/coverage-v8": "npm:^2.0.5" - deepmerge: "npm:^4.3.1" + "@typescript-eslint/eslint-plugin": "npm:^8.1.0" + "@typescript-eslint/parser": "npm:^8.1.0" + depcheck: "npm:^1.4.7" + eslint: "npm:^8.57.0" + eslint-config-prettier: "npm:^8.8.0" + eslint-plugin-import-x: "npm:^0.5.1" + eslint-plugin-jsdoc: "npm:^47.0.2" + eslint-plugin-n: "npm:^16.6.2" + eslint-plugin-prettier: "npm:^4.2.1" + eslint-plugin-promise: "npm:^6.1.1" + eslint-plugin-vitest: "npm:^0.4.1" jsdom: "npm:^24.1.1" + prettier: "npm:^2.7.1" rimraf: "npm:^6.0.1" + ses: "npm:^1.7.0" typedoc: "npm:^0.24.8" - typedoc-plugin-missing-exports: "npm:^2.0.0" typescript: "npm:~5.5.4" vite: "npm:^5.3.5" vitest: "npm:^2.0.5" @@ -1362,8 +1386,22 @@ __metadata: version: 0.0.0-use.local resolution: "@ocap/test-utils@workspace:packages/test-utils" dependencies: + "@metamask/eslint-config": "npm:^13.0.0" + "@metamask/eslint-config-nodejs": "npm:^13.0.0" + "@metamask/eslint-config-typescript": "npm:^13.0.0" + "@typescript-eslint/eslint-plugin": "npm:^8.1.0" + "@typescript-eslint/parser": "npm:^8.1.0" + depcheck: "npm:^1.4.7" + eslint: "npm:^8.57.0" + eslint-config-prettier: "npm:^8.8.0" + eslint-plugin-import-x: "npm:^0.5.1" + eslint-plugin-jsdoc: "npm:^47.0.2" + eslint-plugin-n: "npm:^16.6.2" + eslint-plugin-prettier: "npm:^4.2.1" + eslint-plugin-promise: "npm:^6.1.1" + eslint-plugin-vitest: "npm:^0.4.1" + prettier: "npm:^2.7.1" rimraf: "npm:^6.0.1" - ses: "npm:^1.7.0" typescript: "npm:~5.5.4" vitest: "npm:^2.0.5" languageName: unknown @@ -1980,28 +2018,6 @@ __metadata: languageName: node linkType: hard -"@vitest/coverage-v8@npm:^2.0.5": - version: 2.0.5 - resolution: "@vitest/coverage-v8@npm:2.0.5" - dependencies: - "@ampproject/remapping": "npm:^2.3.0" - "@bcoe/v8-coverage": "npm:^0.2.3" - debug: "npm:^4.3.5" - istanbul-lib-coverage: "npm:^3.2.2" - istanbul-lib-report: "npm:^3.0.1" - istanbul-lib-source-maps: "npm:^5.0.6" - istanbul-reports: "npm:^3.1.7" - magic-string: "npm:^0.30.10" - magicast: "npm:^0.3.4" - std-env: "npm:^3.7.0" - test-exclude: "npm:^7.0.1" - tinyrainbow: "npm:^1.2.0" - peerDependencies: - vitest: 2.0.5 - checksum: 10/bb774d1a52b85adf94dcf62dc9684c59bd6aba6f8d43ce4d4afa06e3ca85651ec217f74842c0c4a81ea0158f029e484055207869e5d741cfbc3119257399fb83 - languageName: node - linkType: hard - "@vitest/expect@npm:2.0.5": version: 2.0.5 resolution: "@vitest/expect@npm:2.0.5" @@ -2888,7 +2904,7 @@ __metadata: languageName: node linkType: hard -"deepmerge@npm:^4.2.2, deepmerge@npm:^4.3.1": +"deepmerge@npm:^4.2.2": version: 4.3.1 resolution: "deepmerge@npm:4.3.1" checksum: 10/058d9e1b0ff1a154468bf3837aea436abcfea1ba1d165ddaaf48ca93765fdd01a30d33c36173da8fbbed951dd0a267602bc782fe288b0fc4b7e1e7091afc4529 @@ -2902,7 +2918,7 @@ __metadata: languageName: node linkType: hard -"depcheck@npm:^1.4.3": +"depcheck@npm:^1.4.7": version: 1.4.7 resolution: "depcheck@npm:1.4.7" dependencies: @@ -3902,7 +3918,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.4.1": +"glob@npm:^10.2.2, glob@npm:^10.3.10": version: 10.4.5 resolution: "glob@npm:10.4.5" dependencies: @@ -4093,13 +4109,6 @@ __metadata: languageName: node linkType: hard -"html-escaper@npm:^2.0.0": - version: 2.0.2 - resolution: "html-escaper@npm:2.0.2" - checksum: 10/034d74029dcca544a34fb6135e98d427acd73019796ffc17383eaa3ec2fe1c0471dcbbc8f8ed39e46e86d43ccd753a160631615e4048285e313569609b66d5b7 - languageName: node - linkType: hard - "htmlparser2@npm:^9.1.0": version: 9.1.0 resolution: "htmlparser2@npm:9.1.0" @@ -4407,45 +4416,6 @@ __metadata: languageName: node linkType: hard -"istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.2": - version: 3.2.2 - resolution: "istanbul-lib-coverage@npm:3.2.2" - checksum: 10/40bbdd1e937dfd8c830fa286d0f665e81b7a78bdabcd4565f6d5667c99828bda3db7fb7ac6b96a3e2e8a2461ddbc5452d9f8bc7d00cb00075fa6a3e99f5b6a81 - languageName: node - linkType: hard - -"istanbul-lib-report@npm:^3.0.0, istanbul-lib-report@npm:^3.0.1": - version: 3.0.1 - resolution: "istanbul-lib-report@npm:3.0.1" - dependencies: - istanbul-lib-coverage: "npm:^3.0.0" - make-dir: "npm:^4.0.0" - supports-color: "npm:^7.1.0" - checksum: 10/86a83421ca1cf2109a9f6d193c06c31ef04a45e72a74579b11060b1e7bb9b6337a4e6f04abfb8857e2d569c271273c65e855ee429376a0d7c91ad91db42accd1 - languageName: node - linkType: hard - -"istanbul-lib-source-maps@npm:^5.0.6": - version: 5.0.6 - resolution: "istanbul-lib-source-maps@npm:5.0.6" - dependencies: - "@jridgewell/trace-mapping": "npm:^0.3.23" - debug: "npm:^4.1.1" - istanbul-lib-coverage: "npm:^3.0.0" - checksum: 10/569dd0a392ee3464b1fe1accbaef5cc26de3479eacb5b91d8c67ebb7b425d39fd02247d85649c3a0e9c29b600809fa60b5af5a281a75a89c01f385b1e24823a2 - languageName: node - linkType: hard - -"istanbul-reports@npm:^3.1.7": - version: 3.1.7 - resolution: "istanbul-reports@npm:3.1.7" - dependencies: - html-escaper: "npm:^2.0.0" - istanbul-lib-report: "npm:^3.0.0" - checksum: 10/f1faaa4684efaf57d64087776018d7426312a59aa6eeb4e0e3a777347d23cd286ad18f427e98f0e3dee666103d7404c9d7abc5f240406a912fa16bd6695437fa - languageName: node - linkType: hard - "jackspeak@npm:^3.1.2": version: 3.4.3 resolution: "jackspeak@npm:3.4.3" @@ -4750,26 +4720,6 @@ __metadata: languageName: node linkType: hard -"magicast@npm:^0.3.4": - version: 0.3.4 - resolution: "magicast@npm:0.3.4" - dependencies: - "@babel/parser": "npm:^7.24.4" - "@babel/types": "npm:^7.24.0" - source-map-js: "npm:^1.2.0" - checksum: 10/704f86639b01c8e063155408cb181d89d4444db3a4a473fb501107f30f19d9c39a159dd315ef9e54a22291c090170044efd9b49a9b3ab8d6deb948a9c99d90b3 - languageName: node - linkType: hard - -"make-dir@npm:^4.0.0": - version: 4.0.0 - resolution: "make-dir@npm:4.0.0" - dependencies: - semver: "npm:^7.5.3" - checksum: 10/bf0731a2dd3aab4db6f3de1585cea0b746bb73eb5a02e3d8d72757e376e64e6ada190b1eddcde5b2f24a81b688a9897efd5018737d05e02e2a671dda9cff8a8a - languageName: node - linkType: hard - "make-fetch-happen@npm:^13.0.0": version: 13.0.1 resolution: "make-fetch-happen@npm:13.0.1" @@ -6315,17 +6265,6 @@ __metadata: languageName: node linkType: hard -"test-exclude@npm:^7.0.1": - version: 7.0.1 - resolution: "test-exclude@npm:7.0.1" - dependencies: - "@istanbuljs/schema": "npm:^0.1.2" - glob: "npm:^10.4.1" - minimatch: "npm:^9.0.4" - checksum: 10/e6f6f4e1df2e7810e082e8d7dfc53be51a931e6e87925f5e1c2ef92cc1165246ba3bf2dae6b5d86251c16925683dba906bd41e40169ebc77120a2d1b5a0dbbe0 - languageName: node - linkType: hard - "text-table@npm:^0.2.0": version: 0.2.0 resolution: "text-table@npm:0.2.0" @@ -6469,15 +6408,6 @@ __metadata: languageName: node linkType: hard -"typedoc-plugin-missing-exports@npm:^2.0.0": - version: 2.3.0 - resolution: "typedoc-plugin-missing-exports@npm:2.3.0" - peerDependencies: - typedoc: 0.24.x || 0.25.x - checksum: 10/83ff8affd82fa39a81931e825ef31b51b7470613c71601fde6ff413a5c7571e30734698092a38a437f12c5d3264010696ce9ca806d43485aa11e8208cb4cb323 - languageName: node - linkType: hard - "typedoc@npm:^0.24.8": version: 0.24.8 resolution: "typedoc@npm:0.24.8" From 388e196fb58be8494065ed2db91a51871bc46050 Mon Sep 17 00:00:00 2001 From: Dimitris Marlagkoutsos Date: Tue, 10 Sep 2024 14:46:29 +0100 Subject: [PATCH 08/15] clean --- packages/extension/.eslintrc.cjs | 6 +++--- packages/streams/.eslintrc.cjs | 20 -------------------- packages/test-utils/.eslintrc.cjs | 20 -------------------- 3 files changed, 3 insertions(+), 43 deletions(-) diff --git a/packages/extension/.eslintrc.cjs b/packages/extension/.eslintrc.cjs index 8dea78f23..c747e0b88 100644 --- a/packages/extension/.eslintrc.cjs +++ b/packages/extension/.eslintrc.cjs @@ -5,9 +5,9 @@ module.exports = { { files: ['src/**/*.ts'], globals: { - // chrome: 'readonly', - // clients: 'readonly', - // Compartment: 'readonly', + chrome: 'readonly', + clients: 'readonly', + Compartment: 'readonly', }, }, diff --git a/packages/streams/.eslintrc.cjs b/packages/streams/.eslintrc.cjs index 2b4878843..165e7042e 100644 --- a/packages/streams/.eslintrc.cjs +++ b/packages/streams/.eslintrc.cjs @@ -1,23 +1,3 @@ module.exports = { extends: ['../../.eslintrc.cjs'], - - // overrides: [ - // { - // files: ['src/**/*.ts'], - // globals: { - // chrome: 'readonly', - // clients: 'readonly', - // Compartment: 'readonly', - // }, - // }, - - // { - // files: ['vite.config.ts'], - // parserOptions: { - // sourceType: 'module', - // tsconfigRootDir: __dirname, - // project: ['./tsconfig.scripts.json'], - // }, - // }, - // ], }; diff --git a/packages/test-utils/.eslintrc.cjs b/packages/test-utils/.eslintrc.cjs index 2b4878843..165e7042e 100644 --- a/packages/test-utils/.eslintrc.cjs +++ b/packages/test-utils/.eslintrc.cjs @@ -1,23 +1,3 @@ module.exports = { extends: ['../../.eslintrc.cjs'], - - // overrides: [ - // { - // files: ['src/**/*.ts'], - // globals: { - // chrome: 'readonly', - // clients: 'readonly', - // Compartment: 'readonly', - // }, - // }, - - // { - // files: ['vite.config.ts'], - // parserOptions: { - // sourceType: 'module', - // tsconfigRootDir: __dirname, - // project: ['./tsconfig.scripts.json'], - // }, - // }, - // ], }; From 4efc76068a361d89815eaa78df7d674cd8a5107d Mon Sep 17 00:00:00 2001 From: Dimitris Marlagkoutsos Date: Tue, 10 Sep 2024 14:53:15 +0100 Subject: [PATCH 09/15] add missing package --- package.json | 1 + yarn.lock | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 139 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 15dd5cba3..00b8231c7 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "@types/node": "^18.18.14", "@typescript-eslint/eslint-plugin": "^8.1.0", "@typescript-eslint/parser": "^8.1.0", + "@vitest/coverage-v8": "^2.0.5", "@yarnpkg/types": "^4.0.0", "depcheck": "^1.4.7", "eslint": "^8.57.0", diff --git a/yarn.lock b/yarn.lock index 5b11628d0..9bb7bc9f8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -217,6 +217,17 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.25.4": + version: 7.25.6 + resolution: "@babel/parser@npm:7.25.6" + dependencies: + "@babel/types": "npm:^7.25.6" + bin: + parser: ./bin/babel-parser.js + checksum: 10/830aab72116aa14eb8d61bfa8f9d69fc8f3a43d909ce993cb4350ae14d3af1a2f740a54410a22d821c48a253263643dfecbc094f9608e6a70ce9ff3c0bbfe91a + languageName: node + linkType: hard + "@babel/template@npm:^7.25.0": version: 7.25.0 resolution: "@babel/template@npm:7.25.0" @@ -254,6 +265,24 @@ __metadata: languageName: node linkType: hard +"@babel/types@npm:^7.25.4, @babel/types@npm:^7.25.6": + version: 7.25.6 + resolution: "@babel/types@npm:7.25.6" + dependencies: + "@babel/helper-string-parser": "npm:^7.24.8" + "@babel/helper-validator-identifier": "npm:^7.24.7" + to-fast-properties: "npm:^2.0.0" + checksum: 10/7b54665e1b51f525fe0f451efdd9fe7a4a6dfba3fd4956c3530bc77336b66ffe3d78c093796ed044119b5d213176af7cf326f317a2057c538d575c6cefcb3562 + languageName: node + linkType: hard + +"@bcoe/v8-coverage@npm:^0.2.3": + version: 0.2.3 + resolution: "@bcoe/v8-coverage@npm:0.2.3" + checksum: 10/1a1f0e356a3bb30b5f1ced6f79c413e6ebacf130421f15fac5fcd8be5ddf98aedb4404d7f5624e3285b700e041f9ef938321f3ca4d359d5b716f96afa120d88d + languageName: node + linkType: hard + "@colors/colors@npm:1.5.0": version: 1.5.0 resolution: "@colors/colors@npm:1.5.0" @@ -699,6 +728,13 @@ __metadata: languageName: node linkType: hard +"@istanbuljs/schema@npm:^0.1.2": + version: 0.1.3 + resolution: "@istanbuljs/schema@npm:0.1.3" + checksum: 10/a9b1e49acdf5efc2f5b2359f2df7f90c5c725f2656f16099e8b2cd3a000619ecca9fc48cf693ba789cf0fd989f6e0df6a22bc05574be4223ecdbb7997d04384b + languageName: node + linkType: hard + "@jridgewell/gen-mapping@npm:^0.3.5": version: 0.3.5 resolution: "@jridgewell/gen-mapping@npm:0.3.5" @@ -731,7 +767,7 @@ __metadata: languageName: node linkType: hard -"@jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": +"@jridgewell/trace-mapping@npm:^0.3.23, @jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": version: 0.3.25 resolution: "@jridgewell/trace-mapping@npm:0.3.25" dependencies: @@ -1290,6 +1326,7 @@ __metadata: "@types/node": "npm:^18.18.14" "@typescript-eslint/eslint-plugin": "npm:^8.1.0" "@typescript-eslint/parser": "npm:^8.1.0" + "@vitest/coverage-v8": "npm:^2.0.5" "@yarnpkg/types": "npm:^4.0.0" depcheck: "npm:^1.4.7" eslint: "npm:^8.57.0" @@ -2018,6 +2055,28 @@ __metadata: languageName: node linkType: hard +"@vitest/coverage-v8@npm:^2.0.5": + version: 2.0.5 + resolution: "@vitest/coverage-v8@npm:2.0.5" + dependencies: + "@ampproject/remapping": "npm:^2.3.0" + "@bcoe/v8-coverage": "npm:^0.2.3" + debug: "npm:^4.3.5" + istanbul-lib-coverage: "npm:^3.2.2" + istanbul-lib-report: "npm:^3.0.1" + istanbul-lib-source-maps: "npm:^5.0.6" + istanbul-reports: "npm:^3.1.7" + magic-string: "npm:^0.30.10" + magicast: "npm:^0.3.4" + std-env: "npm:^3.7.0" + test-exclude: "npm:^7.0.1" + tinyrainbow: "npm:^1.2.0" + peerDependencies: + vitest: 2.0.5 + checksum: 10/bb774d1a52b85adf94dcf62dc9684c59bd6aba6f8d43ce4d4afa06e3ca85651ec217f74842c0c4a81ea0158f029e484055207869e5d741cfbc3119257399fb83 + languageName: node + linkType: hard + "@vitest/expect@npm:2.0.5": version: 2.0.5 resolution: "@vitest/expect@npm:2.0.5" @@ -3918,7 +3977,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^10.2.2, glob@npm:^10.3.10": +"glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.4.1": version: 10.4.5 resolution: "glob@npm:10.4.5" dependencies: @@ -4109,6 +4168,13 @@ __metadata: languageName: node linkType: hard +"html-escaper@npm:^2.0.0": + version: 2.0.2 + resolution: "html-escaper@npm:2.0.2" + checksum: 10/034d74029dcca544a34fb6135e98d427acd73019796ffc17383eaa3ec2fe1c0471dcbbc8f8ed39e46e86d43ccd753a160631615e4048285e313569609b66d5b7 + languageName: node + linkType: hard + "htmlparser2@npm:^9.1.0": version: 9.1.0 resolution: "htmlparser2@npm:9.1.0" @@ -4416,6 +4482,45 @@ __metadata: languageName: node linkType: hard +"istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.2": + version: 3.2.2 + resolution: "istanbul-lib-coverage@npm:3.2.2" + checksum: 10/40bbdd1e937dfd8c830fa286d0f665e81b7a78bdabcd4565f6d5667c99828bda3db7fb7ac6b96a3e2e8a2461ddbc5452d9f8bc7d00cb00075fa6a3e99f5b6a81 + languageName: node + linkType: hard + +"istanbul-lib-report@npm:^3.0.0, istanbul-lib-report@npm:^3.0.1": + version: 3.0.1 + resolution: "istanbul-lib-report@npm:3.0.1" + dependencies: + istanbul-lib-coverage: "npm:^3.0.0" + make-dir: "npm:^4.0.0" + supports-color: "npm:^7.1.0" + checksum: 10/86a83421ca1cf2109a9f6d193c06c31ef04a45e72a74579b11060b1e7bb9b6337a4e6f04abfb8857e2d569c271273c65e855ee429376a0d7c91ad91db42accd1 + languageName: node + linkType: hard + +"istanbul-lib-source-maps@npm:^5.0.6": + version: 5.0.6 + resolution: "istanbul-lib-source-maps@npm:5.0.6" + dependencies: + "@jridgewell/trace-mapping": "npm:^0.3.23" + debug: "npm:^4.1.1" + istanbul-lib-coverage: "npm:^3.0.0" + checksum: 10/569dd0a392ee3464b1fe1accbaef5cc26de3479eacb5b91d8c67ebb7b425d39fd02247d85649c3a0e9c29b600809fa60b5af5a281a75a89c01f385b1e24823a2 + languageName: node + linkType: hard + +"istanbul-reports@npm:^3.1.7": + version: 3.1.7 + resolution: "istanbul-reports@npm:3.1.7" + dependencies: + html-escaper: "npm:^2.0.0" + istanbul-lib-report: "npm:^3.0.0" + checksum: 10/f1faaa4684efaf57d64087776018d7426312a59aa6eeb4e0e3a777347d23cd286ad18f427e98f0e3dee666103d7404c9d7abc5f240406a912fa16bd6695437fa + languageName: node + linkType: hard + "jackspeak@npm:^3.1.2": version: 3.4.3 resolution: "jackspeak@npm:3.4.3" @@ -4720,6 +4825,26 @@ __metadata: languageName: node linkType: hard +"magicast@npm:^0.3.4": + version: 0.3.5 + resolution: "magicast@npm:0.3.5" + dependencies: + "@babel/parser": "npm:^7.25.4" + "@babel/types": "npm:^7.25.4" + source-map-js: "npm:^1.2.0" + checksum: 10/3a2dba6b0bdde957797361d09c7931ebdc1b30231705360eeb40ed458d28e1c3112841c3ed4e1b87ceb28f741e333c7673cd961193aa9fdb4f4946b202e6205a + languageName: node + linkType: hard + +"make-dir@npm:^4.0.0": + version: 4.0.0 + resolution: "make-dir@npm:4.0.0" + dependencies: + semver: "npm:^7.5.3" + checksum: 10/bf0731a2dd3aab4db6f3de1585cea0b746bb73eb5a02e3d8d72757e376e64e6ada190b1eddcde5b2f24a81b688a9897efd5018737d05e02e2a671dda9cff8a8a + languageName: node + linkType: hard + "make-fetch-happen@npm:^13.0.0": version: 13.0.1 resolution: "make-fetch-happen@npm:13.0.1" @@ -6265,6 +6390,17 @@ __metadata: languageName: node linkType: hard +"test-exclude@npm:^7.0.1": + version: 7.0.1 + resolution: "test-exclude@npm:7.0.1" + dependencies: + "@istanbuljs/schema": "npm:^0.1.2" + glob: "npm:^10.4.1" + minimatch: "npm:^9.0.4" + checksum: 10/e6f6f4e1df2e7810e082e8d7dfc53be51a931e6e87925f5e1c2ef92cc1165246ba3bf2dae6b5d86251c16925683dba906bd41e40169ebc77120a2d1b5a0dbbe0 + languageName: node + linkType: hard + "text-table@npm:^0.2.0": version: 0.2.0 resolution: "text-table@npm:0.2.0" From 4e098878108c4c05f3b786ef839c6a01fa609199 Mon Sep 17 00:00:00 2001 From: Dimitris Marlagkoutsos Date: Tue, 10 Sep 2024 15:03:05 +0100 Subject: [PATCH 10/15] fix deduped --- yarn.lock | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9bb7bc9f8..f788ec267 100644 --- a/yarn.lock +++ b/yarn.lock @@ -206,18 +206,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.6, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.25.0, @babel/parser@npm:^7.25.3": - version: 7.25.3 - resolution: "@babel/parser@npm:7.25.3" - dependencies: - "@babel/types": "npm:^7.25.2" - bin: - parser: ./bin/babel-parser.js - checksum: 10/7bd57e89110bdc9cffe0ef2f2286f1cfb9bbb3aa1d9208c287e0bf6a1eb4cfe6ab33958876ebc59aafcbe3e2381c4449240fc7cc2ff32b79bc9db89cd52fc779 - languageName: node - linkType: hard - -"@babel/parser@npm:^7.25.4": +"@babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.6, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.25.0, @babel/parser@npm:^7.25.3, @babel/parser@npm:^7.25.4": version: 7.25.6 resolution: "@babel/parser@npm:7.25.6" dependencies: @@ -254,18 +243,7 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.17.0, @babel/types@npm:^7.23.0, @babel/types@npm:^7.24.0, @babel/types@npm:^7.24.7, @babel/types@npm:^7.25.0, @babel/types@npm:^7.25.2": - version: 7.25.2 - resolution: "@babel/types@npm:7.25.2" - dependencies: - "@babel/helper-string-parser": "npm:^7.24.8" - "@babel/helper-validator-identifier": "npm:^7.24.7" - to-fast-properties: "npm:^2.0.0" - checksum: 10/ccf5399db1dcd6dd87b84a6f7bc8dd241e04a326f4f038c973c26ccb69cd360c8f2276603f584c58fd94da95229313060b27baceb0d9b18a435742d3f616afd1 - languageName: node - linkType: hard - -"@babel/types@npm:^7.25.4, @babel/types@npm:^7.25.6": +"@babel/types@npm:^7.17.0, @babel/types@npm:^7.23.0, @babel/types@npm:^7.24.0, @babel/types@npm:^7.24.7, @babel/types@npm:^7.25.0, @babel/types@npm:^7.25.2, @babel/types@npm:^7.25.4, @babel/types@npm:^7.25.6": version: 7.25.6 resolution: "@babel/types@npm:7.25.6" dependencies: From 831c214f77f1a6d37c9dfbe934b091157f8a7482 Mon Sep 17 00:00:00 2001 From: Dimitris Marlagkoutsos Date: Tue, 10 Sep 2024 15:44:21 +0100 Subject: [PATCH 11/15] remove unused lint:ci --- package.json | 1 - packages/extension/package.json | 1 - packages/shims/package.json | 1 - packages/streams/package.json | 1 - packages/test-utils/package.json | 1 - 5 files changed, 5 deletions(-) diff --git a/package.json b/package.json index 00b8231c7..b178421a8 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ "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 workspaces foreach --all --parallel run lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies", - "lint:ci": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies", "lint:dependencies": "yarn workspaces foreach --all --parallel --verbose run lint:dependencies && yarn dedupe --check", "lint:eslint": "eslint . --cache --ext js,mjs,cjs,ts,mts,cts", "lint:fix": "yarn workspaces foreach --all --parallel run lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix && yarn dedupe", diff --git a/packages/extension/package.json b/packages/extension/package.json index ac5e4398d..74c9ce2db 100644 --- a/packages/extension/package.json +++ b/packages/extension/package.json @@ -18,7 +18,6 @@ "changelog:validate": "../../scripts/validate-changelog.sh @ocap/extension", "clean": "rimraf --glob ./dist './*.tsbuildinfo'", "lint": "yarn lint:eslint && yarn lint:misc --check && yarn lint:dependencies", - "lint:ci": "yarn lint", "lint:dependencies": "depcheck", "lint:eslint": "eslint . --cache --ext js,mjs,cjs,ts,mts,cts", "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write", diff --git a/packages/shims/package.json b/packages/shims/package.json index fb5c3ce39..e492467cb 100644 --- a/packages/shims/package.json +++ b/packages/shims/package.json @@ -24,7 +24,6 @@ "changelog:validate": "../../scripts/validate-changelog.sh @ocap/shims", "clean": "rimraf --glob ./dist './*.tsbuildinfo'", "lint": "yarn lint:eslint && yarn lint:misc --check && yarn lint:dependencies", - "lint:ci": "yarn lint", "lint:dependencies": "depcheck", "lint:eslint": "eslint . --cache --ext js,mjs,cjs,ts,mts,cts", "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write", diff --git a/packages/streams/package.json b/packages/streams/package.json index 53d9adafc..8764f69e0 100644 --- a/packages/streams/package.json +++ b/packages/streams/package.json @@ -34,7 +34,6 @@ "changelog:validate": "../../scripts/validate-changelog.sh streams", "clean": "rimraf --glob ./dist './*.tsbuildinfo'", "lint": "yarn lint:eslint && yarn lint:misc --check && yarn lint:dependencies", - "lint:ci": "yarn lint", "lint:dependencies": "depcheck", "lint:eslint": "eslint . --cache --ext js,mjs,cjs,ts,mts,cts", "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write", diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 040a332bb..dd78137a1 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -15,7 +15,6 @@ "scripts": { "clean": "rimraf --glob ./dist './*.tsbuildinfo'", "lint": "yarn lint:eslint && yarn lint:misc --check && yarn lint:dependencies", - "lint:ci": "yarn lint", "lint:dependencies": "depcheck", "lint:eslint": "eslint . --cache --ext js,mjs,cjs,ts,mts,cts", "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write", From 53b6340fe0c25bc4cd452103ee89ecabeb933f66 Mon Sep 17 00:00:00 2001 From: Dimitris Marlagkoutsos Date: Tue, 10 Sep 2024 15:53:43 +0100 Subject: [PATCH 12/15] Run constrains in packages lint commands --- packages/extension/package.json | 4 ++-- packages/shims/package.json | 4 ++-- packages/streams/package.json | 4 ++-- packages/test-utils/package.json | 4 ++-- yarn.config.cjs | 27 +++++++++++++++++++++++++++ 5 files changed, 35 insertions(+), 8 deletions(-) diff --git a/packages/extension/package.json b/packages/extension/package.json index 74c9ce2db..82967a8d2 100644 --- a/packages/extension/package.json +++ b/packages/extension/package.json @@ -17,10 +17,10 @@ "build:vite": "vite build --config vite.config.ts", "changelog:validate": "../../scripts/validate-changelog.sh @ocap/extension", "clean": "rimraf --glob ./dist './*.tsbuildinfo'", - "lint": "yarn lint:eslint && yarn lint:misc --check && yarn lint:dependencies", + "lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies", "lint:dependencies": "depcheck", "lint:eslint": "eslint . --cache --ext js,mjs,cjs,ts,mts,cts", - "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write", + "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix", "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": "vite --config vite.config.ts & vite build --watch --config vite.config.ts", diff --git a/packages/shims/package.json b/packages/shims/package.json index e492467cb..d58d646af 100644 --- a/packages/shims/package.json +++ b/packages/shims/package.json @@ -23,10 +23,10 @@ "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 lint:dependencies", + "lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies", "lint:dependencies": "depcheck", "lint:eslint": "eslint . --cache --ext js,mjs,cjs,ts,mts,cts", - "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write", + "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix", "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", diff --git a/packages/streams/package.json b/packages/streams/package.json index 8764f69e0..5face1522 100644 --- a/packages/streams/package.json +++ b/packages/streams/package.json @@ -33,10 +33,10 @@ "build:docs": "typedoc", "changelog:validate": "../../scripts/validate-changelog.sh streams", "clean": "rimraf --glob ./dist './*.tsbuildinfo'", - "lint": "yarn lint:eslint && yarn lint:misc --check && yarn lint:dependencies", + "lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies", "lint:dependencies": "depcheck", "lint:eslint": "eslint . --cache --ext js,mjs,cjs,ts,mts,cts", - "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write", + "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix", "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", diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index dd78137a1..49461010a 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -14,10 +14,10 @@ }, "scripts": { "clean": "rimraf --glob ./dist './*.tsbuildinfo'", - "lint": "yarn lint:eslint && yarn lint:misc --check && yarn lint:dependencies", + "lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies", "lint:dependencies": "depcheck", "lint:eslint": "eslint . --cache --ext js,mjs,cjs,ts,mts,cts", - "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write", + "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix", "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" }, diff --git a/yarn.config.cjs b/yarn.config.cjs index 77fe09994..94843ac57 100644 --- a/yarn.config.cjs +++ b/yarn.config.cjs @@ -194,6 +194,33 @@ module.exports = defineConfig({ // No non-root packages may have a "prepack" script. workspace.unset('scripts.prepack'); + // All packages except the root must have the same "lint" scripts. + expectWorkspaceField( + workspace, + 'scripts.lint', + 'yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies', + ); + expectWorkspaceField( + workspace, + 'scripts.lint:dependencies', + 'depcheck', + ); + expectWorkspaceField( + workspace, + 'scripts.lint:eslint', + 'eslint . --cache --ext js,mjs,cjs,ts,mts,cts', + ); + expectWorkspaceField( + workspace, + 'scripts.lint:fix', + 'yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix', + ); + expectWorkspaceField( + workspace, + 'scripts.lint:misc', + "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path .gitignore", + ); + // All non-root packages must have the same "test" script. if (!noBuildOrTests.includes(workspaceBasename)) { expectWorkspaceField( From 5f4d8aef9086d17cfc7efe4fe4069de9dc8bf662 Mon Sep 17 00:00:00 2001 From: Dimitris Marlagkoutsos Date: Tue, 10 Sep 2024 16:07:21 +0100 Subject: [PATCH 13/15] await building to catch the errors --- packages/shims/scripts/bundle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/shims/scripts/bundle.js b/packages/shims/scripts/bundle.js index a4e8d0e50..cd6e3cba2 100644 --- a/packages/shims/scripts/bundle.js +++ b/packages/shims/scripts/bundle.js @@ -20,7 +20,7 @@ const argv = Object.freeze([...process.argv]); await mkdir(distDir, { recursive: true }); await rimraf(`${distDir}/*`, { glob: true }); -generateEndoScriptBundle( +await generateEndoScriptBundle( path.resolve(srcDir, 'endoify.js'), path.resolve(distDir, `endoify.js`), { argv }, From d84a92b1517fe966e7afed8a1d5790e415082f80 Mon Sep 17 00:00:00 2001 From: Dimitris Marlagkoutsos Date: Tue, 10 Sep 2024 16:10:41 +0100 Subject: [PATCH 14/15] revert endoify filetype --- packages/shims/src/{endoify.ts => endoify.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/shims/src/{endoify.ts => endoify.js} (100%) diff --git a/packages/shims/src/endoify.ts b/packages/shims/src/endoify.js similarity index 100% rename from packages/shims/src/endoify.ts rename to packages/shims/src/endoify.js From e1cc04226cf443d55da0e3bfec6d1fcaacf726c5 Mon Sep 17 00:00:00 2001 From: Dimitris Marlagkoutsos Date: Tue, 10 Sep 2024 16:17:58 +0100 Subject: [PATCH 15/15] Run constraints fix first --- package.json | 2 +- packages/extension/package.json | 2 +- packages/shims/package.json | 2 +- packages/streams/package.json | 2 +- packages/test-utils/package.json | 2 +- yarn.config.cjs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index b178421a8..90bff2b5f 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "lint": "yarn workspaces foreach --all --parallel run lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies", "lint:dependencies": "yarn workspaces foreach --all --parallel --verbose run lint:dependencies && yarn dedupe --check", "lint:eslint": "eslint . --cache --ext js,mjs,cjs,ts,mts,cts", - "lint:fix": "yarn workspaces foreach --all --parallel run lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix && yarn dedupe", + "lint:fix": "yarn constraints --fix && yarn workspaces foreach --all --parallel run lint:eslint --fix && yarn lint:misc --write && yarn dedupe", "lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path .gitignore", "prepack": "./scripts/prepack.sh", "test": "yarn workspaces foreach --all --parallel --verbose run test", diff --git a/packages/extension/package.json b/packages/extension/package.json index 82967a8d2..68ca6c89d 100644 --- a/packages/extension/package.json +++ b/packages/extension/package.json @@ -20,7 +20,7 @@ "lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies", "lint:dependencies": "depcheck", "lint:eslint": "eslint . --cache --ext js,mjs,cjs,ts,mts,cts", - "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix", + "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", "start": "vite --config vite.config.ts & vite build --watch --config vite.config.ts", diff --git a/packages/shims/package.json b/packages/shims/package.json index d58d646af..1081d73ee 100644 --- a/packages/shims/package.json +++ b/packages/shims/package.json @@ -26,7 +26,7 @@ "lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies", "lint:dependencies": "depcheck", "lint:eslint": "eslint . --cache --ext js,mjs,cjs,ts,mts,cts", - "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix", + "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", diff --git a/packages/streams/package.json b/packages/streams/package.json index 5face1522..9e7c7d78c 100644 --- a/packages/streams/package.json +++ b/packages/streams/package.json @@ -36,7 +36,7 @@ "lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies", "lint:dependencies": "depcheck", "lint:eslint": "eslint . --cache --ext js,mjs,cjs,ts,mts,cts", - "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix", + "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", diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 49461010a..b62b3bfcd 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -17,7 +17,7 @@ "lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies", "lint:dependencies": "depcheck", "lint:eslint": "eslint . --cache --ext js,mjs,cjs,ts,mts,cts", - "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix", + "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", "test": "echo 'No tests.' && exit 0" }, diff --git a/yarn.config.cjs b/yarn.config.cjs index 94843ac57..049eddd63 100644 --- a/yarn.config.cjs +++ b/yarn.config.cjs @@ -213,7 +213,7 @@ module.exports = defineConfig({ expectWorkspaceField( workspace, 'scripts.lint:fix', - 'yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix', + 'yarn constraints --fix && yarn lint:eslint --fix && yarn lint:misc --write', ); expectWorkspaceField( workspace,