Skip to content

[javascript] Publish atoms under the @selenium npm scope - #18132

Merged
AutomatedTester merged 1 commit into
trunkfrom
atoms-selenium-npm-scope
Oct 7, 2026
Merged

AutomatedTester merged 1 commit into
trunkfrom
atoms-selenium-npm-scope

Conversation

@AutomatedTester

Copy link
Copy Markdown
Member

🔗 Related Issues

Follow-up to #17459, which landed the npm_package target but named it @seleniumhq/atoms.

💥 What does this PR do?

Renames the published npm package from @seleniumhq/atoms to @selenium/atoms.

The @seleniumhq scope does not exist on npmjs — a registry search for scope:seleniumhq returns zero packages, and selenium-webdriver is published unscoped with individual maintainers rather than through an org. Attempting to publish produced:

npm error code E404
npm error 404 Not Found - PUT https://registry.npmjs.org/@seleniumhq%2fatoms - Not found
npm error 404  '@seleniumhq/atoms@4.51.0-nightly...' is not in this registry.

npm returns 404 rather than 403 on a PUT to a scope you don't own, so it can't be used to probe for private orgs. npm will auto-create a user scope on first publish, but never an org scope.

The project owns the @selenium org on npmjs, so the package goes there.

🔧 Implementation Notes

Four files, string rename only:

  • javascript/atoms/package.json — the name field.
  • javascript/atoms/BUILD.bazel — the package attribute on npm_package, plus two comments.
  • javascript/atoms/README.npm.md — the install line and five import examples.
  • javascript/atoms/README.md — the "published to npm as" line.

rake_tasks/node.rake lines 17 and 32 still reference @seleniumhq/selenium-webdriver. Those are deliberately untouched: they target the GitHub Packages nightly registry (npm.pkg.github.com), which requires the scope to match the GitHub org name. Different registry, different constraint.

No Bazel labels move. Only the published package name changes, so every consumer that depends on //javascript/atoms/fragments:* or the *-global atom targets is unaffected.

✅ Verification

  • bazel build //javascript/atoms:selenium-atoms-package — clean; the emitted package.json reads "name": "@selenium/atoms" with all four export paths (., ./get-attribute, ./find-elements, ./is-displayed) intact.
  • bazel build //javascript/atoms:find-elements-global //javascript/atoms:get-attribute-global //javascript/atoms:is-displayed-global — clean, so the injection path used by the bindings still builds.
  • Python consumers reference //javascript/atoms/fragments:{get-attribute,is-displayed,find-elements}-typescript.js in py/BUILD.bazel; none of those labels changed.

💡 Additional Considerations

  • First publish into an org scope needs --access public; npm defaults org-scoped packages to restricted, which is a paid feature, so omitting it fails with a 402.
  • rake_tasks/node.rake still only publishes selenium-webdriver — the atoms package is not yet wired into node:release and currently has to be pushed by hand. Worth a follow-up so it ships with each release.
  • The "main": "./dist/index.cjs" / "require" condition question raised in [javascript] Create @seleniumhq/atoms npm package from TypeScript atoms #17459 is unchanged by this PR and still open.

🤖 AI assistance

  • No substantial AI assistance used
  • AI assisted (complete below)
    • Tool(s): Claude
    • What was generated: Templates
    • I reviewed all AI output and can explain the change

🔄 Types of changes

  • Cleanup (build wiring, packaging metadata)

The @SeleniumHQ scope does not exist on npmjs, so publishing the package
built by //javascript/atoms:selenium-atoms-package failed with a 404 on the
PUT. The project owns the @Selenium org, so use that scope instead.

Only the published package name changes; no Bazel labels move, so the
binding consumers that depend on //javascript/atoms/fragments:* and the
*-global atom targets are unaffected.
@selenium-ci selenium-ci added B-atoms JavaScript chunks generated by Google closure B-build Includes scripting, bazel and CI integrations labels Oct 7, 2026
@AutomatedTester
AutomatedTester merged commit 1efc76c into trunk Oct 7, 2026
64 checks passed
@AutomatedTester
AutomatedTester deleted the atoms-selenium-npm-scope branch October 7, 2026 13:47
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-atoms JavaScript chunks generated by Google closure B-build Includes scripting, bazel and CI integrations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants