Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: drop import.meta.resolve parent arg URL type
I could not find any version of Node.js which accepts a parent URL argument. For example, on Node.js 16.1.0, index.mjs with content: ```js import.meta.resolve('./index.mjs', new URL(import.meta.url)); ``` produces: node:internal/process/promises:246 triggerUncaughtException(err, true /* fromPromise */); ^ TypeError [ERR_INVALID_ARG_TYPE]: The "parentURL" argument must be of type string. Received an instance of URL at new NodeError (node:internal/errors:363:5) at validateString (node:internal/validators:119:11) at Loader.resolve (node:internal/modules/esm/loader:87:7) at Object.resolve (node:internal/modules/esm/translators:122:26) at file:///path/to/index.mjs:1:13 at ModuleJob.run (node:internal/modules/esm/module_job:175:25) at async Loader.import (node:internal/modules/esm/loader:178:24) at async Object.loadESM (node:internal/process/esm_loader:68:5) { code: 'ERR_INVALID_ARG_TYPE' } Therefore, update the docs to drop the URL type for this argument. Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
- Loading branch information