Skip to content

[chore]: add .js to the end of all imports#1700

Merged
pirate merged 5 commits into
mainfrom
import-fixes
Feb 18, 2026
Merged

[chore]: add .js to the end of all imports#1700
pirate merged 5 commits into
mainfrom
import-fixes

Conversation

@pirate

@pirate pirate commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

why

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

Written for commit d1d0547. Summary will update on new commits. Review in cubic

@changeset-bot

changeset-bot Bot commented Feb 18, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d1d0547

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

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@greptile-apps

greptile-apps Bot commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Too many files changed for review. (399 files found, 100 file limit)

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 399 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Note: This PR contains a large number of files. cubic only reviews up to 75 files per PR, so some files may not have been reviewed.

@seanmcguire12 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
@pirate
pirate merged commit a091aff into main Feb 18, 2026
281 of 282 checks passed
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