-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Updates #17
Updates #17
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,14 +10,31 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
node-version: | ||
- 18 | ||
- 17 | ||
- 16 | ||
- 14 | ||
- 12 | ||
- 10 | ||
- 8 | ||
# Note: not easy to setup GitHub Actions correctly in this case for Node 6, but you can run the tests locally (test-on-all-versions.sh) | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm install | ||
- run: npm test | ||
test-static-list-is-up-to-date: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be better to do this as a cron job. Example: sindresorhus/type-fest@ac845e9 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you recommend a schedule? Should I use the same? Also, I when this cron job fails, will you get a notification automatically? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, use the same. And yes, I will get a notification then. |
||
name: Static list is up-to-date | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: latest | ||
- run: npm install | ||
- run: npm test | ||
- run: mv builtin-modules.json builtin-modules-original.json | ||
- run: npm run make | ||
- run: diff builtin-modules.json builtin-modules-original.json |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
[ | ||
"assert", | ||
"assert/strict", | ||
"async_hooks", | ||
"buffer", | ||
"child_process", | ||
|
@@ -10,9 +11,11 @@ | |
"dgram", | ||
"diagnostics_channel", | ||
"dns", | ||
"dns/promises", | ||
"domain", | ||
"events", | ||
"fs", | ||
"fs/promises", | ||
"http", | ||
"http2", | ||
"https", | ||
|
@@ -21,23 +24,30 @@ | |
"net", | ||
"os", | ||
"path", | ||
"path/posix", | ||
"path/win32", | ||
"perf_hooks", | ||
"process", | ||
"punycode", | ||
"querystring", | ||
"readline", | ||
"readline/promises", | ||
"repl", | ||
"stream", | ||
"stream/consumers", | ||
"stream/promises", | ||
"stream/web", | ||
"string_decoder", | ||
"timers", | ||
"timers/promises", | ||
"tls", | ||
"trace_events", | ||
"tty", | ||
"url", | ||
"util", | ||
"util/types", | ||
"v8", | ||
"vm", | ||
"wasi", | ||
"worker_threads", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know why |
||
"zlib" | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,6 @@ | ||
'use strict'; | ||
const {builtinModules} = require('module'); | ||
|
||
const ignoreList = [ | ||
'sys' | ||
]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I prefer to keep the ignore list as it's easier to add entries than a regex. The existing regex could ideally be converted to a list like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I thought about |
||
|
||
// eslint-disable-next-line node/no-deprecated-api | ||
module.exports = (builtinModules || (process.binding ? Object.keys(process.binding('natives')) : []) || []) | ||
.filter(x => !/^_|^(internal|v8|node-inspect)\/|\//.test(x) && !ignoreList.includes(x)) | ||
Comment on lines
-4
to
-10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both using |
||
module.exports = (builtinModules || []) | ||
.filter(x => !/^_|^v8\/|^node-inspect\/|^sys$/.test(x)) | ||
.sort(); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
set -Eeuo pipefail | ||
|
||
for version in 6 8 10 12 14 16 17 18; do | ||
fnm use "$version" | ||
./node_modules/.bin/ava | ||
done |
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.
Node.js 19 introduced a new submodule.
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.
nodejs/node#44250