Skip to content

Convert to ESM#30

Open
kibertoad wants to merge 2 commits intohandlebars-lang:masterfrom
kibertoad:feat/esm
Open

Convert to ESM#30
kibertoad wants to merge 2 commits intohandlebars-lang:masterfrom
kibertoad:feat/esm

Conversation

@kibertoad
Copy link

No description provided.

@kibertoad
Copy link
Author

@jaylinski pls review!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR converts the package’s build/test setup to publish and consume a single ESM build output (dist/index.js) and updates the toolchain configuration accordingly.

Changes:

  • Update TypeScript and ESLint targets to ES2022 and emit ES2022 modules into dist/.
  • Simplify package.json exports to a single default ESM entry and remove the CJS build pipeline.
  • Update specs to import from ../dist/index.js and drop Node 18 from CI/engines.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tsconfig.json Moves compilation target/module to ES2022 and emits into dist/.
package.json Switches to a single ESM export/build output; adjusts build scripts, engines, and published files.
spec/visitor.js Updates test import path to new dist entry.
spec/utils.js Updates test import path to new dist entry.
spec/parser.js Updates test import path to new dist entry.
spec/ast.js Updates test import path to new dist entry.
.github/workflows/ci.yml Removes Node 18 from the test matrix.
.eslintrc.cjs Updates ESLint ecmaVersion to 2022.
Comments suppressed due to low confidence (1)

.github/workflows/ci.yml:48

  • The matrix key is spelled node-vesion. While it currently works because it’s referenced consistently, the typo makes the workflow harder to understand and easier to mis-edit later. Rename the key to node-version and update the ${{ matrix.* }} reference accordingly.
    strategy:
      matrix:
        node-vesion:
          - 20
          - 22
          - 24

    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v4
      - uses: actions/setup-node@v4
        with: 
          cache: pnpm
          node-version: ${{matrix.node-vesion}}


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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