isaacs / node-glob

glob functionality for node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v10.4.0 raised minimum required node version to 18

connor4312 opened this issue · comments

In ed0d061, a require for node:url was added which implicitly raises the Node version above what was previously supported and is still declared in its engines. This wasn't detected because Node 16 checks were removed earlier.

This is probably worth a changelog entry at minimum

The engines states ">=16 || 14 >=14.18".

Node 16.0.0 and 14.18.0 (the lowest versions in each line allowed by the engines range) both support require("node:url").

$ node -v
v14.18.0

$ node -p 'require("node:url")'
{
  Url: [Function: Url],
  parse: [Function: urlParse],
  resolve: [Function: urlResolve],
  resolveObject: [Function: urlResolveObject],
  format: [Function: urlFormat],
  URL: [class URL],
  URLSearchParams: [class URLSearchParams],
  domainToASCII: [Function: domainToASCII],
  domainToUnicode: [Function: domainToUnicode],
  pathToFileURL: [Function: pathToFileURL],
  fileURLToPath: [Function: fileURLToPath],
  urlToHttpOptions: [Function: urlToHttpOptions]
}
$ node -v
v16.0.0

$ node -p 'require("node:url")'
{
  Url: [Function: Url],
  parse: [Function: urlParse],
  resolve: [Function: urlResolve],
  resolveObject: [Function: urlResolveObject],
  format: [Function: urlFormat],
  URL: [class URL],
  URLSearchParams: [class URLSearchParams],
  domainToASCII: [Function: domainToASCII],
  domainToUnicode: [Function: domainToUnicode],
  pathToFileURL: [Function: pathToFileURL],
  fileURLToPath: [Function: fileURLToPath],
  urlToHttpOptions: [Function: urlToHttpOptions]
}

So, I'm not sure what problem you're encountering with it, but it's not node version.

Are you running into issues with Jest? I've heard from a lot of people that the node:... module ids aren't supported until recently. Try updating that maybe?