Skip to content

feat: modernize tsconfig to >= node 20 - #5

Merged
B4nan merged 2 commits into
apify:mainfrom
JuanGalilea:feat/bump-node-22
Jun 17, 2026
Merged

B4nan merged 2 commits into
apify:mainfrom
JuanGalilea:feat/bump-node-22

Conversation

@JuanGalilea

Copy link
Copy Markdown
Contributor

Updates config to match modern node config.

  • gets rid of node (node10) as moduleResolution. Switch to nodenext for the .js extension enforcement on imports.
  • Since its on nodenext, module has to be that as well.
  • target bumped to esnext (compatible with node >= 22). Additionally, lib was already ESNext which could have broken on earlier versions of node due to missing polyfills coming from the mismatch of lib = ESNext and target = ES2019.

bumped minor version since this might be a breaking change for outdated projects

Comment thread package.json Outdated
Comment thread tsconfig.json Outdated
"lib": ["ESNext"],
"module": "CommonJS",
"moduleResolution": "Node",
"module": "nodenext",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i would rather use node20, since nodenext is a moving target

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

set to node20 and resolution nodenext since those are the matching pair.

Comment thread tsconfig.json Outdated
"sourceMap": true,
"strict": true,
"target": "ES2019",
"target": "esnext",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same here, lets use ES2023 or similar. we use this config everywhere, including all the public libraries, those are not a good fit for moving targets in general.

@JuanGalilea JuanGalilea Jun 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

set to ES2023 according to the official TS mapping.

Lib modified as well, so it matches

@JuanGalilea
JuanGalilea requested a review from B4nan June 17, 2026 08:08
@JuanGalilea JuanGalilea changed the title feat: modernize tsconfig to >= node 22 feat: modernize tsconfig to >= node 20 Jun 17, 2026

@B4nan B4nan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks!

@B4nan
B4nan merged commit de8e621 into apify:main Jun 17, 2026
1 check 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.

3 participants