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
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,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 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: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 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",
"test:clean": "yarn workspaces foreach --all --parallel --verbose run test:clean && yarn test",
Expand All @@ -46,8 +45,9 @@
"@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.3",
"depcheck": "^1.4.7",
"eslint": "^8.57.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import-x": "^0.5.1",
Expand Down
24 changes: 20 additions & 4 deletions packages/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
"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 constraints && yarn lint:dependencies",
"lint:dependencies": "depcheck",
"lint:eslint": "eslint . --cache --ext js,mjs,cjs,ts,mts,cts",
"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",
"test": "vitest run --config vitest.config.ts",
Expand All @@ -26,7 +31,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",
Expand All @@ -37,16 +42,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",
Expand Down
2 changes: 0 additions & 2 deletions packages/extension/src/background.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
1 change: 0 additions & 1 deletion packages/extension/src/endoify.test.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
2 changes: 0 additions & 2 deletions packages/extension/src/endoify.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
/* eslint-disable import-x/extensions */
/* eslint-disable import-x/no-unassigned-import */
import '@ocap/shims/endoify';
21 changes: 20 additions & 1 deletion packages/shims/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
"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:dependencies": "depcheck",
"lint:eslint": "eslint . --cache --ext js,mjs,cjs,ts,mts,cts",
"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:clean": "yarn test --no-cache --coverage.clean",
Expand All @@ -38,7 +43,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",
Expand Down
2 changes: 1 addition & 1 deletion packages/shims/scripts/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const argv = Object.freeze([...process.argv]);
await mkdir(distDir, { recursive: true });
await rimraf(`${distDir}/*`, { glob: true });

generateEndoScriptBundle(
await generateEndoScriptBundle(
Copy link
Contributor

@SMotaal SMotaal Sep 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@grypez thanks for noticing the problem and @sirtimid for noticing and fixing the error I introduced in #40: 1370add#diff-4065a37c0be83e49f87d53ebab76253143887ef81dc53ff132b0e7337a9ededdR23

path.resolve(srcDir, 'endoify.js'),
path.resolve(distDir, `endoify.js`),
{ argv },
Expand Down
3 changes: 3 additions & 0 deletions packages/streams/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['../../.eslintrc.cjs'],
};
24 changes: 21 additions & 3 deletions packages/streams/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
"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:dependencies": "depcheck",
"lint:eslint": "eslint . --cache --ext js,mjs,cjs,ts,mts,cts",
"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:clean": "yarn test --no-cache --coverage.clean",
Expand All @@ -48,16 +53,29 @@
"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",
"ses": "^1.7.0",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.5.4",
"vite": "^5.3.5",
"vitest": "^2.0.5"
Expand Down
3 changes: 3 additions & 0 deletions packages/test-utils/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['../../.eslintrc.cjs'],
};
21 changes: 20 additions & 1 deletion packages/test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,30 @@
},
"scripts": {
"clean": "rimraf --glob ./dist './*.tsbuildinfo'",
"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 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"
},
"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"
},
Expand Down
2 changes: 1 addition & 1 deletion vitest.config.packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// eslint-disable-next-line spaced-comment
/// <reference types="vitest"/>

/* 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';

Expand Down
27 changes: 27 additions & 0 deletions yarn.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 constraints --fix && yarn lint:eslint --fix && yarn lint:misc --write',
);
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(
Expand Down
Loading