Repository navigation
[javascript] Publish @seleniumhq/atoms as part of the npm release - #18133
Merged
Merged
Conversation
The npm package landed in #17459 but nothing published it. Wire it into the existing Node release path alongside selenium-webdriver. * node:release publishes //javascript/atoms:selenium-atoms-package.publish before selenium-webdriver.publish. The "already published" rescue is extracted into publish_npm_package so both share it. * node:verify checks both packages; node:build builds both. * setup_github_npm_auth redirects the atoms registry for the nightly GitHub Packages path. The name is already scoped so it needs no rename, but the npmjs access flag is stripped — GitHub Packages derives visibility from the repository. * Add publishConfig.access: public to javascript/atoms/package.json. Scoped packages default to restricted on npmjs, so without this the first publish is rejected. * node:version now fails if the two versions have drifted. The bump works by substituting old_version, so drift would silently leave atoms stale and only surface as a node:verify failure after the release shipped. * Convert the path/target literals to methods rather than constants. Rakefile loads this file twice (as node: and aliased as javascript:), which made constants warn on every invocation. ./go javascript:release dry-run passes end to end for both packages.
titusfortner
added a commit
that referenced
this pull request
Oct 9, 2026
#18132 moved from @SeleniumHQ to @Selenium but #18133 merged with seleniumhq To publish nightlies to GitHub, it must use seleniumhq to match the repo org
This was referenced Oct 9, 2026
Merged
This was referenced Oct 14, 2026
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.
🔗 Related Issues
Follow-up to #17459, which created the
@seleniumhq/atomspackage but did not wire it into the release.💥 What does this PR do?
#17459added thenpm_packagetarget and promotedjavascript/atoms/package.json, but nothing ever publishes it —node:releaseonly ran//javascript/selenium-webdriver:selenium-webdriver.publish. This connects the atoms package to the existing Node release path.node:versionalready bumped bothpackage.jsons in lockstep, so the gap was publish / verify / build:node:releasepublishes//javascript/atoms:selenium-atoms-package.publishbeforeselenium-webdriver.publish. The existing "already published → skip" rescue is extracted intopublish_npm_packageso both targets share it.node:verifychecks both packages;node:buildbuilds both.setup_github_npm_authredirects the atoms registry for the nightly GitHub Packages path. The name is already scoped so it needs no rename, but the npmjsaccessflag is stripped — GitHub Packages derives visibility from the repository.javascript/atoms/package.jsongainspublishConfig.access: "public". Scoped packages default to restricted on npmjs, so without this the first publish is rejected.node:versionnow fails loudly if the two versions have drifted.🔧 Implementation Notes
Why
access: publicmatters. This is the load-bearing bit.@seleniumhq/atomsis scoped, and npm defaults scoped packages to restricted. The dry-run output changes fromdefault accessto:Why the version guard.
node:versionbumps by substitutingold_versionacross four files. If the atoms version ever drifted from selenium-webdriver's, the substitution would silently no-op and leave atoms stale — which would then only surface as anode:verifyfailure after the release had already gone out. Failing at bump time turns a post-release surprise into an obvious pre-release error.Why methods instead of constants.
Rakefileloadsnode.raketwice — once asnode:, once aliased asjavascript:. Top-level constants producedalready initialized constantwarnings on every single invocation, so the shared paths/targets are methods.Publish ordering. Atoms goes first, so the lower-level package is on the registry before anything starts depending on it. Note this means a
selenium-webdriverfailure can leave atoms already published; that matches the existing Ruby multi-gem behaviour inrb:releaseand the per-target "already published" rescue makes a re-run idempotent.🤖 AI assistance
rake_tasks/node.rakechanges and thepublishConfigblock, plus the local dry-run validation described below.💡 Additional Considerations
Two follow-ups needed before the first tagged release — neither blocks this PR:
@seleniumhq/atomshas to go out once with a granular token /npm login. After that the trusted publisher (SeleniumHQ/selenium+release.yml) can be registered and every subsequent release runs unattended —release.ymlalready grantsid-token: write.package.jsonrewrite was checked to produce valid JSON pointing athttps://npm.pkg.github.com, but the first nightly after this merges is the real test.Not changed: the
release.ymlpath filter still lists onlyjavascript/selenium-webdriver/package.json. Version-bump PRs always touch that file, so the trigger already fires; adding the atoms path would be redundant.✅ Validation
./go javascript:release dry-run— passes end to end, both packages, exit 0, no warnings../scripts/format.sh— passes (rubocop, 362 files, no offenses).registry.npmjs.org/@scope%2Fname/version) returns 200 against the live registry.🔄 Types of changes