-
Notifications
You must be signed in to change notification settings - Fork 47
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
chore: move to ESM, update all dependencies #113
Conversation
@nodejs/tsc Anyone willing to review this? |
The coverage report in tests is now broken. Maybe Old output:
Output with
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
nopt@7 drops support for Node.js 12.x so we'll drop support too. BREAKING CHANGE: drop support for Node.js 12.x
Co-authored-by: Michaël Zasso <targos@protonmail.com>
Co-authored-by: Michaël Zasso <targos@protonmail.com>
Co-authored-by: Michaël Zasso <targos@protonmail.com>
Co-authored-by: Michaël Zasso <targos@protonmail.com>
Co-authored-by: Michaël Zasso <targos@protonmail.com>
Co-authored-by: Michaël Zasso <targos@protonmail.com>
Co-authored-by: Michaël Zasso <targos@protonmail.com>
Co-authored-by: Michaël Zasso <targos@protonmail.com>
Co-authored-by: Michaël Zasso <targos@protonmail.com>
Co-authored-by: Michaël Zasso <targos@protonmail.com>
Co-authored-by: Michaël Zasso <targos@protonmail.com>
Co-authored-by: Michaël Zasso <targos@protonmail.com>
Co-authored-by: Michaël Zasso <targos@protonmail.com>
Co-authored-by: Michaël Zasso <targos@protonmail.com>
Co-authored-by: Michaël Zasso <targos@protonmail.com>
Co-authored-by: Michaël Zasso <targos@protonmail.com>
Co-authored-by: Michaël Zasso <targos@protonmail.com>
Co-authored-by: Michaël Zasso <targos@protonmail.com>
@Trott is there a reason to use |
Personal preference. I prefer But also: I know I'm in the minority on this, so I'll update it to set things in |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we drop official support for v14.x at the same time? v14.x EOL is quite close, and that would allow us to switch to node:test
for the tests in a future PR.
I'm with you (Rich) for .mjs
, but no strong feelings.
I thought it did too, but |
Can't drop 14.x until nodejs/build#3214 is resolved. |
I think in this case specifically, it’s better to keep the |
Prioritizing git history over code clarity seems like the wrong trade-off to me, but views on this sort of thing tend to depend on assumptions, speculation, and personal preference. So I've already conceded and named the files back to |
const utils = require('../lib/utils') | ||
const subsystem = require('../lib/rules/subsystem') | ||
import { exec } from 'node:child_process' | ||
import fs from 'node:fs' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: All of these could be import fs from 'node:fs/promises'
@@ -3,17 +3,17 @@ | |||
"version": "3.20.0", | |||
"description": "Validate the commit message for a particular commit in node core", | |||
"main": "index.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"main": "index.js", | |
"exports": "index.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want to also export the package.json
file.
@@ -3,17 +3,17 @@ | |||
"version": "3.20.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be a major version bump?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do the version bumps when we release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chalk
requires ESM. Sure, let's do it.nopt
doesn't support Node.js 12.x so this is a breaking change to drop 12.x support. (I guess the ESM stuff might also be a breaking change for people using this as a dependency rather than a CLI. Does anyone do that?)