Skip to content

Conversation

@mcmire
Copy link
Contributor

@mcmire mcmire commented Jan 8, 2026

Explanation

Preview builds are represented as prereleases, which means that care must be taken to accurately simulate what the dependency tree of a project will look like when a new production version is released. Unfortunately, the existing instructions for using preview builds do not achieve this. This problem has always existed but was exacerbated by the recent shift from peer dependencies to dependencies.

This commit updates the instructions to fix these issues. There are now separate instructions for testing breaking changes vs. non-breaking changes. An addendum for working with patches, which was missing before, is also now included. Finally, instructions for using local builds has been split off from the preview builds instructions for ease of readability.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Refactors and expands documentation around testing unreleased packages.

  • Adds docs/processes/preview-builds.md with detailed workflows for publishing/using preview builds, including separate paths for breaking vs. non‑breaking changes and handling patched dependencies
  • Adds docs/processes/local-builds.md and trims testing-changes-in-other-projects.md to link to the two options
  • Updates breaking-changes.md to point to preview-builds.md
  • Updates scripts/generate-preview-build-message.ts to link to the new preview builds doc

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

mcmire and others added 4 commits January 8, 2026 09:23
Most of the contributor docs are kept in one main file, but as time as
gone on we have split out specific topics into their own files. Some
files are not linked from the main file at all. Finally, one of the
files in `docs/` is intended for the `core-backend` repo, not the repo
as a whole.

Ultimately, this is confusing for contributors.

This commit converts the main file to a table of contents, organized by
category, and makes sure to link to every file in `docs/`. It also moves
the `core-backend`-specific file to that package.
Co-authored-by: Maarten Zuidhoorn <[email protected]>
Preview builds are represented as prereleases, which means that care
must be taken to accurately simulate what the dependency tree of a
project will look like when a new production version is released.
Unfortunately, the existing instructions for using preview builds do not
achieve this. This problem has always existed but was exacerbated by the
recent shift from peer dependencies to dependencies.

This commit updates the instructions to fix these issues. There are now
separate instructions for testing breaking changes vs. non-breaking
changes. An addendum for working with patches, which was missing before,
is also now included. Finally, instructions for using local builds has
been split off from the preview builds instructions for ease of
readability.
@mcmire mcmire force-pushed the update-preview-builds-instructions branch from 97c9bbf to a04b461 Compare January 9, 2026 20:24
@mcmire mcmire changed the title WIP - Update preview builds docs Update preview build instructions Jan 9, 2026
Base automatically changed from reorganize-docs to main January 12, 2026 14:58
@mcmire mcmire marked this pull request as ready for review January 12, 2026 15:04

1. In the project, open `package.json` and locate the entry in `dependencies` for the package. Take note of the major part of the version.

2. Run `yarn why @metamask/<PACKAGE_NAME>`, replacing `PACKAGE_NAME` as appropriate. You will see output like this:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a new process that I'm introducing in this PR. The previous process recommended that the engineer look at the existing dependency entry and target whatever version range was used there. Now I'm recommended that all version ranges in the dependency tree that are compatible with the one used in the dependency tree are targeted. As I mention at the top of this section, this is to mimic production as close as possible.

So on one hand, it's more accurate. On the other hand, it's more steps that before. Do we have any thoughts on this? It would nice if we could automate this somehow, but I'm not sure how to do that yet.

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.

2 participants