Skip to content

Commit 6f54282

Browse files
authored
chore: make @metamask/test-snaps-site publishable (#3679)
<!-- CURSOR_SUMMARY --> > [!NOTE] > Make `@metamask/test-snaps` publishable and adjust Yarn constraints accordingly. > > - **packages/test-snaps/package.json**: > - Make package public by removing `private` and adding `publishConfig` (`access: public`, npm registry). > - Restrict published files to `dist` via `files` array. > - Add `scripts.publish:preview`. > - **yarn.config.cjs**: > - Exempt `packages/test-snaps` from ESM/CJS exports enforcement (same as `snaps-sandbox`). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 6efe9dd. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 9aa68cd commit 6f54282

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

packages/test-snaps/package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "@metamask/test-snaps",
33
"version": "2.28.1",
4-
"private": true,
54
"description": "The test snaps website for MetaMask Snaps, used for end-to-end testing",
65
"keywords": [
76
"MetaMask",
@@ -18,7 +17,9 @@
1817
},
1918
"license": "ISC",
2019
"sideEffects": false,
21-
"files": [],
20+
"files": [
21+
"dist"
22+
],
2223
"scripts": {
2324
"build": "cross-env NODE_ENV=production webpack",
2425
"build:clean": "yarn clean && yarn build",
@@ -31,6 +32,7 @@
3132
"lint:eslint": "eslint . --cache",
3233
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write",
3334
"lint:misc": "prettier --no-error-on-unmatched-pattern --log-level warn \"**/*.json\" \"**/*.md\" \"**/*.html\" \"!CHANGELOG.md\" --ignore-path ../../.gitignore",
35+
"publish:preview": "yarn npm publish --tag preview",
3436
"since-latest-release": "../../scripts/since-latest-release.sh",
3537
"start": "yarn workspaces foreach --parallel --interlaced --all --include \"@metamask/test-snaps\" --include \"@metamask/example-snaps\" run start:test",
3638
"start:test": "cross-env NODE_ENV=development webpack serve",
@@ -119,5 +121,9 @@
119121
},
120122
"engines": {
121123
"node": "^20 || >=22"
124+
},
125+
"publishConfig": {
126+
"access": "public",
127+
"registry": "https://registry.npmjs.org/"
122128
}
123129
}

yarn.config.cjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ module.exports = defineConfig({
109109
if (
110110
!isPrivate &&
111111
!isExample &&
112-
workspace.cwd !== 'packages/snaps-sandbox'
112+
workspace.cwd !== 'packages/snaps-sandbox' &&
113+
workspace.cwd !== 'packages/test-snaps'
113114
) {
114115
// All non-root, non-example packages must set up ESM- and
115116
// CommonJS-compatible exports correctly.

0 commit comments

Comments
 (0)