-
-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure preview build versions are semver-parseable (#4034)
Preview build versions are based on a commit ID. If the commit ID starts with "0" — for instance, "0340690" — then the resulting version — for instance, "2.3.4-preview.0340690" — will not be semver-parseable, and therefore NPM will not allow such a version to be published. This commit replaces the "." in the version string with a "-", which resolves the issue. The preview build instructions in the contributing doc has also been updated.
- Loading branch information
Showing
2 changed files
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,7 +102,7 @@ If you're a member of the MetaMask organization, you can create preview builds b | |
Note two things about each package: | ||
|
||
- The name is scoped to `@metamask-previews` instead of `@metamask`. | ||
- The ID of the last commit in the branch is appended to the version, e.g. `1.2.3-e2df9b4` instead of `1.2.3`. | ||
- The ID of the last commit in the branch is appended to the version, e.g. `1.2.3-preview-e2df9b4` instead of `1.2.3`. | ||
|
||
Now you can [use these preview builds in your project](#using-preview-builds). | ||
|
||
|
@@ -125,7 +125,7 @@ If you've forked this repository, you can create preview builds based on a branc | |
You should be able to see the published version of each package in the output. Note two things: | ||
|
||
- The name is scoped to the NPM organization you entered instead of `@metamask`. | ||
- The ID of the last commit in the branch is appended to the version, e.g. `1.2.3-e2df9b4` instead of `1.2.3`. | ||
- The ID of the last commit in the branch is appended to the version, e.g. `1.2.3-preview-e2df9b4` instead of `1.2.3`. | ||
|
||
Now you can [use these preview builds in your project](#using-preview-builds). | ||
|
||
|
@@ -145,16 +145,16 @@ To use a preview build for a package within a project, you need to override the | |
|
||
> **Example:** | ||
> | ||
> - If you're a member of MetaMask, your project uses Yarn, `@metamask/controller-utils` is listed in dependencies at `^1.1.4`, and you want to use the preview version `1.2.3-e2df9b4`, add the following to `resolutions`: | ||
> - If you're a member of MetaMask, your project uses Yarn, `@metamask/controller-utils` is listed in dependencies at `^1.1.4`, and you want to use the preview version `1.2.3-preview-e2df9b4`, add the following to `resolutions`: | ||
> | ||
> ``` | ||
> "@metamask/controller-utils@^1.1.4": "npm:@metamask-previews/[email protected]" | ||
> "@metamask/controller-utils@^1.1.4": "npm:@metamask-previews/[email protected]preview-e2df9b4" | ||
> ``` | ||
> | ||
> - If you are an individual contributor, your project uses NPM, `@metamask/assets-controllers` is listed in dependencies at `^3.4.7`, and you want to use the preview version `4.5.6-bc2a997` published under `@foo`, add the following to `overrides`: | ||
> - If you are an individual contributor, your project uses NPM, `@metamask/assets-controllers` is listed in dependencies at `^3.4.7`, and you want to use the preview version `4.5.6-preview-bc2a997` published under `@foo`, add the following to `overrides`: | ||
> | ||
> ``` | ||
> "@metamask/assets-controllers@^3.4.7": "npm:@foo/[email protected]" | ||
> "@metamask/assets-controllers@^3.4.7": "npm:@foo/[email protected]preview-bc2a997" | ||
> ``` | ||
4. Run `yarn install`. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters