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

Repo: CI pretest fails on Node 23 with util.isDate is not a function #842

Open
UlisesGascon opened this issue Jan 18, 2025 · 5 comments
Open

Comments

@UlisesGascon
Copy link
Member

Currently the engine is defined as "^18.17.0 || >=20.5.0" (ref) but the CI seems to work fine with Node.js 20 and 21 (#841), but 23 generates an error ref

Run npm test

> [email protected] pretest
> xo

TypeError: util.isDate is not a function
Occurred while linting /home/runner/work/yo/yo/lib/utils/global-config.js:2
    at _deepEqual (/home/runner/work/yo/yo/node_modules/core-assert/index.js:174:19)
    at module.exports (/home/runner/work/yo/yo/node_modules/deep-strict-equal/index.js:5:9)
    at /home/runner/work/yo/yo/node_modules/eslint-plugin-ava/create-ava-rule.js:19[6](https://github.com/yeoman/yo/actions/runs/12846129918/job/35820950716#step:5:7):61
    at Array.some (<anonymous>)
    at VariableDeclarator (/home/runner/work/yo/yo/node_modules/eslint-plugin-ava/create-ava-rule.js:196:49)
    at /home/runner/work/yo/yo/node_modules/eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)
    at Object.emit (/home/runner/work/yo/yo/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/home/runner/work/yo/yo/node_modules/eslint/lib/linter/node-event-generator.js:293:26)
    at NodeEventGenerator.applySelectors (/home/runner/work/yo/yo/node_modules/eslint/lib/linter/node-event-generator.js:322:22)
    at NodeEventGenerator.enterNode (/home/runner/work/yo/yo/node_modules/eslint/lib/linter/node-event-generator.js:336:14)
    at CodePathAnalyzer.enterNode (/home/runner/work/yo/yo/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:[7](https://github.com/yeoman/yo/actions/runs/12846129918/job/35820950716#step:5:8)11:23)
    at /home/runner/work/yo/yo/node_modules/eslint/lib/linter/linter.js:960:32
    at Array.forEach (<anonymous>)
    at runRules (/home/runner/work/yo/yo/node_modules/eslint/lib/linter/linter.js:955:15)
    at Linter._verifyWithoutProcessors (/home/runner/work/yo/yo/node_modules/eslint/lib/linter/linter.js:11[8](https://github.com/yeoman/yo/actions/runs/12846129918/job/35820950716#step:5:9)1:31)
    at Linter._verifyWithoutProcessors (/home/runner/work/yo/yo/node_modules/eslint-plugin-eslint-comments/lib/utils/patch.js:181:42)
    at Linter._verifyWithConfigArray (/home/runner/work/yo/yo/node_modules/eslint/lib/linter/linter.js:1280:21)
    at Linter.verify (/home/runner/work/yo/yo/node_modules/eslint/lib/linter/linter.js:1235:25)
    at Linter.verifyAndFix (/home/runner/work/yo/yo/node_modules/eslint/lib/linter/linter.js:1428:2[9](https://github.com/yeoman/yo/actions/runs/12846129918/job/35820950716#step:5:10))
    at verifyText (/home/runner/work/yo/yo/node_modules/eslint/lib/cli-engine/cli-engine.js:240:48)
    at CLIEngine.executeOnFiles (/home/runner/work/yo/yo/node_modules/eslint/lib/cli-engine/cli-engine.js:808:28)
    at runEslint (/home/runner/work/yo/yo/node_modules/xo/index.js:47:24)
    at /home/runner/work/yo/yo/node_modules/xo/index.js:[11](https://github.com/yeoman/yo/actions/runs/12846129918/job/35820950716#step:5:12)6:42
    at Array.map (<anonymous>)
    at Object.lintFiles (/home/runner/work/yo/yo/node_modules/xo/index.js:115:86)
    at async /home/runner/work/yo/yo/node_modules/xo/cli-main.js:198:18
Error: Process completed with exit code 1.
@mshima
Copy link
Member

mshima commented Jan 18, 2025

Looks a xo issue.
We use an ancient xo version due to esm migration.

We need to switch to eslint, but @yeoman/eslint common config is tuned for typescript/esm.

@MikeMcC399
Copy link

@UlisesGascon

Node.js 21 entered EOL on June 1, 2024, so it would probably be better not to try to cover this release unless there are good reasons for keeping it.

@UlisesGascon
Copy link
Member Author

UlisesGascon commented Jan 23, 2025

Node.js 21 entered EOL on June 1, 2024, so it would probably be better not to try to cover this release unless there are good reasons for keeping it.

While it’s true that Node@21 has reached its End of Life (EOL), our primary goal is to ensure compatibility starting from version 18.x, which we support as the minimum. This approach allows us to confirm that everything functions correctly across all versions from 18 onward, even if some of them are EOL. WDYT @JoshuaKGoldberg ?

@JoshuaKGoldberg
Copy link

Agreed. Regardless of EOL status, dropping support for Node.js 21 would be a breaking change. We're definitely not positioned right now to be making any of those.

I think this issue is really a bug report about Node.js 23, not a feature request to expand the support range.

@MikeMcC399
Copy link

@JoshuaKGoldberg / @UlisesGascon

I think this issue is really a bug report about Node.js 23, not a feature request to expand the support range.

I understand you're in catch-up mode with this repo, so you have historical ballast to deal with.

Maybe change the title to "Fix npm test for Node.js 23"?

It does not look like there is actually any specific action requested for Node.js 21, as this is already working and covered.

@JoshuaKGoldberg JoshuaKGoldberg changed the title Add support for Node 21, 22 and 23 Repo: CI pretest fails on Node 23 with util.isDate is not a function Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants