Declare the real Node.js requirement for loading the packages (engines vs require())

Open
#1,217 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
node.js, typescript

Research direction

Read the package engines declarations alongside the Node.js version results listed in the issue and the related discussions in #1200, #1201, #882, and #884. Decide the supported Node.js floor for the next major release, then align engines with that decision; done means the declared floor matches the chosen support policy for both ESM imports and require().

Written by the indexing model from the issue text.

Description

bug

Summary

All packages declare "node": ">=18.12", but they are ESM only, and require() of them only works on Node.js 20.19+ and 22.12+.

While reviewing #1201 I ran require() on the 14 entry points with real Node binaries:

Node require()
18.12.1, 18.20.8 fails with ERR_REQUIRE_ESM
20.12.2, 20.18.0 fails with ERR_REQUIRE_ESM
20.19.5 OK
22.11.0 fails with ERR_REQUIRE_ESM
22.13.1, 22.17.1 OK

ESM import works on 18.12.1. #1201 documents the require() requirement in the CHANGELOG and docs, and leaves engines unchanged because raising it would break ESM users who work today.

Proposal

Decide the supported Node.js floor for the next major release, and align engines with it. Earlier issues on the same topic: #882 and #884 (closed), which asked for >=22.11.0.

Related: #1200, #1201.

Dominant language
TypeScript
Stars
276
Forks
26
Avg merge
1d 10h
Merged PRs (30d)
47

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from InditexTech/weavejs

All issues in InditexTech/weavejs

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.