Skip to content

Conversation

@seaona
Copy link
Member

@seaona seaona commented Oct 14, 2025

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).

Written by Cursor Bugbot for commit 6efe9dd. This will update automatically on new commits. Configure here.

@seaona seaona requested a review from a team as a code owner October 14, 2025 10:52
@seaona seaona changed the title chore: make @metamask/tesst-dapp-site publishable chore: make @metamask/test-dapp-site publishable Oct 14, 2025
@codecov
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.29%. Comparing base (9aa68cd) to head (6efe9dd).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3679   +/-   ##
=======================================
  Coverage   98.29%   98.29%           
=======================================
  Files         417      417           
  Lines       11924    11924           
  Branches     1851     1851           
=======================================
  Hits        11721    11721           
  Misses        203      203           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mcmire
Copy link
Contributor

mcmire commented Oct 14, 2025

@seaona The output from yarn constraints is not very good. But this is basically saying that you need to add exports to package.json. See e.g.

for an example. (There may be other things you need to add to package.json. You can run yarn constraints yourself to see.)

"lint:eslint": "eslint . --cache",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write",
"lint:misc": "prettier --no-error-on-unmatched-pattern --log-level warn \"**/*.json\" \"**/*.md\" \"**/*.html\" \"!CHANGELOG.md\" --ignore-path ../../.gitignore",
"publish:preview": "yarn npm publish --tag preview",
Copy link
Member Author

@seaona seaona Oct 15, 2025

Choose a reason for hiding this comment

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

to fix this:

image

!isExample &&
workspace.cwd !== 'packages/snaps-sandbox'
workspace.cwd !== 'packages/snaps-sandbox' &&
workspace.cwd !== 'packages/test-snaps'
Copy link
Member Author

Choose a reason for hiding this comment

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

to fix this

image

@seaona
Copy link
Member Author

seaona commented Oct 15, 2025

hi there @mcmire thank you for taking a look! I think issues should be fixed now 🙏

@seaona seaona changed the title chore: make @metamask/test-dapp-site publishable chore: make @metamask/test-snaps-site publishable Oct 15, 2025
@seaona seaona added this pull request to the merge queue Oct 16, 2025
Merged via the queue into main with commit 6f54282 Oct 16, 2025
122 checks passed
@seaona seaona deleted the site-npm-package-ready branch October 16, 2025 07:23
github-merge-queue bot pushed a commit that referenced this pull request Oct 28, 2025
…publishing (#3712)

Following #3679, we want `test-snaps` to be publishable to NPM.
Currently only TypeScript packages are built, so `test-snaps` wouldn't
be published properly. I've added an extra step to build `test-snaps`
before running the NPM publish job.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Updates the publish-release workflow to install dependencies in a
dedicated step and build `@metamask/test-snaps` so it’s included in
release artifacts/NPM publish.
> 
> - **CI (GitHub Actions)**:
>   - **`publish-release` job**:
> - Add dedicated `Install dependencies` step (`yarn install
--immutable`).
>     - Build all packages with `yarn build`.
> - New step to build `@metamask/test-snaps` (`yarn workspace
@metamask/test-snaps build`) so artifacts include it.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
4ffbc25. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants