Skip to content

Commit 889e1f7

Browse files
authored
Remove @metamask/snaps-simulator (#3311)
This will be replaced with `@metamask/snaps-sandbox` in #3306.
1 parent fd21bb6 commit 889e1f7

File tree

290 files changed

+110
-14952
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

290 files changed

+110
-14952
lines changed

.github/workflows/build-lint-test.yml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -73,39 +73,6 @@ jobs:
7373
exit 1
7474
fi
7575
76-
build-simulator:
77-
name: Build "@metamask/snaps-simulator"
78-
runs-on: ubuntu-latest
79-
needs: prepare
80-
steps:
81-
- name: Checkout and setup environment
82-
uses: MetaMask/action-checkout-and-setup@v1
83-
with:
84-
is-high-risk-environment: false
85-
- name: Restore "@metamask/snaps-execution-environments" build
86-
uses: actions/download-artifact@v4
87-
with:
88-
name: snaps-execution-environments-build-${{ runner.os }}-22.x-${{ github.sha }}
89-
- name: Cache Webpack vendor
90-
id: cache-webpack-vendor
91-
uses: actions/cache@v4
92-
with:
93-
path: |
94-
packages/snaps-simulator/vendor
95-
key: webpack-vendor-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
96-
- name: Build Webpack vendor
97-
if: steps.cache-webpack-vendor.outputs.cache-hit != 'true'
98-
run: yarn workspace @metamask/snaps-simulator run build:vendor
99-
- name: Build
100-
run: yarn workspace @metamask/snaps-simulator run build:webpack
101-
- name: Require clean working directory
102-
shell: bash
103-
run: |
104-
if ! git diff --exit-code; then
105-
echo "Working tree dirty at end of job"
106-
exit 1
107-
fi
108-
10976
build-test-snaps:
11077
name: Build "@metamask/test-snaps"
11178
runs-on: ubuntu-latest

.github/workflows/main.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,6 @@ jobs:
5252
secrets:
5353
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
5454

55-
publish-staging-simulator:
56-
name: Publish Snaps Simulator to `staging` folder
57-
needs: lint-build-test
58-
if: ${{ github.ref_name == 'main' && github.event_name == 'push' }}
59-
permissions:
60-
contents: write
61-
uses: ./.github/workflows/publish-github-pages.yml
62-
with:
63-
build_script: yarn workspace @metamask/snaps-simulator build
64-
publish_dir: ./packages/snaps-simulator/dist/webpack/main
65-
destination_dir: snaps-simulator/staging
66-
secrets:
67-
PUBLISH_PAGES_TOKEN: ${{ secrets.PUBLISH_PAGES_TOKEN }}
68-
6955
is-release:
7056
name: Determine whether this is a release merge commit
7157
needs: lint-build-test

.github/workflows/publish-release.yml

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -260,56 +260,3 @@ jobs:
260260
publish_dir: ./packages/test-snaps/dist
261261
secrets:
262262
PUBLISH_PAGES_TOKEN: ${{ secrets.PUBLISH_PAGES_TOKEN }}
263-
264-
is-simulator-release:
265-
name: Determine whether this release updates the simulator
266-
runs-on: ubuntu-latest
267-
needs: publish-release
268-
outputs:
269-
IS_SIMULATOR_RELEASE: ${{ steps.set-output.outputs.IS_SIMULATOR_RELEASE }}
270-
SIMULATOR_VERSION: ${{ steps.set-output.outputs.SIMULATOR_VERSION }}
271-
steps:
272-
- name: Checkout and setup environment
273-
uses: MetaMask/action-checkout-and-setup@v1
274-
with:
275-
is-high-risk-environment: true
276-
ref: ${{ github.sha }}
277-
fetch-depth: 2
278-
- name: Check if this is a simulator release
279-
id: is-simulator-release
280-
shell: bash
281-
run: ./scripts/is-release.sh "packages/snaps-simulator/package.json" "${{ github.event.before }}" "IS_SIMULATOR_RELEASE"
282-
- name: Set output
283-
id: set-output
284-
if: steps.is-simulator-release.outputs.IS_SIMULATOR_RELEASE == 'true'
285-
run: |
286-
echo "IS_SIMULATOR_RELEASE=true" >> "$GITHUB_OUTPUT"
287-
echo "SIMULATOR_VERSION=$(jq --raw-output '.version' packages/snaps-simulator/package.json)" >> "$GITHUB_OUTPUT"
288-
289-
publish-simulator-versioned:
290-
name: Publish Snaps Simulator to `${{ needs.is-simulator-release.outputs.SIMULATOR_VERSION }}` folder
291-
needs: is-simulator-release
292-
if: ${{ needs.is-simulator-release.outputs.IS_SIMULATOR_RELEASE == 'true' }}
293-
permissions:
294-
contents: write
295-
uses: ./.github/workflows/publish-github-pages.yml
296-
with:
297-
build_script: yarn workspace @metamask/snaps-simulator build
298-
publish_dir: ./packages/snaps-simulator/dist/webpack/main
299-
destination_dir: snaps-simulator/${{ needs.is-simulator-release.outputs.SIMULATOR_VERSION }}
300-
secrets:
301-
PUBLISH_PAGES_TOKEN: ${{ secrets.PUBLISH_PAGES_TOKEN }}
302-
303-
publish-simulator-latest:
304-
name: Publish Snaps Simulator to `latest` folder
305-
needs: is-simulator-release
306-
if: ${{ needs.is-simulator-release.outputs.IS_SIMULATOR_RELEASE == 'true' }}
307-
permissions:
308-
contents: write
309-
uses: ./.github/workflows/publish-github-pages.yml
310-
with:
311-
build_script: yarn workspace @metamask/snaps-simulator build
312-
publish_dir: ./packages/snaps-simulator/dist/webpack/main
313-
destination_dir: snaps-simulator/latest
314-
secrets:
315-
PUBLISH_PAGES_TOKEN: ${{ secrets.PUBLISH_PAGES_TOKEN }}

.prettierignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,3 @@ typings/
7777
packages/examples/examples/webpack/index.html
7878
packages/snaps-execution-environments/lavamoat/**/*.json
7979
packages/snaps-jest/public
80-
packages/snaps-simulator/vendor

eslint.config.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,6 @@ const config = createConfig([
325325
'packages/snaps-controllers/src/services/iframe/**/*',
326326
'packages/snaps-controllers/src/services/webworker/**/*',
327327
'packages/snaps-execution-environments/src/**/*',
328-
'packages/snaps-simulator/src/**/*',
329-
'packages/snaps-simulator/jest.setup.js',
330328
'packages/test-snaps/src/**/*',
331329
'**/*.test.browser.ts',
332330
],

packages/snaps-controllers/.depcheckrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"@lavamoat/preinstall-always-fail",
66
"@metamask/auto-changelog",
77
"@metamask/eslint-*",
8+
"@testing-library/dom",
89
"@types/*",
910
"@typescript-eslint/*",
1011
"@vitest/coverage-istanbul",

packages/snaps-controllers/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
"@noble/hashes": "^1.7.1",
118118
"@swc/core": "1.3.78",
119119
"@swc/jest": "^0.2.26",
120+
"@testing-library/dom": "^10.4.0",
120121
"@ts-bridge/cli": "^0.6.1",
121122
"@types/chrome": "^0.0.237",
122123
"@types/concat-stream": "^2.0.0",

packages/snaps-execution-environments/.depcheckrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"@lavamoat/preinstall-always-fail",
66
"@metamask/auto-changelog",
77
"@metamask/eslint-*",
8+
"@testing-library/dom",
89
"@types/*",
910
"@typescript-eslint/*",
1011
"@vitest/coverage-v8",

packages/snaps-execution-environments/lavamoat/build-system/policy.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@
768768
"util.inherits": true
769769
},
770770
"packages": {
771-
"@vitest/browser>@testing-library/user-event>@testing-library/dom>@babel/runtime": true
771+
"@testing-library/dom>@babel/runtime": true
772772
}
773773
},
774774
"@babel/preset-env>@babel/plugin-transform-reserved-words": {
@@ -1322,11 +1322,11 @@
13221322
"setImmediate": true
13231323
},
13241324
"packages": {
1325-
"browserify>duplexer2>readable-stream>isarray": true,
13261325
"browserify>duplexer2>readable-stream>safe-buffer": true,
13271326
"browserify>duplexer2>readable-stream>string_decoder": true,
13281327
"browserify>inherits": true,
13291328
"browserify>readable-stream>core-util-is": true,
1329+
"browserify>readable-stream>isarray": true,
13301330
"browserify>readable-stream>process-nextick-args": true,
13311331
"readable-stream>util-deprecate": true
13321332
}
@@ -1501,10 +1501,10 @@
15011501
},
15021502
"packages": {
15031503
"browserify>inherits": true,
1504-
"browserify>labeled-stream-splicer>stream-splicer>readable-stream>isarray": true,
15051504
"browserify>labeled-stream-splicer>stream-splicer>readable-stream>safe-buffer": true,
15061505
"browserify>labeled-stream-splicer>stream-splicer>readable-stream>string_decoder": true,
15071506
"browserify>readable-stream>core-util-is": true,
1507+
"browserify>readable-stream>isarray": true,
15081508
"browserify>readable-stream>process-nextick-args": true,
15091509
"readable-stream>util-deprecate": true
15101510
}
@@ -1586,10 +1586,10 @@
15861586
},
15871587
"packages": {
15881588
"browserify>inherits": true,
1589-
"browserify>module-deps>readable-stream>isarray": true,
15901589
"browserify>module-deps>readable-stream>safe-buffer": true,
15911590
"browserify>module-deps>readable-stream>string_decoder": true,
15921591
"browserify>readable-stream>core-util-is": true,
1592+
"browserify>readable-stream>isarray": true,
15931593
"browserify>readable-stream>process-nextick-args": true,
15941594
"readable-stream>util-deprecate": true
15951595
}
@@ -1626,10 +1626,10 @@
16261626
},
16271627
"packages": {
16281628
"browserify>inherits": true,
1629-
"browserify>module-deps>stream-combiner2>readable-stream>isarray": true,
16301629
"browserify>module-deps>stream-combiner2>readable-stream>safe-buffer": true,
16311630
"browserify>module-deps>stream-combiner2>readable-stream>string_decoder": true,
16321631
"browserify>readable-stream>core-util-is": true,
1632+
"browserify>readable-stream>isarray": true,
16331633
"browserify>readable-stream>process-nextick-args": true,
16341634
"readable-stream>util-deprecate": true
16351635
}
@@ -1686,10 +1686,10 @@
16861686
},
16871687
"packages": {
16881688
"browserify>inherits": true,
1689-
"browserify>read-only-stream>readable-stream>isarray": true,
16901689
"browserify>read-only-stream>readable-stream>safe-buffer": true,
16911690
"browserify>read-only-stream>readable-stream>string_decoder": true,
16921691
"browserify>readable-stream>core-util-is": true,
1692+
"browserify>readable-stream>isarray": true,
16931693
"browserify>readable-stream>process-nextick-args": true,
16941694
"readable-stream>util-deprecate": true
16951695
}
@@ -1815,8 +1815,8 @@
18151815
"packages": {
18161816
"browserify>inherits": true,
18171817
"browserify>readable-stream>core-util-is": true,
1818+
"browserify>readable-stream>isarray": true,
18181819
"browserify>readable-stream>process-nextick-args": true,
1819-
"browserify>through2>readable-stream>isarray": true,
18201820
"browserify>through2>readable-stream>safe-buffer": true,
18211821
"browserify>through2>readable-stream>string_decoder": true,
18221822
"readable-stream>util-deprecate": true

packages/snaps-execution-environments/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
"@metamask/auto-changelog": "^5.0.1",
9090
"@swc/core": "1.3.78",
9191
"@swc/jest": "^0.2.26",
92+
"@testing-library/dom": "^10.4.0",
9293
"@ts-bridge/cli": "^0.6.1",
9394
"@types/express": "^4.17.17",
9495
"@types/jest": "^27.5.1",

0 commit comments

Comments
 (0)