Comparing version 0.9.2 to 0.10.0
@@ -10,2 +10,7 @@ /* eslint strict: off, node/no-unsupported-features: ["error", { version: 4 }] */ | ||
// Guard against poorly mocked module constructors. | ||
const Module = module.constructor.length > 1 | ||
? module.constructor | ||
: require("module") | ||
const esmPath = path.resolve(__dirname, "esm.js.gz") | ||
@@ -17,3 +22,3 @@ const inspectKey = util.inspect.custom || "inspect" | ||
const mod = new module.constructor(module.id) | ||
const mod = new Module(module.id, null) | ||
mod.filename = __filename | ||
@@ -20,0 +25,0 @@ mod.parent = module.parent |
{ | ||
"name": "@std/esm", | ||
"version": "0.9.2", | ||
"version": "0.10.0", | ||
"description": "Enable ES modules in Node today!", | ||
@@ -5,0 +5,0 @@ "keywords": "commonjs, ecmascript, export, import, modules, node, require", |
@@ -68,3 +68,5 @@ # @std/esm | ||
* [`import`](https://ponyfoo.com/articles/es6-modules-in-depth#import) / [`export`](https://ponyfoo.com/articles/es6-modules-in-depth#export) | ||
* [`import.meta`](https://github.com/tc39/proposal-import-meta) | ||
* [Dynamic `import()`](https://github.com/tc39/proposal-dynamic-import) | ||
* [Improved errors](https://mobile.twitter.com/jdalton/status/907741390813016064) | ||
* [Live bindings](https://ponyfoo.com/articles/es6-modules-in-depth#bindings-not-values) | ||
@@ -97,3 +99,3 @@ * [Loading `.mjs` files as ESM](https://github.com/nodejs/node-eps/blob/master/002-es-modules.md#32-determining-if-source-is-an-es-module) | ||
<li><code>"all"</code> files as ESM</li> | ||
<li><code>"js"</code> files with <code>import</code>, <code>export</code>, or <a href="https://github.com/tc39/proposal-modules-pragma"><code>"use module"</code></a> as ESM</li> | ||
<li><code>"js"</code> and other files with <code>import</code>, <code>export</code>, or <a href="https://github.com/tc39/proposal-modules-pragma"><code>"use module"</code></a> as ESM</li> | ||
</ul> | ||
@@ -100,0 +102,0 @@ </td> |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52477
40
134
4