@kosko/require
Advanced tools
Comparing version 2.0.1 to 2.0.2
# @kosko/require | ||
## 2.0.2 | ||
### Patch Changes | ||
- [#79](https://github.com/tommy351/kosko/pull/79) [`3f1bc58`](https://github.com/tommy351/kosko/commit/3f1bc58dc9cc2dacfd748471e46b459c81d92c43) Thanks [@tommy351](https://github.com/tommy351)! - Add ES module wrapper. In older version of Node.js (e.g. `14.3.0`), it may be invalid to import `@kosko/require` as below. | ||
```js | ||
import { getRequireExtensions } from "@kosko/require"; | ||
``` | ||
It throws the following error. | ||
``` | ||
file:///workspaces/kosko/packages/env/dist/environment/node.mjs:1 | ||
import { getRequireExtensions } from "@kosko/require"; | ||
^^^^^^^^^^^^^^^^^^^^ | ||
SyntaxError: The requested module '@kosko/require' does not provide an export named 'getRequireExtensions' | ||
at ModuleJob._instantiate (internal/modules/esm/module_job.js:97:21) | ||
at async ModuleJob.run (internal/modules/esm/module_job.js:135:5) | ||
at async Loader.import (internal/modules/esm/loader.js:178:24) | ||
``` | ||
In this release, we use an [ES module wrapper](https://nodejs.org/dist/latest-v14.x/docs/api/packages.html#packages_approach_1_use_an_es_module_wrapper) to re-export functions from the CommonJS entry point. It should fix the issue. | ||
## 2.0.1 | ||
@@ -4,0 +28,0 @@ |
{ | ||
"name": "@kosko/require", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Import and resolve modules.", | ||
@@ -10,4 +10,9 @@ "homepage": "https://kosko.dev", | ||
"main": "index.js", | ||
"module": "index.mjs", | ||
"types": "index.d.ts", | ||
"sideEffects": false, | ||
"exports": { | ||
"import": "./index.mjs", | ||
"require": "./index.js" | ||
}, | ||
"keywords": [ | ||
@@ -14,0 +19,0 @@ "kosko" |
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
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
10366
6
145