You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
removes the need to append .js to all imports during esm build process
aligns us with the default standard for esm / esbuild js projects that also need to support cjs
this allows us to seamlessly support ESM, CJS, and TSX with no remapping needed
what changed
test plan
Summary by cubic
Standardized all internal imports and re-exports to include .js extensions to enable native ESM resolution, while keeping CJS and TS working without path remapping. Updated examples to use explicit index.js entrypoints and environment-driven config for easier local runs.
Refactors
Appended .js to all relative imports and barrel exports across core, v3 agent, DOM runtimes/locator scripts, caches, handlers, external clients, and index files.
Switched examples to ../lib/v3/index.js, fixed nested re-export paths, and added env-based config (BROWSERBASE_API_KEY, BROWSERBASE_PROJECT_ID, MODEL_API_KEY) passed into Stagehand/model.
Updated dotenv to ^17.3.1 in dev deps. No public API changes.
Migration
Most users importing from package entry points: no changes.
If importing internal files locally (e.g., examples or custom integrations), include .js in paths and prefer index.js for directories.
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
seanmcguire12
changed the title
Add .js to the end of all imports to seamlessly support ESM, CJS, and TSX with no remapping needed
[chore]: add .js to the end of all imports
Feb 18, 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
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.
why
what changed
test plan
Summary by cubic
Standardized all internal imports and re-exports to include .js extensions to enable native ESM resolution, while keeping CJS and TS working without path remapping. Updated examples to use explicit index.js entrypoints and environment-driven config for easier local runs.
Refactors
Migration
Written for commit d1d0547. Summary will update on new commits. Review in cubic