From 538e60890cd196490250476e008bf7fbbd12c650 Mon Sep 17 00:00:00 2001 From: Elliot Winkler Date: Tue, 11 Jun 2024 14:57:09 -0600 Subject: [PATCH 01/15] chore: Install Corepack as prereq in broken workflows A recent commit upgraded the version of Yarn to v4 and removed the Yarn binary from the repo, thereby requiring that Corepack be installed in order to install dependencies. The `build-lint-test` was updated to install Corepack, but not the documentation-related workflows, so they are failing. This commit fixes those workflows to install Corepack. It also cleans up some work that was done in previous commits: - In the `build-lint-test` workflow we ensure that `prepare` is run once per Node version we are testing and that `build` and `lint` use the latest Node version we are testing. - In steps where we are installing Node just to gain access to the `corepack` executable, we use `.nvmrc` (the version of Node we use for development) to know which version of Node to install rather than using the latest LTS (`lts/*`). For jobs that do not need to concern themselves with being run in multiple Node versions, this ensures that consistent Node versions are used in this step vs. the step that is used to simply restore the Yarn cache. - The checkout step always goes first, this way `.nvmrc` can be read. --- .github/workflows/build-lint-test.yml | 84 ++++++++++++++----------- .github/workflows/create-release-pr.yml | 6 +- .github/workflows/publish-docs.yml | 13 ++-- .github/workflows/publish-release.yml | 52 ++++++++++----- 4 files changed, 97 insertions(+), 58 deletions(-) diff --git a/.github/workflows/build-lint-test.yml b/.github/workflows/build-lint-test.yml index 0cf063594..fbaead2ac 100644 --- a/.github/workflows/build-lint-test.yml +++ b/.github/workflows/build-lint-test.yml @@ -7,41 +7,47 @@ jobs: prepare: name: Prepare runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x, 20.x] steps: - - name: Use Node.js + - uses: actions/checkout@v4 + - name: Install Corepack via Node uses: actions/setup-node@v4 with: - node-version: 'lts/*' + node-version-file: '.nvmrc' - name: Install Yarn run: corepack enable - - uses: actions/checkout@v4 - - name: Use Node.js and install dependencies + - name: Install Node.js ${{ matrix.node-version }} and restore Yarn cache uses: actions/setup-node@v4 with: - node-version: 'lts/*' + node-version: ${{ matrix.node-version }} cache: 'yarn' - - name: Install Yarn dependencies + - name: Install dependencies via Yarn run: yarn --immutable build: name: Build + needs: prepare runs-on: ubuntu-latest - needs: - - prepare + strategy: + matrix: + node-version: [20.x] steps: - - name: Use Node.js + - uses: actions/checkout@v4 + - name: Install Corepack via Node uses: actions/setup-node@v4 with: - node-version: 'lts/*' + node-version-file: '.nvmrc' - name: Install Yarn run: corepack enable - - uses: actions/checkout@v4 - - name: Use Node.js + - name: Install Node.js ${{ matrix.node-version }} and restore Yarn cache uses: actions/setup-node@v4 with: - node-version: 'lts/*' + node-version: ${{ matrix.node-version }} cache: 'yarn' - - run: yarn --immutable --immutable-cache + - name: Install dependencies via Yarn + run: yarn --immutable --immutable-cache - run: yarn build - name: Require clean working directory shell: bash @@ -53,23 +59,26 @@ jobs: lint: name: Lint + needs: prepare runs-on: ubuntu-latest - needs: - - prepare + strategy: + matrix: + node-version: [20.x] steps: - - name: Use Node.js + - uses: actions/checkout@v4 + - name: Install Corepack via Node uses: actions/setup-node@v4 with: - node-version: 'lts/*' + node-version-file: '.nvmrc' - name: Install Yarn run: corepack enable - - uses: actions/checkout@v4 - - name: Use Node.js + - name: Install Node.js ${{ matrix.node-version }} and restore Yarn cache uses: actions/setup-node@v4 with: - node-version: 'lts/*' + node-version: ${{ matrix.node-version }} cache: 'yarn' - - run: yarn --immutable --immutable-cache + - name: Install dependencies via Yarn + run: yarn --immutable --immutable-cache - run: yarn lint - name: Validate RC changelog if: ${{ startsWith(github.head_ref, 'release/') }} @@ -87,26 +96,26 @@ jobs: test: name: Test + needs: prepare runs-on: ubuntu-latest - needs: - - prepare strategy: matrix: node-version: [18.x, 20.x] steps: - - name: Use Node.js + - uses: actions/checkout@v4 + - name: Install Corepack via Node uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version-file: '.nvmrc' - name: Install Yarn run: corepack enable - - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} + - name: Install Node.js ${{ matrix.node-version }} and restore Yarn cache uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: 'yarn' - - run: yarn --immutable --immutable-cache + - name: Install dependencies via Yarn + run: yarn --immutable --immutable-cache - run: yarn test - name: Require clean working directory shell: bash @@ -118,31 +127,32 @@ jobs: compatibility-test: name: Compatibility test + needs: prepare runs-on: ubuntu-latest - needs: - - prepare strategy: matrix: node-version: [18.x, 20.x] steps: - - name: Use Node.js + - uses: actions/checkout@v4 + - name: Install Corepack via Node uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version-file: '.nvmrc' - name: Install Yarn run: corepack enable - - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} + - name: Install Node.js ${{ matrix.node-version }} and restore Yarn cache uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: 'yarn' - - run: rm yarn.lock && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn + - name: Install dependencies via Yarn + run: rm yarn.lock && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn - run: yarn test + - name: Restore lockfile + run: git restore yarn.lock - name: Require clean working directory shell: bash run: | - git restore yarn.lock if ! git diff --exit-code; then echo "Working tree dirty at end of job" exit 1 diff --git a/.github/workflows/create-release-pr.yml b/.github/workflows/create-release-pr.yml index 344014af1..66443a945 100644 --- a/.github/workflows/create-release-pr.yml +++ b/.github/workflows/create-release-pr.yml @@ -29,13 +29,13 @@ jobs: # We check out the specified branch, which will be used as the base # branch for all git operations and the release PR. ref: ${{ github.event.inputs.base-branch }} - - name: Setup Node.js + - name: Install Node.js uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' - uses: MetaMask/action-create-release-pr@v3 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: release-type: ${{ github.event.inputs.release-type }} release-version: ${{ github.event.inputs.release-version }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index dd1c3fa57..f5cc005be 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -21,14 +21,19 @@ jobs: - name: Ensure `destination_dir` is not empty if: ${{ inputs.destination_dir == '' }} run: exit 1 - - name: Checkout the repository - uses: actions/checkout@v4 - - name: Use Node.js + - uses: actions/checkout@v4 + - name: Install Corepack via Node + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + - name: Install Yarn + run: corepack enable + - name: Restore Yarn cache uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' cache: 'yarn' - - name: Install npm dependencies + - name: Install dependencies via Yarn run: yarn --immutable - name: Run build script run: yarn build:docs diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 778b47cb9..a75dd3783 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -19,34 +19,48 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ github.sha }} - - name: Setup Node.js + - name: Install Corepack via Node uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' + - name: Install Yarn + run: corepack enable + - name: Restore Yarn cache + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'yarn' - uses: MetaMask/action-publish-release@v3 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install - run: | - yarn install - yarn build - uses: actions/cache@v3 - id: restore-build with: path: | ./dist ./node_modules/.yarn-state.yml key: ${{ github.sha }} + - run: yarn --immutable + - run: yarn build publish-npm-dry-run: - runs-on: ubuntu-latest needs: publish-release + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: ref: ${{ github.sha }} + - name: Install Corepack via Node + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + - name: Install Yarn + run: corepack enable + - name: Restore Yarn cache + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'yarn' - uses: actions/cache@v3 - id: restore-build with: path: | ./dist @@ -62,15 +76,25 @@ jobs: SKIP_PREPACK: true publish-npm: - environment: npm-publish - runs-on: ubuntu-latest needs: publish-npm-dry-run + runs-on: ubuntu-latest + environment: npm-publish steps: - uses: actions/checkout@v4 with: ref: ${{ github.sha }} + - name: Install Corepack via Node + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + - name: Install Yarn + run: corepack enable + - name: Restore Yarn cache + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'yarn' - uses: actions/cache@v3 - id: restore-build with: path: | ./dist @@ -86,8 +110,8 @@ jobs: SKIP_PREPACK: true get-release-version: - runs-on: ubuntu-latest needs: publish-npm + runs-on: ubuntu-latest outputs: RELEASE_VERSION: ${{ steps.get-release-version.outputs.RELEASE_VERSION }} steps: @@ -99,8 +123,8 @@ jobs: run: ./scripts/get.sh ".version" "RELEASE_VERSION" publish-release-to-gh-pages: - needs: get-release-version name: Publish docs to `${{ needs.get-release-version.outputs.RELEASE_VERSION }}` directory of `gh-pages` branch + needs: get-release-version permissions: contents: write uses: ./.github/workflows/publish-docs.yml @@ -110,8 +134,8 @@ jobs: PUBLISH_DOCS_TOKEN: ${{ secrets.PUBLISH_DOCS_TOKEN }} publish-release-to-latest-gh-pages: - needs: publish-npm name: Publish docs to `latest` directory of `gh-pages` branch + needs: publish-npm permissions: contents: write uses: ./.github/workflows/publish-docs.yml From 8c077c01397c0580b25b7498ba582a96367bb321 Mon Sep 17 00:00:00 2001 From: Erik Marks Date: Fri, 28 Jun 2024 16:51:51 -0700 Subject: [PATCH 02/15] chore: Bump yarn to 4.2.2, add constraints --- .yarnrc.yml | 2 +- constraints.pro | 225 ++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 13 +-- 3 files changed, 233 insertions(+), 7 deletions(-) create mode 100644 constraints.pro diff --git a/.yarnrc.yml b/.yarnrc.yml index 6e38e4baf..738756b8f 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -4,7 +4,7 @@ enableGlobalCache: false enableScripts: false -enableTelemetry: 0 +enableTelemetry: false logFilters: - code: YN0004 diff --git a/constraints.pro b/constraints.pro new file mode 100644 index 000000000..2c7c0bbb5 --- /dev/null +++ b/constraints.pro @@ -0,0 +1,225 @@ +%=============================================================================== +% Utility predicates +%=============================================================================== + +% True if and only if VersionRange is a value that we would expect to see +% following a package in a "*dependencies" field within a `package.json`. +is_valid_version_range(VersionRange) :- + VersionRange = 'workspace:^'; + VersionRange = 'workspace:~'; + parse_version_range(VersionRange, _, _, _, _). + +% Succeeds if Number can be unified with Atom converted to a number; throws if +% not. +atom_to_number(Atom, Number) :- + atom_chars(Atom, Chars), + number_chars(Number, Chars). + +% True if and only if Atom can be converted to a number. +is_atom_number(Atom) :- + catch(atom_to_number(Atom, _), _, false). + +% True if and only if Modifier can be unified with the leading character of the +% version range ("^" or "~" if present, or "" if not present), Major can be +% unified with the major part of the version string, Minor with the minor, and +% Patch with the patch. +parse_version_range(VersionRange, Modifier, Major, Minor, Patch) :- + % Identify and extract the modifier (^ or ~) from the version string + atom_chars(VersionRange, Chars), + Chars = [PossibleModifier | CharsWithoutPossibleModifier], + ( + ( + PossibleModifier = '^'; + PossibleModifier = '~' + ) -> + ( + Modifier = PossibleModifier, + CharsWithoutModifier = CharsWithoutPossibleModifier + ) ; + ( + is_atom_number(PossibleModifier) -> + ( + Modifier = '', + CharsWithoutModifier = Chars + ) ; + false + ) + ), + atomic_list_concat(CharsWithoutModifier, '', VersionRangeWithoutModifier), + atomic_list_concat(VersionParts, '.', VersionRangeWithoutModifier), + % Validate version string while extracting each part + length(VersionParts, 3), + nth0(0, VersionParts, MajorAtom), + nth0(1, VersionParts, MinorAtom), + nth0(2, VersionParts, PatchAtom), + atom_to_number(MajorAtom, Major), + atom_to_number(MinorAtom, Minor), + atom_to_number(PatchAtom, Patch). + +% True if and only if the first SemVer version range is greater than the second +% SemVer version range. Such a range must match "^MAJOR.MINOR.PATCH", +% "~MAJOR.MINOR.PATCH", "MAJOR.MINOR.PATCH". If two ranges do not have the same +% modifier ("^" or "~"), then they cannot be compared and the first cannot be +% considered as less than the second. +% +% Borrowed from: +npm_version_range_out_of_sync(VersionRange1, VersionRange2) :- + parse_version_range(VersionRange1, VersionRange1Modifier, VersionRange1Major, VersionRange1Minor, VersionRange1Patch), + parse_version_range(VersionRange2, VersionRange2Modifier, VersionRange2Major, VersionRange2Minor, VersionRange2Patch), + VersionRange1Modifier == VersionRange2Modifier, + ( + % 2.0.0 > 1.0.0 + % 2.0.0 > 1.1.0 + % 2.0.0 > 1.0.1 + VersionRange1Major @> VersionRange2Major ; + ( + VersionRange1Major == VersionRange2Major , + ( + % 1.1.0 > 1.0.0 + % 1.1.0 > 1.0.1 + VersionRange1Minor @> VersionRange2Minor ; + ( + VersionRange1Minor == VersionRange2Minor , + % 1.0.1 > 1.0.0 + VersionRange1Patch @> VersionRange2Patch + ) + ) + ) + ). + +% Slice a list from From to To. +slice(Left, From, To, Right):- + length(LeftFrom, From), + length([_|LeftTo], To), + append(LeftTo, _, Left), + append(LeftFrom, Right, LeftTo). + +% Repeat a value a given number of times. This is useful for generating lists of +% a given length. For example, repeat('foo', 3, Result) will unify Result with +% ['foo', 'foo', 'foo']. +repeat(Value, Amount, Result) :- + length(Result, Amount), + maplist(=(Value), Result). + +% Resolve a relative path from a workspace directory. +relative_path(WorkspaceCwd, Path, RelativePath) :- + atomic_list_concat(Parts, '/', WorkspaceCwd), + length(Parts, Distance), + repeat('..', Distance, DistanceParts), + atomic_list_concat(DistanceParts, '/', DistanceString), + atomic_list_concat([DistanceString, Path], '/', RelativePath). + +%=============================================================================== +% Constraints +%=============================================================================== + +% All dependency ranges must be recognizable (this makes it possible to apply +% the next two rules effectively). +gen_enforced_dependency(WorkspaceCwd, DependencyIdent, 'a range optionally starting with ^ or ~', DependencyType) :- + workspace_has_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType), + \+ is_valid_version_range(DependencyRange). + +% All dependency ranges for a package must be synchronized across the monorepo +% (the least version range wins), regardless of which "*dependencies" field +% where the package appears. +gen_enforced_dependency(WorkspaceCwd, DependencyIdent, OtherDependencyRange, DependencyType) :- + workspace_has_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType), + workspace_has_dependency(OtherWorkspaceCwd, DependencyIdent, OtherDependencyRange, OtherDependencyType), + WorkspaceCwd \= OtherWorkspaceCwd, + DependencyRange \= OtherDependencyRange, + npm_version_range_out_of_sync(DependencyRange, OtherDependencyRange). + +% If a dependency is listed under "dependencies", it should not be listed under +% "devDependencies". We match on the same dependency range so that if a +% dependency is listed under both lists, their versions are synchronized and +% then this constraint will apply and remove the "right" duplicate. +gen_enforced_dependency(WorkspaceCwd, DependencyIdent, null, DependencyType) :- + workspace_has_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, 'dependencies'), + workspace_has_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType), + DependencyType == 'devDependencies'. + +% Dependencies may not have side effects. +gen_enforced_field(WorkspaceCwd, 'sideEffects', 'false') :- + \+ workspace_field(WorkspaceCwd, 'private', true), + WorkspaceCwd \= '.'. + +% The type definitions entrypoint for the dependency must be `./dist/types/index.d.ts`. +gen_enforced_field(WorkspaceCwd, 'types', './dist/types/index.d.ts') :- + \+ workspace_field(WorkspaceCwd, 'private', true), + WorkspaceCwd \= '.'. +gen_enforced_field(WorkspaceCwd, 'exports["."].types', './dist/types/index.d.ts') :- + \+ workspace_field(WorkspaceCwd, 'private', true), + WorkspaceCwd \= '.'. + +% The entrypoint for the dependency must be `./dist/cjs/index.js`. +gen_enforced_field(WorkspaceCwd, 'main', './dist/index.js') :- + \+ workspace_field(WorkspaceCwd, 'private', true), + WorkspaceCwd \= '.'. +gen_enforced_field(WorkspaceCwd, 'exports["."].require', './dist/index.js') :- + \+ workspace_field(WorkspaceCwd, 'private', true), + WorkspaceCwd \= '.'. + +% The module entrypoint for the dependency must be `./dist/esm/index.js`. +gen_enforced_field(WorkspaceCwd, 'module', './dist/index.mjs') :- + \+ workspace_field(WorkspaceCwd, 'private', true), + WorkspaceCwd \= '.'. +gen_enforced_field(WorkspaceCwd, 'exports["."].import', './dist/index.mjs') :- + \+ workspace_field(WorkspaceCwd, 'private', true), + WorkspaceCwd \= '.'. + +% `package.json` must be exported. +gen_enforced_field(WorkspaceCwd, 'exports["./package.json"]', './package.json') :- + \+ workspace_field(WorkspaceCwd, 'private', true), + WorkspaceCwd \= '.'. + +% The list of files included in the package must only include files generated +% during the build step. +gen_enforced_field(WorkspaceCwd, 'files', ['dist']) :- + \+ workspace_field(WorkspaceCwd, 'private', true), + WorkspaceCwd \= '.'. + +% Dependencies must have a build script. +gen_enforced_field(WorkspaceCwd, 'scripts.build', 'tsup --clean && yarn build:types') :- + \+ workspace_field(WorkspaceCwd, 'private', true), + WorkspaceCwd \= '.'. +gen_enforced_field(WorkspaceCwd, 'scripts.build:types', 'tsc --project tsconfig.build.json') :- + \+ workspace_field(WorkspaceCwd, 'private', true), + WorkspaceCwd \= '.'. +gen_enforced_field(WorkspaceCwd, 'scripts.build:ci', 'tsup --clean') :- + \+ workspace_field(WorkspaceCwd, 'private', true), + WorkspaceCwd \= '.'. + +% Dependencies must have preview scripts. +gen_enforced_field(WorkspaceCwd, 'scripts.publish:preview', 'yarn npm publish --tag preview') :- + \+ workspace_field(WorkspaceCwd, 'private', true), + WorkspaceCwd \= '.'. + +% Dependencies must have a "publishConfig" field. +gen_enforced_field(WorkspaceCwd, 'publishConfig.access', 'public') :- + \+ workspace_field(WorkspaceCwd, 'private', true), + WorkspaceCwd \= '.'. +gen_enforced_field(WorkspaceCwd, 'publishConfig.registry', 'https://registry.npmjs.org/') :- + \+ workspace_field(WorkspaceCwd, 'private', true), + WorkspaceCwd \= '.'. + +% The "changelog:validate" script for each published package must run a common +% script with the name of the package as an argument. +gen_enforced_field(WorkspaceCwd, 'scripts.lint:changelog', ChangelogValidationScript) :- + \+ workspace_field(WorkspaceCwd, 'private', true), + workspace_field(WorkspaceCwd, 'name', WorkspacePackageName), + relative_path(WorkspaceCwd, 'scripts/validate-changelog.sh', BaseChangelogValidationScript), + atomic_list_concat([BaseChangelogValidationScript, ' ', WorkspacePackageName], ChangelogValidationScript). + +% The "lint:dependencies" script must be the same for all packages. +gen_enforced_field(WorkspaceCwd, 'scripts.lint:dependencies', 'depcheck') :- + WorkspaceCwd \= '.'. + +% The root workspace (and only the root workspace) needs to specify the Yarn +% version required for development. +gen_enforced_field(WorkspaceCwd, 'packageManager', 'yarn@4.2.2') :- + WorkspaceCwd == '.'. +gen_enforced_field(WorkspaceCwd, 'packageManager', null) :- + WorkspaceCwd \= '.'. + +% The "engines.node" field must be the same for all packages. +gen_enforced_field(WorkspaceCwd, 'engines.node', '^18.16 || >=20'). diff --git a/package.json b/package.json index 35c4c4894..5b4f3eb14 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,15 @@ { - "name": "@metamask/metamask-module-template", + "name": "@metamask/ocap-kernel-monorepo", + "private": true, "version": "0.0.0", - "description": "The MetaMask Node module template", - "homepage": "https://github.com/MetaMask/metamask-module-template#readme", + "description": "The MetaMask Ocap Kernel monorepo", + "homepage": "https://github.com/MetaMask/ocap-kernel#readme", "bugs": { - "url": "https://github.com/MetaMask/metamask-module-template/issues" + "url": "https://github.com/MetaMask/ocap-kernel/issues" }, "repository": { "type": "git", - "url": "https://github.com/MetaMask/metamask-module-template.git" + "url": "https://github.com/MetaMask/ocap-kernel.git" }, "sideEffects": false, "exports": { @@ -78,7 +79,7 @@ "typedoc": "^0.23.15", "typescript": "~4.8.4" }, - "packageManager": "yarn@4.1.1", + "packageManager": "yarn@4.2.2", "engines": { "node": "^18.18 || >=20" }, From 008cedc83adf367f3b2b52f5171ea77be80ea19f Mon Sep 17 00:00:00 2001 From: Erik Marks Date: Tue, 9 Jul 2024 15:15:10 +0200 Subject: [PATCH 03/15] chore: Convert to monorepo Set up as monorepo per the conventions of the `/core` monorepo, with some inspiration from `/snaps` where applicable. --- .depcheckrc.json | 12 - .depcheckrc.yml | 11 + .eslintrc.js | 118 +- .yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch | 13 + constraints.pro | 322 ++-- jest.config.js => jest.config.packages.js | 50 +- package.json | 86 +- .../playground/CHANGELOG.md | 2 +- packages/playground/LICENSE | 20 + packages/playground/README.md | 15 + packages/playground/jest.config.js | 16 + packages/playground/package.json | 62 + packages/playground/src/index.test.ts | 9 + packages/playground/src/index.ts | 9 + packages/playground/tsconfig.build.json | 10 + packages/playground/tsconfig.json | 8 + packages/playground/tsup.config.ts | 16 + packages/playground/typedoc.json | 7 + scripts/validate-changelog.sh | 17 + tsconfig.build.json | 25 +- tsconfig.json | 14 +- tsconfig.packages.build.json | 11 + tsconfig.packages.json | 25 + tsup.config.ts | 51 + yarn.config.cjs | 286 ---- yarn.lock | 1471 +++++++++++------ 26 files changed, 1672 insertions(+), 1014 deletions(-) delete mode 100644 .depcheckrc.json create mode 100644 .depcheckrc.yml create mode 100644 .yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch rename jest.config.js => jest.config.packages.js (83%) rename CHANGELOG.md => packages/playground/CHANGELOG.md (79%) create mode 100644 packages/playground/LICENSE create mode 100644 packages/playground/README.md create mode 100644 packages/playground/jest.config.js create mode 100644 packages/playground/package.json create mode 100644 packages/playground/src/index.test.ts create mode 100644 packages/playground/src/index.ts create mode 100644 packages/playground/tsconfig.build.json create mode 100644 packages/playground/tsconfig.json create mode 100644 packages/playground/tsup.config.ts create mode 100644 packages/playground/typedoc.json create mode 100755 scripts/validate-changelog.sh create mode 100644 tsconfig.packages.build.json create mode 100644 tsconfig.packages.json create mode 100644 tsup.config.ts delete mode 100644 yarn.config.cjs diff --git a/.depcheckrc.json b/.depcheckrc.json deleted file mode 100644 index 39d5c6ce4..000000000 --- a/.depcheckrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "ignores": [ - "@lavamoat/allow-scripts", - "@lavamoat/preinstall-always-fail", - "@metamask/auto-changelog", - "@types/*", - "@yarnpkg/types", - "prettier-plugin-packagejson", - "ts-node", - "typedoc" - ] -} diff --git a/.depcheckrc.yml b/.depcheckrc.yml new file mode 100644 index 000000000..2052a5074 --- /dev/null +++ b/.depcheckrc.yml @@ -0,0 +1,11 @@ +--- +ignores: + - '@lavamoat/allow-scripts' + - '@lavamoat/preinstall-always-fail' + - '@metamask/auto-changelog' + - '@yarnpkg/*' + - '@types/jest' + - 'jest-silent-reporter' + - 'prettier-plugin-*' + - 'ts-jest' + - 'typedoc' diff --git a/.eslintrc.js b/.eslintrc.js index 634c81ef8..b008601f1 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,50 +1,116 @@ module.exports = { root: true, - extends: ['@metamask/eslint-config'], + extends: ['@metamask/eslint-config', '@metamask/eslint-config-nodejs'], + + parserOptions: { + tsconfigRootDir: __dirname, + }, + + env: { + 'shared-node-browser': true, + }, + + ignorePatterns: [ + '!.eslintrc.js', + '!jest.config.js', + 'node_modules', + '**/dist', + '**/docs', + '**/coverage', + ], + + rules: { + // This prevents importing Node.js builtins. We currently use them in + // our codebase, so this rule is disabled. This rule should be disabled + // in `@metamask/eslint-config-nodejs` in the future. + 'import/no-nodejs-modules': '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', + }, overrides: [ + { + files: ['*.js'], + parserOptions: { + sourceType: 'script', + ecmaVersion: '2020', + }, + }, + { files: ['*.ts'], extends: ['@metamask/eslint-config-typescript'], + parserOptions: { + tsconfigRootDir: __dirname, + project: ['./tsconfig.packages.json'], + }, + rules: { + // Enable rules that are disabled in `@metamask/eslint-config-typescript` + '@typescript-eslint/no-explicit-any': 'error', + + // TODO: auto-fix breaks stuff + '@typescript-eslint/promise-function-async': 'off', + + // Without the `allowAny` option, this rule causes a lot of false + // positives. + '@typescript-eslint/restrict-template-expressions': [ + 'error', + { + allowAny: true, + allowBoolean: true, + allowNumber: true, + }, + ], + }, }, { - files: ['*.js'], - parserOptions: { - sourceType: 'script', + files: ['*.d.ts'], + rules: { + 'import/unambiguous': 'off', }, - extends: ['@metamask/eslint-config-nodejs'], }, { - files: ['yarn.config.cjs'], - parserOptions: { - sourceType: 'script', - ecmaVersion: 2020, + files: ['scripts/*.ts'], + rules: { + // All scripts will have shebangs. + 'n/shebang': 'off', }, - settings: { - jsdoc: { - mode: 'typescript', - }, + }, + + { + files: ['**/jest.environment.js'], + rules: { + // These files run under Node, and thus `require(...)` is expected. + 'n/global-require': 'off', }, - extends: ['@metamask/eslint-config-nodejs'], }, { - files: ['*.test.ts', '*.test.js'], - extends: [ - '@metamask/eslint-config-jest', - '@metamask/eslint-config-nodejs', - ], + files: ['*.test.{ts,js}', '**/tests/**/*.{ts,js}'], + extends: ['@metamask/eslint-config-jest'], + rules: { + '@typescript-eslint/no-shadow': [ + 'error', + { allow: ['describe', 'expect', 'it'] }, + ], + }, }, - ], - ignorePatterns: [ - '!.eslintrc.js', - '!.prettierrc.js', - 'dist/', - 'docs/', - '.yarn/', + { + // These files are test helpers, not tests. We still use the Jest ESLint + // config here to ensure that ESLint expects a test-like environment, but + // various rules meant just to apply to tests have been disabled. + files: ['**/tests/**/*.{ts,js}', '!*.test.{ts,js}'], + rules: { + 'jest/no-export': 'off', + 'jest/require-top-level-describe': 'off', + 'jest/no-if': 'off', + }, + }, ], }; diff --git a/.yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch b/.yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch new file mode 100644 index 000000000..2ac7512ab --- /dev/null +++ b/.yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch @@ -0,0 +1,13 @@ +diff --git a/dist/index.js b/dist/index.js +index 4500c4e43c3bbd24aa60b7d4cf95aa3fee8eb185..9c442bc216f99b7cfadb5ac62cb98d3ae9ce2f56 100644 +--- a/dist/index.js ++++ b/dist/index.js +@@ -1813,6 +1813,8 @@ var cjsSplitting = () => { + } + const { transform: transform3 } = await Promise.resolve().then(() => require("sucrase")); + const result = transform3(code, { ++ // https://github.com/egoist/tsup/issues/1087 ++ disableESTransforms: true, + filePath: info.path, + transforms: ["imports"], + sourceMapOptions: this.options.sourcemap ? { diff --git a/constraints.pro b/constraints.pro index 2c7c0bbb5..3a7533b5b 100644 --- a/constraints.pro +++ b/constraints.pro @@ -87,133 +87,250 @@ npm_version_range_out_of_sync(VersionRange1, VersionRange2) :- ) ). -% Slice a list from From to To. -slice(Left, From, To, Right):- - length(LeftFrom, From), - length([_|LeftTo], To), - append(LeftTo, _, Left), - append(LeftFrom, Right, LeftTo). - -% Repeat a value a given number of times. This is useful for generating lists of -% a given length. For example, repeat('foo', 3, Result) will unify Result with -% ['foo', 'foo', 'foo']. -repeat(Value, Amount, Result) :- - length(Result, Amount), - maplist(=(Value), Result). - -% Resolve a relative path from a workspace directory. -relative_path(WorkspaceCwd, Path, RelativePath) :- +% True if and only if WorkspaceBasename can unify with the part of the given +% workspace directory name that results from removing all leading directories. +workspace_basename(WorkspaceCwd, WorkspaceBasename) :- atomic_list_concat(Parts, '/', WorkspaceCwd), - length(Parts, Distance), - repeat('..', Distance, DistanceParts), - atomic_list_concat(DistanceParts, '/', DistanceString), - atomic_list_concat([DistanceString, Path], '/', RelativePath). + last(Parts, WorkspaceBasename). + +% True if and only if WorkspacePackageName can unify with the name of the +% package which the workspace represents (which comes from the directory where +% the package is located). Assumes that the package is not in a sub-workspace +% and is not private. +workspace_package_name(WorkspaceCwd, WorkspacePackageName) :- + workspace_basename(WorkspaceCwd, WorkspaceBasename), + atom_concat('@metamask/', WorkspaceBasename, WorkspacePackageName). + +% True if RepoName can be unified with the repository name part of RepoUrl, a +% complete URL for a repository on GitHub. This URL must include the ".git" +% extension. +repo_name(RepoUrl, RepoName) :- + Prefix = 'https://github.com/MetaMask/', + atom_length(Prefix, PrefixLength), + Suffix = '.git', + atom_length(Suffix, SuffixLength), + atom_length(RepoUrl, RepoUrlLength), + sub_atom(RepoUrl, 0, PrefixLength, After, Prefix), + sub_atom(RepoUrl, Before, SuffixLength, 0, Suffix), + Start is RepoUrlLength - After + 1, + End is Before + 1, + RepoNameLength is End - Start, + sub_atom(RepoUrl, PrefixLength, RepoNameLength, SuffixLength, RepoName). %=============================================================================== % Constraints %=============================================================================== -% All dependency ranges must be recognizable (this makes it possible to apply -% the next two rules effectively). -gen_enforced_dependency(WorkspaceCwd, DependencyIdent, 'a range optionally starting with ^ or ~', DependencyType) :- - workspace_has_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType), - \+ is_valid_version_range(DependencyRange). +% All packages, published or otherwise, must have a name. +\+ gen_enforced_field(WorkspaceCwd, 'name', null). -% All dependency ranges for a package must be synchronized across the monorepo -% (the least version range wins), regardless of which "*dependencies" field -% where the package appears. -gen_enforced_dependency(WorkspaceCwd, DependencyIdent, OtherDependencyRange, DependencyType) :- - workspace_has_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType), - workspace_has_dependency(OtherWorkspaceCwd, DependencyIdent, OtherDependencyRange, OtherDependencyType), - WorkspaceCwd \= OtherWorkspaceCwd, - DependencyRange \= OtherDependencyRange, - npm_version_range_out_of_sync(DependencyRange, OtherDependencyRange). - -% If a dependency is listed under "dependencies", it should not be listed under -% "devDependencies". We match on the same dependency range so that if a -% dependency is listed under both lists, their versions are synchronized and -% then this constraint will apply and remove the "right" duplicate. -gen_enforced_dependency(WorkspaceCwd, DependencyIdent, null, DependencyType) :- - workspace_has_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, 'dependencies'), - workspace_has_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType), - DependencyType == 'devDependencies'. +% The name of the root package can be anything, but the name of a non-root +% package must match its directory (e.g., a package located in "packages/foo" +% must be called "@metamask/foo"). +% +% NOTE: This assumes that the set of non-root workspaces is flat. Nested +% workspaces will be added in a future change. +gen_enforced_field(WorkspaceCwd, 'name', WorkspacePackageName) :- + WorkspaceCwd \= '.', + workspace_package_name(WorkspaceCwd, WorkspacePackageName). -% Dependencies may not have side effects. -gen_enforced_field(WorkspaceCwd, 'sideEffects', 'false') :- - \+ workspace_field(WorkspaceCwd, 'private', true), - WorkspaceCwd \= '.'. +% All packages, published or otherwise, must have a description. +\+ gen_enforced_field(WorkspaceCwd, 'description', null). +% The description cannot end with a period. +gen_enforced_field(WorkspaceCwd, 'description', DescriptionWithoutTrailingPeriod) :- + workspace_field(WorkspaceCwd, 'description', Description), + atom_length(Description, Length), + LengthLessOne is Length - 1, + sub_atom(Description, LengthLessOne, 1, 0, LastCharacter), + sub_atom(Description, 0, LengthLessOne, 1, DescriptionWithoutPossibleTrailingPeriod), + ( + LastCharacter == '.' -> + DescriptionWithoutTrailingPeriod = DescriptionWithoutPossibleTrailingPeriod ; + DescriptionWithoutTrailingPeriod = Description + ). -% The type definitions entrypoint for the dependency must be `./dist/types/index.d.ts`. -gen_enforced_field(WorkspaceCwd, 'types', './dist/types/index.d.ts') :- +% All published packages must have the same set of NPM keywords. +gen_enforced_field(WorkspaceCwd, 'keywords', ['MetaMask', 'Ethereum']) :- + \+ workspace_field(WorkspaceCwd, 'private', true). +% Non-published packages do not have any NPM keywords. +gen_enforced_field(WorkspaceCwd, 'keywords', null) :- + workspace_field(WorkspaceCwd, 'private', true). + +% The homepage of a published package must match its name (which is in turn +% based on its workspace directory name). +gen_enforced_field(WorkspaceCwd, 'homepage', CorrectHomepageUrl) :- \+ workspace_field(WorkspaceCwd, 'private', true), - WorkspaceCwd \= '.'. -gen_enforced_field(WorkspaceCwd, 'exports["."].types', './dist/types/index.d.ts') :- + workspace_basename(WorkspaceCwd, WorkspaceBasename), + workspace_field(WorkspaceCwd, 'repository.url', RepoUrl), + repo_name(RepoUrl, RepoName), + atomic_list_concat(['https://github.com/MetaMask/', RepoName, '/tree/main/packages/', WorkspaceBasename, '#readme'], CorrectHomepageUrl). +% Non-published packages do not have a homepage. +gen_enforced_field(WorkspaceCwd, 'homepage', null) :- + workspace_field(WorkspaceCwd, 'private', true). + +% The bugs URL of a published package must point to the Issues page for the +% repository. +gen_enforced_field(WorkspaceCwd, 'bugs.url', CorrectBugsUrl) :- \+ workspace_field(WorkspaceCwd, 'private', true), + workspace_field(WorkspaceCwd, 'repository.url', RepoUrl), + repo_name(RepoUrl, RepoName), + atomic_list_concat(['https://github.com/MetaMask/', RepoName, '/issues'], CorrectBugsUrl). +% Non-published packages must not have a bugs section. +gen_enforced_field(WorkspaceCwd, 'bugs', null) :- + workspace_field(WorkspaceCwd, 'private', true). + +% All packages must specify Git as the repository type. +gen_enforced_field(WorkspaceCwd, 'repository.type', 'git'). + +% All packages must match the URL of a repo within the MetaMask organization. +gen_enforced_field(WorkspaceCwd, 'repository.url', 'https://github.com/MetaMask/.git') :- + workspace_field(WorkspaceCwd, 'repository.url', RepoUrl), + \+ repo_name(RepoUrl, _). +% The repository URL for non-root packages must match the same URL used for the +% root package. +gen_enforced_field(WorkspaceCwd, 'repository.url', RepoUrl) :- + workspace_field('.', 'repository.url', RepoUrl), + repo_name(RepoUrl, _). WorkspaceCwd \= '.'. -% The entrypoint for the dependency must be `./dist/cjs/index.js`. +% The license for all published packages must be MIT unless otherwise specified. +gen_enforced_field(WorkspaceCwd, 'license', 'MIT') :- + \+ workspace_field(WorkspaceCwd, 'private', true). +% Non-published packages do not have a license. +gen_enforced_field(WorkspaceCwd, 'license', null) :- + workspace_field(WorkspaceCwd, 'private', true). + +% The entrypoint for all published packages must be the same. gen_enforced_field(WorkspaceCwd, 'main', './dist/index.js') :- - \+ workspace_field(WorkspaceCwd, 'private', true), - WorkspaceCwd \= '.'. -gen_enforced_field(WorkspaceCwd, 'exports["."].require', './dist/index.js') :- - \+ workspace_field(WorkspaceCwd, 'private', true), - WorkspaceCwd \= '.'. + \+ workspace_field(WorkspaceCwd, 'private', true). +% Non-published packages must not specify an entrypoint. +gen_enforced_field(WorkspaceCwd, 'main', null) :- + workspace_field(WorkspaceCwd, 'private', true). -% The module entrypoint for the dependency must be `./dist/esm/index.js`. -gen_enforced_field(WorkspaceCwd, 'module', './dist/index.mjs') :- - \+ workspace_field(WorkspaceCwd, 'private', true), - WorkspaceCwd \= '.'. -gen_enforced_field(WorkspaceCwd, 'exports["."].import', './dist/index.mjs') :- - \+ workspace_field(WorkspaceCwd, 'private', true), - WorkspaceCwd \= '.'. +% The type definitions entrypoint for all publishable packages must be the same. +gen_enforced_field(WorkspaceCwd, 'types', './dist/types/index.d.ts') :- + \+ workspace_field(WorkspaceCwd, 'private', true). +% Non-published packages must not specify a type definitions entrypoint. +gen_enforced_field(WorkspaceCwd, 'types', null) :- + workspace_field(WorkspaceCwd, 'private', true). -% `package.json` must be exported. +% The exports for all published packages must be the same. +gen_enforced_field(WorkspaceCwd, 'exports["."].import', './dist/index.mjs') :- + \+ workspace_field(WorkspaceCwd, 'private', true). +gen_enforced_field(WorkspaceCwd, 'exports["."].require', './dist/index.js') :- + \+ workspace_field(WorkspaceCwd, 'private', true). +gen_enforced_field(WorkspaceCwd, 'exports["."].types', './dist/types/index.d.ts') :- + \+ workspace_field(WorkspaceCwd, 'private', true). gen_enforced_field(WorkspaceCwd, 'exports["./package.json"]', './package.json') :- - \+ workspace_field(WorkspaceCwd, 'private', true), - WorkspaceCwd \= '.'. + \+ workspace_field(WorkspaceCwd, 'private', true). +% Non-published packages must not specify exports. +gen_enforced_field(WorkspaceCwd, 'exports', null) :- + workspace_field(WorkspaceCwd, 'private', true). -% The list of files included in the package must only include files generated -% during the build step. -gen_enforced_field(WorkspaceCwd, 'files', ['dist']) :- - \+ workspace_field(WorkspaceCwd, 'private', true), - WorkspaceCwd \= '.'. +% Published packages must not have side effects. +gen_enforced_field(WorkspaceCwd, 'sideEffects', false) :- + \+ workspace_field(WorkspaceCwd, 'private', true). +% Non-published packages must not specify side effects. +gen_enforced_field(WorkspaceCwd, 'sideEffects', null) :- + workspace_field(WorkspaceCwd, 'private', true). -% Dependencies must have a build script. -gen_enforced_field(WorkspaceCwd, 'scripts.build', 'tsup --clean && yarn build:types') :- - \+ workspace_field(WorkspaceCwd, 'private', true), - WorkspaceCwd \= '.'. -gen_enforced_field(WorkspaceCwd, 'scripts.build:types', 'tsc --project tsconfig.build.json') :- - \+ workspace_field(WorkspaceCwd, 'private', true), +% The list of files included in published packages must only include files +% generated during the build step. +gen_enforced_field(WorkspaceCwd, 'files', ['dist/']) :- + \+ workspace_field(WorkspaceCwd, 'private', true). +% The root package must specify an empty set of published files. (This is +% required in order to be able to import anything in development-only scripts, +% as otherwise the `node/no-unpublished-require` ESLint rule will disallow it.) +gen_enforced_field(WorkspaceCwd, 'files', []) :- + WorkspaceCwd = '.'. + +% All non-root packages must have the same "build" script. +gen_enforced_field(WorkspaceCwd, 'scripts.build', 'tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean') :- WorkspaceCwd \= '.'. -gen_enforced_field(WorkspaceCwd, 'scripts.build:ci', 'tsup --clean') :- - \+ workspace_field(WorkspaceCwd, 'private', true), + +% All non-root packages must have the same "build:docs" script. +gen_enforced_field(WorkspaceCwd, 'scripts.build:docs', 'typedoc') :- WorkspaceCwd \= '.'. -% Dependencies must have preview scripts. +% All published packages must have the same "publish:preview" script. gen_enforced_field(WorkspaceCwd, 'scripts.publish:preview', 'yarn npm publish --tag preview') :- + \+ workspace_field(WorkspaceCwd, 'private', true). + +% All published packages must not have a "prepack" script. +gen_enforced_field(WorkspaceCwd, 'scripts.prepack', null) :- + \+ workspace_field(WorkspaceCwd, 'private', true). + +% The "changelog:validate" script for each published package must run a common +% script with the name of the package as the first argument. +gen_enforced_field(WorkspaceCwd, 'scripts.changelog:validate', CorrectChangelogValidationCommand) :- \+ workspace_field(WorkspaceCwd, 'private', true), - WorkspaceCwd \= '.'. + workspace_field(WorkspaceCwd, 'scripts.changelog:validate', ChangelogValidationCommand), + workspace_package_name(WorkspaceCwd, WorkspacePackageName), + atomic_list_concat(['../../scripts/validate-changelog.sh ', WorkspacePackageName, ' [...]'], CorrectChangelogValidationCommand), + atom_concat('../../scripts/validate-changelog.sh ', WorkspacePackageName, ExpectedPrefix), + \+ atom_concat(ExpectedPrefix, _, ChangelogValidationCommand). -% Dependencies must have a "publishConfig" field. -gen_enforced_field(WorkspaceCwd, 'publishConfig.access', 'public') :- +% The "changelog:update" script for each published package must run a common +% script with the name of the package as the first argument. +gen_enforced_field(WorkspaceCwd, 'scripts.changelog:update', CorrectChangelogUpdateCommand) :- \+ workspace_field(WorkspaceCwd, 'private', true), + workspace_field(WorkspaceCwd, 'scripts.changelog:update', ChangelogUpdateCommand), + workspace_package_name(WorkspaceCwd, WorkspacePackageName), + atomic_list_concat(['../../scripts/update-changelog.sh ', WorkspacePackageName, ' [...]'], CorrectChangelogUpdateCommand), + atom_concat('../../scripts/update-changelog.sh ', WorkspacePackageName, ExpectedPrefix), + \+ atom_concat(ExpectedPrefix, _, ChangelogUpdateCommand). + +% All non-root packages must have the same "test" script. +gen_enforced_field(WorkspaceCwd, 'scripts.test', 'jest --reporters=jest-silent-reporter') :- WorkspaceCwd \= '.'. -gen_enforced_field(WorkspaceCwd, 'publishConfig.registry', 'https://registry.npmjs.org/') :- - \+ workspace_field(WorkspaceCwd, 'private', true), + +% All non-root packages must have the same "test:clean" script. +gen_enforced_field(WorkspaceCwd, 'scripts.test:clean', 'jest --clearCache') :- WorkspaceCwd \= '.'. -% The "changelog:validate" script for each published package must run a common -% script with the name of the package as an argument. -gen_enforced_field(WorkspaceCwd, 'scripts.lint:changelog', ChangelogValidationScript) :- - \+ workspace_field(WorkspaceCwd, 'private', true), - workspace_field(WorkspaceCwd, 'name', WorkspacePackageName), - relative_path(WorkspaceCwd, 'scripts/validate-changelog.sh', BaseChangelogValidationScript), - atomic_list_concat([BaseChangelogValidationScript, ' ', WorkspacePackageName], ChangelogValidationScript). +% All non-root packages must have the same "test:verbose" script. +gen_enforced_field(WorkspaceCwd, 'scripts.test:verbose', 'jest --verbose') :- + WorkspaceCwd \= '.'. -% The "lint:dependencies" script must be the same for all packages. -gen_enforced_field(WorkspaceCwd, 'scripts.lint:dependencies', 'depcheck') :- +% All non-root packages must have the same "test:watch" script. +gen_enforced_field(WorkspaceCwd, 'scripts.test:watch', 'jest --watch') :- WorkspaceCwd \= '.'. +% All dependency ranges must be recognizable (this makes it possible to apply +% the next two rules effectively). +gen_enforced_dependency(WorkspaceCwd, DependencyIdent, 'a range optionally starting with ^ or ~', DependencyType) :- + workspace_has_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType), + \+ is_valid_version_range(DependencyRange). + +% All version ranges used to reference one workspace package in another +% workspace package's `dependencies` or `devDependencies` must be the same. +% Among all references to the same dependency across the monorepo, the one with +% the smallest version range will win. (We handle `peerDependencies` in another +% constraint, as it has slightly different logic.) +gen_enforced_dependency(WorkspaceCwd, DependencyIdent, OtherDependencyRange, DependencyType) :- + workspace_has_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType), + workspace_has_dependency(OtherWorkspaceCwd, DependencyIdent, OtherDependencyRange, OtherDependencyType), + WorkspaceCwd \= OtherWorkspaceCwd, + DependencyRange \= OtherDependencyRange, + npm_version_range_out_of_sync(DependencyRange, OtherDependencyRange), + DependencyType \= 'peerDependencies', + OtherDependencyType \= 'peerDependencies'. + +% All version ranges used to reference one workspace package in another +% workspace package's `dependencies` or `devDependencies` must match the current +% version of that package. (We handle `peerDependencies` in another rule.) +gen_enforced_dependency(WorkspaceCwd, DependencyIdent, CorrectDependencyRange, DependencyType) :- + DependencyType \= 'peerDependencies', + workspace_has_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType), + workspace_ident(OtherWorkspaceCwd, DependencyIdent), + workspace_version(OtherWorkspaceCwd, OtherWorkspaceVersion), + atomic_list_concat(['^', OtherWorkspaceVersion], CorrectDependencyRange). + +% If a workspace package is listed under another workspace package's +% `dependencies`, it should not also be listed under its `devDependencies`. +gen_enforced_dependency(WorkspaceCwd, DependencyIdent, null, 'devDependencies') :- + workspace_has_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, 'dependencies'). + % The root workspace (and only the root workspace) needs to specify the Yarn % version required for development. gen_enforced_field(WorkspaceCwd, 'packageManager', 'yarn@4.2.2') :- @@ -221,5 +338,16 @@ gen_enforced_field(WorkspaceCwd, 'packageManager', 'yarn@4.2.2') :- gen_enforced_field(WorkspaceCwd, 'packageManager', null) :- WorkspaceCwd \= '.'. -% The "engines.node" field must be the same for all packages. -gen_enforced_field(WorkspaceCwd, 'engines.node', '^18.16 || >=20'). +% All packages must specify a minimum Node version of 18. +gen_enforced_field(WorkspaceCwd, 'engines.node', '^18.18 || >=20'). + +% All published packages are public. +gen_enforced_field(WorkspaceCwd, 'publishConfig.access', 'public') :- + \+ workspace_field(WorkspaceCwd, 'private', true). +% All published packages are available on the NPM registry. +gen_enforced_field(WorkspaceCwd, 'publishConfig.registry', 'https://registry.npmjs.org/') :- + \+ workspace_field(WorkspaceCwd, 'private', true). +% Non-published packages do not need to specify any publishing settings +% whatsoever. +gen_enforced_field(WorkspaceCwd, 'publishConfig', null) :- + workspace_field(WorkspaceCwd, 'private', true). diff --git a/jest.config.js b/jest.config.packages.js similarity index 83% rename from jest.config.js rename to jest.config.packages.js index 83e15048b..3be8df86b 100644 --- a/jest.config.js +++ b/jest.config.packages.js @@ -22,21 +22,29 @@ module.exports = { collectCoverage: true, // An array of glob patterns indicating a set of files for which coverage information should be collected - collectCoverageFrom: ['./src/**/*.ts'], + collectCoverageFrom: [ + './src/**/*.ts', + '!./src/**/*.test.ts', + '!./src/**/*.test.browser.ts', + '!./src/test-utils/**/*.ts', + '!./src/**/*.d.ts', + '!./src/**/__test__/**', + '!./src/**/__mocks__/**', + '!./src/**/__snapshots__/**', + '!./src/**/__fixtures__/**', + ], // The directory where Jest should output its coverage files coverageDirectory: 'coverage', // An array of regexp pattern strings used to skip coverage collection - // coveragePathIgnorePatterns: [ - // "/node_modules/" - // ], + coveragePathIgnorePatterns: ['./src/index.ts'], // Indicates which provider should be used to instrument code for coverage coverageProvider: 'babel', // A list of reporter names that Jest uses when writing coverage reports - coverageReporters: ['html', 'json-summary', 'text'], + coverageReporters: ['html', 'json-summary', 'text', 'json'], // An object that configures minimum threshold enforcement for coverage results coverageThreshold: { @@ -85,7 +93,16 @@ module.exports = { // ], // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module - // moduleNameMapper: {}, + // Here we ensure that Jest resolves `@metamask/*` imports to the uncompiled source code for packages that live in this repo. + // NOTE: This must be synchronized with the `paths` option in `tsconfig.packages.json`. + moduleNameMapper: { + '^@metamask/(.+)$': [ + '/../$1/src', + // Some @metamask/* packages we are referencing aren't in this monorepo, + // so in that case use their published versions + '/../../node_modules/@metamask/$1', + ], + }, // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader // modulePathIgnorePatterns: [], @@ -100,7 +117,7 @@ module.exports = { preset: 'ts-jest', // Run tests from one or more projects - // projects: undefined, + // projects: undefined // Use this configuration option to add custom reporters to Jest // reporters: undefined, @@ -132,10 +149,10 @@ module.exports = { // runner: "jest-runner", // The paths to modules that run some code to configure or set up the testing environment before each test - // setupFiles: [], + // setupFiles: ['../../tests/setup.ts'], // A list of paths to modules that run some code to configure or set up the testing framework before each test - // setupFilesAfterEnv: [], + // setupFilesAfterEnv: ['../../tests/setupAfterEnv/index.ts'], // The number of seconds after which a test is considered as slow and reported as such in the results. // slowTestThreshold: 5, @@ -144,10 +161,12 @@ module.exports = { // snapshotSerializers: [], // The test environment that will be used for testing - // testEnvironment: "jest-environment-node", + testEnvironment: 'node', // Options that will be passed to the testEnvironment - // testEnvironmentOptions: {}, + testEnvironmentOptions: { + customExportConditions: ['node', 'node-addons'], + }, // Adds a location field to test results // testLocationInResults: false, @@ -172,8 +191,8 @@ module.exports = { // This option allows use of a custom test runner // testRunner: "jest-circus/runner", - // Reduce the default test timeout from 5s to 2.5s - testTimeout: 2500, + // Default timeout of a test in milliseconds. + testTimeout: 5000, // This option sets the URL for the jsdom environment. It is reflected in properties such as location.href // testURL: "http://localhost", @@ -185,10 +204,7 @@ module.exports = { // transform: undefined, // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation - // transformIgnorePatterns: [ - // "/node_modules/", - // "\\.pnp\\.[^\\/]+$" - // ], + // transformIgnorePatterns: undefined // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them // unmockedModulePathPatterns: undefined, diff --git a/package.json b/package.json index 5b4f3eb14..c0ea03d6e 100644 --- a/package.json +++ b/package.json @@ -1,66 +1,52 @@ { - "name": "@metamask/ocap-kernel-monorepo", - "private": true, + "name": "root", "version": "0.0.0", - "description": "The MetaMask Ocap Kernel monorepo", - "homepage": "https://github.com/MetaMask/ocap-kernel#readme", - "bugs": { - "url": "https://github.com/MetaMask/ocap-kernel/issues" - }, + "private": true, "repository": { "type": "git", "url": "https://github.com/MetaMask/ocap-kernel.git" }, - "sideEffects": false, - "exports": { - ".": { - "import": { - "types": "./dist/index.d.mts", - "default": "./dist/index.mjs" - }, - "require": { - "types": "./dist/index.d.cts", - "default": "./dist/index.cjs" - } - }, - "./package.json": "./package.json" - }, - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.cts", - "files": [ - "dist" + "files": [], + "workspaces": [ + "packages/*" ], "scripts": { - "build": "ts-bridge --project tsconfig.build.json --clean", - "build:docs": "typedoc", - "lint": "yarn lint:eslint && yarn lint:constraints && yarn lint:misc --check && yarn lint:dependencies --check && yarn lint:changelog", - "lint:changelog": "auto-changelog validate --prettier", - "lint:constraints": "yarn constraints", - "lint:dependencies": "depcheck && yarn dedupe", + "build": "yarn run build:source && yarn run build:types", + "build:clean": "yarn clean && yarn build", + "build:docs": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run build:docs", + "build:source": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run build", + "build:types": "tsc --build tsconfig.build.json --verbose", + "build:watch": "yarn run build --watch", + "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 dist '**/*.tsbuildinfo'", + "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:eslint": "eslint . --cache --ext js,cjs,ts", - "lint:fix": "yarn lint:eslint --fix && yarn lint:constraints --fix && yarn lint:misc --write && yarn lint:dependencies && yarn lint:changelog", - "lint:misc": "prettier '**/*.json' '**/*.md' '**/*.yml' '!.yarnrc.yml' --ignore-path .gitignore --no-error-on-unmatched-pattern", + "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix && yarn lint:dependencies:fix", + "lint:misc": "prettier '**/*.json' '**/*.md' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path .gitignore", "prepack": "./scripts/prepack.sh", - "test": "jest && jest-it-up && attw --pack", - "test:watch": "jest --watch" + "test": "yarn test:verbose --silent --collectCoverage=false --reporters=jest-silent-reporter", + "test:clean": "yarn workspaces foreach --all --parallel --verbose run test:clean && yarn test", + "test:verbose": "yarn workspaces foreach --all --parallel --verbose run test:verbose" + }, + "resolutions": { + "tsup@^8.0.2": "patch:tsup@npm%3A8.0.2#./.yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch" }, "devDependencies": { - "@arethetypeswrong/cli": "^0.15.3", "@lavamoat/allow-scripts": "^3.0.4", "@lavamoat/preinstall-always-fail": "^2.0.0", - "@metamask/auto-changelog": "^3.4.3", + "@metamask/auto-changelog": "^3.4.4", "@metamask/eslint-config": "^12.2.0", "@metamask/eslint-config-jest": "^12.1.0", "@metamask/eslint-config-nodejs": "^12.1.0", "@metamask/eslint-config-typescript": "^12.1.0", - "@ts-bridge/cli": "^0.1.4", - "@ts-bridge/shims": "^0.1.1", "@types/jest": "^28.1.6", - "@types/node": "^18.18", + "@types/node": "^18.18.14", "@typescript-eslint/eslint-plugin": "^5.43.0", "@typescript-eslint/parser": "^5.43.0", - "@yarnpkg/types": "^4.0.0-rc.52", + "@yarnpkg/types": "^4.0.0", "depcheck": "^1.4.3", "eslint": "^8.44.0", "eslint-config-prettier": "^8.8.0", @@ -71,25 +57,23 @@ "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-promise": "^6.1.1", "jest": "^28.1.3", - "jest-it-up": "^2.0.2", + "jest-silent-reporter": "^0.6.0", "prettier": "^2.7.1", "prettier-plugin-packagejson": "^2.3.0", + "rimraf": "^6.0.0", "ts-jest": "^28.0.7", - "ts-node": "^10.7.0", - "typedoc": "^0.23.15", - "typescript": "~4.8.4" + "tsup": "^8.0.2", + "typedoc": "^0.24.8", + "typescript": "~4.9.5" }, "packageManager": "yarn@4.2.2", "engines": { "node": "^18.18 || >=20" }, - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" - }, "lavamoat": { "allowScripts": { - "@lavamoat/preinstall-always-fail": false + "@lavamoat/preinstall-always-fail": false, + "tsup>esbuild": true } } } diff --git a/CHANGELOG.md b/packages/playground/CHANGELOG.md similarity index 79% rename from CHANGELOG.md rename to packages/playground/CHANGELOG.md index ffa0b6ac4..0c82cb1ed 100644 --- a/CHANGELOG.md +++ b/packages/playground/CHANGELOG.md @@ -7,4 +7,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -[Unreleased]: https://github.com/MetaMask/metamask-module-template/ +[Unreleased]: https://github.com/MetaMask/ocap-kernel/ diff --git a/packages/playground/LICENSE b/packages/playground/LICENSE new file mode 100644 index 000000000..6f8bff03f --- /dev/null +++ b/packages/playground/LICENSE @@ -0,0 +1,20 @@ +MIT License + +Copyright (c) 2024 MetaMask + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE diff --git a/packages/playground/README.md b/packages/playground/README.md new file mode 100644 index 000000000..fc2546914 --- /dev/null +++ b/packages/playground/README.md @@ -0,0 +1,15 @@ +# `@metamask/playground` + +An Ocap Kernel playground. + +## Installation + +`yarn add @metamask/playground` + +or + +`npm install @metamask/playground` + +## Contributing + +This package is part of a monorepo. Instructions for contributing can be found in the [monorepo README](https://github.com/MetaMask/ocap-kernel#readme). diff --git a/packages/playground/jest.config.js b/packages/playground/jest.config.js new file mode 100644 index 000000000..0eec2ce3a --- /dev/null +++ b/packages/playground/jest.config.js @@ -0,0 +1,16 @@ +/* + * For a detailed explanation regarding each configuration property and type check, visit: + * https://jestjs.io/docs/configuration + */ + +const merge = require('deepmerge'); +const path = require('path'); + +const baseConfig = require('../../jest.config.packages'); + +const displayName = path.basename(__dirname); + +module.exports = merge(baseConfig, { + // The display name when running multiple projects + displayName, +}); diff --git a/packages/playground/package.json b/packages/playground/package.json new file mode 100644 index 000000000..599298439 --- /dev/null +++ b/packages/playground/package.json @@ -0,0 +1,62 @@ +{ + "name": "@metamask/playground", + "version": "0.0.0", + "description": "An Ocap Kernel playground", + "keywords": [ + "MetaMask", + "Ethereum" + ], + "homepage": "https://github.com/MetaMask/ocap-kernel/tree/main/packages/playground#readme", + "bugs": { + "url": "https://github.com/MetaMask/ocap-kernel/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/MetaMask/ocap-kernel.git" + }, + "license": "MIT", + "sideEffects": false, + "exports": { + ".": { + "import": "./dist/index.mjs", + "require": "./dist/index.js", + "types": "./dist/types/index.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "./dist/index.js", + "types": "./dist/types/index.d.ts", + "files": [ + "dist/" + ], + "scripts": { + "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build:docs": "typedoc", + "changelog:validate": "../../scripts/validate-changelog.sh @metamask/playground", + "publish:preview": "yarn npm publish --tag preview", + "test": "jest --reporters=jest-silent-reporter", + "posttest": "jest-it-up", + "test:clean": "jest --clearCache", + "test:verbose": "jest --verbose", + "test:watch": "jest --watch" + }, + "devDependencies": { + "@metamask/auto-changelog": "^3.4.4", + "@types/jest": "^28.1.6", + "deepmerge": "^4.3.1", + "jest": "^28.1.3", + "jest-it-up": "^2.0.2", + "ts-jest": "^28.0.7", + "tsup": "^8.0.2", + "typedoc": "^0.24.8", + "typedoc-plugin-missing-exports": "^2.0.0", + "typescript": "~4.9.5" + }, + "engines": { + "node": "^18.18 || >=20" + }, + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org/" + } +} diff --git a/packages/playground/src/index.test.ts b/packages/playground/src/index.test.ts new file mode 100644 index 000000000..bc062d369 --- /dev/null +++ b/packages/playground/src/index.test.ts @@ -0,0 +1,9 @@ +import greeter from '.'; + +describe('Test', () => { + it('greets', () => { + const name = 'Huey'; + const result = greeter(name); + expect(result).toBe('Hello, Huey!'); + }); +}); diff --git a/packages/playground/src/index.ts b/packages/playground/src/index.ts new file mode 100644 index 000000000..6972c1172 --- /dev/null +++ b/packages/playground/src/index.ts @@ -0,0 +1,9 @@ +/** + * Example function that returns a greeting for the given name. + * + * @param name - The name to greet. + * @returns The greeting. + */ +export default function greeter(name: string): string { + return `Hello, ${name}!`; +} diff --git a/packages/playground/tsconfig.build.json b/packages/playground/tsconfig.build.json new file mode 100644 index 000000000..ff5a1ceaf --- /dev/null +++ b/packages/playground/tsconfig.build.json @@ -0,0 +1,10 @@ +{ + "extends": "../../tsconfig.packages.build.json", + "compilerOptions": { + "baseUrl": "./", + "outDir": "./dist/types", + "rootDir": "./src" + }, + "references": [], + "include": ["../../types", "./src"] +} diff --git a/packages/playground/tsconfig.json b/packages/playground/tsconfig.json new file mode 100644 index 000000000..6f1d89de4 --- /dev/null +++ b/packages/playground/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.packages.json", + "compilerOptions": { + "baseUrl": "./" + }, + "references": [], + "include": ["./src"] +} diff --git a/packages/playground/tsup.config.ts b/packages/playground/tsup.config.ts new file mode 100644 index 000000000..c89908020 --- /dev/null +++ b/packages/playground/tsup.config.ts @@ -0,0 +1,16 @@ +import deepmerge from 'deepmerge'; +// The Node ESLint plugin is confused. +// eslint-disable-next-line n/no-extraneous-import +import type { Options } from 'tsup'; + +import packageJson from './package.json'; + +// `tsup.config.ts` is not under `rootDir`, so we need to use `require` instead. +// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires +const { default: baseConfig } = require('../../tsup.config'); + +const config: Options = { + name: packageJson.name, +}; + +export default deepmerge(baseConfig, config); diff --git a/packages/playground/typedoc.json b/packages/playground/typedoc.json new file mode 100644 index 000000000..c9da015db --- /dev/null +++ b/packages/playground/typedoc.json @@ -0,0 +1,7 @@ +{ + "entryPoints": ["./src/index.ts"], + "excludePrivate": true, + "hideGenerator": true, + "out": "docs", + "tsconfig": "./tsconfig.build.json" +} diff --git a/scripts/validate-changelog.sh b/scripts/validate-changelog.sh new file mode 100755 index 000000000..19dabb362 --- /dev/null +++ b/scripts/validate-changelog.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -euo pipefail + +if [[ $# -eq 0 ]]; then + echo "Missing package name." + exit 1 +fi + +package_name="$1" +shift # remove package name from arguments + +if [[ "${GITHUB_REF:-}" =~ '^release/' ]]; then + yarn auto-changelog validate --prettier --tag-prefix "${package_name}@" --rc "$@" +else + yarn auto-changelog validate --prettier --tag-prefix "${package_name}@" "$@" +fi diff --git a/tsconfig.build.json b/tsconfig.build.json index 0160af457..08f850ad7 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -1,24 +1,5 @@ { - "extends": "./tsconfig.json", - "compilerOptions": { - "declaration": true, - "declarationMap": true, - "emitDeclarationOnly": true, - "inlineSources": true, - "noEmit": false, - "outDir": "dist", - "rootDir": "src", - "sourceMap": true - }, - "include": ["./src/**/*.ts"], - "exclude": [ - "./src/**/__fixtures__/**/*", - "./src/**/__mocks__/**/*", - "./src/**/__test__/**/*", - "./src/**/__tests__/**/*", - "./src/**/__snapshots__/**/*", - "./src/**/*.test.ts", - "./src/**/*.test-d.ts", - "./src/**/*.test.*.ts" - ] + "files": [], + "include": [], + "references": [{ "path": "./packages/playground/tsconfig.build.json" }] } diff --git a/tsconfig.json b/tsconfig.json index 56f653116..7982f2ba5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,16 +1,10 @@ { "compilerOptions": { "esModuleInterop": true, - "exactOptionalPropertyTypes": true, - "forceConsistentCasingInFileNames": true, - "lib": ["ES2020"], - "module": "CommonJS", - "moduleResolution": "node", "noEmit": true, - "noErrorTruncation": true, - "noUncheckedIndexedAccess": true, - "strict": true, - "target": "es2020" + "resolveJsonModule": true }, - "exclude": ["./dist", "**/node_modules"] + "files": [], + "include": ["tsup.config.ts"], + "references": [{ "path": "./packages/playground" }] } diff --git a/tsconfig.packages.build.json b/tsconfig.packages.build.json new file mode 100644 index 000000000..e77c1d80b --- /dev/null +++ b/tsconfig.packages.build.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.packages.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "inlineSources": true, + "sourceMap": true + }, + "exclude": ["./jest.config.packages.ts", "**/*.test.ts", "**/jest.config.ts"] +} diff --git a/tsconfig.packages.json b/tsconfig.packages.json new file mode 100644 index 000000000..d7ee52ad2 --- /dev/null +++ b/tsconfig.packages.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "composite": true, + "exactOptionalPropertyTypes": true, + "forceConsistentCasingInFileNames": true, + "lib": ["ES2020"], + "module": "CommonJS", + "moduleResolution": "Node", + "noErrorTruncation": true, + "noUncheckedIndexedAccess": true, + /** + * Here we ensure that TypeScript resolves `@metamask/*` imports to the + * uncompiled source code for packages that live in this repo. + * + * NOTE: This must be synchronized with the `moduleNameMapper` option in + * `jest.config.packages.js`. + */ + "paths": { + "@metamask/*": ["../*/src"] + }, + "strict": true, + "target": "ES2020", + "useUnknownInCatchVariables": true + } +} diff --git a/tsup.config.ts b/tsup.config.ts new file mode 100644 index 000000000..e297bd393 --- /dev/null +++ b/tsup.config.ts @@ -0,0 +1,51 @@ +import { builtinModules } from 'module'; +import type { Options } from 'tsup'; + +const config: Options = { + // Clean the dist folder before bundling. + clean: true, + + // The entry to bundle. + entry: [ + 'src/**/*.ts', + 'src/**/*.tsx', + '!src/**/__fixtures__/**/*', + '!src/**/__mocks__/**/*', + '!src/**/__test__/**/*', + '!src/**/__tests__/**/*', + '!src/**/__snapshots__/**/*', + '!src/**/test-utils/**/*', + '!src/**/*.test.ts', + '!src/**/*.test.tsx', + '!src/**/*.test-d.ts', + '!src/**/*.test.*.ts', + '!src/**/*.test.*.tsx', + ], + + // External modules that should not be processed by `tsup`. We want to + // exclude built-in Node.js modules from the bundle. + // https://tsup.egoist.dev/#excluding-packages + external: builtinModules, + + // The output formats. We want to generate both CommonJS and ESM bundles. + // https://tsup.egoist.dev/#bundle-formats + format: ['cjs', 'esm'], + + // The platform to target when generating the bundles. `neutral` means that + // the bundles will work in both Node.js and browsers. + platform: 'neutral', + + // Hide unnecessary logs from the console. Warnings and errors will still be + // shown. + silent: true, + + // Generate sourcemaps as separate files. + // https://tsup.egoist.dev/#generate-sourcemap-file + sourcemap: true, + + // Split the output into chunks. This is useful for tree-shaking. + // https://tsup.egoist.dev/#code-splitting + splitting: true, +}; + +export default config; diff --git a/yarn.config.cjs b/yarn.config.cjs deleted file mode 100644 index 1a50431ce..000000000 --- a/yarn.config.cjs +++ /dev/null @@ -1,286 +0,0 @@ -/** @type {import('@yarnpkg/types')} */ -const { defineConfig } = require('@yarnpkg/types'); -const { readFile } = require('fs/promises'); -const { basename, resolve } = require('path'); - -/** - * Aliases for the Yarn type definitions, to make the code more readable. - * - * @typedef {import('@yarnpkg/types').Yarn.Constraints.Workspace} Workspace - * @typedef {import('@yarnpkg/types').Yarn.Constraints.Dependency} Dependency - */ - -/** - * The base URL for the GitHub repository. - * - * @type {string} - */ -const BASE_URL = 'https://github.com/MetaMask/'; - -/** - * Get the name of the workspace. The workspace name is expected to be in the - * form `@metamask/workspace-name`, and this function will extract - * `workspace-name`. - * - * @param {Workspace} workspace - The workspace. - * @returns {string} The name of the workspace. - */ -function getWorkspaceName(workspace) { - return basename(workspace.ident); -} - -/** - * Get the absolute path to a file within the workspace. - * - * @param {Workspace} workspace - The workspace. - * @param {string} path - The path to the file, relative to the workspace root. - * @returns {string} The absolute path to the file. - */ -function getWorkspacePath(workspace, path) { - return resolve(__dirname, workspace.cwd, path); -} - -/** - * Get the contents of a file within the workspace. The file is expected to be - * encoded as UTF-8. - * - * @param {Workspace} workspace - The workspace. - * @param {string} path - The path to the file, relative to the workspace root. - * @returns {Promise} The contents of the file. - */ -async function getWorkspaceFile(workspace, path) { - return await readFile(getWorkspacePath(workspace, path), 'utf8'); -} - -/** - * Expect that the workspace has the given field, and that it is a non-null - * value. If the field is not present, or is null, this will log an error, and - * cause the constraint to fail. - * - * If a value is provided, this will also verify that the field is equal to the - * given value. - * - * @param {Workspace} workspace - The workspace to check. - * @param {string} field - The field to check. - * @param {any} [value] - The value to check. - */ -function expectWorkspaceField(workspace, field, value) { - const fieldValue = workspace.manifest[field]; - if (fieldValue === null) { - workspace.error(`Missing required field "${field}".`); - return; - } - - if (value) { - workspace.set(field, value); - } -} - -/** - * Expect that the workspace has a description, and that it is a non-null - * string. If the description is not present, or is null, this will log an - * error, and cause the constraint to fail. - * - * This will also verify that the description does not end with a period. - * - * @param {Workspace} workspace - The workspace to check. - */ -function expectWorkspaceDescription(workspace) { - expectWorkspaceField(workspace, 'description'); - - const { description } = workspace.manifest; - if (typeof description !== 'string') { - workspace.error( - `Expected description to be a string, but got ${typeof description}.`, - ); - return; - } - - if (description.endsWith('.')) { - workspace.set('description', description.slice(0, -1)); - } -} - -/** - * Expect that if a dependency is listed under "dependencies", it is not also - * listed under "devDependencies". If it is, this will log an error, and cause - * the constraint to fail. - * - * @param {Workspace} workspace - The workspace to check. - */ -function expectWorkspaceDependencies(workspace) { - workspace.pkg.dependencies.forEach((dependency) => { - // `workspace.pkg` does not have a `devDependencies` field, so we need to - // check the `manifest` instead. - const isDependency = Boolean( - workspace.manifest.dependencies?.[dependency.ident], - ); - const isDevDependency = Boolean( - workspace.manifest.devDependencies?.[dependency.ident], - ); - - if (isDependency && isDevDependency) { - workspace.unset(`devDependencies.${dependency.ident}`); - } - }); -} - -/** - * Expect that the workspace has a README.md file, and that it is a non-empty - * string. The README.md is expected to: - * - * - Not contain template instructions (unless the workspace is the module - * template itself). - * - Match the version of Node.js specified in the `.nvmrc` file. - * - * @param {Workspace} workspace - The workspace to check. - * @param {string} workspaceName - The name of the workspace. - * @returns {Promise} - */ -async function expectReadme(workspace, workspaceName) { - const readme = await getWorkspaceFile(workspace, 'README.md'); - if ( - workspaceName !== 'metamask-module-template' && - readme.includes('## Template Instructions') - ) { - workspace.error( - 'The README.md contains template instructions. These instructions should be removed.', - ); - } - - if (!readme.includes(`yarn add @metamask/${workspaceName}`)) { - workspace.error( - `The README.md does not contain an example of how to install the package using Yarn (\`yarn add @metamask/${workspaceName}\`). Please add an example.`, - ); - } - - if (!readme.includes(`npm install @metamask/${workspaceName}`)) { - workspace.error( - `The README.md does not contain an example of how to install the package using npm (\`npm install @metamask/${workspaceName}\`). Please add an example.`, - ); - } -} - -/** - * Expect that the workspace has a pull_request_template.md file, and that it - * is a non-empty string. The pull_request_template.md is expected to: - * - * - Not contain an examples section (unless the workspace is the module - * template itself). - * - * @param {Workspace} workspace - The workspace to check. - * @param {string} workspaceName - The name of the workspace. - * @returns {Promise} - */ -async function expectPullRequestTemplate(workspace, workspaceName) { - if (workspaceName === 'metamask-module-template') { - return; - } - - const pullRequestTemplate = await getWorkspaceFile( - workspace, - '.github/PULL_REQUEST_TEMPLATE.md', - ); - - if (!pullRequestTemplate) { - workspace.error( - 'The pull_request_template.md is missing. This should be added.', - ); - } - - if (pullRequestTemplate.includes('## Examples')) { - workspace.error( - 'The pull_request_template.md contains an examples section. This section should be removed.', - ); - } -} - -/** - * Expect that the workspace has a valid `exports` field. The `exports` field - * is expected to: - * - * - Export a `types` entrypoint as the first export, or not at all. - * - * This is required for proper TypeScript support when using `Node16` (or later) - * module resolution. - * - * @param {Workspace} workspace - The workspace to check. - * @returns {void} - */ -function expectExports(workspace) { - const { exports: manifestExports } = workspace.manifest; - Object.entries(manifestExports) - .filter(([, exportValue]) => typeof exportValue !== 'string') - .forEach(([exportName, exportObject]) => { - const keys = Object.keys(exportObject); - if (keys.includes('types') && keys[0] !== 'types') { - workspace.error( - `The "types" export must be the first export in the "exports" field for the export "${exportName}".`, - ); - } - }); -} - -module.exports = defineConfig({ - async constraints({ Yarn }) { - const workspace = Yarn.workspace(); - const workspaceName = getWorkspaceName(workspace); - const workspaceRepository = `${BASE_URL}${workspaceName}`; - - // The package must have a name, version, description, and license. - expectWorkspaceField(workspace, 'name', `@metamask/${workspaceName}`); - expectWorkspaceField(workspace, 'version'); - expectWorkspaceField(workspace, 'license'); - expectWorkspaceDescription(workspace); - - // The package must have a valid README.md file. - await expectReadme(workspace, workspaceName); - - // The package must have a valid pull request template. - await expectPullRequestTemplate(workspace, workspaceName); - - expectWorkspaceDependencies(workspace); - - // The homepage of the package must match its name. - workspace.set('homepage', `${workspaceRepository}#readme`); - - // The bugs URL of the package must point to the Issues page for the - // repository. - workspace.set('bugs.url', `${workspaceRepository}/issues`); - - // The package must specify Git as the repository type, and match the URL of - // a repository within the MetaMask organization. - workspace.set('repository.type', 'git'); - workspace.set('repository.url', `${workspaceRepository}.git`); - - // The package must specify a minimum Node.js version of 18.18. - workspace.set('engines.node', '^18.18 || >=20'); - - // The package must provide the location of the CommonJS-compatible - // entrypoint and its matching type declaration file. - workspace.set('main', './dist/index.cjs'); - workspace.set('exports["."].require.default', './dist/index.cjs'); - workspace.set('types', './dist/index.d.cts'); - workspace.set('exports["."].require.types', './dist/index.d.cts'); - - // The package must provide the location of the ESM-compatible JavaScript - // entrypoint and its matching type declaration file. - workspace.set('module', './dist/index.mjs'); - workspace.set('exports["."].import.default', './dist/index.mjs'); - workspace.set('exports["."].import.types', './dist/index.d.mts'); - - // The package must export a `package.json` file. - workspace.set('exports["./package.json"]', './package.json'); - - expectExports(workspace); - - // The list of files included in the package must only include files - // generated during the build process. - workspace.set('files', ['dist']); - - // The package is public, and should be published to the npm registry. - workspace.unset('private'); - workspace.set('publishConfig.access', 'public'); - workspace.set('publishConfig.registry', 'https://registry.npmjs.org/'); - }, -}); diff --git a/yarn.lock b/yarn.lock index 9666a56f8..b3a7ccca9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -22,44 +22,6 @@ __metadata: languageName: node linkType: hard -"@andrewbranch/untar.js@npm:^1.0.3": - version: 1.0.3 - resolution: "@andrewbranch/untar.js@npm:1.0.3" - checksum: 10/a32de53839fc61af90a394cf93d4368aacd167c9c80f0b3ba0c268460942a6ce2bfe257b6d3f03986b9dcb7368f10b9dc7f66c2f94254d2662da8278454e7d12 - languageName: node - linkType: hard - -"@arethetypeswrong/cli@npm:^0.15.3": - version: 0.15.3 - resolution: "@arethetypeswrong/cli@npm:0.15.3" - dependencies: - "@arethetypeswrong/core": "npm:0.15.1" - chalk: "npm:^4.1.2" - cli-table3: "npm:^0.6.3" - commander: "npm:^10.0.1" - marked: "npm:^9.1.2" - marked-terminal: "npm:^6.0.0" - semver: "npm:^7.5.4" - bin: - attw: dist/index.js - checksum: 10/d64eea5c946669a24cd93007b03546b1422b9fa26e298589add461fc818a9aa1fddd2f0d3a7ed3a5f302f6c047ba574782bf4b04f7b087f1a370540e5dbfbb90 - languageName: node - linkType: hard - -"@arethetypeswrong/core@npm:0.15.1": - version: 0.15.1 - resolution: "@arethetypeswrong/core@npm:0.15.1" - dependencies: - "@andrewbranch/untar.js": "npm:^1.0.3" - fflate: "npm:^0.8.2" - semver: "npm:^7.5.4" - ts-expose-internals-conditionally: "npm:1.0.0-empty.0" - typescript: "npm:5.3.3" - validate-npm-package-name: "npm:^5.0.0" - checksum: 10/af07d7d0d93926b019d8dc412cee251db972e443be181ef4ef79d28d61f76542b2911a381397ab3ddc23d9a669d830994b4f3b0033f8244f3750027f319595af - languageName: node - linkType: hard - "@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.22.13": version: 7.22.13 resolution: "@babel/code-frame@npm:7.22.13" @@ -451,37 +413,175 @@ __metadata: languageName: node linkType: hard -"@colors/colors@npm:1.5.0": - version: 1.5.0 - resolution: "@colors/colors@npm:1.5.0" - checksum: 10/9d226461c1e91e95f067be2bdc5e6f99cfe55a721f45afb44122e23e4b8602eeac4ff7325af6b5a369f36396ee1514d3809af3f57769066d80d83790d8e53339 +"@es-joy/jsdoccomment@npm:~0.36.1": + version: 0.36.1 + resolution: "@es-joy/jsdoccomment@npm:0.36.1" + dependencies: + comment-parser: "npm:1.3.1" + esquery: "npm:^1.4.0" + jsdoc-type-pratt-parser: "npm:~3.1.0" + checksum: 10/0701c6aa187614269e0b67aed7932a9376d00a765a9521b61e019cb37cfdddf861a5822a55ce6dba30c19f533f7b7d0aad83e4e53e3b0b330aa64f77c67fcc57 languageName: node linkType: hard -"@cspotcode/source-map-consumer@npm:0.8.0": - version: 0.8.0 - resolution: "@cspotcode/source-map-consumer@npm:0.8.0" - checksum: 10/dfe1399712e4d54e1d53b0c7782f929647ff8675c37ae7637ce2ffdbcc8bad06fea969bcbec6147e7ea70a89257cfc86695a3702c1946a1c334454480937b966 +"@esbuild/aix-ppc64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/aix-ppc64@npm:0.19.12" + conditions: os=aix & cpu=ppc64 languageName: node linkType: hard -"@cspotcode/source-map-support@npm:0.7.0": - version: 0.7.0 - resolution: "@cspotcode/source-map-support@npm:0.7.0" - dependencies: - "@cspotcode/source-map-consumer": "npm:0.8.0" - checksum: 10/d58b31640c4b1438c0caf8ed7eb46647674c042a625919660d9fb2d76f3621875520082934bae88ef54a75d53e8f9cafb506160bb02403a19e7155aa5f4ac59b +"@esbuild/android-arm64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/android-arm64@npm:0.19.12" + conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@es-joy/jsdoccomment@npm:~0.36.1": - version: 0.36.1 - resolution: "@es-joy/jsdoccomment@npm:0.36.1" - dependencies: - comment-parser: "npm:1.3.1" - esquery: "npm:^1.4.0" - jsdoc-type-pratt-parser: "npm:~3.1.0" - checksum: 10/0701c6aa187614269e0b67aed7932a9376d00a765a9521b61e019cb37cfdddf861a5822a55ce6dba30c19f533f7b7d0aad83e4e53e3b0b330aa64f77c67fcc57 +"@esbuild/android-arm@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/android-arm@npm:0.19.12" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@esbuild/android-x64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/android-x64@npm:0.19.12" + conditions: os=android & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/darwin-arm64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/darwin-arm64@npm:0.19.12" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/darwin-x64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/darwin-x64@npm:0.19.12" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/freebsd-arm64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/freebsd-arm64@npm:0.19.12" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/freebsd-x64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/freebsd-x64@npm:0.19.12" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/linux-arm64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/linux-arm64@npm:0.19.12" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/linux-arm@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/linux-arm@npm:0.19.12" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@esbuild/linux-ia32@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/linux-ia32@npm:0.19.12" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/linux-loong64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/linux-loong64@npm:0.19.12" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + +"@esbuild/linux-mips64el@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/linux-mips64el@npm:0.19.12" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + +"@esbuild/linux-ppc64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/linux-ppc64@npm:0.19.12" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/linux-riscv64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/linux-riscv64@npm:0.19.12" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + +"@esbuild/linux-s390x@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/linux-s390x@npm:0.19.12" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + +"@esbuild/linux-x64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/linux-x64@npm:0.19.12" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/netbsd-x64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/netbsd-x64@npm:0.19.12" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openbsd-x64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/openbsd-x64@npm:0.19.12" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/sunos-x64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/sunos-x64@npm:0.19.12" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/win32-arm64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/win32-arm64@npm:0.19.12" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/win32-ia32@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/win32-ia32@npm:0.19.12" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/win32-x64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/win32-x64@npm:0.19.12" + conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -848,6 +948,19 @@ __metadata: languageName: node linkType: hard +"@jest/types@npm:^26.6.2": + version: 26.6.2 + resolution: "@jest/types@npm:26.6.2" + dependencies: + "@types/istanbul-lib-coverage": "npm:^2.0.0" + "@types/istanbul-reports": "npm:^3.0.0" + "@types/node": "npm:*" + "@types/yargs": "npm:^15.0.0" + chalk: "npm:^4.0.0" + checksum: 10/02d42749c8c6dc7e3184d0ff0293dd91c97233c2e6dc3708d61ef33d3162d4f07ad38d2d8a39abd94cf2fced69b92a87565c7099137c4529809242ca327254af + languageName: node + linkType: hard + "@jest/types@npm:^28.1.3": version: 28.1.3 resolution: "@jest/types@npm:28.1.3" @@ -937,7 +1050,7 @@ __metadata: languageName: node linkType: hard -"@metamask/auto-changelog@npm:^3.4.3": +"@metamask/auto-changelog@npm:^3.4.4": version: 3.4.4 resolution: "@metamask/auto-changelog@npm:3.4.4" dependencies: @@ -1002,42 +1115,20 @@ __metadata: languageName: node linkType: hard -"@metamask/metamask-module-template@workspace:.": +"@metamask/playground@workspace:packages/playground": version: 0.0.0-use.local - resolution: "@metamask/metamask-module-template@workspace:." + resolution: "@metamask/playground@workspace:packages/playground" dependencies: - "@arethetypeswrong/cli": "npm:^0.15.3" - "@lavamoat/allow-scripts": "npm:^3.0.4" - "@lavamoat/preinstall-always-fail": "npm:^2.0.0" - "@metamask/auto-changelog": "npm:^3.4.3" - "@metamask/eslint-config": "npm:^12.2.0" - "@metamask/eslint-config-jest": "npm:^12.1.0" - "@metamask/eslint-config-nodejs": "npm:^12.1.0" - "@metamask/eslint-config-typescript": "npm:^12.1.0" - "@ts-bridge/cli": "npm:^0.1.4" - "@ts-bridge/shims": "npm:^0.1.1" + "@metamask/auto-changelog": "npm:^3.4.4" "@types/jest": "npm:^28.1.6" - "@types/node": "npm:^18.18" - "@typescript-eslint/eslint-plugin": "npm:^5.43.0" - "@typescript-eslint/parser": "npm:^5.43.0" - "@yarnpkg/types": "npm:^4.0.0-rc.52" - depcheck: "npm:^1.4.3" - eslint: "npm:^8.44.0" - eslint-config-prettier: "npm:^8.8.0" - eslint-plugin-import: "npm:~2.26.0" - eslint-plugin-jest: "npm:^27.2.2" - eslint-plugin-jsdoc: "npm:^39.9.1" - eslint-plugin-n: "npm:^15.7.0" - eslint-plugin-prettier: "npm:^4.2.1" - eslint-plugin-promise: "npm:^6.1.1" + deepmerge: "npm:^4.3.1" jest: "npm:^28.1.3" jest-it-up: "npm:^2.0.2" - prettier: "npm:^2.7.1" - prettier-plugin-packagejson: "npm:^2.3.0" ts-jest: "npm:^28.0.7" - ts-node: "npm:^10.7.0" - typedoc: "npm:^0.23.15" - typescript: "npm:~4.8.4" + tsup: "npm:^8.0.2" + typedoc: "npm:^0.24.8" + typedoc-plugin-missing-exports: "npm:^2.0.0" + typescript: "npm:~4.9.5" languageName: unknown linkType: soft @@ -1177,97 +1268,147 @@ __metadata: languageName: node linkType: hard -"@sinclair/typebox@npm:^0.24.1": - version: 0.24.28 - resolution: "@sinclair/typebox@npm:0.24.28" - checksum: 10/326152428f752bd3b5518e3998c1d24dea47dc1970b24dd34e89201f5836727633baf1486422b967b0c9477a2e767a53e04132c6c0f14628b9b8353394871cf3 +"@rollup/rollup-android-arm-eabi@npm:4.18.1": + version: 4.18.1 + resolution: "@rollup/rollup-android-arm-eabi@npm:4.18.1" + conditions: os=android & cpu=arm languageName: node linkType: hard -"@sindresorhus/is@npm:^4.6.0": - version: 4.6.0 - resolution: "@sindresorhus/is@npm:4.6.0" - checksum: 10/e7f36ed72abfcd5e0355f7423a72918b9748bb1ef370a59f3e5ad8d40b728b85d63b272f65f63eec1faf417cda89dcb0aeebe94015647b6054659c1442fe5ce0 +"@rollup/rollup-android-arm64@npm:4.18.1": + version: 4.18.1 + resolution: "@rollup/rollup-android-arm64@npm:4.18.1" + conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@sinonjs/commons@npm:^1.7.0": - version: 1.8.1 - resolution: "@sinonjs/commons@npm:1.8.1" - dependencies: - type-detect: "npm:4.0.8" - checksum: 10/856c3e1beeddae275fe67054396b69921091a4e7fb2ccc4e3e23d0f33ecc127eb64b953763113fccc70160fd69276ec31605e33a5e9ea1d272a1deb8a889693d +"@rollup/rollup-darwin-arm64@npm:4.18.1": + version: 4.18.1 + resolution: "@rollup/rollup-darwin-arm64@npm:4.18.1" + conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@sinonjs/fake-timers@npm:^9.1.2": - version: 9.1.2 - resolution: "@sinonjs/fake-timers@npm:9.1.2" - dependencies: - "@sinonjs/commons": "npm:^1.7.0" - checksum: 10/033c74ad389b0655b6af2fa1af31dddf45878e65879f06c5d1940e0ceb053a234f2f46c728dcd97df8ee9312431e45dd7aedaee3a69d47f73a2001a7547fc3d6 +"@rollup/rollup-darwin-x64@npm:4.18.1": + version: 4.18.1 + resolution: "@rollup/rollup-darwin-x64@npm:4.18.1" + conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@tootallnate/once@npm:2": - version: 2.0.0 - resolution: "@tootallnate/once@npm:2.0.0" - checksum: 10/ad87447820dd3f24825d2d947ebc03072b20a42bfc96cbafec16bff8bbda6c1a81fcb0be56d5b21968560c5359a0af4038a68ba150c3e1694fe4c109a063bed8 +"@rollup/rollup-linux-arm-gnueabihf@npm:4.18.1": + version: 4.18.1 + resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.18.1" + conditions: os=linux & cpu=arm & libc=glibc languageName: node linkType: hard -"@ts-bridge/cli@npm:^0.1.4": - version: 0.1.4 - resolution: "@ts-bridge/cli@npm:0.1.4" - dependencies: - chalk: "npm:^5.3.0" - resolve.exports: "npm:^2.0.2" - yargs: "npm:^17.7.2" - peerDependencies: - "@ts-bridge/shims": ^0.1.1 - typescript: ">=4.8.0" - peerDependenciesMeta: - "@ts-bridge/shims": - optional: true - bin: - ts-bridge: ./dist/index.js - tsbridge: ./dist/index.js - checksum: 10/db83db5d283d7341f53f042f115884f514acd1ce6c7e14975b821b39cc4852f3cd6e41790a8cbb2b8615f0e5de77e5bdcec0745935b41267b2af4db031400c84 +"@rollup/rollup-linux-arm-musleabihf@npm:4.18.1": + version: 4.18.1 + resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.18.1" + conditions: os=linux & cpu=arm & libc=musl languageName: node linkType: hard -"@ts-bridge/shims@npm:^0.1.1": - version: 0.1.1 - resolution: "@ts-bridge/shims@npm:0.1.1" - checksum: 10/df15df15450f0a6305033655a0afa2458a76362d644eab046d9899b9dc9ba200023144dc8d80040f68cd74f12ba4f2da2ea2c4c950d552ff66688eccd658e2f0 +"@rollup/rollup-linux-arm64-gnu@npm:4.18.1": + version: 4.18.1 + resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.18.1" + conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@tsconfig/node10@npm:^1.0.7": - version: 1.0.8 - resolution: "@tsconfig/node10@npm:1.0.8" - checksum: 10/b8d5fffbc6b17ef64ef74f7fdbccee02a809a063ade785c3648dae59406bc207f70ea2c4296f92749b33019fa36a5ae716e42e49cc7f1bbf0fd147be0d6b970a +"@rollup/rollup-linux-arm64-musl@npm:4.18.1": + version: 4.18.1 + resolution: "@rollup/rollup-linux-arm64-musl@npm:4.18.1" + conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@tsconfig/node12@npm:^1.0.7": - version: 1.0.9 - resolution: "@tsconfig/node12@npm:1.0.9" - checksum: 10/a01b2400ab3582b86b589c6d31dcd0c0656f333adecde85d6d7d4086adb059808b82692380bb169546d189bf771ae21d02544a75b57bd6da4a5dd95f8567bec9 +"@rollup/rollup-linux-powerpc64le-gnu@npm:4.18.1": + version: 4.18.1 + resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.18.1" + conditions: os=linux & cpu=ppc64 & libc=glibc languageName: node linkType: hard -"@tsconfig/node14@npm:^1.0.0": - version: 1.0.1 - resolution: "@tsconfig/node14@npm:1.0.1" - checksum: 10/976345e896c0f059867f94f8d0f6ddb8b1844fb62bf36b727de8a9a68f024857e5db97ed51d3325e23e0616a5e48c034ff51a8d595b3fe7e955f3587540489be +"@rollup/rollup-linux-riscv64-gnu@npm:4.18.1": + version: 4.18.1 + resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.18.1" + conditions: os=linux & cpu=riscv64 & libc=glibc languageName: node linkType: hard -"@tsconfig/node16@npm:^1.0.2": - version: 1.0.2 - resolution: "@tsconfig/node16@npm:1.0.2" - checksum: 10/ca94d3639714672bbfd55f03521d3f56bb6a25479bd425da81faf21f13e1e9d15f40f97377dedbbf477a5841c5b0c8f4cd1b391f33553d750b9202c54c2c07aa +"@rollup/rollup-linux-s390x-gnu@npm:4.18.1": + version: 4.18.1 + resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.18.1" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-x64-gnu@npm:4.18.1": + version: 4.18.1 + resolution: "@rollup/rollup-linux-x64-gnu@npm:4.18.1" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-x64-musl@npm:4.18.1": + version: 4.18.1 + resolution: "@rollup/rollup-linux-x64-musl@npm:4.18.1" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@rollup/rollup-win32-arm64-msvc@npm:4.18.1": + version: 4.18.1 + resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.18.1" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-win32-ia32-msvc@npm:4.18.1": + version: 4.18.1 + resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.18.1" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@rollup/rollup-win32-x64-msvc@npm:4.18.1": + version: 4.18.1 + resolution: "@rollup/rollup-win32-x64-msvc@npm:4.18.1" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@sinclair/typebox@npm:^0.24.1": + version: 0.24.28 + resolution: "@sinclair/typebox@npm:0.24.28" + checksum: 10/326152428f752bd3b5518e3998c1d24dea47dc1970b24dd34e89201f5836727633baf1486422b967b0c9477a2e767a53e04132c6c0f14628b9b8353394871cf3 + languageName: node + linkType: hard + +"@sinonjs/commons@npm:^1.7.0": + version: 1.8.1 + resolution: "@sinonjs/commons@npm:1.8.1" + dependencies: + type-detect: "npm:4.0.8" + checksum: 10/856c3e1beeddae275fe67054396b69921091a4e7fb2ccc4e3e23d0f33ecc127eb64b953763113fccc70160fd69276ec31605e33a5e9ea1d272a1deb8a889693d + languageName: node + linkType: hard + +"@sinonjs/fake-timers@npm:^9.1.2": + version: 9.1.2 + resolution: "@sinonjs/fake-timers@npm:9.1.2" + dependencies: + "@sinonjs/commons": "npm:^1.7.0" + checksum: 10/033c74ad389b0655b6af2fa1af31dddf45878e65879f06c5d1940e0ceb053a234f2f46c728dcd97df8ee9312431e45dd7aedaee3a69d47f73a2001a7547fc3d6 + languageName: node + linkType: hard + +"@tootallnate/once@npm:2": + version: 2.0.0 + resolution: "@tootallnate/once@npm:2.0.0" + checksum: 10/ad87447820dd3f24825d2d947ebc03072b20a42bfc96cbafec16bff8bbda6c1a81fcb0be56d5b21968560c5359a0af4038a68ba150c3e1694fe4c109a063bed8 languageName: node linkType: hard @@ -1319,6 +1460,13 @@ __metadata: languageName: node linkType: hard +"@types/estree@npm:1.0.5": + version: 1.0.5 + resolution: "@types/estree@npm:1.0.5" + checksum: 10/7de6d928dd4010b0e20c6919e1a6c27b61f8d4567befa89252055fad503d587ecb9a1e3eab1b1901f923964d7019796db810b7fd6430acb26c32866d126fd408 + languageName: node + linkType: hard + "@types/glob@npm:^7.1.1": version: 7.1.3 resolution: "@types/glob@npm:7.1.3" @@ -1394,12 +1542,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:^18.18": - version: 18.19.34 - resolution: "@types/node@npm:18.19.34" +"@types/node@npm:*, @types/node@npm:^18.18.14": + version: 18.19.39 + resolution: "@types/node@npm:18.19.39" dependencies: undici-types: "npm:~5.26.4" - checksum: 10/5c8daed0c672e824c36d31312377fc4dddf3e91006fadad719527bb2bd710d4207193c1c7034da9d2d6cbc03da89d3693c86207f751540c18a7d38802040fbd9 + checksum: 10/d2fe84adf087a4184217b666f675e99678060d15f84882a4a1c3e49c3dca521a7e99a201a3c073c2b60b00419f1f4c3b357d8f7397f65e400dc3b77b0145a1da languageName: node linkType: hard @@ -1438,6 +1586,15 @@ __metadata: languageName: node linkType: hard +"@types/yargs@npm:^15.0.0": + version: 15.0.19 + resolution: "@types/yargs@npm:15.0.19" + dependencies: + "@types/yargs-parser": "npm:*" + checksum: 10/c3abcd3472c32c02702f365dc1702a0728562deb8a8c61f3ce2161958d756cc033f7d78567565b4eba62f5869e9b5eac93d4c1dcb2c97af17aafda8f9f892b4b + languageName: node + linkType: hard + "@types/yargs@npm:^17.0.8": version: 17.0.11 resolution: "@types/yargs@npm:17.0.11" @@ -1637,12 +1794,12 @@ __metadata: languageName: node linkType: hard -"@yarnpkg/types@npm:^4.0.0-rc.52": - version: 4.0.0-rc.52 - resolution: "@yarnpkg/types@npm:4.0.0-rc.52" +"@yarnpkg/types@npm:^4.0.0": + version: 4.0.0 + resolution: "@yarnpkg/types@npm:4.0.0" dependencies: tslib: "npm:^2.4.0" - checksum: 10/858c2b2848a6449004e9cb7bf847b8aabdc6b4bd0c73e8aedae1a1ff8fab7cc8e4ee18a054076e9bb374c59435439715f7844d7993ca0b252f244ead06bcd87d + checksum: 10/f9670e120761a4d17461df2f01aa4b92213fbdd063501a36145d11ea01bd87ba01d44615cba3d6bc8f9bfc39a03a9a6452bf0436c7fb0c9c5311352b975349e6 languageName: node linkType: hard @@ -1669,14 +1826,7 @@ __metadata: languageName: node linkType: hard -"acorn-walk@npm:^8.1.1": - version: 8.2.0 - resolution: "acorn-walk@npm:8.2.0" - checksum: 10/e69f7234f2adfeb16db3671429a7c80894105bd7534cb2032acf01bb26e6a847952d11a062d071420b43f8d82e33d2e57f26fe87d9cce0853e8143d8910ff1de - languageName: node - linkType: hard - -"acorn@npm:^8.4.1, acorn@npm:^8.9.0": +"acorn@npm:^8.9.0": version: 8.10.0 resolution: "acorn@npm:8.10.0" bin: @@ -1752,13 +1902,6 @@ __metadata: languageName: node linkType: hard -"ansi-escapes@npm:^6.2.0": - version: 6.2.1 - resolution: "ansi-escapes@npm:6.2.1" - checksum: 10/3b064937dc8a0645ed8094bc8b09483ee718f3aa3139746280e6c2ea80e28c0a3ce66973d0f33e88e60021abbf67e5f877deabfc810e75edf8a19dfa128850be - languageName: node - linkType: hard - "ansi-regex@npm:^5.0.1": version: 5.0.1 resolution: "ansi-regex@npm:5.0.1" @@ -1773,6 +1916,13 @@ __metadata: languageName: node linkType: hard +"ansi-sequence-parser@npm:^1.1.0": + version: 1.1.1 + resolution: "ansi-sequence-parser@npm:1.1.1" + checksum: 10/9ce30f257badc2ef62cac8028a7e26c368d22bf26650427192e8ffd102da42e377e3affe90fae58062eecc963b0b055f510dde3b677c7e0c433c67069b5a8ee5 + languageName: node + linkType: hard + "ansi-styles@npm:^3.2.1": version: 3.2.1 resolution: "ansi-styles@npm:3.2.1" @@ -1806,10 +1956,10 @@ __metadata: languageName: node linkType: hard -"ansicolors@npm:~0.3.2": - version: 0.3.2 - resolution: "ansicolors@npm:0.3.2" - checksum: 10/0704d1485d84d65a47aacd3d2d26f501f21aeeb509922c8f2496d0ec5d346dc948efa64f3151aef0571d73e5c44eb10fd02f27f59762e9292fe123bb1ea9ff7d +"any-promise@npm:^1.0.0": + version: 1.3.0 + resolution: "any-promise@npm:1.3.0" + checksum: 10/6737469ba353b5becf29e4dc3680736b9caa06d300bda6548812a8fee63ae7d336d756f88572fa6b5219aed36698d808fa55f62af3e7e6845c7a1dc77d240edb languageName: node linkType: hard @@ -1840,13 +1990,6 @@ __metadata: languageName: node linkType: hard -"arg@npm:^4.1.0": - version: 4.1.3 - resolution: "arg@npm:4.1.3" - checksum: 10/969b491082f20cad166649fa4d2073ea9e974a4e5ac36247ca23d2e5a8b3cb12d60e9ff70a8acfe26d76566c71fd351ee5e6a9a6595157eb36f92b1fd64e1599 - languageName: node - linkType: hard - "argparse@npm:^1.0.7": version: 1.0.10 resolution: "argparse@npm:1.0.10" @@ -2062,12 +2205,12 @@ __metadata: languageName: node linkType: hard -"braces@npm:^3.0.1, braces@npm:~3.0.2": - version: 3.0.2 - resolution: "braces@npm:3.0.2" +"braces@npm:^3.0.3, braces@npm:~3.0.2": + version: 3.0.3 + resolution: "braces@npm:3.0.3" dependencies: - fill-range: "npm:^7.0.1" - checksum: 10/966b1fb48d193b9d155f810e5efd1790962f2c4e0829f8440b8ad236ba009222c501f70185ef732fef17a4c490bb33a03b90dab0631feafbdf447da91e8165b1 + fill-range: "npm:^7.1.1" + checksum: 10/fad11a0d4697a27162840b02b1fad249c1683cbc510cd5bf1a471f2f8085c046d41094308c577a50a03a579dd99d5a6b3724c4b5e8b14df2c4443844cfcda2c6 languageName: node linkType: hard @@ -2119,6 +2262,24 @@ __metadata: languageName: node linkType: hard +"bundle-require@npm:^4.0.0": + version: 4.2.1 + resolution: "bundle-require@npm:4.2.1" + dependencies: + load-tsconfig: "npm:^0.2.3" + peerDependencies: + esbuild: ">=0.17" + checksum: 10/e49cb6528373d4e086723bc37fb037e05e9cd529e1b3aa1c4da6c495c4725a0f74ae9cc461de35163d65dd3a6c41a0474c6e52b74b8ded4fe829c951d0784ec1 + languageName: node + linkType: hard + +"cac@npm:^6.7.12": + version: 6.7.14 + resolution: "cac@npm:6.7.14" + checksum: 10/002769a0fbfc51c062acd2a59df465a2a947916b02ac50b56c69ec6c018ee99ac3e7f4dd7366334ea847f1ecacf4defaa61bcd2ac283db50156ce1f1d8c8ad42 + languageName: node + linkType: hard + "cacache@npm:^16.1.0": version: 16.1.1 resolution: "cacache@npm:16.1.1" @@ -2204,18 +2365,6 @@ __metadata: languageName: node linkType: hard -"cardinal@npm:^2.1.1": - version: 2.1.1 - resolution: "cardinal@npm:2.1.1" - dependencies: - ansicolors: "npm:~0.3.2" - redeyed: "npm:~2.1.0" - bin: - cdl: ./bin/cdl.js - checksum: 10/caf0d34739ef7b1d80e1753311f889997b62c4490906819eb5da5bd46e7f5e5caba7a8a96ca401190c7d9c18443a7749e5338630f7f9a1ae98d60cac49b9008e - languageName: node - linkType: hard - "chalk@npm:^2.4.2": version: 2.4.2 resolution: "chalk@npm:2.4.2" @@ -2227,7 +2376,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^4.0.0, chalk@npm:^4.1.1, chalk@npm:^4.1.2": +"chalk@npm:^4.0.0, chalk@npm:^4.1.1": version: 4.1.2 resolution: "chalk@npm:4.1.2" dependencies: @@ -2237,13 +2386,6 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^5.3.0": - version: 5.3.0 - resolution: "chalk@npm:5.3.0" - checksum: 10/6373caaab21bd64c405bfc4bd9672b145647fc9482657b5ea1d549b3b2765054e9d3d928870cdf764fb4aad67555f5061538ff247b8310f110c5c888d92397ea - languageName: node - linkType: hard - "char-regex@npm:^1.0.2": version: 1.0.2 resolution: "char-regex@npm:1.0.2" @@ -2251,9 +2393,9 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:>=3.0.0 <4.0.0": - version: 3.5.3 - resolution: "chokidar@npm:3.5.3" +"chokidar@npm:>=3.0.0 <4.0.0, chokidar@npm:^3.5.1": + version: 3.6.0 + resolution: "chokidar@npm:3.6.0" dependencies: anymatch: "npm:~3.1.2" braces: "npm:~3.0.2" @@ -2266,7 +2408,7 @@ __metadata: dependenciesMeta: fsevents: optional: true - checksum: 10/863e3ff78ee7a4a24513d2a416856e84c8e4f5e60efbe03e8ab791af1a183f569b62fc6f6b8044e2804966cb81277ddbbc1dc374fba3265bd609ea8efd62f5b3 + checksum: 10/c327fb07704443f8d15f7b4a7ce93b2f0bc0e6cea07ec28a7570aa22cd51fcf0379df589403976ea956c369f25aa82d84561947e227cd925902e1751371658df languageName: node linkType: hard @@ -2277,6 +2419,13 @@ __metadata: languageName: node linkType: hard +"ci-info@npm:^2.0.0": + version: 2.0.0 + resolution: "ci-info@npm:2.0.0" + checksum: 10/3b374666a85ea3ca43fa49aa3a048d21c9b475c96eb13c133505d2324e7ae5efd6a454f41efe46a152269e9b6a00c9edbe63ec7fa1921957165aae16625acd67 + languageName: node + linkType: hard + "ci-info@npm:^3.2.0": version: 3.3.0 resolution: "ci-info@npm:3.3.0" @@ -2305,19 +2454,6 @@ __metadata: languageName: node linkType: hard -"cli-table3@npm:^0.6.3": - version: 0.6.5 - resolution: "cli-table3@npm:0.6.5" - dependencies: - "@colors/colors": "npm:1.5.0" - string-width: "npm:^4.2.0" - dependenciesMeta: - "@colors/colors": - optional: true - checksum: 10/8dca71256f6f1367bab84c33add3f957367c7c43750a9828a4212ebd31b8df76bd7419d386e3391ac7419698a8540c25f1a474584028f35b170841cde2e055c5 - languageName: node - linkType: hard - "cli-width@npm:^3.0.0": version: 3.0.0 resolution: "cli-width@npm:3.0.0" @@ -2409,10 +2545,10 @@ __metadata: languageName: node linkType: hard -"commander@npm:^10.0.1": - version: 10.0.1 - resolution: "commander@npm:10.0.1" - checksum: 10/8799faa84a30da985802e661cc9856adfaee324d4b138413013ef7f087e8d7924b144c30a1f1405475f0909f467665cd9e1ce13270a2f41b141dab0b7a58f3fb +"commander@npm:^4.0.0": + version: 4.1.1 + resolution: "commander@npm:4.1.1" + checksum: 10/3b2dc4125f387dab73b3294dbcb0ab2a862f9c0ad748ee2b27e3544d25325b7a8cdfbcc228d103a98a716960b14478114a5206b5415bd48cdafa38797891562c languageName: node linkType: hard @@ -2473,13 +2609,6 @@ __metadata: languageName: node linkType: hard -"create-require@npm:^1.1.0": - version: 1.1.1 - resolution: "create-require@npm:1.1.1" - checksum: 10/a9a1503d4390d8b59ad86f4607de7870b39cad43d929813599a23714831e81c520bddf61bcdd1f8e30f05fd3a2b71ae8538e946eb2786dc65c2bbc520f692eff - languageName: node - linkType: hard - "cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" @@ -2491,15 +2620,15 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.2.0, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": - version: 4.3.4 - resolution: "debug@npm:4.3.4" +"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.2.0, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": + version: 4.3.5 + resolution: "debug@npm:4.3.5" dependencies: ms: "npm:2.1.2" peerDependenciesMeta: supports-color: optional: true - checksum: 10/0073c3bcbd9cb7d71dd5f6b55be8701af42df3e56e911186dfa46fac3a5b9eb7ce7f377dd1d3be6db8977221f8eb333d945216f645cf56f6b688cd484837d255 + checksum: 10/cb6eab424c410e07813ca1392888589972ce9a32b8829c6508f5e1f25f3c3e70a76731610ae55b4bbe58d1a2fffa1424b30e97fa8d394e49cd2656a9643aedd2 languageName: node linkType: hard @@ -2535,10 +2664,10 @@ __metadata: languageName: node linkType: hard -"deepmerge@npm:^4.2.2": - version: 4.2.2 - resolution: "deepmerge@npm:4.2.2" - checksum: 10/0e58ed14f530d08f9b996cfc3a41b0801691620235bc5e1883260e3ed1c1b4a1dfb59f865770e45d5dfb1d7ee108c4fc10c2f85e822989d4123490ea90be2545 +"deepmerge@npm:^4.2.2, deepmerge@npm:^4.3.1": + version: 4.3.1 + resolution: "deepmerge@npm:4.3.1" + checksum: 10/058d9e1b0ff1a154468bf3837aea436abcfea1ba1d165ddaaf48ca93765fdd01a30d33c36173da8fbbed951dd0a267602bc782fe288b0fc4b7e1e7091afc4529 languageName: node linkType: hard @@ -2639,13 +2768,6 @@ __metadata: languageName: node linkType: hard -"diff@npm:^4.0.1": - version: 4.0.2 - resolution: "diff@npm:4.0.2" - checksum: 10/ec09ec2101934ca5966355a229d77afcad5911c92e2a77413efda5455636c4cf2ce84057e2d7715227a2eeeda04255b849bd3ae3a4dd22eb22e86e76456df069 - languageName: node - linkType: hard - "diff@npm:^5.0.0": version: 5.0.0 resolution: "diff@npm:5.0.0" @@ -2715,13 +2837,6 @@ __metadata: languageName: node linkType: hard -"emojilib@npm:^2.4.0": - version: 2.4.0 - resolution: "emojilib@npm:2.4.0" - checksum: 10/bef767eca49acaa881388d91bee6936ea57ae367d603d5227ff0a9da3e2d1e774a61c447e5f2f4901797d023c4b5239bc208285b6172a880d3655024a0f44980 - languageName: node - linkType: hard - "encoding@npm:^0.1.13": version: 0.1.13 resolution: "encoding@npm:0.1.13" @@ -2832,6 +2947,86 @@ __metadata: languageName: node linkType: hard +"esbuild@npm:^0.19.2": + version: 0.19.12 + resolution: "esbuild@npm:0.19.12" + dependencies: + "@esbuild/aix-ppc64": "npm:0.19.12" + "@esbuild/android-arm": "npm:0.19.12" + "@esbuild/android-arm64": "npm:0.19.12" + "@esbuild/android-x64": "npm:0.19.12" + "@esbuild/darwin-arm64": "npm:0.19.12" + "@esbuild/darwin-x64": "npm:0.19.12" + "@esbuild/freebsd-arm64": "npm:0.19.12" + "@esbuild/freebsd-x64": "npm:0.19.12" + "@esbuild/linux-arm": "npm:0.19.12" + "@esbuild/linux-arm64": "npm:0.19.12" + "@esbuild/linux-ia32": "npm:0.19.12" + "@esbuild/linux-loong64": "npm:0.19.12" + "@esbuild/linux-mips64el": "npm:0.19.12" + "@esbuild/linux-ppc64": "npm:0.19.12" + "@esbuild/linux-riscv64": "npm:0.19.12" + "@esbuild/linux-s390x": "npm:0.19.12" + "@esbuild/linux-x64": "npm:0.19.12" + "@esbuild/netbsd-x64": "npm:0.19.12" + "@esbuild/openbsd-x64": "npm:0.19.12" + "@esbuild/sunos-x64": "npm:0.19.12" + "@esbuild/win32-arm64": "npm:0.19.12" + "@esbuild/win32-ia32": "npm:0.19.12" + "@esbuild/win32-x64": "npm:0.19.12" + dependenciesMeta: + "@esbuild/aix-ppc64": + optional: true + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 10/861fa8eb2428e8d6521a4b7c7930139e3f45e8d51a86985cc29408172a41f6b18df7b3401e7e5e2d528cdf83742da601ddfdc77043ddc4f1c715a8ddb2d8a255 + languageName: node + linkType: hard + "escalade@npm:^3.1.1": version: 3.1.1 resolution: "escalade@npm:3.1.1" @@ -3127,7 +3322,7 @@ __metadata: languageName: node linkType: hard -"esprima@npm:^4.0.0, esprima@npm:~4.0.0": +"esprima@npm:^4.0.0": version: 4.0.1 resolution: "esprima@npm:4.0.1" bin: @@ -3286,13 +3481,6 @@ __metadata: languageName: node linkType: hard -"fflate@npm:^0.8.2": - version: 0.8.2 - resolution: "fflate@npm:0.8.2" - checksum: 10/2bd26ba6d235d428de793c6a0cd1aaa96a06269ebd4e21b46c8fd1bd136abc631acf27e188d47c3936db090bf3e1ede11d15ce9eae9bffdc4bfe1b9dc66ca9cb - languageName: node - linkType: hard - "file-entry-cache@npm:^6.0.1": version: 6.0.1 resolution: "file-entry-cache@npm:6.0.1" @@ -3302,12 +3490,12 @@ __metadata: languageName: node linkType: hard -"fill-range@npm:^7.0.1": - version: 7.0.1 - resolution: "fill-range@npm:7.0.1" +"fill-range@npm:^7.1.1": + version: 7.1.1 + resolution: "fill-range@npm:7.1.1" dependencies: to-regex-range: "npm:^5.0.1" - checksum: 10/e260f7592fd196b4421504d3597cc76f4a1ca7a9488260d533b611fc3cefd61e9a9be1417cb82d3b01ad9f9c0ff2dbf258e1026d2445e26b0cf5148ff4250429 + checksum: 10/a7095cb39e5bc32fada2aa7c7249d3f6b01bd1ce461a61b0adabacccabd9198500c6fb1f68a7c851a657e273fce2233ba869638897f3d7ed2e87a2d89b4436ea languageName: node linkType: hard @@ -3543,6 +3731,22 @@ __metadata: languageName: node linkType: hard +"glob@npm:^11.0.0": + version: 11.0.0 + resolution: "glob@npm:11.0.0" + dependencies: + foreground-child: "npm:^3.1.0" + jackspeak: "npm:^4.0.1" + minimatch: "npm:^10.0.0" + minipass: "npm:^7.1.2" + package-json-from-dist: "npm:^1.0.0" + path-scurry: "npm:^2.0.0" + bin: + glob: dist/esm/bin.mjs + checksum: 10/e66939201d11ae30fe97e3364ac2be5c59d6c9bfce18ac633edfad473eb6b46a7553f6f73658f67caaf6cccc1df1ae336298a45e9021fa5695fd78754cc1603e + languageName: node + linkType: hard + "glob@npm:^7.1.3, glob@npm:^7.1.4": version: 7.1.6 resolution: "glob@npm:7.1.6" @@ -3611,7 +3815,7 @@ __metadata: languageName: node linkType: hard -"globby@npm:^11.1.0": +"globby@npm:^11.0.3, globby@npm:^11.1.0": version: 11.1.0 resolution: "globby@npm:11.1.0" dependencies: @@ -3634,10 +3838,10 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": - version: 4.2.10 - resolution: "graceful-fs@npm:4.2.10" - checksum: 10/0c83c52b62c68a944dcfb9d66b0f9f10f7d6e3d081e8067b9bfdc9e5f3a8896584d576036f82915773189eec1eba599397fc620e75c03c0610fb3d67c6713c1a +"graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: 10/bf152d0ed1dc159239db1ba1f74fdbc40cb02f626770dcd5815c427ce0688c2635a06ed69af364396da4636d0408fcf7d4afdf7881724c3307e46aff30ca49e2 languageName: node linkType: hard @@ -3969,6 +4173,17 @@ __metadata: languageName: node linkType: hard +"is-ci@npm:^2.0.0": + version: 2.0.0 + resolution: "is-ci@npm:2.0.0" + dependencies: + ci-info: "npm:^2.0.0" + bin: + is-ci: bin.js + checksum: 10/77b869057510f3efa439bbb36e9be429d53b3f51abd4776eeea79ab3b221337fe1753d1e50058a9e2c650d38246108beffb15ccfd443929d77748d8c0cc90144 + languageName: node + linkType: hard + "is-core-module@npm:^2.11.0, is-core-module@npm:^2.13.0, is-core-module@npm:^2.4.0, is-core-module@npm:^2.8.1": version: 2.13.1 resolution: "is-core-module@npm:2.13.1" @@ -4205,6 +4420,19 @@ __metadata: languageName: node linkType: hard +"jackspeak@npm:^4.0.1": + version: 4.0.1 + resolution: "jackspeak@npm:4.0.1" + dependencies: + "@isaacs/cliui": "npm:^8.0.2" + "@pkgjs/parseargs": "npm:^0.11.0" + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 10/b20dc0df0dbb2903e4d540ae68308ec7d1dd60944b130e867e218c98b5d77481d65ea734b6c81c812d481500076e8b3fdfccfb38fc81cb1acf165e853da3e26c + languageName: node + linkType: hard + "jest-changed-files@npm:^28.1.3": version: 28.1.3 resolution: "jest-changed-files@npm:28.1.3" @@ -4552,6 +4780,16 @@ __metadata: languageName: node linkType: hard +"jest-silent-reporter@npm:^0.6.0": + version: 0.6.0 + resolution: "jest-silent-reporter@npm:0.6.0" + dependencies: + chalk: "npm:^4.0.0" + jest-util: "npm:^26.0.0" + checksum: 10/443e0abaf5a6dc8c17da1e8495b7a55f813224adc39b6d1954bf49ff7fe70533b1020571453180dbb8388ace87f8e1dfc79610a4554bb93334f6c4154231c292 + languageName: node + linkType: hard + "jest-snapshot@npm:^28.1.3": version: 28.1.3 resolution: "jest-snapshot@npm:28.1.3" @@ -4583,6 +4821,20 @@ __metadata: languageName: node linkType: hard +"jest-util@npm:^26.0.0": + version: 26.6.2 + resolution: "jest-util@npm:26.6.2" + dependencies: + "@jest/types": "npm:^26.6.2" + "@types/node": "npm:*" + chalk: "npm:^4.0.0" + graceful-fs: "npm:^4.2.4" + is-ci: "npm:^2.0.0" + micromatch: "npm:^4.0.2" + checksum: 10/4502bc699f147d2fa43274af18174b55fd5b956becd1347665217e35a5354e929206abaef580f967ed239587be926c835eb3ca9b5c361205df1988bc8d58a462 + languageName: node + linkType: hard + "jest-util@npm:^28.0.0, jest-util@npm:^28.1.3": version: 28.1.3 resolution: "jest-util@npm:28.1.3" @@ -4657,6 +4909,13 @@ __metadata: languageName: node linkType: hard +"joycon@npm:^3.0.1": + version: 3.1.1 + resolution: "joycon@npm:3.1.1" + checksum: 10/4b36e3479144ec196425f46b3618f8a96ce7e1b658f091a309cd4906215f5b7a402d7df331a3e0a09681381a658d0c5f039cb3cf6907e0a1e17ed847f5d37775 + languageName: node + linkType: hard + "js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": version: 4.0.0 resolution: "js-tokens@npm:4.0.0" @@ -4758,10 +5017,10 @@ __metadata: languageName: node linkType: hard -"jsonc-parser@npm:^3.0.0": - version: 3.2.0 - resolution: "jsonc-parser@npm:3.2.0" - checksum: 10/bd68b902e5f9394f01da97921f49c5084b2dc03a0c5b4fdb2a429f8d6f292686c1bf87badaeb0a8148d024192a88f5ad2e57b2918ba43fe25cf15f3371db64d4 +"jsonc-parser@npm:^3.2.0": + version: 3.3.1 + resolution: "jsonc-parser@npm:3.3.1" + checksum: 10/9b0dc391f20b47378f843ef1e877e73ec652a5bdc3c5fa1f36af0f119a55091d147a86c1ee86a232296f55c929bba174538c2bf0312610e0817a22de131cc3f4 languageName: node linkType: hard @@ -4789,6 +5048,13 @@ __metadata: languageName: node linkType: hard +"lilconfig@npm:^3.0.0": + version: 3.1.2 + resolution: "lilconfig@npm:3.1.2" + checksum: 10/8058403850cfad76d6041b23db23f730e52b6c17a8c28d87b90766639ca0ee40c748a3e85c2d7bd133d572efabff166c4b015e5d25e01fd666cb4b13cfada7f0 + languageName: node + linkType: hard + "lines-and-columns@npm:^1.1.6": version: 1.1.6 resolution: "lines-and-columns@npm:1.1.6" @@ -4796,6 +5062,13 @@ __metadata: languageName: node linkType: hard +"load-tsconfig@npm:^0.2.3": + version: 0.2.5 + resolution: "load-tsconfig@npm:0.2.5" + checksum: 10/b3176f6f0c86dbdbbc7e337440a803b0b4407c55e2e1cfc53bd3db68e0211448f36428a6075ecf5e286db5d1bf791da756fc0ac4d2447717140fb6a5218ecfb4 + languageName: node + linkType: hard + "locate-path@npm:^5.0.0": version: 5.0.0 resolution: "locate-path@npm:5.0.0" @@ -4828,6 +5101,13 @@ __metadata: languageName: node linkType: hard +"lodash.sortby@npm:^4.7.0": + version: 4.7.0 + resolution: "lodash.sortby@npm:4.7.0" + checksum: 10/38df19ae28608af2c50ac342fc1f414508309d53e1d58ed9adfb2c3cd17c3af290058c0a0478028d932c5404df3d53349d19fa364ef6bed6145a6bc21320399e + languageName: node + linkType: hard + "lodash@npm:4.17.21, lodash@npm:^4.17.20, lodash@npm:^4.17.21": version: 4.17.21 resolution: "lodash@npm:4.17.21" @@ -4853,6 +5133,13 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^11.0.0": + version: 11.0.0 + resolution: "lru-cache@npm:11.0.0" + checksum: 10/41f36fbff8b6f199cce3e9cb2b625714f97a535dfd7f16d0988c2627f9ed4c38b6dc8f9ea7fdba19262a7c917ba41c89cad15ca3e3791fc9a2068af472b5bc8d + languageName: node + linkType: hard + "lru-cache@npm:^5.1.1": version: 5.1.1 resolution: "lru-cache@npm:5.1.1" @@ -4894,7 +5181,7 @@ __metadata: languageName: node linkType: hard -"make-error@npm:1.x, make-error@npm:^1.1.1": +"make-error@npm:1.x": version: 1.3.6 resolution: "make-error@npm:1.3.6" checksum: 10/b86e5e0e25f7f777b77fabd8e2cbf15737972869d852a22b7e73c17623928fccb826d8e46b9951501d3f20e51ad74ba8c59ed584f610526a48f8ccf88aaec402 @@ -4953,37 +5240,12 @@ __metadata: languageName: node linkType: hard -"marked-terminal@npm:^6.0.0": - version: 6.2.0 - resolution: "marked-terminal@npm:6.2.0" - dependencies: - ansi-escapes: "npm:^6.2.0" - cardinal: "npm:^2.1.1" - chalk: "npm:^5.3.0" - cli-table3: "npm:^0.6.3" - node-emoji: "npm:^2.1.3" - supports-hyperlinks: "npm:^3.0.0" - peerDependencies: - marked: ">=1 <12" - checksum: 10/98e79d0c4597ced53f7252fe711baf729e2c8754e654d49c713e764189419e880894534fa879f0d0c12801c938bc76cf80a7b67427e2d75fd0e502d5c7b73c1b - languageName: node - linkType: hard - -"marked@npm:^4.0.19": - version: 4.1.1 - resolution: "marked@npm:4.1.1" - bin: - marked: bin/marked.js - checksum: 10/7cf479000a1ee3e51be81a542d5a6fd639394484f29942bb7bd25d045b5475c3a861106790a8e91c7ab1c071db66d20ea02174c5982ff1262026c54e98270637 - languageName: node - linkType: hard - -"marked@npm:^9.1.2": - version: 9.1.6 - resolution: "marked@npm:9.1.6" +"marked@npm:^4.3.0": + version: 4.3.0 + resolution: "marked@npm:4.3.0" bin: marked: bin/marked.js - checksum: 10/29d073500c70b6b53cd35a8d19f5e43df6e2819ddeca8848a31901b87b82ca0ea46a8a831920c656c69c33ad5dce4b75654c4c4ced34a67f4e4e4a31c7620cfe + checksum: 10/c830bb4cb3705b754ca342b656e8a582d7428706b2678c898b856f6030c134ce2d1e19136efa3e6a1841f7330efbd24963d6bdeddc57d2938e906250f99895d0 languageName: node linkType: hard @@ -5001,13 +5263,13 @@ __metadata: languageName: node linkType: hard -"micromatch@npm:^4.0.4": - version: 4.0.4 - resolution: "micromatch@npm:4.0.4" +"micromatch@npm:^4.0.2, micromatch@npm:^4.0.4": + version: 4.0.7 + resolution: "micromatch@npm:4.0.7" dependencies: - braces: "npm:^3.0.1" - picomatch: "npm:^2.2.3" - checksum: 10/c499da5aad38f3ba1a32a73a81f3dd9b631e12492133c503c14ce59aa5c631159c08f2c43d3a7e0ea3955c7921d41b7b97e662360fe3b28b2cfb0923949c176d + braces: "npm:^3.0.3" + picomatch: "npm:^2.3.1" + checksum: 10/a11ed1cb67dcbbe9a5fc02c4062cf8bb0157d73bf86956003af8dcfdf9b287f9e15ec0f6d6925ff6b8b5b496202335e497b01de4d95ef6cf06411bc5e5c474a0 languageName: node linkType: hard @@ -5018,6 +5280,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:^10.0.0": + version: 10.0.1 + resolution: "minimatch@npm:10.0.1" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 10/082e7ccbc090d5f8c4e4e029255d5a1d1e3af37bda837da2b8b0085b1503a1210c91ac90d9ebfe741d8a5f286ece820a1abb4f61dc1f82ce602a055d461d93f3 + languageName: node + linkType: hard + "minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" @@ -5027,7 +5298,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^5.0.1, minimatch@npm:^5.1.0": +"minimatch@npm:^5.0.1": version: 5.1.0 resolution: "minimatch@npm:5.1.0" dependencies: @@ -5036,12 +5307,12 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.1": - version: 9.0.4 - resolution: "minimatch@npm:9.0.4" +"minimatch@npm:^9.0.0, minimatch@npm:^9.0.1": + version: 9.0.5 + resolution: "minimatch@npm:9.0.5" dependencies: brace-expansion: "npm:^2.0.1" - checksum: 10/4cdc18d112b164084513e890d6323370db14c22249d536ad1854539577a895e690a27513dc346392f61a4a50afbbd8abc88f3f25558bfbbbb862cd56508b20f5 + checksum: 10/dd6a8927b063aca6d910b119e1f2df6d2ce7d36eab91de83167dd136bb85e1ebff97b0d3de1cb08bd1f7e018ca170b4962479fefab5b2a69e2ae12cb2edc8348 languageName: node linkType: hard @@ -5136,10 +5407,10 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.0.4": - version: 7.0.4 - resolution: "minipass@npm:7.0.4" - checksum: 10/e864bd02ceb5e0707696d58f7ce3a0b89233f0d686ef0d447a66db705c0846a8dc6f34865cd85256c1472ff623665f616b90b8ff58058b2ad996c5de747d2d18 +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.0.4, minipass@npm:^7.1.2": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: 10/c25f0ee8196d8e6036661104bacd743785b2599a21de5c516b32b3fa2b83113ac89a2358465bc04956baab37ffb956ae43be679b2262bf7be15fce467ccd7950 languageName: node linkType: hard @@ -5203,6 +5474,17 @@ __metadata: languageName: node linkType: hard +"mz@npm:^2.7.0": + version: 2.7.0 + resolution: "mz@npm:2.7.0" + dependencies: + any-promise: "npm:^1.0.0" + object-assign: "npm:^4.0.1" + thenify-all: "npm:^1.0.0" + checksum: 10/8427de0ece99a07e9faed3c0c6778820d7543e3776f9a84d22cf0ec0a8eb65f6e9aee9c9d353ff9a105ff62d33a9463c6ca638974cc652ee8140cd1e35951c87 + languageName: node + linkType: hard + "nanoid@npm:^3.3.6": version: 3.3.6 resolution: "nanoid@npm:3.3.6" @@ -5233,18 +5515,6 @@ __metadata: languageName: node linkType: hard -"node-emoji@npm:^2.1.3": - version: 2.1.3 - resolution: "node-emoji@npm:2.1.3" - dependencies: - "@sindresorhus/is": "npm:^4.6.0" - char-regex: "npm:^1.0.2" - emojilib: "npm:^2.4.0" - skin-tone: "npm:^2.0.0" - checksum: 10/e9cff16f557972bc45040c26cb686961935c582af612bd41446f0094834088c1cdf7d4370a39ce5d42b71c1352a35b8d8a7a2fec53922b51abf54f36e56cc614 - languageName: node - linkType: hard - "node-gyp@npm:^10.0.0": version: 10.1.0 resolution: "node-gyp@npm:10.1.0" @@ -5401,6 +5671,13 @@ __metadata: languageName: node linkType: hard +"object-assign@npm:^4.0.1": + version: 4.1.1 + resolution: "object-assign@npm:4.1.1" + checksum: 10/fcc6e4ea8c7fe48abfbb552578b1c53e0d194086e2e6bbbf59e0a536381a292f39943c6e9628af05b5528aa5e3318bb30d6b2e53cadaf5b8fe9e12c4b69af23f + languageName: node + linkType: hard + "object-inspect@npm:^1.13.1, object-inspect@npm:^1.9.0": version: 1.13.1 resolution: "object-inspect@npm:1.13.1" @@ -5522,6 +5799,13 @@ __metadata: languageName: node linkType: hard +"package-json-from-dist@npm:^1.0.0": + version: 1.0.0 + resolution: "package-json-from-dist@npm:1.0.0" + checksum: 10/ac706ec856a5a03f5261e4e48fa974f24feb044d51f84f8332e2af0af04fbdbdd5bbbfb9cbbe354190409bc8307c83a9e38c6672c3c8855f709afb0006a009ea + languageName: node + linkType: hard + "parent-module@npm:^1.0.0": version: 1.0.1 resolution: "parent-module@npm:1.0.1" @@ -5581,6 +5865,16 @@ __metadata: languageName: node linkType: hard +"path-scurry@npm:^2.0.0": + version: 2.0.0 + resolution: "path-scurry@npm:2.0.0" + dependencies: + lru-cache: "npm:^11.0.0" + minipass: "npm:^7.1.2" + checksum: 10/285ae0c2d6c34ae91dc1d5378ede21981c9a2f6de1ea9ca5a88b5a270ce9763b83dbadc7a324d512211d8d36b0c540427d3d0817030849d97a60fa840a2c59ec + languageName: node + linkType: hard + "path-type@npm:^4.0.0": version: 4.0.0 resolution: "path-type@npm:4.0.0" @@ -5595,14 +5889,14 @@ __metadata: languageName: node linkType: hard -"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.3": +"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" checksum: 10/60c2595003b05e4535394d1da94850f5372c9427ca4413b71210f437f7b2ca091dbd611c45e8b37d10036fa8eade25c1b8951654f9d3973bfa66a2ff4d3b08bc languageName: node linkType: hard -"pirates@npm:^4.0.4": +"pirates@npm:^4.0.1, pirates@npm:^4.0.4": version: 4.0.6 resolution: "pirates@npm:4.0.6" checksum: 10/d02dda76f4fec1cbdf395c36c11cf26f76a644f9f9a1bfa84d3167d0d3154d5289aacc72677aa20d599bb4a6937a471de1b65c995e2aea2d8687cbcd7e43ea5f @@ -5627,6 +5921,24 @@ __metadata: languageName: node linkType: hard +"postcss-load-config@npm:^4.0.1": + version: 4.0.2 + resolution: "postcss-load-config@npm:4.0.2" + dependencies: + lilconfig: "npm:^3.0.0" + yaml: "npm:^2.3.4" + peerDependencies: + postcss: ">=8.0.9" + ts-node: ">=9.0.0" + peerDependenciesMeta: + postcss: + optional: true + ts-node: + optional: true + checksum: 10/e2c2ed9b7998a5b123e1ce0c124daf6504b1454c67dcc1c8fdbcc5ffb2597b7de245e3ac34f63afc928d3fd3260b1e36492ebbdb01a9ff63f16b3c8b7b925d1b + languageName: node + linkType: hard + "postcss@npm:^8.1.10": version: 8.4.31 resolution: "postcss@npm:8.4.31" @@ -5788,15 +6100,6 @@ __metadata: languageName: node linkType: hard -"redeyed@npm:~2.1.0": - version: 2.1.1 - resolution: "redeyed@npm:2.1.1" - dependencies: - esprima: "npm:~4.0.0" - checksum: 10/86880f97d54bb55bbf1c338e27fe28f18f52afc2f5afa808354a09a3777aa79b4f04e04844350d7fec80aa2d299196bde256b21f586e7e5d9b63494bd4a9db27 - languageName: node - linkType: hard - "regexp.prototype.flags@npm:^1.5.1": version: 1.5.1 resolution: "regexp.prototype.flags@npm:1.5.1" @@ -5859,13 +6162,6 @@ __metadata: languageName: node linkType: hard -"resolve.exports@npm:^2.0.2": - version: 2.0.2 - resolution: "resolve.exports@npm:2.0.2" - checksum: 10/f1cc0b6680f9a7e0345d783e0547f2a5110d8336b3c2a4227231dd007271ffd331fd722df934f017af90bae0373920ca0d4005da6f76cb3176c8ae426370f893 - languageName: node - linkType: hard - "resolve@npm:1.22.8, resolve@npm:^1.18.1, resolve@npm:^1.20.0, resolve@npm:^1.22.0, resolve@npm:^1.22.1, resolve@npm:^1.22.4": version: 1.22.8 resolution: "resolve@npm:1.22.8" @@ -5917,6 +6213,117 @@ __metadata: languageName: node linkType: hard +"rimraf@npm:^6.0.0": + version: 6.0.0 + resolution: "rimraf@npm:6.0.0" + dependencies: + glob: "npm:^11.0.0" + bin: + rimraf: dist/esm/bin.mjs + checksum: 10/8a2e161f89b4fb8d7f3cab9bdea5360e9ab2ddc13d8120508b56eb93ba0c6f4506b799598900db6558628194b09f89705d1b98a591d7f727508e427e247befea + languageName: node + linkType: hard + +"rollup@npm:^4.0.2": + version: 4.18.1 + resolution: "rollup@npm:4.18.1" + dependencies: + "@rollup/rollup-android-arm-eabi": "npm:4.18.1" + "@rollup/rollup-android-arm64": "npm:4.18.1" + "@rollup/rollup-darwin-arm64": "npm:4.18.1" + "@rollup/rollup-darwin-x64": "npm:4.18.1" + "@rollup/rollup-linux-arm-gnueabihf": "npm:4.18.1" + "@rollup/rollup-linux-arm-musleabihf": "npm:4.18.1" + "@rollup/rollup-linux-arm64-gnu": "npm:4.18.1" + "@rollup/rollup-linux-arm64-musl": "npm:4.18.1" + "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.18.1" + "@rollup/rollup-linux-riscv64-gnu": "npm:4.18.1" + "@rollup/rollup-linux-s390x-gnu": "npm:4.18.1" + "@rollup/rollup-linux-x64-gnu": "npm:4.18.1" + "@rollup/rollup-linux-x64-musl": "npm:4.18.1" + "@rollup/rollup-win32-arm64-msvc": "npm:4.18.1" + "@rollup/rollup-win32-ia32-msvc": "npm:4.18.1" + "@rollup/rollup-win32-x64-msvc": "npm:4.18.1" + "@types/estree": "npm:1.0.5" + fsevents: "npm:~2.3.2" + dependenciesMeta: + "@rollup/rollup-android-arm-eabi": + optional: true + "@rollup/rollup-android-arm64": + optional: true + "@rollup/rollup-darwin-arm64": + optional: true + "@rollup/rollup-darwin-x64": + optional: true + "@rollup/rollup-linux-arm-gnueabihf": + optional: true + "@rollup/rollup-linux-arm-musleabihf": + optional: true + "@rollup/rollup-linux-arm64-gnu": + optional: true + "@rollup/rollup-linux-arm64-musl": + optional: true + "@rollup/rollup-linux-powerpc64le-gnu": + optional: true + "@rollup/rollup-linux-riscv64-gnu": + optional: true + "@rollup/rollup-linux-s390x-gnu": + optional: true + "@rollup/rollup-linux-x64-gnu": + optional: true + "@rollup/rollup-linux-x64-musl": + optional: true + "@rollup/rollup-win32-arm64-msvc": + optional: true + "@rollup/rollup-win32-ia32-msvc": + optional: true + "@rollup/rollup-win32-x64-msvc": + optional: true + fsevents: + optional: true + bin: + rollup: dist/bin/rollup + checksum: 10/7a5f110d216e8599dc3cb11cf570316d989abae00785d99c2bcb6027287fe60d2eaed70e457d88a036622e7fc67e8db6e730d3c784aa90a258bd4c020676ad44 + languageName: node + linkType: hard + +"root@workspace:.": + version: 0.0.0-use.local + resolution: "root@workspace:." + dependencies: + "@lavamoat/allow-scripts": "npm:^3.0.4" + "@lavamoat/preinstall-always-fail": "npm:^2.0.0" + "@metamask/auto-changelog": "npm:^3.4.4" + "@metamask/eslint-config": "npm:^12.2.0" + "@metamask/eslint-config-jest": "npm:^12.1.0" + "@metamask/eslint-config-nodejs": "npm:^12.1.0" + "@metamask/eslint-config-typescript": "npm:^12.1.0" + "@types/jest": "npm:^28.1.6" + "@types/node": "npm:^18.18.14" + "@typescript-eslint/eslint-plugin": "npm:^5.43.0" + "@typescript-eslint/parser": "npm:^5.43.0" + "@yarnpkg/types": "npm:^4.0.0" + depcheck: "npm:^1.4.3" + eslint: "npm:^8.44.0" + eslint-config-prettier: "npm:^8.8.0" + eslint-plugin-import: "npm:~2.26.0" + eslint-plugin-jest: "npm:^27.2.2" + eslint-plugin-jsdoc: "npm:^39.9.1" + eslint-plugin-n: "npm:^15.7.0" + eslint-plugin-prettier: "npm:^4.2.1" + eslint-plugin-promise: "npm:^6.1.1" + jest: "npm:^28.1.3" + jest-silent-reporter: "npm:^0.6.0" + prettier: "npm:^2.7.1" + prettier-plugin-packagejson: "npm:^2.3.0" + rimraf: "npm:^6.0.0" + ts-jest: "npm:^28.0.7" + tsup: "npm:^8.0.2" + typedoc: "npm:^0.24.8" + typescript: "npm:~4.9.5" + languageName: unknown + linkType: soft + "run-async@npm:^2.3.0": version: 2.4.1 resolution: "run-async@npm:2.4.1" @@ -6007,7 +6414,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:7.x, semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.3.2, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.3, semver@npm:^7.5.4": +"semver@npm:7.x, semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.3.2, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.3": version: 7.6.2 resolution: "semver@npm:7.6.2" bin: @@ -6071,14 +6478,15 @@ __metadata: languageName: node linkType: hard -"shiki@npm:^0.11.1": - version: 0.11.1 - resolution: "shiki@npm:0.11.1" +"shiki@npm:^0.14.1": + version: 0.14.7 + resolution: "shiki@npm:0.14.7" dependencies: - jsonc-parser: "npm:^3.0.0" - vscode-oniguruma: "npm:^1.6.1" - vscode-textmate: "npm:^6.0.0" - checksum: 10/44f3b28eb12b2f306304d909958c23b0eea596152d2137de5e65e55477fb9c45a127c0015200e67620a15bc49e22583f0da0da81fb9279a63c15fbf0e1a46b6b + ansi-sequence-parser: "npm:^1.1.0" + jsonc-parser: "npm:^3.2.0" + vscode-oniguruma: "npm:^1.7.0" + vscode-textmate: "npm:^8.0.0" + checksum: 10/be3f2444c65bd0c57802026f171cb42ad571d361ee885be0c292b60785f68c70f19b69310f5ffe7f7a93db4c5ef50211e0a0248794bc6bb48d242bc43fe72a62 languageName: node linkType: hard @@ -6114,15 +6522,6 @@ __metadata: languageName: node linkType: hard -"skin-tone@npm:^2.0.0": - version: 2.0.0 - resolution: "skin-tone@npm:2.0.0" - dependencies: - unicode-emoji-modifier-base: "npm:^1.0.0" - checksum: 10/19de157586b8019cacc55eb25d9d640f00fc02415761f3e41a4527142970fd4e7f6af0333bc90e879858766c20a976107bb386ffd4c812289c01d51f2c8d182c - languageName: node - linkType: hard - "slash@npm:^3.0.0": version: 3.0.0 resolution: "slash@npm:3.0.0" @@ -6209,6 +6608,15 @@ __metadata: languageName: node linkType: hard +"source-map@npm:0.8.0-beta.0": + version: 0.8.0-beta.0 + resolution: "source-map@npm:0.8.0-beta.0" + dependencies: + whatwg-url: "npm:^7.0.0" + checksum: 10/c02e22ab9f8b8e38655ba1e9abae9fe1f8ba216cbbea922718d5e2ea45821606a74f10edec1db9055e7f7cfd1e6a62e5eade67ec30c017a02f4c8e990accbc1c + languageName: node + linkType: hard + "source-map@npm:^0.6.0, source-map@npm:^0.6.1": version: 0.6.1 resolution: "source-map@npm:0.6.1" @@ -6418,6 +6826,24 @@ __metadata: languageName: node linkType: hard +"sucrase@npm:^3.20.3": + version: 3.35.0 + resolution: "sucrase@npm:3.35.0" + dependencies: + "@jridgewell/gen-mapping": "npm:^0.3.2" + commander: "npm:^4.0.0" + glob: "npm:^10.3.10" + lines-and-columns: "npm:^1.1.6" + mz: "npm:^2.7.0" + pirates: "npm:^4.0.1" + ts-interface-checker: "npm:^0.1.9" + bin: + sucrase: bin/sucrase + sucrase-node: bin/sucrase-node + checksum: 10/bc601558a62826f1c32287d4fdfa4f2c09fe0fec4c4d39d0e257fd9116d7d6227a18309721d4185ec84c9dc1af0d5ec0e05a42a337fbb74fc293e068549aacbe + languageName: node + linkType: hard + "supports-color@npm:^5.3.0": version: 5.5.0 resolution: "supports-color@npm:5.5.0" @@ -6455,16 +6881,6 @@ __metadata: languageName: node linkType: hard -"supports-hyperlinks@npm:^3.0.0": - version: 3.0.0 - resolution: "supports-hyperlinks@npm:3.0.0" - dependencies: - has-flag: "npm:^4.0.0" - supports-color: "npm:^7.0.0" - checksum: 10/911075a412d8bcfbbca413e8963d56ed0975e35ff98d599ef85301aed4221428653145263828b6c58cb4cb6ff24596be83ead3cca221a88a70428af93d5e2a73 - languageName: node - linkType: hard - "supports-preserve-symlinks-flag@npm:^1.0.0": version: 1.0.0 resolution: "supports-preserve-symlinks-flag@npm:1.0.0" @@ -6514,6 +6930,24 @@ __metadata: languageName: node linkType: hard +"thenify-all@npm:^1.0.0": + version: 1.6.0 + resolution: "thenify-all@npm:1.6.0" + dependencies: + thenify: "npm:>= 3.1.0 < 4" + checksum: 10/dba7cc8a23a154cdcb6acb7f51d61511c37a6b077ec5ab5da6e8b874272015937788402fd271fdfc5f187f8cb0948e38d0a42dcc89d554d731652ab458f5343e + languageName: node + linkType: hard + +"thenify@npm:>= 3.1.0 < 4": + version: 3.3.1 + resolution: "thenify@npm:3.3.1" + dependencies: + any-promise: "npm:^1.0.0" + checksum: 10/486e1283a867440a904e36741ff1a177faa827cf94d69506f7e3ae4187b9afdf9ec368b3d8da225c192bfe2eb943f3f0080594156bf39f21b57cd1411e2e7f6d + languageName: node + linkType: hard + "tmpl@npm:1.0.5": version: 1.0.5 resolution: "tmpl@npm:1.0.5" @@ -6537,10 +6971,28 @@ __metadata: languageName: node linkType: hard -"ts-expose-internals-conditionally@npm:1.0.0-empty.0": - version: 1.0.0-empty.0 - resolution: "ts-expose-internals-conditionally@npm:1.0.0-empty.0" - checksum: 10/6b4f546fc59f04f68d579f1bc0704541ec17521f84d32a15b45bef5dbc7a787143a065e19541cc5b64ff494f16f223bce59f3f5bf10ec538e5739e23c0efb878 +"tr46@npm:^1.0.1": + version: 1.0.1 + resolution: "tr46@npm:1.0.1" + dependencies: + punycode: "npm:^2.1.0" + checksum: 10/6e80d75480cb6658f7f283c15f5f41c2d4dfa243ca99a0e1baf3de6cc823fc4c829f89782a7a11e029905781fccfea42d08d8a6674ba7948c7dbc595b6f27dd3 + languageName: node + linkType: hard + +"tree-kill@npm:^1.2.2": + version: 1.2.2 + resolution: "tree-kill@npm:1.2.2" + bin: + tree-kill: cli.js + checksum: 10/49117f5f410d19c84b0464d29afb9642c863bc5ba40fcb9a245d474c6d5cc64d1b177a6e6713129eb346b40aebb9d4631d967517f9fbe8251c35b21b13cd96c7 + languageName: node + linkType: hard + +"ts-interface-checker@npm:^0.1.9": + version: 0.1.13 + resolution: "ts-interface-checker@npm:0.1.13" + checksum: 10/9f7346b9e25bade7a1050c001ec5a4f7023909c0e1644c5a96ae20703a131627f081479e6622a4ecee2177283d0069e651e507bedadd3904fc4010ab28ffce00 languageName: node linkType: hard @@ -6577,44 +7029,6 @@ __metadata: languageName: node linkType: hard -"ts-node@npm:^10.7.0": - version: 10.7.0 - resolution: "ts-node@npm:10.7.0" - dependencies: - "@cspotcode/source-map-support": "npm:0.7.0" - "@tsconfig/node10": "npm:^1.0.7" - "@tsconfig/node12": "npm:^1.0.7" - "@tsconfig/node14": "npm:^1.0.0" - "@tsconfig/node16": "npm:^1.0.2" - acorn: "npm:^8.4.1" - acorn-walk: "npm:^8.1.1" - arg: "npm:^4.1.0" - create-require: "npm:^1.1.0" - diff: "npm:^4.0.1" - make-error: "npm:^1.1.1" - v8-compile-cache-lib: "npm:^3.0.0" - yn: "npm:3.1.1" - peerDependencies: - "@swc/core": ">=1.2.50" - "@swc/wasm": ">=1.2.50" - "@types/node": "*" - typescript: ">=2.7" - peerDependenciesMeta: - "@swc/core": - optional: true - "@swc/wasm": - optional: true - bin: - ts-node: dist/bin.js - ts-node-cwd: dist/bin-cwd.js - ts-node-esm: dist/bin-esm.js - ts-node-script: dist/bin-script.js - ts-node-transpile-only: dist/bin-transpile.js - ts-script: dist/bin-script-deprecated.js - checksum: 10/5c2b3a43ea3c4071a256f255c9b6ec42996108aa7ed7a52be6c25b117907b6035bf0896af63f7866e8ba9fa618937ff61a35d41f4c91fa02b85812705293fdff - languageName: node - linkType: hard - "tsconfig-paths@npm:^3.14.1": version: 3.14.1 resolution: "tsconfig-paths@npm:3.14.1" @@ -6641,6 +7055,84 @@ __metadata: languageName: node linkType: hard +"tsup@npm:8.0.2": + version: 8.0.2 + resolution: "tsup@npm:8.0.2" + dependencies: + bundle-require: "npm:^4.0.0" + cac: "npm:^6.7.12" + chokidar: "npm:^3.5.1" + debug: "npm:^4.3.1" + esbuild: "npm:^0.19.2" + execa: "npm:^5.0.0" + globby: "npm:^11.0.3" + joycon: "npm:^3.0.1" + postcss-load-config: "npm:^4.0.1" + resolve-from: "npm:^5.0.0" + rollup: "npm:^4.0.2" + source-map: "npm:0.8.0-beta.0" + sucrase: "npm:^3.20.3" + tree-kill: "npm:^1.2.2" + peerDependencies: + "@microsoft/api-extractor": ^7.36.0 + "@swc/core": ^1 + postcss: ^8.4.12 + typescript: ">=4.5.0" + peerDependenciesMeta: + "@microsoft/api-extractor": + optional: true + "@swc/core": + optional: true + postcss: + optional: true + typescript: + optional: true + bin: + tsup: dist/cli-default.js + tsup-node: dist/cli-node.js + checksum: 10/dd8c375181a748cdeb86aa3d779d6d755596881f47fe38b7c4b810ff1ef6424d485b23065fda0f6e32d9988bae19cd64e49f6e2f11295d5184485ab7528a37d1 + languageName: node + linkType: hard + +"tsup@patch:tsup@npm%3A8.0.2#./.yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch::locator=root%40workspace%3A.": + version: 8.0.2 + resolution: "tsup@patch:tsup@npm%3A8.0.2#./.yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch::version=8.0.2&hash=ce4dd6&locator=root%40workspace%3A." + dependencies: + bundle-require: "npm:^4.0.0" + cac: "npm:^6.7.12" + chokidar: "npm:^3.5.1" + debug: "npm:^4.3.1" + esbuild: "npm:^0.19.2" + execa: "npm:^5.0.0" + globby: "npm:^11.0.3" + joycon: "npm:^3.0.1" + postcss-load-config: "npm:^4.0.1" + resolve-from: "npm:^5.0.0" + rollup: "npm:^4.0.2" + source-map: "npm:0.8.0-beta.0" + sucrase: "npm:^3.20.3" + tree-kill: "npm:^1.2.2" + peerDependencies: + "@microsoft/api-extractor": ^7.36.0 + "@swc/core": ^1 + postcss: ^8.4.12 + typescript: ">=4.5.0" + peerDependenciesMeta: + "@microsoft/api-extractor": + optional: true + "@swc/core": + optional: true + postcss: + optional: true + typescript: + optional: true + bin: + tsup: dist/cli-default.js + tsup-node: dist/cli-node.js + checksum: 10/4f011dee02adb00970189b34642e0d3c6824d6db874c1e72fbfb800d2367d2f78852f559059a059ee9088215363d061aa5ef37ab286a64027ea7214c8a580fb8 + languageName: node + linkType: hard + "tsutils@npm:^3.21.0": version: 3.21.0 resolution: "tsutils@npm:3.21.0" @@ -6729,59 +7221,48 @@ __metadata: languageName: node linkType: hard -"typedoc@npm:^0.23.15": - version: 0.23.15 - resolution: "typedoc@npm:0.23.15" - dependencies: - lunr: "npm:^2.3.9" - marked: "npm:^4.0.19" - minimatch: "npm:^5.1.0" - shiki: "npm:^0.11.1" +"typedoc-plugin-missing-exports@npm:^2.0.0": + version: 2.3.0 + resolution: "typedoc-plugin-missing-exports@npm:2.3.0" peerDependencies: - typescript: 4.6.x || 4.7.x || 4.8.x - bin: - typedoc: bin/typedoc - checksum: 10/f9425e4dc424b4008dab783dcc9ce4b2428efc4b8d504e817b99aa9cb34230bde007fb57b5ae1767fe508a451706d784a216423f06602e1cdaf91db619fcc72e + typedoc: 0.24.x || 0.25.x + checksum: 10/83ff8affd82fa39a81931e825ef31b51b7470613c71601fde6ff413a5c7571e30734698092a38a437f12c5d3264010696ce9ca806d43485aa11e8208cb4cb323 languageName: node linkType: hard -"typescript@npm:5.3.3": - version: 5.3.3 - resolution: "typescript@npm:5.3.3" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10/6e4e6a14a50c222b3d14d4ea2f729e79f972fa536ac1522b91202a9a65af3605c2928c4a790a4a50aa13694d461c479ba92cedaeb1e7b190aadaa4e4b96b8e18 - languageName: node - linkType: hard - -"typescript@npm:~4.8.4": - version: 4.8.4 - resolution: "typescript@npm:4.8.4" +"typedoc@npm:^0.24.8": + version: 0.24.8 + resolution: "typedoc@npm:0.24.8" + dependencies: + lunr: "npm:^2.3.9" + marked: "npm:^4.3.0" + minimatch: "npm:^9.0.0" + shiki: "npm:^0.14.1" + peerDependencies: + typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10/f985d8dd6ae815753d61cb81e434f3a4a5796ac52e423370fca6ad11bcd188df4013d82e3ba3b88c9746745b9341390ba68f862dc9d30bac6465e0699f2a795b + typedoc: bin/typedoc + checksum: 10/4f2f92ddde3f70a1a9666507f6bdf6620023599bd2c2a3ed3f8f909f9c28d92594c30ee6ee68f5a248ff70e09623acf1323bad633cb713b9f2e36bbd4fccf683 languageName: node linkType: hard -"typescript@patch:typescript@npm%3A5.3.3#optional!builtin": - version: 5.3.3 - resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7" +"typescript@npm:~4.9.5": + version: 4.9.5 + resolution: "typescript@npm:4.9.5" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10/c93786fcc9a70718ba1e3819bab56064ead5817004d1b8186f8ca66165f3a2d0100fee91fa64c840dcd45f994ca5d615d8e1f566d39a7470fc1e014dbb4cf15d + checksum: 10/458f7220ab11e0fc191514cc41be1707645ec9a8c2d609448a448e18c522cef9646f58728f6811185a4c35613dacdf6c98cf8965c88b3541d0288c47291e4300 languageName: node linkType: hard -"typescript@patch:typescript@npm%3A~4.8.4#optional!builtin": - version: 4.8.4 - resolution: "typescript@patch:typescript@npm%3A4.8.4#optional!builtin::version=4.8.4&hash=1a91c8" +"typescript@patch:typescript@npm%3A~4.9.5#optional!builtin": + version: 4.9.5 + resolution: "typescript@patch:typescript@npm%3A4.9.5#optional!builtin::version=4.9.5&hash=289587" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10/5d81fd8cf5152091a0c0b84ebc868de8433583072a340c4899e0fc7ad6a80314b880a1466868c9a6a1f640c3d1f2fe7f41f8c541b99d78c8b414263dfa27eba3 + checksum: 10/5659316360b5cc2d6f5931b346401fa534107b68b60179cf14970e27978f0936c1d5c46f4b5b8175f8cba0430f522b3ce355b4b724c0ea36ce6c0347fab25afd languageName: node linkType: hard @@ -6804,13 +7285,6 @@ __metadata: languageName: node linkType: hard -"unicode-emoji-modifier-base@npm:^1.0.0": - version: 1.0.0 - resolution: "unicode-emoji-modifier-base@npm:1.0.0" - checksum: 10/6e1521d35fa69493207eb8b41f8edb95985d8b3faf07c01d820a1830b5e8403e20002563e2f84683e8e962a49beccae789f0879356bf92a4ec7a4dd8e2d16fdb - languageName: node - linkType: hard - "unique-filename@npm:^1.1.1": version: 1.1.1 resolution: "unique-filename@npm:1.1.1" @@ -6877,13 +7351,6 @@ __metadata: languageName: node linkType: hard -"v8-compile-cache-lib@npm:^3.0.0": - version: 3.0.0 - resolution: "v8-compile-cache-lib@npm:3.0.0" - checksum: 10/90cfbe591c47e0b69c3ddf6b224dd3cfd4e00e67aedd71c35896d5edf72312410cf223230048176a93d6621c78c00e38b9f62edbe125b2454484a84f3092f7e7 - languageName: node - linkType: hard - "v8-to-istanbul@npm:^9.0.1": version: 9.0.1 resolution: "v8-to-istanbul@npm:9.0.1" @@ -6914,17 +7381,17 @@ __metadata: languageName: node linkType: hard -"vscode-oniguruma@npm:^1.6.1": - version: 1.6.2 - resolution: "vscode-oniguruma@npm:1.6.2" - checksum: 10/2b9404ffe6e4ff4079844a3dc1cc6be459d74e475007355cfc09af8bdee09a8c8ac26787d372e08b6c2563f68b31f9b4ec1eb9ae0cc6991bdea2bfd3d38ade45 +"vscode-oniguruma@npm:^1.7.0": + version: 1.7.0 + resolution: "vscode-oniguruma@npm:1.7.0" + checksum: 10/7da9d21459f9788544b258a5fd1b9752df6edd8b406a19eea0209c6bf76507d5717277016799301c4da0d536095f9ca8c06afd1ab8f4001189090c804ca4814e languageName: node linkType: hard -"vscode-textmate@npm:^6.0.0": - version: 6.0.0 - resolution: "vscode-textmate@npm:6.0.0" - checksum: 10/5db7e2c9a4e4f5e9c3937f74d86dbaeb6f5a6325dc7d23b9087f9b37acdf640611b5b436c5977cd0d5f830631af42f12c48107b41e0aa80a55284ace0c685a6f +"vscode-textmate@npm:^8.0.0": + version: 8.0.0 + resolution: "vscode-textmate@npm:8.0.0" + checksum: 10/9fa7d66d6042cb090d116c2d8820d34c8870cfcbaed6e404da89f66b899970ed0ac47b59a2e30fc40a25af5414822bb3ea27974f714e9b91910d69c894be95f7 languageName: node linkType: hard @@ -6937,6 +7404,24 @@ __metadata: languageName: node linkType: hard +"webidl-conversions@npm:^4.0.2": + version: 4.0.2 + resolution: "webidl-conversions@npm:4.0.2" + checksum: 10/594187c36f2d7898f89c0ed3b9248a095fa549ecc1befb10a97bc884b5680dc96677f58df5579334d8e0d1018e5ef075689cfa2a6c459f45a61a9deb512cb59e + languageName: node + linkType: hard + +"whatwg-url@npm:^7.0.0": + version: 7.1.0 + resolution: "whatwg-url@npm:7.1.0" + dependencies: + lodash.sortby: "npm:^4.7.0" + tr46: "npm:^1.0.1" + webidl-conversions: "npm:^4.0.2" + checksum: 10/769fd35838b4e50536ae08d836472e86adbedda1d5493ea34353c55468147e7868b91d2535b59e01a9e7331ab7e4cdfdf5490c279c045da23c327cf33e32f755 + languageName: node + linkType: hard + "which-boxed-primitive@npm:^1.0.2": version: 1.0.2 resolution: "which-boxed-primitive@npm:1.0.2" @@ -7071,6 +7556,15 @@ __metadata: languageName: node linkType: hard +"yaml@npm:^2.3.4": + version: 2.4.5 + resolution: "yaml@npm:2.4.5" + bin: + yaml: bin.mjs + checksum: 10/b09bf5a615a65276d433d76b8e34ad6b4c0320b85eb3f1a39da132c61ae6e2ff34eff4624e6458d96d49566c93cf43408ba5e568218293a8c6541a2006883f64 + languageName: node + linkType: hard + "yargs-parser@npm:^20.2.2": version: 20.2.7 resolution: "yargs-parser@npm:20.2.7" @@ -7085,7 +7579,7 @@ __metadata: languageName: node linkType: hard -"yargs@npm:17.7.2, yargs@npm:^17.0.1, yargs@npm:^17.3.1, yargs@npm:^17.7.2": +"yargs@npm:17.7.2, yargs@npm:^17.0.1, yargs@npm:^17.3.1": version: 17.7.2 resolution: "yargs@npm:17.7.2" dependencies: @@ -7115,13 +7609,6 @@ __metadata: languageName: node linkType: hard -"yn@npm:3.1.1": - version: 3.1.1 - resolution: "yn@npm:3.1.1" - checksum: 10/2c487b0e149e746ef48cda9f8bad10fc83693cd69d7f9dcd8be4214e985de33a29c9e24f3c0d6bcf2288427040a8947406ab27f7af67ee9456e6b84854f02dd6 - languageName: node - linkType: hard - "yocto-queue@npm:^0.1.0": version: 0.1.0 resolution: "yocto-queue@npm:0.1.0" From b4c2fe8f9b863c8e7ede1e663c2e0b41d49a3dab Mon Sep 17 00:00:00 2001 From: Erik Marks Date: Tue, 9 Jul 2024 15:56:03 +0200 Subject: [PATCH 04/15] chore: Replace tsup with ts-bridge --- .depcheckrc.yml | 6 +- constraints.pro | 21 +- package.json | 10 +- .../CHANGELOG.md | 0 .../{playground => ocap-playground}/LICENSE | 0 .../{playground => ocap-playground}/README.md | 6 +- .../jest.config.js | 0 .../package.json | 28 +- .../src/index.test.ts | 0 .../src/index.ts | 0 .../tsconfig.build.json | 2 +- .../tsconfig.json | 0 .../typedoc.json | 0 packages/playground/tsup.config.ts | 16 - tsconfig.build.json | 2 +- tsconfig.json | 4 +- tsup.config.ts | 51 - yarn.lock | 956 +++++------------- 18 files changed, 308 insertions(+), 794 deletions(-) rename packages/{playground => ocap-playground}/CHANGELOG.md (100%) rename packages/{playground => ocap-playground}/LICENSE (100%) rename packages/{playground => ocap-playground}/README.md (67%) rename packages/{playground => ocap-playground}/jest.config.js (100%) rename packages/{playground => ocap-playground}/package.json (69%) rename packages/{playground => ocap-playground}/src/index.test.ts (100%) rename packages/{playground => ocap-playground}/src/index.ts (100%) rename packages/{playground => ocap-playground}/tsconfig.build.json (86%) rename packages/{playground => ocap-playground}/tsconfig.json (100%) rename packages/{playground => ocap-playground}/typedoc.json (100%) delete mode 100644 packages/playground/tsup.config.ts delete mode 100644 tsup.config.ts diff --git a/.depcheckrc.yml b/.depcheckrc.yml index 2052a5074..1cdc2b13a 100644 --- a/.depcheckrc.yml +++ b/.depcheckrc.yml @@ -1,10 +1,14 @@ --- ignores: + - '@arethetypeswrong/cli' - '@lavamoat/allow-scripts' - '@lavamoat/preinstall-always-fail' - '@metamask/auto-changelog' - - '@yarnpkg/*' + - '@ts-bridge/cli' + - '@ts-bridge/shims' - '@types/jest' + - '@types/node' + - '@yarnpkg/*' - 'jest-silent-reporter' - 'prettier-plugin-*' - 'ts-jest' diff --git a/constraints.pro b/constraints.pro index 3a7533b5b..ae27a8921 100644 --- a/constraints.pro +++ b/constraints.pro @@ -201,26 +201,35 @@ gen_enforced_field(WorkspaceCwd, 'license', null) :- workspace_field(WorkspaceCwd, 'private', true). % The entrypoint for all published packages must be the same. -gen_enforced_field(WorkspaceCwd, 'main', './dist/index.js') :- +gen_enforced_field(WorkspaceCwd, 'main', './dist/index.cjs') :- + \+ workspace_field(WorkspaceCwd, 'private', true). +gen_enforced_field(WorkspaceCwd, 'module', './dist/index.mjs') :- \+ workspace_field(WorkspaceCwd, 'private', true). % Non-published packages must not specify an entrypoint. gen_enforced_field(WorkspaceCwd, 'main', null) :- workspace_field(WorkspaceCwd, 'private', true). +gen_enforced_field(WorkspaceCwd, 'module', null) :- + workspace_field(WorkspaceCwd, 'private', true). % The type definitions entrypoint for all publishable packages must be the same. -gen_enforced_field(WorkspaceCwd, 'types', './dist/types/index.d.ts') :- +gen_enforced_field(WorkspaceCwd, 'types', './dist/index.d.cts') :- \+ workspace_field(WorkspaceCwd, 'private', true). % Non-published packages must not specify a type definitions entrypoint. gen_enforced_field(WorkspaceCwd, 'types', null) :- workspace_field(WorkspaceCwd, 'private', true). % The exports for all published packages must be the same. -gen_enforced_field(WorkspaceCwd, 'exports["."].import', './dist/index.mjs') :- +% CommonJS +gen_enforced_field(WorkspaceCwd, 'exports["."].require.default', './dist/index.cjs') :- + \+ workspace_field(WorkspaceCwd, 'private', true). +gen_enforced_field(WorkspaceCwd, 'exports["."].require.types', './dist/index.d.cts') :- \+ workspace_field(WorkspaceCwd, 'private', true). -gen_enforced_field(WorkspaceCwd, 'exports["."].require', './dist/index.js') :- +% ESM +gen_enforced_field(WorkspaceCwd, 'exports["."].import.default', './dist/index.mjs') :- \+ workspace_field(WorkspaceCwd, 'private', true). -gen_enforced_field(WorkspaceCwd, 'exports["."].types', './dist/types/index.d.ts') :- +gen_enforced_field(WorkspaceCwd, 'exports["."].import.types', './dist/index.d.mts') :- \+ workspace_field(WorkspaceCwd, 'private', true). +% package.json gen_enforced_field(WorkspaceCwd, 'exports["./package.json"]', './package.json') :- \+ workspace_field(WorkspaceCwd, 'private', true). % Non-published packages must not specify exports. @@ -245,7 +254,7 @@ gen_enforced_field(WorkspaceCwd, 'files', []) :- WorkspaceCwd = '.'. % All non-root packages must have the same "build" script. -gen_enforced_field(WorkspaceCwd, 'scripts.build', 'tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean') :- +gen_enforced_field(WorkspaceCwd, 'scripts.build', 'ts-bridge --project tsconfig.build.json --clean') :- WorkspaceCwd \= '.'. % All non-root packages must have the same "build:docs" script. diff --git a/package.json b/package.json index c0ea03d6e..895a3b64c 100644 --- a/package.json +++ b/package.json @@ -31,10 +31,8 @@ "test:clean": "yarn workspaces foreach --all --parallel --verbose run test:clean && yarn test", "test:verbose": "yarn workspaces foreach --all --parallel --verbose run test:verbose" }, - "resolutions": { - "tsup@^8.0.2": "patch:tsup@npm%3A8.0.2#./.yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch" - }, "devDependencies": { + "@arethetypeswrong/cli": "^0.15.3", "@lavamoat/allow-scripts": "^3.0.4", "@lavamoat/preinstall-always-fail": "^2.0.0", "@metamask/auto-changelog": "^3.4.4", @@ -42,6 +40,8 @@ "@metamask/eslint-config-jest": "^12.1.0", "@metamask/eslint-config-nodejs": "^12.1.0", "@metamask/eslint-config-typescript": "^12.1.0", + "@ts-bridge/cli": "^0.1.4", + "@ts-bridge/shims": "^0.1.1", "@types/jest": "^28.1.6", "@types/node": "^18.18.14", "@typescript-eslint/eslint-plugin": "^5.43.0", @@ -62,7 +62,6 @@ "prettier-plugin-packagejson": "^2.3.0", "rimraf": "^6.0.0", "ts-jest": "^28.0.7", - "tsup": "^8.0.2", "typedoc": "^0.24.8", "typescript": "~4.9.5" }, @@ -72,8 +71,7 @@ }, "lavamoat": { "allowScripts": { - "@lavamoat/preinstall-always-fail": false, - "tsup>esbuild": true + "@lavamoat/preinstall-always-fail": false } } } diff --git a/packages/playground/CHANGELOG.md b/packages/ocap-playground/CHANGELOG.md similarity index 100% rename from packages/playground/CHANGELOG.md rename to packages/ocap-playground/CHANGELOG.md diff --git a/packages/playground/LICENSE b/packages/ocap-playground/LICENSE similarity index 100% rename from packages/playground/LICENSE rename to packages/ocap-playground/LICENSE diff --git a/packages/playground/README.md b/packages/ocap-playground/README.md similarity index 67% rename from packages/playground/README.md rename to packages/ocap-playground/README.md index fc2546914..d67d60bf3 100644 --- a/packages/playground/README.md +++ b/packages/ocap-playground/README.md @@ -1,14 +1,14 @@ -# `@metamask/playground` +# `@metamask/ocap-playground` An Ocap Kernel playground. ## Installation -`yarn add @metamask/playground` +`yarn add @metamask/ocap-playground` or -`npm install @metamask/playground` +`npm install @metamask/ocap-playground` ## Contributing diff --git a/packages/playground/jest.config.js b/packages/ocap-playground/jest.config.js similarity index 100% rename from packages/playground/jest.config.js rename to packages/ocap-playground/jest.config.js diff --git a/packages/playground/package.json b/packages/ocap-playground/package.json similarity index 69% rename from packages/playground/package.json rename to packages/ocap-playground/package.json index 599298439..6b4dd0099 100644 --- a/packages/playground/package.json +++ b/packages/ocap-playground/package.json @@ -1,12 +1,12 @@ { - "name": "@metamask/playground", + "name": "@metamask/ocap-playground", "version": "0.0.0", "description": "An Ocap Kernel playground", "keywords": [ "MetaMask", "Ethereum" ], - "homepage": "https://github.com/MetaMask/ocap-kernel/tree/main/packages/playground#readme", + "homepage": "https://github.com/MetaMask/ocap-kernel/tree/main/packages/ocap-playground#readme", "bugs": { "url": "https://github.com/MetaMask/ocap-kernel/issues" }, @@ -18,21 +18,27 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "default": "./dist/index.mjs", + "types": "./dist/index.d.mts" + }, + "require": { + "default": "./dist/index.cjs", + "types": "./dist/index.d.cts" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "module": "./dist/index.mjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --clean", "build:docs": "typedoc", - "changelog:validate": "../../scripts/validate-changelog.sh @metamask/playground", + "changelog:validate": "../../scripts/validate-changelog.sh @metamask/ocap-playground", "publish:preview": "yarn npm publish --tag preview", "test": "jest --reporters=jest-silent-reporter", "posttest": "jest-it-up", @@ -41,13 +47,15 @@ "test:watch": "jest --watch" }, "devDependencies": { + "@arethetypeswrong/cli": "^0.15.3", "@metamask/auto-changelog": "^3.4.4", + "@ts-bridge/cli": "^0.1.4", + "@ts-bridge/shims": "^0.1.1", "@types/jest": "^28.1.6", "deepmerge": "^4.3.1", "jest": "^28.1.3", "jest-it-up": "^2.0.2", "ts-jest": "^28.0.7", - "tsup": "^8.0.2", "typedoc": "^0.24.8", "typedoc-plugin-missing-exports": "^2.0.0", "typescript": "~4.9.5" diff --git a/packages/playground/src/index.test.ts b/packages/ocap-playground/src/index.test.ts similarity index 100% rename from packages/playground/src/index.test.ts rename to packages/ocap-playground/src/index.test.ts diff --git a/packages/playground/src/index.ts b/packages/ocap-playground/src/index.ts similarity index 100% rename from packages/playground/src/index.ts rename to packages/ocap-playground/src/index.ts diff --git a/packages/playground/tsconfig.build.json b/packages/ocap-playground/tsconfig.build.json similarity index 86% rename from packages/playground/tsconfig.build.json rename to packages/ocap-playground/tsconfig.build.json index ff5a1ceaf..02a0eea03 100644 --- a/packages/playground/tsconfig.build.json +++ b/packages/ocap-playground/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [], diff --git a/packages/playground/tsconfig.json b/packages/ocap-playground/tsconfig.json similarity index 100% rename from packages/playground/tsconfig.json rename to packages/ocap-playground/tsconfig.json diff --git a/packages/playground/typedoc.json b/packages/ocap-playground/typedoc.json similarity index 100% rename from packages/playground/typedoc.json rename to packages/ocap-playground/typedoc.json diff --git a/packages/playground/tsup.config.ts b/packages/playground/tsup.config.ts deleted file mode 100644 index c89908020..000000000 --- a/packages/playground/tsup.config.ts +++ /dev/null @@ -1,16 +0,0 @@ -import deepmerge from 'deepmerge'; -// The Node ESLint plugin is confused. -// eslint-disable-next-line n/no-extraneous-import -import type { Options } from 'tsup'; - -import packageJson from './package.json'; - -// `tsup.config.ts` is not under `rootDir`, so we need to use `require` instead. -// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires -const { default: baseConfig } = require('../../tsup.config'); - -const config: Options = { - name: packageJson.name, -}; - -export default deepmerge(baseConfig, config); diff --git a/tsconfig.build.json b/tsconfig.build.json index 08f850ad7..44e5c2c8f 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -1,5 +1,5 @@ { "files": [], "include": [], - "references": [{ "path": "./packages/playground/tsconfig.build.json" }] + "references": [{ "path": "./packages/ocap-playground/tsconfig.build.json" }] } diff --git a/tsconfig.json b/tsconfig.json index 7982f2ba5..245e1f474 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,6 +5,6 @@ "resolveJsonModule": true }, "files": [], - "include": ["tsup.config.ts"], - "references": [{ "path": "./packages/playground" }] + "include": [], + "references": [{ "path": "./packages/ocap-playground" }] } diff --git a/tsup.config.ts b/tsup.config.ts deleted file mode 100644 index e297bd393..000000000 --- a/tsup.config.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { builtinModules } from 'module'; -import type { Options } from 'tsup'; - -const config: Options = { - // Clean the dist folder before bundling. - clean: true, - - // The entry to bundle. - entry: [ - 'src/**/*.ts', - 'src/**/*.tsx', - '!src/**/__fixtures__/**/*', - '!src/**/__mocks__/**/*', - '!src/**/__test__/**/*', - '!src/**/__tests__/**/*', - '!src/**/__snapshots__/**/*', - '!src/**/test-utils/**/*', - '!src/**/*.test.ts', - '!src/**/*.test.tsx', - '!src/**/*.test-d.ts', - '!src/**/*.test.*.ts', - '!src/**/*.test.*.tsx', - ], - - // External modules that should not be processed by `tsup`. We want to - // exclude built-in Node.js modules from the bundle. - // https://tsup.egoist.dev/#excluding-packages - external: builtinModules, - - // The output formats. We want to generate both CommonJS and ESM bundles. - // https://tsup.egoist.dev/#bundle-formats - format: ['cjs', 'esm'], - - // The platform to target when generating the bundles. `neutral` means that - // the bundles will work in both Node.js and browsers. - platform: 'neutral', - - // Hide unnecessary logs from the console. Warnings and errors will still be - // shown. - silent: true, - - // Generate sourcemaps as separate files. - // https://tsup.egoist.dev/#generate-sourcemap-file - sourcemap: true, - - // Split the output into chunks. This is useful for tree-shaking. - // https://tsup.egoist.dev/#code-splitting - splitting: true, -}; - -export default config; diff --git a/yarn.lock b/yarn.lock index b3a7ccca9..fe445a7c5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -22,6 +22,44 @@ __metadata: languageName: node linkType: hard +"@andrewbranch/untar.js@npm:^1.0.3": + version: 1.0.3 + resolution: "@andrewbranch/untar.js@npm:1.0.3" + checksum: 10/a32de53839fc61af90a394cf93d4368aacd167c9c80f0b3ba0c268460942a6ce2bfe257b6d3f03986b9dcb7368f10b9dc7f66c2f94254d2662da8278454e7d12 + languageName: node + linkType: hard + +"@arethetypeswrong/cli@npm:^0.15.3": + version: 0.15.3 + resolution: "@arethetypeswrong/cli@npm:0.15.3" + dependencies: + "@arethetypeswrong/core": "npm:0.15.1" + chalk: "npm:^4.1.2" + cli-table3: "npm:^0.6.3" + commander: "npm:^10.0.1" + marked: "npm:^9.1.2" + marked-terminal: "npm:^6.0.0" + semver: "npm:^7.5.4" + bin: + attw: dist/index.js + checksum: 10/d64eea5c946669a24cd93007b03546b1422b9fa26e298589add461fc818a9aa1fddd2f0d3a7ed3a5f302f6c047ba574782bf4b04f7b087f1a370540e5dbfbb90 + languageName: node + linkType: hard + +"@arethetypeswrong/core@npm:0.15.1": + version: 0.15.1 + resolution: "@arethetypeswrong/core@npm:0.15.1" + dependencies: + "@andrewbranch/untar.js": "npm:^1.0.3" + fflate: "npm:^0.8.2" + semver: "npm:^7.5.4" + ts-expose-internals-conditionally: "npm:1.0.0-empty.0" + typescript: "npm:5.3.3" + validate-npm-package-name: "npm:^5.0.0" + checksum: 10/af07d7d0d93926b019d8dc412cee251db972e443be181ef4ef79d28d61f76542b2911a381397ab3ddc23d9a669d830994b4f3b0033f8244f3750027f319595af + languageName: node + linkType: hard + "@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.22.13": version: 7.22.13 resolution: "@babel/code-frame@npm:7.22.13" @@ -413,6 +451,13 @@ __metadata: languageName: node linkType: hard +"@colors/colors@npm:1.5.0": + version: 1.5.0 + resolution: "@colors/colors@npm:1.5.0" + checksum: 10/9d226461c1e91e95f067be2bdc5e6f99cfe55a721f45afb44122e23e4b8602eeac4ff7325af6b5a369f36396ee1514d3809af3f57769066d80d83790d8e53339 + languageName: node + linkType: hard + "@es-joy/jsdoccomment@npm:~0.36.1": version: 0.36.1 resolution: "@es-joy/jsdoccomment@npm:0.36.1" @@ -424,167 +469,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/aix-ppc64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/aix-ppc64@npm:0.19.12" - conditions: os=aix & cpu=ppc64 - languageName: node - linkType: hard - -"@esbuild/android-arm64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/android-arm64@npm:0.19.12" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/android-arm@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/android-arm@npm:0.19.12" - conditions: os=android & cpu=arm - languageName: node - linkType: hard - -"@esbuild/android-x64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/android-x64@npm:0.19.12" - conditions: os=android & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/darwin-arm64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/darwin-arm64@npm:0.19.12" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/darwin-x64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/darwin-x64@npm:0.19.12" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/freebsd-arm64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/freebsd-arm64@npm:0.19.12" - conditions: os=freebsd & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/freebsd-x64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/freebsd-x64@npm:0.19.12" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/linux-arm64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/linux-arm64@npm:0.19.12" - conditions: os=linux & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/linux-arm@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/linux-arm@npm:0.19.12" - conditions: os=linux & cpu=arm - languageName: node - linkType: hard - -"@esbuild/linux-ia32@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/linux-ia32@npm:0.19.12" - conditions: os=linux & cpu=ia32 - languageName: node - linkType: hard - -"@esbuild/linux-loong64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/linux-loong64@npm:0.19.12" - conditions: os=linux & cpu=loong64 - languageName: node - linkType: hard - -"@esbuild/linux-mips64el@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/linux-mips64el@npm:0.19.12" - conditions: os=linux & cpu=mips64el - languageName: node - linkType: hard - -"@esbuild/linux-ppc64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/linux-ppc64@npm:0.19.12" - conditions: os=linux & cpu=ppc64 - languageName: node - linkType: hard - -"@esbuild/linux-riscv64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/linux-riscv64@npm:0.19.12" - conditions: os=linux & cpu=riscv64 - languageName: node - linkType: hard - -"@esbuild/linux-s390x@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/linux-s390x@npm:0.19.12" - conditions: os=linux & cpu=s390x - languageName: node - linkType: hard - -"@esbuild/linux-x64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/linux-x64@npm:0.19.12" - conditions: os=linux & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/netbsd-x64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/netbsd-x64@npm:0.19.12" - conditions: os=netbsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/openbsd-x64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/openbsd-x64@npm:0.19.12" - conditions: os=openbsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/sunos-x64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/sunos-x64@npm:0.19.12" - conditions: os=sunos & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/win32-arm64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/win32-arm64@npm:0.19.12" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/win32-ia32@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/win32-ia32@npm:0.19.12" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - -"@esbuild/win32-x64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/win32-x64@npm:0.19.12" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - "@eslint-community/eslint-utils@npm:^4.2.0": version: 4.4.0 resolution: "@eslint-community/eslint-utils@npm:4.4.0" @@ -1115,17 +999,19 @@ __metadata: languageName: node linkType: hard -"@metamask/playground@workspace:packages/playground": +"@metamask/ocap-playground@workspace:packages/ocap-playground": version: 0.0.0-use.local - resolution: "@metamask/playground@workspace:packages/playground" + resolution: "@metamask/ocap-playground@workspace:packages/ocap-playground" dependencies: + "@arethetypeswrong/cli": "npm:^0.15.3" "@metamask/auto-changelog": "npm:^3.4.4" + "@ts-bridge/cli": "npm:^0.1.4" + "@ts-bridge/shims": "npm:^0.1.1" "@types/jest": "npm:^28.1.6" deepmerge: "npm:^4.3.1" jest: "npm:^28.1.3" jest-it-up: "npm:^2.0.2" ts-jest: "npm:^28.0.7" - tsup: "npm:^8.0.2" typedoc: "npm:^0.24.8" typedoc-plugin-missing-exports: "npm:^2.0.0" typescript: "npm:~4.9.5" @@ -1268,118 +1154,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-android-arm-eabi@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-android-arm-eabi@npm:4.18.1" - conditions: os=android & cpu=arm - languageName: node - linkType: hard - -"@rollup/rollup-android-arm64@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-android-arm64@npm:4.18.1" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - -"@rollup/rollup-darwin-arm64@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-darwin-arm64@npm:4.18.1" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@rollup/rollup-darwin-x64@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-darwin-x64@npm:4.18.1" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@rollup/rollup-linux-arm-gnueabihf@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.18.1" - conditions: os=linux & cpu=arm & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-arm-musleabihf@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.18.1" - conditions: os=linux & cpu=arm & libc=musl - languageName: node - linkType: hard - -"@rollup/rollup-linux-arm64-gnu@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.18.1" - conditions: os=linux & cpu=arm64 & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-arm64-musl@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-arm64-musl@npm:4.18.1" - conditions: os=linux & cpu=arm64 & libc=musl - languageName: node - linkType: hard - -"@rollup/rollup-linux-powerpc64le-gnu@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.18.1" - conditions: os=linux & cpu=ppc64 & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-riscv64-gnu@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.18.1" - conditions: os=linux & cpu=riscv64 & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-s390x-gnu@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.18.1" - conditions: os=linux & cpu=s390x & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-x64-gnu@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-x64-gnu@npm:4.18.1" - conditions: os=linux & cpu=x64 & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-x64-musl@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-x64-musl@npm:4.18.1" - conditions: os=linux & cpu=x64 & libc=musl - languageName: node - linkType: hard - -"@rollup/rollup-win32-arm64-msvc@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.18.1" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"@rollup/rollup-win32-ia32-msvc@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.18.1" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - -"@rollup/rollup-win32-x64-msvc@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-win32-x64-msvc@npm:4.18.1" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - "@sinclair/typebox@npm:^0.24.1": version: 0.24.28 resolution: "@sinclair/typebox@npm:0.24.28" @@ -1387,6 +1161,13 @@ __metadata: languageName: node linkType: hard +"@sindresorhus/is@npm:^4.6.0": + version: 4.6.0 + resolution: "@sindresorhus/is@npm:4.6.0" + checksum: 10/e7f36ed72abfcd5e0355f7423a72918b9748bb1ef370a59f3e5ad8d40b728b85d63b272f65f63eec1faf417cda89dcb0aeebe94015647b6054659c1442fe5ce0 + languageName: node + linkType: hard + "@sinonjs/commons@npm:^1.7.0": version: 1.8.1 resolution: "@sinonjs/commons@npm:1.8.1" @@ -1412,6 +1193,33 @@ __metadata: languageName: node linkType: hard +"@ts-bridge/cli@npm:^0.1.4": + version: 0.1.4 + resolution: "@ts-bridge/cli@npm:0.1.4" + dependencies: + chalk: "npm:^5.3.0" + resolve.exports: "npm:^2.0.2" + yargs: "npm:^17.7.2" + peerDependencies: + "@ts-bridge/shims": ^0.1.1 + typescript: ">=4.8.0" + peerDependenciesMeta: + "@ts-bridge/shims": + optional: true + bin: + ts-bridge: ./dist/index.js + tsbridge: ./dist/index.js + checksum: 10/db83db5d283d7341f53f042f115884f514acd1ce6c7e14975b821b39cc4852f3cd6e41790a8cbb2b8615f0e5de77e5bdcec0745935b41267b2af4db031400c84 + languageName: node + linkType: hard + +"@ts-bridge/shims@npm:^0.1.1": + version: 0.1.1 + resolution: "@ts-bridge/shims@npm:0.1.1" + checksum: 10/df15df15450f0a6305033655a0afa2458a76362d644eab046d9899b9dc9ba200023144dc8d80040f68cd74f12ba4f2da2ea2c4c950d552ff66688eccd658e2f0 + languageName: node + linkType: hard + "@types/babel__core@npm:^7.1.14": version: 7.1.19 resolution: "@types/babel__core@npm:7.1.19" @@ -1460,13 +1268,6 @@ __metadata: languageName: node linkType: hard -"@types/estree@npm:1.0.5": - version: 1.0.5 - resolution: "@types/estree@npm:1.0.5" - checksum: 10/7de6d928dd4010b0e20c6919e1a6c27b61f8d4567befa89252055fad503d587ecb9a1e3eab1b1901f923964d7019796db810b7fd6430acb26c32866d126fd408 - languageName: node - linkType: hard - "@types/glob@npm:^7.1.1": version: 7.1.3 resolution: "@types/glob@npm:7.1.3" @@ -1902,6 +1703,13 @@ __metadata: languageName: node linkType: hard +"ansi-escapes@npm:^6.2.0": + version: 6.2.1 + resolution: "ansi-escapes@npm:6.2.1" + checksum: 10/3b064937dc8a0645ed8094bc8b09483ee718f3aa3139746280e6c2ea80e28c0a3ce66973d0f33e88e60021abbf67e5f877deabfc810e75edf8a19dfa128850be + languageName: node + linkType: hard + "ansi-regex@npm:^5.0.1": version: 5.0.1 resolution: "ansi-regex@npm:5.0.1" @@ -1956,10 +1764,10 @@ __metadata: languageName: node linkType: hard -"any-promise@npm:^1.0.0": - version: 1.3.0 - resolution: "any-promise@npm:1.3.0" - checksum: 10/6737469ba353b5becf29e4dc3680736b9caa06d300bda6548812a8fee63ae7d336d756f88572fa6b5219aed36698d808fa55f62af3e7e6845c7a1dc77d240edb +"ansicolors@npm:~0.3.2": + version: 0.3.2 + resolution: "ansicolors@npm:0.3.2" + checksum: 10/0704d1485d84d65a47aacd3d2d26f501f21aeeb509922c8f2496d0ec5d346dc948efa64f3151aef0571d73e5c44eb10fd02f27f59762e9292fe123bb1ea9ff7d languageName: node linkType: hard @@ -2262,24 +2070,6 @@ __metadata: languageName: node linkType: hard -"bundle-require@npm:^4.0.0": - version: 4.2.1 - resolution: "bundle-require@npm:4.2.1" - dependencies: - load-tsconfig: "npm:^0.2.3" - peerDependencies: - esbuild: ">=0.17" - checksum: 10/e49cb6528373d4e086723bc37fb037e05e9cd529e1b3aa1c4da6c495c4725a0f74ae9cc461de35163d65dd3a6c41a0474c6e52b74b8ded4fe829c951d0784ec1 - languageName: node - linkType: hard - -"cac@npm:^6.7.12": - version: 6.7.14 - resolution: "cac@npm:6.7.14" - checksum: 10/002769a0fbfc51c062acd2a59df465a2a947916b02ac50b56c69ec6c018ee99ac3e7f4dd7366334ea847f1ecacf4defaa61bcd2ac283db50156ce1f1d8c8ad42 - languageName: node - linkType: hard - "cacache@npm:^16.1.0": version: 16.1.1 resolution: "cacache@npm:16.1.1" @@ -2365,6 +2155,18 @@ __metadata: languageName: node linkType: hard +"cardinal@npm:^2.1.1": + version: 2.1.1 + resolution: "cardinal@npm:2.1.1" + dependencies: + ansicolors: "npm:~0.3.2" + redeyed: "npm:~2.1.0" + bin: + cdl: ./bin/cdl.js + checksum: 10/caf0d34739ef7b1d80e1753311f889997b62c4490906819eb5da5bd46e7f5e5caba7a8a96ca401190c7d9c18443a7749e5338630f7f9a1ae98d60cac49b9008e + languageName: node + linkType: hard + "chalk@npm:^2.4.2": version: 2.4.2 resolution: "chalk@npm:2.4.2" @@ -2376,7 +2178,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^4.0.0, chalk@npm:^4.1.1": +"chalk@npm:^4.0.0, chalk@npm:^4.1.1, chalk@npm:^4.1.2": version: 4.1.2 resolution: "chalk@npm:4.1.2" dependencies: @@ -2386,6 +2188,13 @@ __metadata: languageName: node linkType: hard +"chalk@npm:^5.3.0": + version: 5.3.0 + resolution: "chalk@npm:5.3.0" + checksum: 10/6373caaab21bd64c405bfc4bd9672b145647fc9482657b5ea1d549b3b2765054e9d3d928870cdf764fb4aad67555f5061538ff247b8310f110c5c888d92397ea + languageName: node + linkType: hard + "char-regex@npm:^1.0.2": version: 1.0.2 resolution: "char-regex@npm:1.0.2" @@ -2393,7 +2202,7 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:>=3.0.0 <4.0.0, chokidar@npm:^3.5.1": +"chokidar@npm:>=3.0.0 <4.0.0": version: 3.6.0 resolution: "chokidar@npm:3.6.0" dependencies: @@ -2454,6 +2263,19 @@ __metadata: languageName: node linkType: hard +"cli-table3@npm:^0.6.3": + version: 0.6.5 + resolution: "cli-table3@npm:0.6.5" + dependencies: + "@colors/colors": "npm:1.5.0" + string-width: "npm:^4.2.0" + dependenciesMeta: + "@colors/colors": + optional: true + checksum: 10/8dca71256f6f1367bab84c33add3f957367c7c43750a9828a4212ebd31b8df76bd7419d386e3391ac7419698a8540c25f1a474584028f35b170841cde2e055c5 + languageName: node + linkType: hard + "cli-width@npm:^3.0.0": version: 3.0.0 resolution: "cli-width@npm:3.0.0" @@ -2545,10 +2367,10 @@ __metadata: languageName: node linkType: hard -"commander@npm:^4.0.0": - version: 4.1.1 - resolution: "commander@npm:4.1.1" - checksum: 10/3b2dc4125f387dab73b3294dbcb0ab2a862f9c0ad748ee2b27e3544d25325b7a8cdfbcc228d103a98a716960b14478114a5206b5415bd48cdafa38797891562c +"commander@npm:^10.0.1": + version: 10.0.1 + resolution: "commander@npm:10.0.1" + checksum: 10/8799faa84a30da985802e661cc9856adfaee324d4b138413013ef7f087e8d7924b144c30a1f1405475f0909f467665cd9e1ce13270a2f41b141dab0b7a58f3fb languageName: node linkType: hard @@ -2620,7 +2442,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.2.0, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": +"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.2.0, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": version: 4.3.5 resolution: "debug@npm:4.3.5" dependencies: @@ -2837,6 +2659,13 @@ __metadata: languageName: node linkType: hard +"emojilib@npm:^2.4.0": + version: 2.4.0 + resolution: "emojilib@npm:2.4.0" + checksum: 10/bef767eca49acaa881388d91bee6936ea57ae367d603d5227ff0a9da3e2d1e774a61c447e5f2f4901797d023c4b5239bc208285b6172a880d3655024a0f44980 + languageName: node + linkType: hard + "encoding@npm:^0.1.13": version: 0.1.13 resolution: "encoding@npm:0.1.13" @@ -2947,86 +2776,6 @@ __metadata: languageName: node linkType: hard -"esbuild@npm:^0.19.2": - version: 0.19.12 - resolution: "esbuild@npm:0.19.12" - dependencies: - "@esbuild/aix-ppc64": "npm:0.19.12" - "@esbuild/android-arm": "npm:0.19.12" - "@esbuild/android-arm64": "npm:0.19.12" - "@esbuild/android-x64": "npm:0.19.12" - "@esbuild/darwin-arm64": "npm:0.19.12" - "@esbuild/darwin-x64": "npm:0.19.12" - "@esbuild/freebsd-arm64": "npm:0.19.12" - "@esbuild/freebsd-x64": "npm:0.19.12" - "@esbuild/linux-arm": "npm:0.19.12" - "@esbuild/linux-arm64": "npm:0.19.12" - "@esbuild/linux-ia32": "npm:0.19.12" - "@esbuild/linux-loong64": "npm:0.19.12" - "@esbuild/linux-mips64el": "npm:0.19.12" - "@esbuild/linux-ppc64": "npm:0.19.12" - "@esbuild/linux-riscv64": "npm:0.19.12" - "@esbuild/linux-s390x": "npm:0.19.12" - "@esbuild/linux-x64": "npm:0.19.12" - "@esbuild/netbsd-x64": "npm:0.19.12" - "@esbuild/openbsd-x64": "npm:0.19.12" - "@esbuild/sunos-x64": "npm:0.19.12" - "@esbuild/win32-arm64": "npm:0.19.12" - "@esbuild/win32-ia32": "npm:0.19.12" - "@esbuild/win32-x64": "npm:0.19.12" - dependenciesMeta: - "@esbuild/aix-ppc64": - optional: true - "@esbuild/android-arm": - optional: true - "@esbuild/android-arm64": - optional: true - "@esbuild/android-x64": - optional: true - "@esbuild/darwin-arm64": - optional: true - "@esbuild/darwin-x64": - optional: true - "@esbuild/freebsd-arm64": - optional: true - "@esbuild/freebsd-x64": - optional: true - "@esbuild/linux-arm": - optional: true - "@esbuild/linux-arm64": - optional: true - "@esbuild/linux-ia32": - optional: true - "@esbuild/linux-loong64": - optional: true - "@esbuild/linux-mips64el": - optional: true - "@esbuild/linux-ppc64": - optional: true - "@esbuild/linux-riscv64": - optional: true - "@esbuild/linux-s390x": - optional: true - "@esbuild/linux-x64": - optional: true - "@esbuild/netbsd-x64": - optional: true - "@esbuild/openbsd-x64": - optional: true - "@esbuild/sunos-x64": - optional: true - "@esbuild/win32-arm64": - optional: true - "@esbuild/win32-ia32": - optional: true - "@esbuild/win32-x64": - optional: true - bin: - esbuild: bin/esbuild - checksum: 10/861fa8eb2428e8d6521a4b7c7930139e3f45e8d51a86985cc29408172a41f6b18df7b3401e7e5e2d528cdf83742da601ddfdc77043ddc4f1c715a8ddb2d8a255 - languageName: node - linkType: hard - "escalade@npm:^3.1.1": version: 3.1.1 resolution: "escalade@npm:3.1.1" @@ -3322,7 +3071,7 @@ __metadata: languageName: node linkType: hard -"esprima@npm:^4.0.0": +"esprima@npm:^4.0.0, esprima@npm:~4.0.0": version: 4.0.1 resolution: "esprima@npm:4.0.1" bin: @@ -3481,6 +3230,13 @@ __metadata: languageName: node linkType: hard +"fflate@npm:^0.8.2": + version: 0.8.2 + resolution: "fflate@npm:0.8.2" + checksum: 10/2bd26ba6d235d428de793c6a0cd1aaa96a06269ebd4e21b46c8fd1bd136abc631acf27e188d47c3936db090bf3e1ede11d15ce9eae9bffdc4bfe1b9dc66ca9cb + languageName: node + linkType: hard + "file-entry-cache@npm:^6.0.1": version: 6.0.1 resolution: "file-entry-cache@npm:6.0.1" @@ -3815,7 +3571,7 @@ __metadata: languageName: node linkType: hard -"globby@npm:^11.0.3, globby@npm:^11.1.0": +"globby@npm:^11.1.0": version: 11.1.0 resolution: "globby@npm:11.1.0" dependencies: @@ -4909,13 +4665,6 @@ __metadata: languageName: node linkType: hard -"joycon@npm:^3.0.1": - version: 3.1.1 - resolution: "joycon@npm:3.1.1" - checksum: 10/4b36e3479144ec196425f46b3618f8a96ce7e1b658f091a309cd4906215f5b7a402d7df331a3e0a09681381a658d0c5f039cb3cf6907e0a1e17ed847f5d37775 - languageName: node - linkType: hard - "js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": version: 4.0.0 resolution: "js-tokens@npm:4.0.0" @@ -5048,13 +4797,6 @@ __metadata: languageName: node linkType: hard -"lilconfig@npm:^3.0.0": - version: 3.1.2 - resolution: "lilconfig@npm:3.1.2" - checksum: 10/8058403850cfad76d6041b23db23f730e52b6c17a8c28d87b90766639ca0ee40c748a3e85c2d7bd133d572efabff166c4b015e5d25e01fd666cb4b13cfada7f0 - languageName: node - linkType: hard - "lines-and-columns@npm:^1.1.6": version: 1.1.6 resolution: "lines-and-columns@npm:1.1.6" @@ -5062,13 +4804,6 @@ __metadata: languageName: node linkType: hard -"load-tsconfig@npm:^0.2.3": - version: 0.2.5 - resolution: "load-tsconfig@npm:0.2.5" - checksum: 10/b3176f6f0c86dbdbbc7e337440a803b0b4407c55e2e1cfc53bd3db68e0211448f36428a6075ecf5e286db5d1bf791da756fc0ac4d2447717140fb6a5218ecfb4 - languageName: node - linkType: hard - "locate-path@npm:^5.0.0": version: 5.0.0 resolution: "locate-path@npm:5.0.0" @@ -5101,13 +4836,6 @@ __metadata: languageName: node linkType: hard -"lodash.sortby@npm:^4.7.0": - version: 4.7.0 - resolution: "lodash.sortby@npm:4.7.0" - checksum: 10/38df19ae28608af2c50ac342fc1f414508309d53e1d58ed9adfb2c3cd17c3af290058c0a0478028d932c5404df3d53349d19fa364ef6bed6145a6bc21320399e - languageName: node - linkType: hard - "lodash@npm:4.17.21, lodash@npm:^4.17.20, lodash@npm:^4.17.21": version: 4.17.21 resolution: "lodash@npm:4.17.21" @@ -5240,6 +4968,22 @@ __metadata: languageName: node linkType: hard +"marked-terminal@npm:^6.0.0": + version: 6.2.0 + resolution: "marked-terminal@npm:6.2.0" + dependencies: + ansi-escapes: "npm:^6.2.0" + cardinal: "npm:^2.1.1" + chalk: "npm:^5.3.0" + cli-table3: "npm:^0.6.3" + node-emoji: "npm:^2.1.3" + supports-hyperlinks: "npm:^3.0.0" + peerDependencies: + marked: ">=1 <12" + checksum: 10/98e79d0c4597ced53f7252fe711baf729e2c8754e654d49c713e764189419e880894534fa879f0d0c12801c938bc76cf80a7b67427e2d75fd0e502d5c7b73c1b + languageName: node + linkType: hard + "marked@npm:^4.3.0": version: 4.3.0 resolution: "marked@npm:4.3.0" @@ -5249,6 +4993,15 @@ __metadata: languageName: node linkType: hard +"marked@npm:^9.1.2": + version: 9.1.6 + resolution: "marked@npm:9.1.6" + bin: + marked: bin/marked.js + checksum: 10/29d073500c70b6b53cd35a8d19f5e43df6e2819ddeca8848a31901b87b82ca0ea46a8a831920c656c69c33ad5dce4b75654c4c4ced34a67f4e4e4a31c7620cfe + languageName: node + linkType: hard + "merge-stream@npm:^2.0.0": version: 2.0.0 resolution: "merge-stream@npm:2.0.0" @@ -5474,17 +5227,6 @@ __metadata: languageName: node linkType: hard -"mz@npm:^2.7.0": - version: 2.7.0 - resolution: "mz@npm:2.7.0" - dependencies: - any-promise: "npm:^1.0.0" - object-assign: "npm:^4.0.1" - thenify-all: "npm:^1.0.0" - checksum: 10/8427de0ece99a07e9faed3c0c6778820d7543e3776f9a84d22cf0ec0a8eb65f6e9aee9c9d353ff9a105ff62d33a9463c6ca638974cc652ee8140cd1e35951c87 - languageName: node - linkType: hard - "nanoid@npm:^3.3.6": version: 3.3.6 resolution: "nanoid@npm:3.3.6" @@ -5515,6 +5257,18 @@ __metadata: languageName: node linkType: hard +"node-emoji@npm:^2.1.3": + version: 2.1.3 + resolution: "node-emoji@npm:2.1.3" + dependencies: + "@sindresorhus/is": "npm:^4.6.0" + char-regex: "npm:^1.0.2" + emojilib: "npm:^2.4.0" + skin-tone: "npm:^2.0.0" + checksum: 10/e9cff16f557972bc45040c26cb686961935c582af612bd41446f0094834088c1cdf7d4370a39ce5d42b71c1352a35b8d8a7a2fec53922b51abf54f36e56cc614 + languageName: node + linkType: hard + "node-gyp@npm:^10.0.0": version: 10.1.0 resolution: "node-gyp@npm:10.1.0" @@ -5671,13 +5425,6 @@ __metadata: languageName: node linkType: hard -"object-assign@npm:^4.0.1": - version: 4.1.1 - resolution: "object-assign@npm:4.1.1" - checksum: 10/fcc6e4ea8c7fe48abfbb552578b1c53e0d194086e2e6bbbf59e0a536381a292f39943c6e9628af05b5528aa5e3318bb30d6b2e53cadaf5b8fe9e12c4b69af23f - languageName: node - linkType: hard - "object-inspect@npm:^1.13.1, object-inspect@npm:^1.9.0": version: 1.13.1 resolution: "object-inspect@npm:1.13.1" @@ -5896,7 +5643,7 @@ __metadata: languageName: node linkType: hard -"pirates@npm:^4.0.1, pirates@npm:^4.0.4": +"pirates@npm:^4.0.4": version: 4.0.6 resolution: "pirates@npm:4.0.6" checksum: 10/d02dda76f4fec1cbdf395c36c11cf26f76a644f9f9a1bfa84d3167d0d3154d5289aacc72677aa20d599bb4a6937a471de1b65c995e2aea2d8687cbcd7e43ea5f @@ -5921,24 +5668,6 @@ __metadata: languageName: node linkType: hard -"postcss-load-config@npm:^4.0.1": - version: 4.0.2 - resolution: "postcss-load-config@npm:4.0.2" - dependencies: - lilconfig: "npm:^3.0.0" - yaml: "npm:^2.3.4" - peerDependencies: - postcss: ">=8.0.9" - ts-node: ">=9.0.0" - peerDependenciesMeta: - postcss: - optional: true - ts-node: - optional: true - checksum: 10/e2c2ed9b7998a5b123e1ce0c124daf6504b1454c67dcc1c8fdbcc5ffb2597b7de245e3ac34f63afc928d3fd3260b1e36492ebbdb01a9ff63f16b3c8b7b925d1b - languageName: node - linkType: hard - "postcss@npm:^8.1.10": version: 8.4.31 resolution: "postcss@npm:8.4.31" @@ -6100,6 +5829,15 @@ __metadata: languageName: node linkType: hard +"redeyed@npm:~2.1.0": + version: 2.1.1 + resolution: "redeyed@npm:2.1.1" + dependencies: + esprima: "npm:~4.0.0" + checksum: 10/86880f97d54bb55bbf1c338e27fe28f18f52afc2f5afa808354a09a3777aa79b4f04e04844350d7fec80aa2d299196bde256b21f586e7e5d9b63494bd4a9db27 + languageName: node + linkType: hard + "regexp.prototype.flags@npm:^1.5.1": version: 1.5.1 resolution: "regexp.prototype.flags@npm:1.5.1" @@ -6162,6 +5900,13 @@ __metadata: languageName: node linkType: hard +"resolve.exports@npm:^2.0.2": + version: 2.0.2 + resolution: "resolve.exports@npm:2.0.2" + checksum: 10/f1cc0b6680f9a7e0345d783e0547f2a5110d8336b3c2a4227231dd007271ffd331fd722df934f017af90bae0373920ca0d4005da6f76cb3176c8ae426370f893 + languageName: node + linkType: hard + "resolve@npm:1.22.8, resolve@npm:^1.18.1, resolve@npm:^1.20.0, resolve@npm:^1.22.0, resolve@npm:^1.22.1, resolve@npm:^1.22.4": version: 1.22.8 resolution: "resolve@npm:1.22.8" @@ -6224,73 +5969,11 @@ __metadata: languageName: node linkType: hard -"rollup@npm:^4.0.2": - version: 4.18.1 - resolution: "rollup@npm:4.18.1" - dependencies: - "@rollup/rollup-android-arm-eabi": "npm:4.18.1" - "@rollup/rollup-android-arm64": "npm:4.18.1" - "@rollup/rollup-darwin-arm64": "npm:4.18.1" - "@rollup/rollup-darwin-x64": "npm:4.18.1" - "@rollup/rollup-linux-arm-gnueabihf": "npm:4.18.1" - "@rollup/rollup-linux-arm-musleabihf": "npm:4.18.1" - "@rollup/rollup-linux-arm64-gnu": "npm:4.18.1" - "@rollup/rollup-linux-arm64-musl": "npm:4.18.1" - "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.18.1" - "@rollup/rollup-linux-riscv64-gnu": "npm:4.18.1" - "@rollup/rollup-linux-s390x-gnu": "npm:4.18.1" - "@rollup/rollup-linux-x64-gnu": "npm:4.18.1" - "@rollup/rollup-linux-x64-musl": "npm:4.18.1" - "@rollup/rollup-win32-arm64-msvc": "npm:4.18.1" - "@rollup/rollup-win32-ia32-msvc": "npm:4.18.1" - "@rollup/rollup-win32-x64-msvc": "npm:4.18.1" - "@types/estree": "npm:1.0.5" - fsevents: "npm:~2.3.2" - dependenciesMeta: - "@rollup/rollup-android-arm-eabi": - optional: true - "@rollup/rollup-android-arm64": - optional: true - "@rollup/rollup-darwin-arm64": - optional: true - "@rollup/rollup-darwin-x64": - optional: true - "@rollup/rollup-linux-arm-gnueabihf": - optional: true - "@rollup/rollup-linux-arm-musleabihf": - optional: true - "@rollup/rollup-linux-arm64-gnu": - optional: true - "@rollup/rollup-linux-arm64-musl": - optional: true - "@rollup/rollup-linux-powerpc64le-gnu": - optional: true - "@rollup/rollup-linux-riscv64-gnu": - optional: true - "@rollup/rollup-linux-s390x-gnu": - optional: true - "@rollup/rollup-linux-x64-gnu": - optional: true - "@rollup/rollup-linux-x64-musl": - optional: true - "@rollup/rollup-win32-arm64-msvc": - optional: true - "@rollup/rollup-win32-ia32-msvc": - optional: true - "@rollup/rollup-win32-x64-msvc": - optional: true - fsevents: - optional: true - bin: - rollup: dist/bin/rollup - checksum: 10/7a5f110d216e8599dc3cb11cf570316d989abae00785d99c2bcb6027287fe60d2eaed70e457d88a036622e7fc67e8db6e730d3c784aa90a258bd4c020676ad44 - languageName: node - linkType: hard - "root@workspace:.": version: 0.0.0-use.local resolution: "root@workspace:." dependencies: + "@arethetypeswrong/cli": "npm:^0.15.3" "@lavamoat/allow-scripts": "npm:^3.0.4" "@lavamoat/preinstall-always-fail": "npm:^2.0.0" "@metamask/auto-changelog": "npm:^3.4.4" @@ -6298,6 +5981,8 @@ __metadata: "@metamask/eslint-config-jest": "npm:^12.1.0" "@metamask/eslint-config-nodejs": "npm:^12.1.0" "@metamask/eslint-config-typescript": "npm:^12.1.0" + "@ts-bridge/cli": "npm:^0.1.4" + "@ts-bridge/shims": "npm:^0.1.1" "@types/jest": "npm:^28.1.6" "@types/node": "npm:^18.18.14" "@typescript-eslint/eslint-plugin": "npm:^5.43.0" @@ -6318,7 +6003,6 @@ __metadata: prettier-plugin-packagejson: "npm:^2.3.0" rimraf: "npm:^6.0.0" ts-jest: "npm:^28.0.7" - tsup: "npm:^8.0.2" typedoc: "npm:^0.24.8" typescript: "npm:~4.9.5" languageName: unknown @@ -6414,7 +6098,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:7.x, semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.3.2, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.3": +"semver@npm:7.x, semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.3.2, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.3, semver@npm:^7.5.4": version: 7.6.2 resolution: "semver@npm:7.6.2" bin: @@ -6522,6 +6206,15 @@ __metadata: languageName: node linkType: hard +"skin-tone@npm:^2.0.0": + version: 2.0.0 + resolution: "skin-tone@npm:2.0.0" + dependencies: + unicode-emoji-modifier-base: "npm:^1.0.0" + checksum: 10/19de157586b8019cacc55eb25d9d640f00fc02415761f3e41a4527142970fd4e7f6af0333bc90e879858766c20a976107bb386ffd4c812289c01d51f2c8d182c + languageName: node + linkType: hard + "slash@npm:^3.0.0": version: 3.0.0 resolution: "slash@npm:3.0.0" @@ -6608,15 +6301,6 @@ __metadata: languageName: node linkType: hard -"source-map@npm:0.8.0-beta.0": - version: 0.8.0-beta.0 - resolution: "source-map@npm:0.8.0-beta.0" - dependencies: - whatwg-url: "npm:^7.0.0" - checksum: 10/c02e22ab9f8b8e38655ba1e9abae9fe1f8ba216cbbea922718d5e2ea45821606a74f10edec1db9055e7f7cfd1e6a62e5eade67ec30c017a02f4c8e990accbc1c - languageName: node - linkType: hard - "source-map@npm:^0.6.0, source-map@npm:^0.6.1": version: 0.6.1 resolution: "source-map@npm:0.6.1" @@ -6826,24 +6510,6 @@ __metadata: languageName: node linkType: hard -"sucrase@npm:^3.20.3": - version: 3.35.0 - resolution: "sucrase@npm:3.35.0" - dependencies: - "@jridgewell/gen-mapping": "npm:^0.3.2" - commander: "npm:^4.0.0" - glob: "npm:^10.3.10" - lines-and-columns: "npm:^1.1.6" - mz: "npm:^2.7.0" - pirates: "npm:^4.0.1" - ts-interface-checker: "npm:^0.1.9" - bin: - sucrase: bin/sucrase - sucrase-node: bin/sucrase-node - checksum: 10/bc601558a62826f1c32287d4fdfa4f2c09fe0fec4c4d39d0e257fd9116d7d6227a18309721d4185ec84c9dc1af0d5ec0e05a42a337fbb74fc293e068549aacbe - languageName: node - linkType: hard - "supports-color@npm:^5.3.0": version: 5.5.0 resolution: "supports-color@npm:5.5.0" @@ -6881,6 +6547,16 @@ __metadata: languageName: node linkType: hard +"supports-hyperlinks@npm:^3.0.0": + version: 3.0.0 + resolution: "supports-hyperlinks@npm:3.0.0" + dependencies: + has-flag: "npm:^4.0.0" + supports-color: "npm:^7.0.0" + checksum: 10/911075a412d8bcfbbca413e8963d56ed0975e35ff98d599ef85301aed4221428653145263828b6c58cb4cb6ff24596be83ead3cca221a88a70428af93d5e2a73 + languageName: node + linkType: hard + "supports-preserve-symlinks-flag@npm:^1.0.0": version: 1.0.0 resolution: "supports-preserve-symlinks-flag@npm:1.0.0" @@ -6930,24 +6606,6 @@ __metadata: languageName: node linkType: hard -"thenify-all@npm:^1.0.0": - version: 1.6.0 - resolution: "thenify-all@npm:1.6.0" - dependencies: - thenify: "npm:>= 3.1.0 < 4" - checksum: 10/dba7cc8a23a154cdcb6acb7f51d61511c37a6b077ec5ab5da6e8b874272015937788402fd271fdfc5f187f8cb0948e38d0a42dcc89d554d731652ab458f5343e - languageName: node - linkType: hard - -"thenify@npm:>= 3.1.0 < 4": - version: 3.3.1 - resolution: "thenify@npm:3.3.1" - dependencies: - any-promise: "npm:^1.0.0" - checksum: 10/486e1283a867440a904e36741ff1a177faa827cf94d69506f7e3ae4187b9afdf9ec368b3d8da225c192bfe2eb943f3f0080594156bf39f21b57cd1411e2e7f6d - languageName: node - linkType: hard - "tmpl@npm:1.0.5": version: 1.0.5 resolution: "tmpl@npm:1.0.5" @@ -6971,28 +6629,10 @@ __metadata: languageName: node linkType: hard -"tr46@npm:^1.0.1": - version: 1.0.1 - resolution: "tr46@npm:1.0.1" - dependencies: - punycode: "npm:^2.1.0" - checksum: 10/6e80d75480cb6658f7f283c15f5f41c2d4dfa243ca99a0e1baf3de6cc823fc4c829f89782a7a11e029905781fccfea42d08d8a6674ba7948c7dbc595b6f27dd3 - languageName: node - linkType: hard - -"tree-kill@npm:^1.2.2": - version: 1.2.2 - resolution: "tree-kill@npm:1.2.2" - bin: - tree-kill: cli.js - checksum: 10/49117f5f410d19c84b0464d29afb9642c863bc5ba40fcb9a245d474c6d5cc64d1b177a6e6713129eb346b40aebb9d4631d967517f9fbe8251c35b21b13cd96c7 - languageName: node - linkType: hard - -"ts-interface-checker@npm:^0.1.9": - version: 0.1.13 - resolution: "ts-interface-checker@npm:0.1.13" - checksum: 10/9f7346b9e25bade7a1050c001ec5a4f7023909c0e1644c5a96ae20703a131627f081479e6622a4ecee2177283d0069e651e507bedadd3904fc4010ab28ffce00 +"ts-expose-internals-conditionally@npm:1.0.0-empty.0": + version: 1.0.0-empty.0 + resolution: "ts-expose-internals-conditionally@npm:1.0.0-empty.0" + checksum: 10/6b4f546fc59f04f68d579f1bc0704541ec17521f84d32a15b45bef5dbc7a787143a065e19541cc5b64ff494f16f223bce59f3f5bf10ec538e5739e23c0efb878 languageName: node linkType: hard @@ -7055,84 +6695,6 @@ __metadata: languageName: node linkType: hard -"tsup@npm:8.0.2": - version: 8.0.2 - resolution: "tsup@npm:8.0.2" - dependencies: - bundle-require: "npm:^4.0.0" - cac: "npm:^6.7.12" - chokidar: "npm:^3.5.1" - debug: "npm:^4.3.1" - esbuild: "npm:^0.19.2" - execa: "npm:^5.0.0" - globby: "npm:^11.0.3" - joycon: "npm:^3.0.1" - postcss-load-config: "npm:^4.0.1" - resolve-from: "npm:^5.0.0" - rollup: "npm:^4.0.2" - source-map: "npm:0.8.0-beta.0" - sucrase: "npm:^3.20.3" - tree-kill: "npm:^1.2.2" - peerDependencies: - "@microsoft/api-extractor": ^7.36.0 - "@swc/core": ^1 - postcss: ^8.4.12 - typescript: ">=4.5.0" - peerDependenciesMeta: - "@microsoft/api-extractor": - optional: true - "@swc/core": - optional: true - postcss: - optional: true - typescript: - optional: true - bin: - tsup: dist/cli-default.js - tsup-node: dist/cli-node.js - checksum: 10/dd8c375181a748cdeb86aa3d779d6d755596881f47fe38b7c4b810ff1ef6424d485b23065fda0f6e32d9988bae19cd64e49f6e2f11295d5184485ab7528a37d1 - languageName: node - linkType: hard - -"tsup@patch:tsup@npm%3A8.0.2#./.yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch::locator=root%40workspace%3A.": - version: 8.0.2 - resolution: "tsup@patch:tsup@npm%3A8.0.2#./.yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch::version=8.0.2&hash=ce4dd6&locator=root%40workspace%3A." - dependencies: - bundle-require: "npm:^4.0.0" - cac: "npm:^6.7.12" - chokidar: "npm:^3.5.1" - debug: "npm:^4.3.1" - esbuild: "npm:^0.19.2" - execa: "npm:^5.0.0" - globby: "npm:^11.0.3" - joycon: "npm:^3.0.1" - postcss-load-config: "npm:^4.0.1" - resolve-from: "npm:^5.0.0" - rollup: "npm:^4.0.2" - source-map: "npm:0.8.0-beta.0" - sucrase: "npm:^3.20.3" - tree-kill: "npm:^1.2.2" - peerDependencies: - "@microsoft/api-extractor": ^7.36.0 - "@swc/core": ^1 - postcss: ^8.4.12 - typescript: ">=4.5.0" - peerDependenciesMeta: - "@microsoft/api-extractor": - optional: true - "@swc/core": - optional: true - postcss: - optional: true - typescript: - optional: true - bin: - tsup: dist/cli-default.js - tsup-node: dist/cli-node.js - checksum: 10/4f011dee02adb00970189b34642e0d3c6824d6db874c1e72fbfb800d2367d2f78852f559059a059ee9088215363d061aa5ef37ab286a64027ea7214c8a580fb8 - languageName: node - linkType: hard - "tsutils@npm:^3.21.0": version: 3.21.0 resolution: "tsutils@npm:3.21.0" @@ -7246,6 +6808,16 @@ __metadata: languageName: node linkType: hard +"typescript@npm:5.3.3": + version: 5.3.3 + resolution: "typescript@npm:5.3.3" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/6e4e6a14a50c222b3d14d4ea2f729e79f972fa536ac1522b91202a9a65af3605c2928c4a790a4a50aa13694d461c479ba92cedaeb1e7b190aadaa4e4b96b8e18 + languageName: node + linkType: hard + "typescript@npm:~4.9.5": version: 4.9.5 resolution: "typescript@npm:4.9.5" @@ -7256,6 +6828,16 @@ __metadata: languageName: node linkType: hard +"typescript@patch:typescript@npm%3A5.3.3#optional!builtin": + version: 5.3.3 + resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/c93786fcc9a70718ba1e3819bab56064ead5817004d1b8186f8ca66165f3a2d0100fee91fa64c840dcd45f994ca5d615d8e1f566d39a7470fc1e014dbb4cf15d + languageName: node + linkType: hard + "typescript@patch:typescript@npm%3A~4.9.5#optional!builtin": version: 4.9.5 resolution: "typescript@patch:typescript@npm%3A4.9.5#optional!builtin::version=4.9.5&hash=289587" @@ -7285,6 +6867,13 @@ __metadata: languageName: node linkType: hard +"unicode-emoji-modifier-base@npm:^1.0.0": + version: 1.0.0 + resolution: "unicode-emoji-modifier-base@npm:1.0.0" + checksum: 10/6e1521d35fa69493207eb8b41f8edb95985d8b3faf07c01d820a1830b5e8403e20002563e2f84683e8e962a49beccae789f0879356bf92a4ec7a4dd8e2d16fdb + languageName: node + linkType: hard + "unique-filename@npm:^1.1.1": version: 1.1.1 resolution: "unique-filename@npm:1.1.1" @@ -7404,24 +6993,6 @@ __metadata: languageName: node linkType: hard -"webidl-conversions@npm:^4.0.2": - version: 4.0.2 - resolution: "webidl-conversions@npm:4.0.2" - checksum: 10/594187c36f2d7898f89c0ed3b9248a095fa549ecc1befb10a97bc884b5680dc96677f58df5579334d8e0d1018e5ef075689cfa2a6c459f45a61a9deb512cb59e - languageName: node - linkType: hard - -"whatwg-url@npm:^7.0.0": - version: 7.1.0 - resolution: "whatwg-url@npm:7.1.0" - dependencies: - lodash.sortby: "npm:^4.7.0" - tr46: "npm:^1.0.1" - webidl-conversions: "npm:^4.0.2" - checksum: 10/769fd35838b4e50536ae08d836472e86adbedda1d5493ea34353c55468147e7868b91d2535b59e01a9e7331ab7e4cdfdf5490c279c045da23c327cf33e32f755 - languageName: node - linkType: hard - "which-boxed-primitive@npm:^1.0.2": version: 1.0.2 resolution: "which-boxed-primitive@npm:1.0.2" @@ -7556,15 +7127,6 @@ __metadata: languageName: node linkType: hard -"yaml@npm:^2.3.4": - version: 2.4.5 - resolution: "yaml@npm:2.4.5" - bin: - yaml: bin.mjs - checksum: 10/b09bf5a615a65276d433d76b8e34ad6b4c0320b85eb3f1a39da132c61ae6e2ff34eff4624e6458d96d49566c93cf43408ba5e568218293a8c6541a2006883f64 - languageName: node - linkType: hard - "yargs-parser@npm:^20.2.2": version: 20.2.7 resolution: "yargs-parser@npm:20.2.7" @@ -7579,7 +7141,7 @@ __metadata: languageName: node linkType: hard -"yargs@npm:17.7.2, yargs@npm:^17.0.1, yargs@npm:^17.3.1": +"yargs@npm:17.7.2, yargs@npm:^17.0.1, yargs@npm:^17.3.1, yargs@npm:^17.7.2": version: 17.7.2 resolution: "yargs@npm:17.7.2" dependencies: From ffa0cd3a84624c2adedb33f1c4156f4b27618728 Mon Sep 17 00:00:00 2001 From: Erik Marks Date: Tue, 9 Jul 2024 16:40:41 +0200 Subject: [PATCH 05/15] chore: Fix GitHub workflows, make package private --- .github/workflows/create-release-pr.yml | 41 ------- ...uild-lint-test.yml => lint-build-test.yml} | 109 +++++++++--------- .github/workflows/main.yml | 73 ++++++------ .github/workflows/publish-docs.yml | 47 -------- .github/workflows/publish-main-docs.yml | 16 --- .github/workflows/publish-preview.yml | 66 +++++++++++ .github/workflows/publish-rc-docs.yml | 28 ----- .github/workflows/publish-release.yml | 87 ++++---------- .github/workflows/security-code-scanner.yml | 43 ------- constraints.pro | 16 +-- package.json | 3 +- packages/ocap-playground/package.json | 33 +----- scripts/validate-changelog.sh | 5 +- 13 files changed, 183 insertions(+), 384 deletions(-) delete mode 100644 .github/workflows/create-release-pr.yml rename .github/workflows/{build-lint-test.yml => lint-build-test.yml} (59%) delete mode 100644 .github/workflows/publish-docs.yml delete mode 100644 .github/workflows/publish-main-docs.yml create mode 100644 .github/workflows/publish-preview.yml delete mode 100644 .github/workflows/publish-rc-docs.yml delete mode 100644 .github/workflows/security-code-scanner.yml diff --git a/.github/workflows/create-release-pr.yml b/.github/workflows/create-release-pr.yml deleted file mode 100644 index 66443a945..000000000 --- a/.github/workflows/create-release-pr.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Create Release Pull Request - -on: - workflow_dispatch: - inputs: - base-branch: - description: 'The base branch for git operations and the pull request.' - default: 'main' - required: true - release-type: - description: 'A SemVer version diff, i.e. major, minor, or patch. Mutually exclusive with "release-version".' - required: false - release-version: - description: 'A specific version to bump to. Mutually exclusive with "release-type".' - required: false - -jobs: - create-release-pr: - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - steps: - - uses: actions/checkout@v4 - with: - # This is to guarantee that the most recent tag is fetched. - # This can be configured to a more reasonable value by consumers. - fetch-depth: 0 - # We check out the specified branch, which will be used as the base - # branch for all git operations and the release PR. - ref: ${{ github.event.inputs.base-branch }} - - name: Install Node.js - uses: actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - - uses: MetaMask/action-create-release-pr@v3 - with: - release-type: ${{ github.event.inputs.release-type }} - release-version: ${{ github.event.inputs.release-version }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build-lint-test.yml b/.github/workflows/lint-build-test.yml similarity index 59% rename from .github/workflows/build-lint-test.yml rename to .github/workflows/lint-build-test.yml index fbaead2ac..b5c0fc8c1 100644 --- a/.github/workflows/build-lint-test.yml +++ b/.github/workflows/lint-build-test.yml @@ -1,4 +1,4 @@ -name: Build, Lint, and Test +name: Lint, Build, and Test on: workflow_call: @@ -10,45 +10,50 @@ jobs: strategy: matrix: node-version: [18.x, 20.x] + outputs: + child-workspace-package-names: ${{ steps.workspace-package-names.outputs.child-workspace-package-names }} steps: - uses: actions/checkout@v4 - - name: Install Corepack via Node + - name: Install Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' + node-version: ${{ matrix.node-version }} - name: Install Yarn run: corepack enable - - name: Install Node.js ${{ matrix.node-version }} and restore Yarn cache + - name: Restore Yarn cache uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - cache: 'yarn' - - name: Install dependencies via Yarn - run: yarn --immutable + cache: yarn + - run: yarn --immutable + - name: Fetch workspace package names + id: workspace-package-names + run: | + echo "child-workspace-package-names=$(yarn workspaces list --no-private --json | jq --slurp --raw-output 'map(.name) | @json')" >> "$GITHUB_OUTPUT" + shell: bash - build: - name: Build - needs: prepare + lint: + name: Lint runs-on: ubuntu-latest + needs: prepare strategy: matrix: node-version: [20.x] steps: - uses: actions/checkout@v4 - - name: Install Corepack via Node + - name: Install Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' + node-version: ${{ matrix.node-version }} - name: Install Yarn run: corepack enable - - name: Install Node.js ${{ matrix.node-version }} and restore Yarn cache + - name: Restore Yarn cache uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - cache: 'yarn' - - name: Install dependencies via Yarn - run: yarn --immutable --immutable-cache - - run: yarn build + cache: yarn + - run: yarn --immutable + - run: yarn lint - name: Require clean working directory shell: bash run: | @@ -57,35 +62,29 @@ jobs: exit 1 fi - lint: - name: Lint - needs: prepare + validate-changelog: + name: Validate changelog runs-on: ubuntu-latest + needs: prepare strategy: matrix: node-version: [20.x] + package-name: ${{ fromJson(needs.prepare.outputs.child-workspace-package-names) }} steps: - uses: actions/checkout@v4 - - name: Install Corepack via Node + - name: Install Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' + node-version: ${{ matrix.node-version }} - name: Install Yarn run: corepack enable - - name: Install Node.js ${{ matrix.node-version }} and restore Yarn cache + - name: Restore Yarn cache uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - cache: 'yarn' - - name: Install dependencies via Yarn - run: yarn --immutable --immutable-cache - - run: yarn lint - - name: Validate RC changelog - if: ${{ startsWith(github.head_ref, 'release/') }} - run: yarn lint:changelog --rc - - name: Validate changelog - if: ${{ !startsWith(github.head_ref, 'release/') }} - run: yarn lint:changelog + cache: yarn + - run: yarn --immutable + - run: yarn workspace ${{ matrix.package-name }} changelog:validate - name: Require clean working directory shell: bash run: | @@ -94,29 +93,28 @@ jobs: exit 1 fi - test: - name: Test - needs: prepare + build: + name: Build runs-on: ubuntu-latest + needs: prepare strategy: matrix: - node-version: [18.x, 20.x] + node-version: [20.x] steps: - uses: actions/checkout@v4 - - name: Install Corepack via Node + - name: Install Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' + node-version: ${{ matrix.node-version }} - name: Install Yarn run: corepack enable - - name: Install Node.js ${{ matrix.node-version }} and restore Yarn cache + - name: Restore Yarn cache uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - cache: 'yarn' - - name: Install dependencies via Yarn - run: yarn --immutable --immutable-cache - - run: yarn test + cache: yarn + - run: yarn --immutable + - run: yarn build - name: Require clean working directory shell: bash run: | @@ -125,31 +123,30 @@ jobs: exit 1 fi - compatibility-test: - name: Compatibility test - needs: prepare + test: + name: Test runs-on: ubuntu-latest + needs: prepare strategy: matrix: node-version: [18.x, 20.x] + package-name: ${{ fromJson(needs.prepare.outputs.child-workspace-package-names) }} steps: - uses: actions/checkout@v4 - - name: Install Corepack via Node + - name: Install Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' + node-version: ${{ matrix.node-version }} - name: Install Yarn run: corepack enable - - name: Install Node.js ${{ matrix.node-version }} and restore Yarn cache + - name: Restore Yarn cache uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - cache: 'yarn' - - name: Install dependencies via Yarn - run: rm yarn.lock && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn - - run: yarn test - - name: Restore lockfile - run: git restore yarn.lock + cache: yarn + - run: yarn --immutable + - run: yarn test:scripts + - run: yarn workspace ${{ matrix.package-name }} run test - name: Require clean working directory shell: bash run: | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8382408dd..9d4c6dcdf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,68 +10,67 @@ jobs: name: Check workflows runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - name: Download actionlint id: download-actionlint - run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/7fdc9630cc360ea1a469eed64ac6d78caeda1234/scripts/download-actionlint.bash) 1.6.23 + run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/7fdc9630cc360ea1a469eed64ac6d78caeda1234/scripts/download-actionlint.bash) 1.6.25 shell: bash - name: Check workflow files run: ${{ steps.download-actionlint.outputs.executable }} -color shell: bash - build-lint-test: - name: Build, lint, and test - uses: ./.github/workflows/build-lint-test.yml - - all-jobs-completed: - name: All jobs completed - runs-on: ubuntu-latest - needs: - - check-workflows - - build-lint-test - outputs: - PASSED: ${{ steps.set-output.outputs.PASSED }} - steps: - - name: Set PASSED output - id: set-output - run: echo "PASSED=true" >> "$GITHUB_OUTPUT" - - all-jobs-pass: - name: All jobs pass - if: ${{ always() }} - runs-on: ubuntu-latest - needs: all-jobs-completed - steps: - - name: Check that all jobs have passed - run: | - passed="${{ needs.all-jobs-completed.outputs.PASSED }}" - if [[ $passed != "true" ]]; then - exit 1 - fi + lint-build-test: + name: Lint, build, and test + needs: check-workflows + uses: ./.github/workflows/lint-build-test.yml is-release: + name: Determine whether this is a release merge commit + needs: lint-build-test + runs-on: ubuntu-latest # Filtering by `push` events ensures that we only release from the `main` branch, which is a # requirement for our npm publishing environment. # The commit author should always be 'github-actions' for releases created by the # 'create-release-pr' workflow, so we filter by that as well to prevent accidentally # triggering a release. if: github.event_name == 'push' && startsWith(github.event.head_commit.author.name, 'github-actions') - needs: all-jobs-pass outputs: IS_RELEASE: ${{ steps.is-release.outputs.IS_RELEASE }} - runs-on: ubuntu-latest steps: - - uses: MetaMask/action-is-release@v1 - id: is-release + - id: is-release + uses: MetaMask/action-is-release@v1 publish-release: + name: Publish release needs: is-release if: needs.is-release.outputs.IS_RELEASE == 'true' - name: Publish release permissions: contents: write uses: ./.github/workflows/publish-release.yml secrets: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - PUBLISH_DOCS_TOKEN: ${{ secrets.PUBLISH_DOCS_TOKEN }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + + all-jobs-complete: + name: All jobs complete + runs-on: ubuntu-latest + needs: lint-build-test + outputs: + passed: ${{ steps.set-output.outputs.passed }} + steps: + - name: Set passed output + id: set-output + run: echo "passed=true" >> "$GITHUB_OUTPUT" + + all-jobs-pass: + name: All jobs pass + if: ${{ always() }} + runs-on: ubuntu-latest + needs: all-jobs-complete + steps: + - name: Check that all jobs have passed + run: | + passed="${{ needs.all-jobs-complete.outputs.passed }}" + if [[ $passed != "true" ]]; then + exit 1 + fi diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml deleted file mode 100644 index f5cc005be..000000000 --- a/.github/workflows/publish-docs.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Publish docs to GitHub Pages - -on: - workflow_call: - inputs: - destination_dir: - required: true - type: string - secrets: - PUBLISH_DOCS_TOKEN: - required: true - -jobs: - publish-docs-to-gh-pages: - name: Publish docs to GitHub Pages - runs-on: ubuntu-latest - environment: github-pages - permissions: - contents: write - steps: - - name: Ensure `destination_dir` is not empty - if: ${{ inputs.destination_dir == '' }} - run: exit 1 - - uses: actions/checkout@v4 - - name: Install Corepack via Node - uses: actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - - name: Install Yarn - run: corepack enable - - name: Restore Yarn cache - uses: actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - cache: 'yarn' - - name: Install dependencies via Yarn - run: yarn --immutable - - name: Run build script - run: yarn build:docs - - name: Deploy to `${{ inputs.destination_dir }}` directory of `gh-pages` branch - uses: peaceiris/actions-gh-pages@de7ea6f8efb354206b205ef54722213d99067935 - with: - # This `PUBLISH_DOCS_TOKEN` needs to be manually set per-repository. - # Look in the repository settings under "Environments", and set this token in the `github-pages` environment. - personal_token: ${{ secrets.PUBLISH_DOCS_TOKEN }} - publish_dir: ./docs - destination_dir: ${{ inputs.destination_dir }} diff --git a/.github/workflows/publish-main-docs.yml b/.github/workflows/publish-main-docs.yml deleted file mode 100644 index b9bbbefc0..000000000 --- a/.github/workflows/publish-main-docs.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Publish main branch docs to GitHub Pages - -on: - push: - branches: main - -jobs: - publish-to-gh-pages: - name: Publish docs to `staging` directory of `gh-pages` branch - permissions: - contents: write - uses: ./.github/workflows/publish-docs.yml - with: - destination_dir: staging - secrets: - PUBLISH_DOCS_TOKEN: ${{ secrets.PUBLISH_DOCS_TOKEN }} diff --git a/.github/workflows/publish-preview.yml b/.github/workflows/publish-preview.yml new file mode 100644 index 000000000..3dcce39e9 --- /dev/null +++ b/.github/workflows/publish-preview.yml @@ -0,0 +1,66 @@ +name: Publish a preview build + +on: + issue_comment: + types: created + +jobs: + is-fork-pull-request: + name: Determine whether this issue comment was on a pull request from a fork + if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '@metamaskbot publish-preview') }} + runs-on: ubuntu-latest + outputs: + IS_FORK: ${{ steps.is-fork.outputs.IS_FORK }} + steps: + - uses: actions/checkout@v4 + - name: Determine whether this PR is from a fork + id: is-fork + run: echo "IS_FORK=$(gh pr view --json isCrossRepository --jq '.isCrossRepository' "${PR_NUMBER}" )" >> "$GITHUB_OUTPUT" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_NUMBER: ${{ github.event.issue.number }} + + publish-preview: + name: Publish build preview + needs: is-fork-pull-request + permissions: + pull-requests: write + # This ensures we don't publish on forks. We can't trust forks with this token. + if: ${{ needs.is-fork-pull-request.outputs.IS_FORK == 'false' }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Check out pull request + run: gh pr checkout "${PR_NUMBER}" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_NUMBER: ${{ github.event.issue.number }} + - name: Install Node + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + - name: Install Yarn + run: corepack enable + - name: Restore Yarn cache + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: yarn + - run: yarn --immutable + - name: Get commit SHA + id: commit-sha + run: echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT" + - run: yarn prepare-preview-builds @metamask-previews ${{ steps.commit-sha.outputs.COMMIT_SHA }} + - run: yarn build + - name: Publish preview build + run: yarn publish-previews + env: + YARN_NPM_AUTH_TOKEN: ${{ secrets.PUBLISH_PREVIEW_NPM_TOKEN }} + - name: Generate preview build message + run: yarn ts-node scripts/generate-preview-build-message.ts + - name: Post build preview in comment + run: gh pr comment "${PR_NUMBER}" --body-file preview-build-message.txt + env: + COMMIT_SHA: ${{ steps.commit-sha.outputs.COMMIT_SHA }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_NUMBER: ${{ github.event.issue.number }} diff --git a/.github/workflows/publish-rc-docs.yml b/.github/workflows/publish-rc-docs.yml deleted file mode 100644 index 802cf6bca..000000000 --- a/.github/workflows/publish-rc-docs.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Publish release candidate docs to GitHub Pages - -on: - push: - branches: 'release/**' - -jobs: - get-release-version: - name: Get release version - runs-on: ubuntu-latest - outputs: - release-version: ${{ steps.release-name.outputs.RELEASE_VERSION }} - steps: - - name: Extract release version from branch name - id: release-name - run: | - BRANCH_NAME='${{ github.ref_name }}' - echo "RELEASE_VERSION=v${BRANCH_NAME#release/}" >> "$GITHUB_OUTPUT" - publish-to-gh-pages: - name: Publish docs to `rc-${{ needs.get-release-version.outputs.release-version }}` directory of `gh-pages` branch - permissions: - contents: write - uses: ./.github/workflows/publish-docs.yml - needs: get-release-version - with: - destination_dir: rc-${{ needs.get-release-version.outputs.release-version }} - secrets: - PUBLISH_DOCS_TOKEN: ${{ secrets.PUBLISH_DOCS_TOKEN }} diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index a75dd3783..452a9fc40 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -7,8 +7,6 @@ on: required: true SLACK_WEBHOOK_URL: required: true - PUBLISH_DOCS_TOKEN: - required: true jobs: publish-release: @@ -19,7 +17,7 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ github.sha }} - - name: Install Corepack via Node + - name: Install Node uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' @@ -29,46 +27,42 @@ jobs: uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' - cache: 'yarn' - - uses: MetaMask/action-publish-release@v3 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/cache@v3 + cache: yarn + - uses: actions/cache@v4 with: path: | - ./dist + ./packages/**/dist ./node_modules/.yarn-state.yml key: ${{ github.sha }} + - uses: MetaMask/action-publish-release@v3 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: yarn --immutable - run: yarn build publish-npm-dry-run: - needs: publish-release runs-on: ubuntu-latest + needs: publish-release steps: - uses: actions/checkout@v4 with: ref: ${{ github.sha }} - - name: Install Corepack via Node + - name: Install Node uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' - name: Install Yarn run: corepack enable - - name: Restore Yarn cache - uses: actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - cache: 'yarn' - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | - ./dist + ./packages/**/dist ./node_modules/.yarn-state.yml key: ${{ github.sha }} + fail-on-cache-miss: true - name: Dry Run Publish # omit npm-token token to perform dry run publish - uses: MetaMask/action-npm-publish@v4 + uses: MetaMask/action-npm-publish@v5 with: slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} subteam: S042S7RE4AE # @metamask-npm-publishers @@ -76,70 +70,29 @@ jobs: SKIP_PREPACK: true publish-npm: - needs: publish-npm-dry-run - runs-on: ubuntu-latest environment: npm-publish + runs-on: ubuntu-latest + needs: publish-npm-dry-run steps: - uses: actions/checkout@v4 with: ref: ${{ github.sha }} - - name: Install Corepack via Node + - name: Install Node uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' - name: Install Yarn run: corepack enable - - name: Restore Yarn cache - uses: actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - cache: 'yarn' - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | - ./dist + ./packages/**/dist ./node_modules/.yarn-state.yml key: ${{ github.sha }} + fail-on-cache-miss: true - name: Publish - uses: MetaMask/action-npm-publish@v2 + uses: MetaMask/action-npm-publish@v5 with: - # This `NPM_TOKEN` needs to be manually set per-repository. - # Look in the repository settings under "Environments", and set this token in the `npm-publish` environment. npm-token: ${{ secrets.NPM_TOKEN }} env: SKIP_PREPACK: true - - get-release-version: - needs: publish-npm - runs-on: ubuntu-latest - outputs: - RELEASE_VERSION: ${{ steps.get-release-version.outputs.RELEASE_VERSION }} - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.sha }} - - id: get-release-version - shell: bash - run: ./scripts/get.sh ".version" "RELEASE_VERSION" - - publish-release-to-gh-pages: - name: Publish docs to `${{ needs.get-release-version.outputs.RELEASE_VERSION }}` directory of `gh-pages` branch - needs: get-release-version - permissions: - contents: write - uses: ./.github/workflows/publish-docs.yml - with: - destination_dir: ${{ needs.get-release-version.outputs.RELEASE_VERSION }} - secrets: - PUBLISH_DOCS_TOKEN: ${{ secrets.PUBLISH_DOCS_TOKEN }} - - publish-release-to-latest-gh-pages: - name: Publish docs to `latest` directory of `gh-pages` branch - needs: publish-npm - permissions: - contents: write - uses: ./.github/workflows/publish-docs.yml - with: - destination_dir: latest - secrets: - PUBLISH_DOCS_TOKEN: ${{ secrets.PUBLISH_DOCS_TOKEN }} diff --git a/.github/workflows/security-code-scanner.yml b/.github/workflows/security-code-scanner.yml deleted file mode 100644 index ced04497b..000000000 --- a/.github/workflows/security-code-scanner.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: 'MetaMask Security Code Scanner' - -on: - push: - branches: ['main'] - pull_request: - branches: ['main'] - -jobs: - run-security-scan: - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - steps: - - name: MetaMask Security Code Scanner - uses: MetaMask/Security-Code-Scanner@main - with: - repo: ${{ github.repository }} - paths_ignored: | - .storybook/ - '**/__snapshots__/' - '**/*.snap' - '**/*.stories.js' - '**/*.stories.tsx' - '**/*.test.browser.ts*' - '**/*.test.js*' - '**/*.test.ts*' - '**/fixtures/' - '**/jest.config.js' - '**/jest.environment.js' - '**/mocks/' - '**/test*/' - docs/ - e2e/ - merged-packages/ - node_modules - storybook/ - test*/ - rules_excluded: example - project_metrics_token: ${{ secrets.SECURITY_SCAN_METRICS_TOKEN }} - slack_webhook: ${{ secrets.APPSEC_BOT_SLACK_WEBHOOK }} diff --git a/constraints.pro b/constraints.pro index ae27a8921..00c88d552 100644 --- a/constraints.pro +++ b/constraints.pro @@ -269,26 +269,16 @@ gen_enforced_field(WorkspaceCwd, 'scripts.publish:preview', 'yarn npm publish -- gen_enforced_field(WorkspaceCwd, 'scripts.prepack', null) :- \+ workspace_field(WorkspaceCwd, 'private', true). -% The "changelog:validate" script for each published package must run a common +% The "lint:changelog" script for each published package must run a common % script with the name of the package as the first argument. -gen_enforced_field(WorkspaceCwd, 'scripts.changelog:validate', CorrectChangelogValidationCommand) :- +gen_enforced_field(WorkspaceCwd, 'scripts.lint:changelog', CorrectChangelogValidationCommand) :- \+ workspace_field(WorkspaceCwd, 'private', true), - workspace_field(WorkspaceCwd, 'scripts.changelog:validate', ChangelogValidationCommand), + workspace_field(WorkspaceCwd, 'scripts.lint:changelog', ChangelogValidationCommand), workspace_package_name(WorkspaceCwd, WorkspacePackageName), atomic_list_concat(['../../scripts/validate-changelog.sh ', WorkspacePackageName, ' [...]'], CorrectChangelogValidationCommand), atom_concat('../../scripts/validate-changelog.sh ', WorkspacePackageName, ExpectedPrefix), \+ atom_concat(ExpectedPrefix, _, ChangelogValidationCommand). -% The "changelog:update" script for each published package must run a common -% script with the name of the package as the first argument. -gen_enforced_field(WorkspaceCwd, 'scripts.changelog:update', CorrectChangelogUpdateCommand) :- - \+ workspace_field(WorkspaceCwd, 'private', true), - workspace_field(WorkspaceCwd, 'scripts.changelog:update', ChangelogUpdateCommand), - workspace_package_name(WorkspaceCwd, WorkspacePackageName), - atomic_list_concat(['../../scripts/update-changelog.sh ', WorkspacePackageName, ' [...]'], CorrectChangelogUpdateCommand), - atom_concat('../../scripts/update-changelog.sh ', WorkspacePackageName, ExpectedPrefix), - \+ atom_concat(ExpectedPrefix, _, ChangelogUpdateCommand). - % All non-root packages must have the same "test" script. gen_enforced_field(WorkspaceCwd, 'scripts.test', 'jest --reporters=jest-silent-reporter') :- WorkspaceCwd \= '.'. diff --git a/package.json b/package.json index 895a3b64c..ea86201d8 100644 --- a/package.json +++ b/package.json @@ -17,10 +17,9 @@ "build:source": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run build", "build:types": "tsc --build tsconfig.build.json --verbose", "build:watch": "yarn run build --watch", - "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 dist '**/*.tsbuildinfo'", "lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies", + "lint:changelog": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run lint:changelog", "lint:dependencies": "depcheck && yarn dedupe --check", "lint:dependencies:fix": "depcheck && yarn dedupe", "lint:eslint": "eslint . --cache --ext js,cjs,ts", diff --git a/packages/ocap-playground/package.json b/packages/ocap-playground/package.json index 6b4dd0099..fea1f6122 100644 --- a/packages/ocap-playground/package.json +++ b/packages/ocap-playground/package.json @@ -1,44 +1,19 @@ { "name": "@metamask/ocap-playground", "version": "0.0.0", + "private": true, "description": "An Ocap Kernel playground", - "keywords": [ - "MetaMask", - "Ethereum" - ], - "homepage": "https://github.com/MetaMask/ocap-kernel/tree/main/packages/ocap-playground#readme", - "bugs": { - "url": "https://github.com/MetaMask/ocap-kernel/issues" - }, "repository": { "type": "git", "url": "https://github.com/MetaMask/ocap-kernel.git" }, - "license": "MIT", - "sideEffects": false, - "exports": { - ".": { - "import": { - "default": "./dist/index.mjs", - "types": "./dist/index.d.mts" - }, - "require": { - "default": "./dist/index.cjs", - "types": "./dist/index.d.cts" - } - }, - "./package.json": "./package.json" - }, - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { "build": "ts-bridge --project tsconfig.build.json --clean", "build:docs": "typedoc", - "changelog:validate": "../../scripts/validate-changelog.sh @metamask/ocap-playground", + "lint:changelog": "../../scripts/validate-changelog.sh @metamask/ocap-playground", "publish:preview": "yarn npm publish --tag preview", "test": "jest --reporters=jest-silent-reporter", "posttest": "jest-it-up", @@ -62,9 +37,5 @@ }, "engines": { "node": "^18.18 || >=20" - }, - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" } } diff --git a/scripts/validate-changelog.sh b/scripts/validate-changelog.sh index 19dabb362..8e287c2d3 100755 --- a/scripts/validate-changelog.sh +++ b/scripts/validate-changelog.sh @@ -8,10 +8,9 @@ if [[ $# -eq 0 ]]; then fi package_name="$1" -shift # remove package name from arguments if [[ "${GITHUB_REF:-}" =~ '^release/' ]]; then - yarn auto-changelog validate --prettier --tag-prefix "${package_name}@" --rc "$@" + yarn auto-changelog validate --prettier --tag-prefix "${package_name}@" --rc else - yarn auto-changelog validate --prettier --tag-prefix "${package_name}@" "$@" + yarn auto-changelog validate --prettier --tag-prefix "${package_name}@" fi From 291ce064497f18e809e7fb52945617bb2d48d88a Mon Sep 17 00:00:00 2001 From: Erik Marks Date: Tue, 9 Jul 2024 18:22:52 +0200 Subject: [PATCH 06/15] chore: Further workflow fixes --- .github/workflows/lint-build-test.yml | 2 +- scripts/get.sh | 24 ------------------------ scripts/prepack.sh | 1 + 3 files changed, 2 insertions(+), 25 deletions(-) delete mode 100755 scripts/get.sh diff --git a/.github/workflows/lint-build-test.yml b/.github/workflows/lint-build-test.yml index b5c0fc8c1..15d9c8ed4 100644 --- a/.github/workflows/lint-build-test.yml +++ b/.github/workflows/lint-build-test.yml @@ -29,7 +29,7 @@ jobs: - name: Fetch workspace package names id: workspace-package-names run: | - echo "child-workspace-package-names=$(yarn workspaces list --no-private --json | jq --slurp --raw-output 'map(.name) | @json')" >> "$GITHUB_OUTPUT" + echo "child-workspace-package-names=$(yarn workspaces list --json | jq --slurp --raw-output 'map(.name) | @json')" >> "$GITHUB_OUTPUT" shell: bash lint: diff --git a/scripts/get.sh b/scripts/get.sh deleted file mode 100755 index 9c988bb8a..000000000 --- a/scripts/get.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -u -set -o pipefail - -if [[ ${RUNNER_DEBUG:-0} == 1 ]]; then - set -x -fi - -KEY="${1}" -OUTPUT="${2}" - -if [[ -z $KEY ]]; then - echo "Error: KEY not specified." - exit 1 -fi - -if [[ -z $OUTPUT ]]; then - echo "Error: OUTPUT not specified." - exit 1 -fi - -echo "$OUTPUT=$(jq --raw-output "$KEY" package.json)" >> "$GITHUB_OUTPUT" diff --git a/scripts/prepack.sh b/scripts/prepack.sh index ad99af58d..7f2ece375 100755 --- a/scripts/prepack.sh +++ b/scripts/prepack.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash +set -x set -e set -o pipefail From 4b6d827b7aae5fa22fafa1b216a32c3f77c4d18c Mon Sep 17 00:00:00 2001 From: Erik Marks Date: Tue, 9 Jul 2024 18:30:28 +0200 Subject: [PATCH 07/15] chore: Restore core/ changelog scripts --- constraints.pro | 16 +++++++++++++--- package.json | 7 ++++--- packages/ocap-playground/package.json | 2 +- scripts/update-changelog.sh | 21 +++++++++++++++++++++ scripts/validate-changelog.sh | 5 +++-- 5 files changed, 42 insertions(+), 9 deletions(-) create mode 100755 scripts/update-changelog.sh diff --git a/constraints.pro b/constraints.pro index 00c88d552..ae27a8921 100644 --- a/constraints.pro +++ b/constraints.pro @@ -269,16 +269,26 @@ gen_enforced_field(WorkspaceCwd, 'scripts.publish:preview', 'yarn npm publish -- gen_enforced_field(WorkspaceCwd, 'scripts.prepack', null) :- \+ workspace_field(WorkspaceCwd, 'private', true). -% The "lint:changelog" script for each published package must run a common +% The "changelog:validate" script for each published package must run a common % script with the name of the package as the first argument. -gen_enforced_field(WorkspaceCwd, 'scripts.lint:changelog', CorrectChangelogValidationCommand) :- +gen_enforced_field(WorkspaceCwd, 'scripts.changelog:validate', CorrectChangelogValidationCommand) :- \+ workspace_field(WorkspaceCwd, 'private', true), - workspace_field(WorkspaceCwd, 'scripts.lint:changelog', ChangelogValidationCommand), + workspace_field(WorkspaceCwd, 'scripts.changelog:validate', ChangelogValidationCommand), workspace_package_name(WorkspaceCwd, WorkspacePackageName), atomic_list_concat(['../../scripts/validate-changelog.sh ', WorkspacePackageName, ' [...]'], CorrectChangelogValidationCommand), atom_concat('../../scripts/validate-changelog.sh ', WorkspacePackageName, ExpectedPrefix), \+ atom_concat(ExpectedPrefix, _, ChangelogValidationCommand). +% The "changelog:update" script for each published package must run a common +% script with the name of the package as the first argument. +gen_enforced_field(WorkspaceCwd, 'scripts.changelog:update', CorrectChangelogUpdateCommand) :- + \+ workspace_field(WorkspaceCwd, 'private', true), + workspace_field(WorkspaceCwd, 'scripts.changelog:update', ChangelogUpdateCommand), + workspace_package_name(WorkspaceCwd, WorkspacePackageName), + atomic_list_concat(['../../scripts/update-changelog.sh ', WorkspacePackageName, ' [...]'], CorrectChangelogUpdateCommand), + atom_concat('../../scripts/update-changelog.sh ', WorkspacePackageName, ExpectedPrefix), + \+ atom_concat(ExpectedPrefix, _, ChangelogUpdateCommand). + % All non-root packages must have the same "test" script. gen_enforced_field(WorkspaceCwd, 'scripts.test', 'jest --reporters=jest-silent-reporter') :- WorkspaceCwd \= '.'. diff --git a/package.json b/package.json index ea86201d8..2d667a447 100644 --- a/package.json +++ b/package.json @@ -13,13 +13,14 @@ "scripts": { "build": "yarn run build:source && yarn run build:types", "build:clean": "yarn clean && yarn build", - "build:docs": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run build:docs", - "build:source": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run build", + "build:docs": "yarn workspaces foreach --all --parallel --interlaced --verbose run build:docs", + "build:source": "yarn workspaces foreach --all --parallel --interlaced --verbose run build", "build:types": "tsc --build tsconfig.build.json --verbose", "build:watch": "yarn run build --watch", + "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 dist '**/*.tsbuildinfo'", "lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies", - "lint:changelog": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run lint:changelog", "lint:dependencies": "depcheck && yarn dedupe --check", "lint:dependencies:fix": "depcheck && yarn dedupe", "lint:eslint": "eslint . --cache --ext js,cjs,ts", diff --git a/packages/ocap-playground/package.json b/packages/ocap-playground/package.json index fea1f6122..00ea9a73f 100644 --- a/packages/ocap-playground/package.json +++ b/packages/ocap-playground/package.json @@ -13,7 +13,7 @@ "scripts": { "build": "ts-bridge --project tsconfig.build.json --clean", "build:docs": "typedoc", - "lint:changelog": "../../scripts/validate-changelog.sh @metamask/ocap-playground", + "changelog:validate": "../../scripts/validate-changelog.sh @metamask/ocap-playground", "publish:preview": "yarn npm publish --tag preview", "test": "jest --reporters=jest-silent-reporter", "posttest": "jest-it-up", diff --git a/scripts/update-changelog.sh b/scripts/update-changelog.sh new file mode 100755 index 000000000..7cd563901 --- /dev/null +++ b/scripts/update-changelog.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +set -euo pipefail + +# Get the current package name +if [[ $# -eq 0 ]]; then + echo "Missing package name." + exit 1 +fi + +package_name="$1" +shift # remove package name from arguments + +# Get the current git branch +branch=$(git rev-parse --abbrev-ref HEAD) + +if [[ $branch =~ ^release/ ]]; then + yarn auto-changelog update --prettier --tag-prefix "${package_name}@" --rc "$@" +else + yarn auto-changelog update --prettier --tag-prefix "${package_name}@" "$@" +fi diff --git a/scripts/validate-changelog.sh b/scripts/validate-changelog.sh index 8e287c2d3..19dabb362 100755 --- a/scripts/validate-changelog.sh +++ b/scripts/validate-changelog.sh @@ -8,9 +8,10 @@ if [[ $# -eq 0 ]]; then fi package_name="$1" +shift # remove package name from arguments if [[ "${GITHUB_REF:-}" =~ '^release/' ]]; then - yarn auto-changelog validate --prettier --tag-prefix "${package_name}@" --rc + yarn auto-changelog validate --prettier --tag-prefix "${package_name}@" --rc "$@" else - yarn auto-changelog validate --prettier --tag-prefix "${package_name}@" + yarn auto-changelog validate --prettier --tag-prefix "${package_name}@" "$@" fi From ab7103874f21c0c45a1a7d7416c99db048d4520c Mon Sep 17 00:00:00 2001 From: Erik Marks Date: Tue, 9 Jul 2024 19:00:00 +0200 Subject: [PATCH 08/15] chore: Fix workflow file --- .github/workflows/lint-build-test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/lint-build-test.yml b/.github/workflows/lint-build-test.yml index 15d9c8ed4..5de4e042b 100644 --- a/.github/workflows/lint-build-test.yml +++ b/.github/workflows/lint-build-test.yml @@ -145,7 +145,6 @@ jobs: node-version: ${{ matrix.node-version }} cache: yarn - run: yarn --immutable - - run: yarn test:scripts - run: yarn workspace ${{ matrix.package-name }} run test - name: Require clean working directory shell: bash From 15434445f19d3b240d8357bcbfa301d97fccb564 Mon Sep 17 00:00:00 2001 From: Erik Marks Date: Wed, 10 Jul 2024 17:24:52 +0200 Subject: [PATCH 09/15] chore: Fix root build script --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2d667a447..d003875ca 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,8 @@ "scripts": { "build": "yarn run build:source && yarn run build:types", "build:clean": "yarn clean && yarn build", - "build:docs": "yarn workspaces foreach --all --parallel --interlaced --verbose run build:docs", - "build:source": "yarn workspaces foreach --all --parallel --interlaced --verbose run build", + "build:docs": "yarn workspaces foreach --all --exclude root --parallel --interlaced --verbose run build:docs", + "build:source": "yarn workspaces foreach --all --parallel --exclude root --interlaced --verbose run build", "build:types": "tsc --build tsconfig.build.json --verbose", "build:watch": "yarn run build --watch", "changelog:update": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run changelog:update", From 2483067a544ec419bef54ad8060a7173cf4c4bc5 Mon Sep 17 00:00:00 2001 From: Erik Marks Date: Wed, 10 Jul 2024 17:40:27 +0200 Subject: [PATCH 10/15] chore: Remove unused patch --- .yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 .yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch diff --git a/.yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch b/.yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch deleted file mode 100644 index 2ac7512ab..000000000 --- a/.yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/dist/index.js b/dist/index.js -index 4500c4e43c3bbd24aa60b7d4cf95aa3fee8eb185..9c442bc216f99b7cfadb5ac62cb98d3ae9ce2f56 100644 ---- a/dist/index.js -+++ b/dist/index.js -@@ -1813,6 +1813,8 @@ var cjsSplitting = () => { - } - const { transform: transform3 } = await Promise.resolve().then(() => require("sucrase")); - const result = transform3(code, { -+ // https://github.com/egoist/tsup/issues/1087 -+ disableESTransforms: true, - filePath: info.path, - transforms: ["imports"], - sourceMapOptions: this.options.sourcemap ? { From 6b0fdac6e8c04f3d72f2ef5776a658b0f9d4c962 Mon Sep 17 00:00:00 2001 From: Erik Marks Date: Wed, 10 Jul 2024 17:42:56 +0200 Subject: [PATCH 11/15] chore: Remove LICENSE file for unpublished package --- packages/ocap-playground/LICENSE | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 packages/ocap-playground/LICENSE diff --git a/packages/ocap-playground/LICENSE b/packages/ocap-playground/LICENSE deleted file mode 100644 index 6f8bff03f..000000000 --- a/packages/ocap-playground/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -MIT License - -Copyright (c) 2024 MetaMask - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE From c6416efa23c688fc4ca0c1670b3d6094d8ece2ce Mon Sep 17 00:00:00 2001 From: Erik Marks Date: Wed, 10 Jul 2024 17:43:25 +0200 Subject: [PATCH 12/15] chore: Remove CHANGELOG.md file for unpublished package --- packages/ocap-playground/CHANGELOG.md | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 packages/ocap-playground/CHANGELOG.md diff --git a/packages/ocap-playground/CHANGELOG.md b/packages/ocap-playground/CHANGELOG.md deleted file mode 100644 index 0c82cb1ed..000000000 --- a/packages/ocap-playground/CHANGELOG.md +++ /dev/null @@ -1,10 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [Unreleased] - -[Unreleased]: https://github.com/MetaMask/ocap-kernel/ From 66daa1b81d5c1efd2a8dfefa667f55e41c41d537 Mon Sep 17 00:00:00 2001 From: Erik Marks Date: Wed, 10 Jul 2024 17:44:58 +0200 Subject: [PATCH 13/15] chore: Use later version of action in workflow --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9d4c6dcdf..2cdf00de2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,7 +10,7 @@ jobs: name: Check workflows runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Download actionlint id: download-actionlint run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/7fdc9630cc360ea1a469eed64ac6d78caeda1234/scripts/download-actionlint.bash) 1.6.25 From db33594e6fec08316549027b2328be1957ea8062 Mon Sep 17 00:00:00 2001 From: Erik Marks Date: Wed, 10 Jul 2024 18:20:22 +0200 Subject: [PATCH 14/15] chore: Fix validate-changelog CI job --- .github/workflows/lint-build-test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/lint-build-test.yml b/.github/workflows/lint-build-test.yml index 5de4e042b..319f02df1 100644 --- a/.github/workflows/lint-build-test.yml +++ b/.github/workflows/lint-build-test.yml @@ -69,7 +69,6 @@ jobs: strategy: matrix: node-version: [20.x] - package-name: ${{ fromJson(needs.prepare.outputs.child-workspace-package-names) }} steps: - uses: actions/checkout@v4 - name: Install Node.js ${{ matrix.node-version }} @@ -84,7 +83,7 @@ jobs: node-version: ${{ matrix.node-version }} cache: yarn - run: yarn --immutable - - run: yarn workspace ${{ matrix.package-name }} changelog:validate + - run: yarn changelog:validate - name: Require clean working directory shell: bash run: | From a86e937e86d22d92f668ff423c26d062ee01b97f Mon Sep 17 00:00:00 2001 From: Erik Marks Date: Fri, 12 Jul 2024 11:34:20 +0200 Subject: [PATCH 15/15] chore: Make root package name more explicit --- package.json | 6 ++-- yarn.lock | 78 ++++++++++++++++++++++++++-------------------------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/package.json b/package.json index d003875ca..90bd16198 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "root", + "name": "ocap-kernel-monorepo", "version": "0.0.0", "private": true, "repository": { @@ -13,8 +13,8 @@ "scripts": { "build": "yarn run build:source && yarn run build:types", "build:clean": "yarn clean && yarn build", - "build:docs": "yarn workspaces foreach --all --exclude root --parallel --interlaced --verbose run build:docs", - "build:source": "yarn workspaces foreach --all --parallel --exclude root --interlaced --verbose run build", + "build:docs": "yarn workspaces foreach --all --exclude ocap-kernel-monorepo --parallel --interlaced --verbose run build:docs", + "build:source": "yarn workspaces foreach --all --parallel --exclude ocap-kernel-monorepo --interlaced --verbose run build", "build:types": "tsc --build tsconfig.build.json --verbose", "build:watch": "yarn run build --watch", "changelog:update": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run changelog:update", diff --git a/yarn.lock b/yarn.lock index fe445a7c5..c5189eb34 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5462,6 +5462,45 @@ __metadata: languageName: node linkType: hard +"ocap-kernel-monorepo@workspace:.": + version: 0.0.0-use.local + resolution: "ocap-kernel-monorepo@workspace:." + dependencies: + "@arethetypeswrong/cli": "npm:^0.15.3" + "@lavamoat/allow-scripts": "npm:^3.0.4" + "@lavamoat/preinstall-always-fail": "npm:^2.0.0" + "@metamask/auto-changelog": "npm:^3.4.4" + "@metamask/eslint-config": "npm:^12.2.0" + "@metamask/eslint-config-jest": "npm:^12.1.0" + "@metamask/eslint-config-nodejs": "npm:^12.1.0" + "@metamask/eslint-config-typescript": "npm:^12.1.0" + "@ts-bridge/cli": "npm:^0.1.4" + "@ts-bridge/shims": "npm:^0.1.1" + "@types/jest": "npm:^28.1.6" + "@types/node": "npm:^18.18.14" + "@typescript-eslint/eslint-plugin": "npm:^5.43.0" + "@typescript-eslint/parser": "npm:^5.43.0" + "@yarnpkg/types": "npm:^4.0.0" + depcheck: "npm:^1.4.3" + eslint: "npm:^8.44.0" + eslint-config-prettier: "npm:^8.8.0" + eslint-plugin-import: "npm:~2.26.0" + eslint-plugin-jest: "npm:^27.2.2" + eslint-plugin-jsdoc: "npm:^39.9.1" + eslint-plugin-n: "npm:^15.7.0" + eslint-plugin-prettier: "npm:^4.2.1" + eslint-plugin-promise: "npm:^6.1.1" + jest: "npm:^28.1.3" + jest-silent-reporter: "npm:^0.6.0" + prettier: "npm:^2.7.1" + prettier-plugin-packagejson: "npm:^2.3.0" + rimraf: "npm:^6.0.0" + ts-jest: "npm:^28.0.7" + typedoc: "npm:^0.24.8" + typescript: "npm:~4.9.5" + languageName: unknown + linkType: soft + "once@npm:^1.3.0": version: 1.4.0 resolution: "once@npm:1.4.0" @@ -5969,45 +6008,6 @@ __metadata: languageName: node linkType: hard -"root@workspace:.": - version: 0.0.0-use.local - resolution: "root@workspace:." - dependencies: - "@arethetypeswrong/cli": "npm:^0.15.3" - "@lavamoat/allow-scripts": "npm:^3.0.4" - "@lavamoat/preinstall-always-fail": "npm:^2.0.0" - "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/eslint-config": "npm:^12.2.0" - "@metamask/eslint-config-jest": "npm:^12.1.0" - "@metamask/eslint-config-nodejs": "npm:^12.1.0" - "@metamask/eslint-config-typescript": "npm:^12.1.0" - "@ts-bridge/cli": "npm:^0.1.4" - "@ts-bridge/shims": "npm:^0.1.1" - "@types/jest": "npm:^28.1.6" - "@types/node": "npm:^18.18.14" - "@typescript-eslint/eslint-plugin": "npm:^5.43.0" - "@typescript-eslint/parser": "npm:^5.43.0" - "@yarnpkg/types": "npm:^4.0.0" - depcheck: "npm:^1.4.3" - eslint: "npm:^8.44.0" - eslint-config-prettier: "npm:^8.8.0" - eslint-plugin-import: "npm:~2.26.0" - eslint-plugin-jest: "npm:^27.2.2" - eslint-plugin-jsdoc: "npm:^39.9.1" - eslint-plugin-n: "npm:^15.7.0" - eslint-plugin-prettier: "npm:^4.2.1" - eslint-plugin-promise: "npm:^6.1.1" - jest: "npm:^28.1.3" - jest-silent-reporter: "npm:^0.6.0" - prettier: "npm:^2.7.1" - prettier-plugin-packagejson: "npm:^2.3.0" - rimraf: "npm:^6.0.0" - ts-jest: "npm:^28.0.7" - typedoc: "npm:^0.24.8" - typescript: "npm:~4.9.5" - languageName: unknown - linkType: soft - "run-async@npm:^2.3.0": version: 2.4.1 resolution: "run-async@npm:2.4.1"