You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I write a demo, and it uses npx patch-package is-number, then Cannot find module 'node:process'
Environment: Node.js 14.7.0
yaml: 2.7.0
To Reproduce
1.create a folder dds
2.npm init -y
3.npm install patch-package then the version of node_modules/yaml is 2.7.0
4. modify node_modules/isarray/index.js
var toString = {}.toString;
module.exports = Array.isArray || function (arr) {
console.log(111);
return toString.call(arr) == '[object Array]';
};
npx patch-package isarray and then Cannot find module 'node:process'
if I npm install yaml@2.2.2,it's ok.
if I change the node's version nvm use v16.18.0 it is also ok;
look the node_modules/patch-package/package.json, we can find that patch-package dependences "yaml": "^2.2.2".
So I think the yaml@2.7.0 is not support the node 14.7.0.Before you publish the tag 2.7.0, it works well.
Yeah, the engines.node dependency should be updated to >= 14.18. Previously the minimum was in practice Node.js 14.6, as that introduces private method support.
I should also come up with a better expression for execution environment compatibility. Maybe something along these lines?
Execution environments that have reached end-of-life are only supported with the latest extended support release.
So e.g. Node.js would only be guaranteed support for 14.21.3, unless yet another release of it is made.
Node.js 14 EOL was in April 2023, and its earliest supported version (14.18.0) was released in September 2021. I think requiring an update to at least that is a reasonable request, and so the changes in yaml 2.7.0 should not be considered breaking. Essentially, if you're using an out-of-date version of an EOL'd engine, it's not reasonable to expect all package updates to "just work".
Activity
nondanee commentedon Jan 2, 2025
https://nodejs.org/api/modules.html#built-in-modules
prefix only supports node 14.18.0 or newer
eemeli commentedon Jan 2, 2025
Yeah, the
engines.nodedependency should be updated to>= 14.18. Previously the minimum was in practice Node.js 14.6, as that introduces private method support.I should also come up with a better expression for execution environment compatibility. Maybe something along these lines?
So e.g. Node.js would only be guaranteed support for 14.21.3, unless yet another release of it is made.
Node.js 14 EOL was in April 2023, and its earliest supported version (14.18.0) was released in September 2021. I think requiring an update to at least that is a reasonable request, and so the changes in yaml 2.7.0 should not be considered breaking. Essentially, if you're using an out-of-date version of an EOL'd engine, it's not reasonable to expect all package updates to "just work".
[Snyk] Upgrade yaml from 2.6.1 to 2.7.0 (#44)