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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions .github/workflows/build-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,39 +73,6 @@ jobs:
exit 1
fi

build-simulator:
name: Build "@metamask/snaps-simulator"
runs-on: ubuntu-latest
needs: prepare
steps:
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
with:
is-high-risk-environment: false
- name: Restore "@metamask/snaps-execution-environments" build
uses: actions/download-artifact@v4
with:
name: snaps-execution-environments-build-${{ runner.os }}-22.x-${{ github.sha }}
- name: Cache Webpack vendor
id: cache-webpack-vendor
uses: actions/cache@v4
with:
path: |
packages/snaps-simulator/vendor
key: webpack-vendor-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- name: Build Webpack vendor
if: steps.cache-webpack-vendor.outputs.cache-hit != 'true'
run: yarn workspace @metamask/snaps-simulator run build:vendor
- name: Build
run: yarn workspace @metamask/snaps-simulator run build:webpack
- name: Require clean working directory
shell: bash
run: |
if ! git diff --exit-code; then
echo "Working tree dirty at end of job"
exit 1
fi

build-test-snaps:
name: Build "@metamask/test-snaps"
runs-on: ubuntu-latest
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,6 @@ jobs:
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

publish-staging-simulator:
name: Publish Snaps Simulator to `staging` folder
needs: lint-build-test
if: ${{ github.ref_name == 'main' && github.event_name == 'push' }}
permissions:
contents: write
uses: ./.github/workflows/publish-github-pages.yml
with:
build_script: yarn workspace @metamask/snaps-simulator build
publish_dir: ./packages/snaps-simulator/dist/webpack/main
destination_dir: snaps-simulator/staging
secrets:
PUBLISH_PAGES_TOKEN: ${{ secrets.PUBLISH_PAGES_TOKEN }}

is-release:
name: Determine whether this is a release merge commit
needs: lint-build-test
Expand Down
53 changes: 0 additions & 53 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,56 +260,3 @@ jobs:
publish_dir: ./packages/test-snaps/dist
secrets:
PUBLISH_PAGES_TOKEN: ${{ secrets.PUBLISH_PAGES_TOKEN }}

is-simulator-release:
name: Determine whether this release updates the simulator
runs-on: ubuntu-latest
needs: publish-release
outputs:
IS_SIMULATOR_RELEASE: ${{ steps.set-output.outputs.IS_SIMULATOR_RELEASE }}
SIMULATOR_VERSION: ${{ steps.set-output.outputs.SIMULATOR_VERSION }}
steps:
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
with:
is-high-risk-environment: true
ref: ${{ github.sha }}
fetch-depth: 2
- name: Check if this is a simulator release
id: is-simulator-release
shell: bash
run: ./scripts/is-release.sh "packages/snaps-simulator/package.json" "${{ github.event.before }}" "IS_SIMULATOR_RELEASE"
- name: Set output
id: set-output
if: steps.is-simulator-release.outputs.IS_SIMULATOR_RELEASE == 'true'
run: |
echo "IS_SIMULATOR_RELEASE=true" >> "$GITHUB_OUTPUT"
echo "SIMULATOR_VERSION=$(jq --raw-output '.version' packages/snaps-simulator/package.json)" >> "$GITHUB_OUTPUT"

publish-simulator-versioned:
name: Publish Snaps Simulator to `${{ needs.is-simulator-release.outputs.SIMULATOR_VERSION }}` folder
needs: is-simulator-release
if: ${{ needs.is-simulator-release.outputs.IS_SIMULATOR_RELEASE == 'true' }}
permissions:
contents: write
uses: ./.github/workflows/publish-github-pages.yml
with:
build_script: yarn workspace @metamask/snaps-simulator build
publish_dir: ./packages/snaps-simulator/dist/webpack/main
destination_dir: snaps-simulator/${{ needs.is-simulator-release.outputs.SIMULATOR_VERSION }}
secrets:
PUBLISH_PAGES_TOKEN: ${{ secrets.PUBLISH_PAGES_TOKEN }}

