Skip to content

Use explicit extensions in generated ESM index imports - #2087

Draft
Victor-Su-Ortiz wants to merge 1 commit into
caolan:masterfrom
Victor-Su-Ortiz:minimax/esm-index-extensions-2010
Draft

Victor-Su-Ortiz wants to merge 1 commit into
caolan:masterfrom
Victor-Su-Ortiz:minimax/esm-index-extensions-2010

Conversation

@Victor-Su-Ortiz

Copy link
Copy Markdown

Summary

Fixes #2010. Generate explicit .js imports in the async-es index, consistent with the individual modules. Add a build regression that checks relative specifiers and exercises the index and a generated alias in native ESM; keep the test compatible with Node 18.

Verification

  • Regression fails against the original generated index and passes with the fix.
  • Native ESM index and alias imports pass on Node 22 and Node 18.20.8.
  • npm test: lint and 703 tests passed.
  • git diff --check passed.

Limitations

The complete release build was not validated successfully in this macOS checkout. GNU Make 3.81 cannot expand the existing alias target rule; the ESM verification reproduced its source/alias copy actions locally. make test-build also encounters the existing compiler's yargs argv incompatibility. Generated temporary build debris was preserved outside the lint scan before rerunning npm test. Actual browser automation was not run; the regression uses strict native ESM resolution.

AI assistance

Implementation and tests generated with OpenCode opencode/space-bunny-free (Space Bunny). Codex independently reviewed and ran the checks and requested the Node 18 compatibility correction. No human code review has occurred. Submitted as a draft for maintainer review.

This branch has not been deployed

No deployments
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.

Webcomponent imports fail

1 participant