Fix NPM dist tags and make some NPM private #15416
Open
+170
−270
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Make sure that the NPM packages that are meant to be private are private.
Use the same release NPM tag (dist-tag) for all packages released from from the same branch.
Type of Change
Why
In the previous attempt to fix the publish/release pipeline I implemented sorting of all NPM packages by the dirst-tag that they use: latest vs custom. The custom dist-tag being tags like "canary", "preview", etc.
The sorting not always work correctly and using the "latest" tag creates issues in non-main release branches.
After discussing this issue with @tido64 and @acoates-ms , we realized that the root cause is that we have several packages that are missing
"private": truein theirpackage.jsonsince they are meant to private. Also, all packages published from the same branch must have the same dist-tag.What
This PR has the following changes:
"private": truetopackage.jsonfiles that are meant to be private.npmGroupByTag.jsscriptpublish.yml. They are published fromrelease.ymlas Nuget packages only after the wholePublishpipeline succeeds.setVersionEnvVars.jsis changed to provide thenpmDistTagbased on thereact-native-windowspackage defined in thevnext\package.json.release.ymlstages are changed to jobs. This way we can run publishing in parallel and be able to recover pushing to specific component registry independently from each other.Testing
No testing is done yet. We will have to fix the pipeline later if we see the issues.
We do not expect issues with the
publish.ymlsince we only removed steps there.If any issues happened in
release.yml, then we can recover manually and fix the script after that,Changelog
Should this change be included in the release notes: no
Microsoft Reviewers: Open in CodeFlow