Improve the profiler-cli publish script and document the whole deployment in a better way - #6260
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6260 +/- ##
=======================================
Coverage 83.82% 83.82%
=======================================
Files 350 350
Lines 37744 37744
Branches 10646 10646
=======================================
Hits 31638 31638
Misses 5677 5677
Partials 429 429 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
fatadel
approved these changes
Aug 27, 2026
fatadel
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the PR! I've left some minor comments that would be nice to implement but lgtm overall.
canova
force-pushed
the
improve-deploy
branch
from
September 3, 2026 11:18
765f2d1 to
b3ad104
Compare
…stry Yarn 1 sets npm_config_registry to https://registry.yarnpkg.com in the environment of every script it runs. The npm publish spawned by this script inherited that and tried to upload to the Yarn mirror, which is read-only and doesn't receive the token that ~/.npmrc scopes to registry.npmjs.org, so the publish failed to authenticate. Fixed this issue by setting publishConfig.registry in package.json, which npm applies at publish time regardless of how it was invoked, and by dropping that one inherited variable when the script spawns npm. The other npm_config_* variables are left alone since they may be the user's own configuration, and clearing something like npm_config_userconfig would hide their ~/.npmrc from npm entirely.
npm publish needs a token in ~/.npmrc to start at all, and fails with ENEEDAUTH instead of offering to log you in, so a stale token would only surface after yarn test-all had already run. Check npm whoami up front and run npm login when it fails, which keeps the interactive part at the beginning and skips it when the existing token is still good. The browser round trip npm makes at publish time is the 2FA check on the upload itself and still happens either way. The check is skipped for --dry-run, which uploads nothing and so needs no credentials at all.
yarn build-cli bundles the working copy rather than a commit, so anything uncommitted at publish time ends up in the tarball on npm with no commit or tag matching what users install. Check `git status --porcelain` before the npm login and the test run, print what is dirty and stop there. Untracked files count too, since a source file that isn't committed yet still gets bundled.
The deploying document was outdated a bit since we added the cli and changed the deployment process for a few times. This commit reorganizes the file a bit so we have the whole step indicated properly and with the proper release order. And it also adds a step by step list at the top summarizes everything.
canova
force-pushed
the
improve-deploy
branch
from
September 3, 2026 11:20
b3ad104 to
e6bc941
Compare
canova
enabled auto-merge
September 3, 2026 11:21
fatadel
added a commit
that referenced
this pull request
Sep 3, 2026
Changes: [Nazım Can Altınova] Update oxfmt 0.59.0 → 0.63.0 (major) (#6262) [Andrew Creskey] Show which network requests were prefetched (#6259) [Florian Quèze] profiler-cli: document the marker field:value search syntax (#6265) [Florian Quèze] profiler-cli: report one time base for text and JSON output (#6266) [Florian Quèze] profiler-cli: avoid a stack overflow on large marker threads (#6264) [Markus Stange] Give the frameTable a lib column (#6258) [Florian Quèze] profiler-cli: accept --limit 0 as unlimited, and make truncation loud (#6267) [Florian Quèze] profiler-cli: report the network request count the filters ran against (#6274) [Nazım Can Altınova] Fix dark mode contrast of the warning icons in the publish panel (#6280) [Nazım Can Altınova] Extract the publish panel warning indicator into a small component (#6282) [Markus Stange] More typed arrays in the FrameTable (and a flags column) (#6173) [Nazım Can Altınova] Improve the profiler-cli publish script and document the whole deployment in a better way (#6260) [fatadel] 🔃 Sync: l10n -> main (September 3, 2026) (#6301) [fatadel] Bump profiler-cli version to 0.9.0 (#6302) And special thanks to our localizers: es-CL: ravmn nl: Mark Heijl sv-SE: Andreas Pettersson sv-SE: Luna Jernberg sv-SE: Peter Kihlstedt tr: Selim Şumlu tr: giray zh-CN: 高乐喆
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Main | Deploy preview
Previously the
yarn publish-cliwasn't working properly, and that's why I had to usenpm publish ...manually every time, but that's quite prone to errors. I improved that script and updated the whole documentation so it's easier to follow.These are the things I did, please look at their own commits to see their details:
scripts/publish-profiler-cli.mjsscript:npm publishfails)Since I didn't want to publish to our own npmjs package while testing, I used a local verdaccio server to host it and verified that the script indeed works now.
Also it looks like there are a lot more changes made than it actually is in deploying.md, mostly because some sections are shifted around and git can't figure that out.