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

Updates #17

Closed
wants to merge 5 commits into from
Closed

Updates #17

wants to merge 5 commits into from

Conversation

papb
Copy link

@papb papb commented Oct 13, 2022

I suspect you might have wanted to simply drop support for the old Node.js versions, but it was easy to not do it, so I left them all, I hope you don't mind. (If you want you can drop support for them on another release)

  • Fix valid submodules being skipped, closes fs/promises #12
  • Update static list according to Node.js v18.10.0
  • Improve tests
  • Improve CI
  • Add script for local testing quickly on all supported Node.js versions (6, 8, 10, 12, 14, 16, 17, 18), needs local installation of fnm

I don't see anything here as breaking change.

"v8",
"vm",
"wasi",
"worker_threads",
Copy link
Author

Choose a reason for hiding this comment

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

I don't know why wasi was here, because even before my changes, running npm run make did not output it (tested in Node.js 6, 8, 10, 12, 14, 16, 17, 18). After some investigation I found that it is a module hidden under an experimental flag. If this flag is set, then this module will include it. However, I think it's better to omit it from the static list, since usually it will not be present.

Comment on lines -4 to -10
const ignoreList = [
'sys'
];

// 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))
Copy link
Author

@papb papb Oct 13, 2022

Choose a reason for hiding this comment

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

Both using process.binding and accounting for ^internal/ are only necessary for Node.js 4 and below. Since they are already not supported by this package, so I just removed those, to simplify the logic.

with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
test-static-list-is-up-to-date:
Copy link
Owner

Choose a reason for hiding this comment

The 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

Copy link
Author

Choose a reason for hiding this comment

The 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?

Copy link
Owner

Choose a reason for hiding this comment

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

Yes, use the same. And yes, I will get a notification then.

@@ -1,11 +1,6 @@
'use strict';
const {builtinModules} = require('module');

const ignoreList = [
'sys'
];
Copy link
Owner

Choose a reason for hiding this comment

The 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 ignorePrefixList.

Copy link
Author

Choose a reason for hiding this comment

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

Yeah I thought about ignorePrefixList, I was wondering which one you'd prefer, I guessed incorrectly, will update :)

@@ -10,14 +10,31 @@ jobs:
fail-fast: false
matrix:
node-version:
- 18
Copy link

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.

Copy link

Choose a reason for hiding this comment

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

@sindresorhus
Copy link
Owner

Bump :)

@sindresorhus
Copy link
Owner

Bump

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.

fs/promises
3 participants