Skip to content

Improve the profiler-cli publish script and document the whole deployment in a better way - #6260

Merged
canova merged 4 commits into
firefox-devtools:mainfrom
canova:improve-deploy
Sep 3, 2026
Merged

canova merged 4 commits into
firefox-devtools:mainfrom
canova:improve-deploy

Conversation

@canova

@canova canova commented Aug 14, 2026

Copy link
Copy Markdown
Member

Main | Deploy preview

Previously the yarn publish-cli wasn't working properly, and that's why I had to use npm 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:

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.

@canova
canova requested review from fatadel and mstange August 14, 2026 11:16
@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.82%. Comparing base (7abc8b8) to head (e6bc941).
⚠️ Report is 11 commits behind head on main.

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

@fatadel fatadel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR! I've left some minor comments that would be nice to implement but lgtm overall.

Comment thread scripts/publish-profiler-cli.mjs Outdated
Comment thread scripts/publish-profiler-cli.mjs Outdated
…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
canova enabled auto-merge September 3, 2026 11:21
@canova
canova merged commit db5dd21 into firefox-devtools:main Sep 3, 2026
21 checks passed
@fatadel fatadel mentioned this pull request Sep 3, 2026
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: 高乐喆
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