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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(no-unsupported-features): Update to v21.6.1 of node #180

Merged
merged 11 commits into from Feb 23, 2024

Conversation

scagood
Copy link

@scagood scagood commented Feb 6, 2024

This is a work in progress... I spent some time going through the node docs for this. Unfortunatly this is very much not automatable currently 馃槩

Hopefully its a good base to start from though as we keep the list updated from here.

I still need to:

  • Add WebCrypto support.
  • Add WebStream support.
  • Compare the list with lib/rules/no-unsupported-features/node-builtins.js (There are some noticable differences)
  • Extract the globals from the modules to bind them to the trackMap.
  • Add console as global
  • Add process as global

@scagood
Copy link
Author

scagood commented Feb 6, 2024

@aladdin-add Do you think that splitting the node modules up like this makes sense?

In the future I would also like to merge the lib/rules/no-deprecated-api.js deprecated definitions into the same core dataset.

@aladdin-add
Copy link

馃憤 seems a good direction! just a few thoughts:

  • 'node_modules' - the dirname name is a bit confusing. 馃槃
  • Maybe it can be json files, facilitates the possibility of being generated automatically in the future?

@scagood
Copy link
Author

scagood commented Feb 7, 2024

It would also be lovely to have a mechanism to detect instances of constructed properties 馃槩

Maybe its possible using the ts parser 馃

const buffer = Buffer.from('asdasd');

// It'd be nice to mark this as deprecated somehow
buffer.parent

I am not sure if a json file is better than a JS file here, because the file would need to be pre-processed into JS anyway.
I do also want the deprecations to get added here too, meaning the JSON tree would be almost identical to the JS we have now.

@scagood scagood linked an issue Feb 9, 2024 that may be closed by this pull request
@scagood scagood force-pushed the node-builtins branch 5 times, most recently from 9afbc22 to 4bb1361 Compare February 9, 2024 14:35
@scagood scagood marked this pull request as ready for review February 13, 2024 15:15
@aladdin-add aladdin-add self-requested a review February 19, 2024 09:17
Copy link

@aladdin-add aladdin-add left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@aladdin-add aladdin-add merged commit d24f645 into eslint-community:master Feb 23, 2024
17 checks passed
@scagood scagood deleted the node-builtins branch February 23, 2024 08:58
const { READ } = require("@eslint-community/eslint-utils")

/** @type {import('../types.js').SupportVersionTree} */
const static = {

Choose a reason for hiding this comment

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

static is a reserved keyword and will throw in strict mode.

Copy link
Author

Choose a reason for hiding this comment

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

馃槺 Good catch

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.

feat request: DeprecationWarning for fs.rmdir
3 participants