Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bump to node 20 #3456

Merged
merged 9 commits into from
Jan 30, 2025
Merged

feat: bump to node 20 #3456

merged 9 commits into from
Jan 30, 2025

Conversation

holic
Copy link
Member

@holic holic commented Jan 17, 2025

node 18 EOL is april 2025: https://endoflife.date/nodejs

pnpm clean
rm -rf node_modules packages/*/node_modules test/*/node_modules
nvm install 20
nvm alias default 20
nvm use default
npm install -g pnpm
pnpm install
pnpm build

Copy link

changeset-bot bot commented Jan 17, 2025

🦋 Changeset detected

Latest commit: 70d1a7e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 30 packages
Name Type
create-mud Patch
@latticexyz/abi-ts Patch
@latticexyz/block-logs-stream Patch
@latticexyz/cli Patch
@latticexyz/common Patch
@latticexyz/config Patch
@latticexyz/dev-tools Patch
@latticexyz/entrykit Patch
@latticexyz/explorer Patch
@latticexyz/faucet Patch
@latticexyz/gas-report Patch
@latticexyz/paymaster Patch
@latticexyz/protocol-parser Patch
@latticexyz/react Patch
@latticexyz/recs Patch
@latticexyz/schema-type Patch
solhint-config-mud Patch
solhint-plugin-mud Patch
@latticexyz/stash Patch
@latticexyz/store-consumer Patch
@latticexyz/store-indexer Patch
@latticexyz/store-sync Patch
@latticexyz/store Patch
@latticexyz/utils Patch
vite-plugin-mud Patch
@latticexyz/world-module-callwithsignature Patch
@latticexyz/world-module-erc20 Patch
@latticexyz/world-module-metadata Patch
@latticexyz/world-modules Patch
@latticexyz/world Patch

Not sure what this means? Click here to learn what changesets are.

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

@holic
Copy link
Member Author

holic commented Jan 17, 2025

was hoping bumping to node 20 would fix #3389 but needs node 22

might see about skipping 20 in favor of 22

@holic
Copy link
Member Author

holic commented Jan 17, 2025

tried node 22 but something about our TS->JS build step prob has to change to make JSON imports work

  • using assert after json import leads to SyntaxError: Unexpected identifier 'assert' when using built files from other packages (e.g. cli bin)
  • using with after json import leads to Expected ";" but found "with" when building ESM/TS file
    • bumping tsup helps with this
  • not using either leads to TypeError [ERR_IMPORT_ATTRIBUTE_MISSING]: Module "[path].abi.json" needs an import attribute of "type: json" when using built files from other packages (e.g. cli bin)

@holic
Copy link
Member Author

holic commented Jan 17, 2025

after bumping tsup to resolve the with parse errors during TS builds, I now get issues with create-mud

create-mud:build: node:internal/modules/esm/resolve:314
create-mud:build:   return new ERR_PACKAGE_PATH_NOT_EXPORTED(
create-mud:build:          ^
create-mud:build:
create-mud:build: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in node_modules/.pnpm/[email protected]/node_modules/unicorn-magic/package.json
create-mud:build:     at exportsNotFound (node:internal/modules/esm/resolve:314:10)
create-mud:build:     at packageExportsResolve (node:internal/modules/esm/resolve:605:13)
create-mud:build:     at resolveExports (node:internal/modules/cjs/loader:638:36)
create-mud:build:     at Function._findPath (node:internal/modules/cjs/loader:743:31)

likely stemming from create-create-app being super old and outdated, and maybe we need to revisit node 22 when we go change our template strategy

@yonadaa
Copy link
Contributor

yonadaa commented Jan 20, 2025

Reminder to update the docs :)
image

@holic holic merged commit 491a5ac into main Jan 30, 2025
16 checks passed
@holic holic deleted the holic/node-20 branch January 30, 2025 11:21
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