publish-simulator-latest:
name: Publish Snaps Simulator to `latest` folder
needs: is-simulator-release
if: ${{ needs.is-simulator-release.outputs.IS_SIMULATOR_RELEASE == 'true' }}
permissions:
contents: write
uses: ./.github/workflows/publish-github-pages.yml
with:
build_script: yarn workspace @metamask/snaps-simulator build
publish_dir: ./packages/snaps-simulator/dist/webpack/main
destination_dir: snaps-simulator/latest
secrets:
PUBLISH_PAGES_TOKEN: ${{ secrets.PUBLISH_PAGES_TOKEN }}
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,3 @@ typings/
packages/examples/examples/webpack/index.html
packages/snaps-execution-environments/lavamoat/**/*.json
packages/snaps-jest/public
packages/snaps-simulator/vendor
2 changes: 0 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,6 @@ const config = createConfig([
'packages/snaps-controllers/src/services/iframe/**/*',
'packages/snaps-controllers/src/services/webworker/**/*',
'packages/snaps-execution-environments/src/**/*',
'packages/snaps-simulator/src/**/*',
'packages/snaps-simulator/jest.setup.js',
'packages/test-snaps/src/**/*',
'**/*.test.browser.ts',
],
Expand Down
1 change: 1 addition & 0 deletions packages/snaps-controllers/.depcheckrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"@lavamoat/preinstall-always-fail",
"@metamask/auto-changelog",
"@metamask/eslint-*",
"@testing-library/dom",
"@types/*",
"@typescript-eslint/*",
"@vitest/coverage-istanbul",
Expand Down
1 change: 1 addition & 0 deletions packages/snaps-controllers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
"@noble/hashes": "^1.7.1",
"@swc/core": "1.3.78",
"@swc/jest": "^0.2.26",
"@testing-library/dom": "^10.4.0",
Copy link
Member Author

Choose a reason for hiding this comment

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

@vitest/browsers apparently has an implicit dependency on @testing-library/dom. This was previously brought in by @metamask/snaps-simulator, but now it needs to be explicitly added to packages using it.

"@ts-bridge/cli": "^0.6.1",
"@types/chrome": "^0.0.237",
"@types/concat-stream": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions packages/snaps-execution-environments/.depcheckrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"@lavamoat/preinstall-always-fail",
"@metamask/auto-changelog",
"@metamask/eslint-*",
"@testing-library/dom",
"@types/*",
"@typescript-eslint/*",
"@vitest/coverage-v8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@
"util.inherits": true
},
"packages": {
"@vitest/browser>@testing-library/user-event>@testing-library/dom>@babel/runtime": true
"@testing-library/dom>@babel/runtime": true
}
},
"@babel/preset-env>@babel/plugin-transform-reserved-words": {
Expand Down Expand Up @@ -1322,11 +1322,11 @@
"setImmediate": true
},
"packages": {
"browserify>duplexer2>readable-stream>isarray": true,
"browserify>duplexer2>readable-stream>safe-buffer": true,
"browserify>duplexer2>readable-stream>string_decoder": true,
"browserify>inherits": true,
"browserify>readable-stream>core-util-is": true,
"browserify>readable-stream>isarray": true,
"browserify>readable-stream>process-nextick-args": true,
"readable-stream>util-deprecate": true
}
Expand Down Expand Up @@ -1501,10 +1501,10 @@
},
"packages": {
"browserify>inherits": true,
"browserify>labeled-stream-splicer>stream-splicer>readable-stream>isarray": true,
"browserify>labeled-stream-splicer>stream-splicer>readable-stream>safe-buffer": true,
"browserify>labeled-stream-splicer>stream-splicer>readable-stream>string_decoder": true,
"browserify>readable-stream>core-util-is": true,
"browserify>readable-stream>isarray": true,
"browserify>readable-stream>process-nextick-args": true,
"readable-stream>util-deprecate": true
}
Expand Down Expand Up @@ -1586,10 +1586,10 @@
},
"packages": {
"browserify>inherits": true,
"browserify>module-deps>readable-stream>isarray": true,
"browserify>module-deps>readable-stream>safe-buffer": true,
"browserify>module-deps>readable-stream>string_decoder": true,
"browserify>readable-stream>core-util-is": true,
"browserify>readable-stream>isarray": true,
"browserify>readable-stream>process-nextick-args": true,
"readable-stream>util-deprecate": true
}
Expand Down Expand Up @@ -1626,10 +1626,10 @@
},
"packages": {
"browserify>inherits": true,
"browserify>module-deps>stream-combiner2>readable-stream>isarray": true,
"browserify>module-deps>stream-combiner2>readable-stream>safe-buffer": true,
"browserify>module-deps>stream-combiner2>readable-stream>string_decoder": true,
"browserify>readable-stream>core-util-is": true,
"browserify>readable-stream>isarray": true,
"browserify>readable-stream>process-nextick-args": true,
"readable-stream>util-deprecate": true
}
Expand Down Expand Up @@ -1686,10 +1686,10 @@
},
"packages": {
"browserify>inherits": true,
"browserify>read-only-stream>readable-stream>isarray": true,
"browserify>read-only-stream>readable-stream>safe-buffer": true,
"browserify>read-only-stream>readable-stream>string_decoder": true,
"browserify>readable-stream>core-util-is": true,
"browserify>readable-stream>isarray": true,
"browserify>readable-stream>process-nextick-args": true,
"readable-stream>util-deprecate": true
}
Expand Down Expand Up @@ -1815,8 +1815,8 @@
"packages": {
"browserify>inherits": true,
"browserify>readable-stream>core-util-is": true,
"browserify>readable-stream>isarray": true,
"browserify>readable-stream>process-nextick-args": true,
"browserify>through2>readable-stream>isarray": true,
"browserify>through2>readable-stream>safe-buffer": true,
"browserify>through2>readable-stream>string_decoder": true,
"readable-stream>util-deprecate": true
Expand Down
1 change: 1 addition & 0 deletions packages/snaps-execution-environments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
"@metamask/auto-changelog": "^5.0.1",
"@swc/core": "1.3.78",
"@swc/jest": "^0.2.26",
"@testing-library/dom": "^10.4.0",
"@ts-bridge/cli": "^0.6.1",
"@types/express": "^4.17.17",
"@types/jest": "^27.5.1",
Expand Down
25 changes: 0 additions & 25 deletions packages/snaps-simulator/.depcheckrc.json

This file was deleted.

2 changes: 0 additions & 2 deletions packages/snaps-simulator/.gitignore

This file was deleted.

14 changes: 0 additions & 14 deletions packages/snaps-simulator/.swcrc

This file was deleted.

Loading
Loading