-
-
Notifications
You must be signed in to change notification settings - Fork 34.1k
Closed as not planned
Description
>cat foo.js
export const foo = "foo";
>cat bar.js
export * from "./foo.js";
import { foo } from "./bar.js";
console.log(foo);
>node bar.js
fooIf it's intentional to allow, there is another issue.
>cat test.js
import "./test.js" with { unknown: "attribute" };
console.log("It works!");
>node test.js
It works!
>cat test.js
import "node:fs" with { unknown: "attribute" };
>node test.js
node:internal/modules/esm/assert:60
throw new ERR_IMPORT_ATTRIBUTE_UNSUPPORTED(keys[i], importAttributes[keys[i]], url);
^
TypeError [ERR_IMPORT_ATTRIBUTE_UNSUPPORTED]: Import attribute "unknown" with value "attribute" is not supported in node:fsWhen importing self, the validateAttributes not checking attributes.
Metadata
Metadata
Assignees
Labels
No labels