From 39bc31b2e9ada3cea61a0de5d6591697bf25b9eb Mon Sep 17 00:00:00 2001 From: Ferdi Date: Fri, 9 Apr 2021 18:28:13 +0100 Subject: [PATCH 1/3] docs: add command flag to import.meta.resolve import.meta.resolve is only available under --experimental-import-meta-resolve cli flag. Source: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/modules/esm/translators.js#L132 --- doc/api/esm.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/api/esm.md b/doc/api/esm.md index bd8fbe0721c77c..233d2e2feaced8 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -283,6 +283,9 @@ const buffer = readFileSync(new URL('./data.proto', import.meta.url)); > Stability: 1 - Experimental +*This feature is only available with the `--experimental-import-meta-resolve` command +flag enabled.* + * `specifier` {string} The module specifier to resolve relative to `parent`. * `parent` {string|URL} The absolute parent module URL to resolve from. If none is specified, the value of `import.meta.url` is used as the default. From 2b0ccd6f22904c851ac9896b616c3a090ac74406 Mon Sep 17 00:00:00 2001 From: Ferdi Date: Sat, 10 Apr 2021 10:24:46 +0100 Subject: [PATCH 2/3] fix lint error thanks @marsonya Co-authored-by: akhil marsonya <16393876+marsonya@users.noreply.github.com> --- doc/api/esm.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/esm.md b/doc/api/esm.md index 233d2e2feaced8..525e21d630b95e 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -283,8 +283,8 @@ const buffer = readFileSync(new URL('./data.proto', import.meta.url)); > Stability: 1 - Experimental -*This feature is only available with the `--experimental-import-meta-resolve` command -flag enabled.* +*This feature is only available with the `--experimental-import-meta-resolve` +command flag enabled.* * `specifier` {string} The module specifier to resolve relative to `parent`. * `parent` {string|URL} The absolute parent module URL to resolve from. If none From 447e1cbf92324d6104cfa7086c28eeff1c5f47e7 Mon Sep 17 00:00:00 2001 From: Ferdi Date: Sat, 10 Apr 2021 21:48:21 +0100 Subject: [PATCH 3/3] remove italic style thanks @RaisinTen Co-authored-by: Darshan Sen --- doc/api/esm.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/esm.md b/doc/api/esm.md index 525e21d630b95e..98b26bc7c36acd 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -283,8 +283,8 @@ const buffer = readFileSync(new URL('./data.proto', import.meta.url)); > Stability: 1 - Experimental -*This feature is only available with the `--experimental-import-meta-resolve` -command flag enabled.* +This feature is only available with the `--experimental-import-meta-resolve` +command flag enabled. * `specifier` {string} The module specifier to resolve relative to `parent`. * `parent` {string|URL} The absolute parent module URL to resolve from. If none