@cspell/dynamic-import 10.3.1-alpha.1 → 10.3.2-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# `@cspell/dynamic-import`
|
|
2
2
|
|
|
3
|
-
A small library to assist with dynamically loading CommonJS and ESM
|
|
3
|
+
A small library to assist with dynamically loading CommonJS and ESM modules from either CommonJS or ESM modules.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -12,9 +12,9 @@ npm install -S @cspell/dynamic-import
|
|
|
12
12
|
|
|
13
13
|
### Example ESM Package
|
|
14
14
|
|
|
15
|
-
Example loading [chalk v5](https://www.npmjs.com/package/chalk) which is an ESM
|
|
15
|
+
Example loading [chalk v5](https://www.npmjs.com/package/chalk), which is an ESM-only module.
|
|
16
16
|
|
|
17
|
-
**TypeScript
|
|
17
|
+
**TypeScript CommonJS**
|
|
18
18
|
|
|
19
19
|
```ts
|
|
20
20
|
import { dynamicImport } from '@cspell/dynamic-import';
|
|
@@ -32,7 +32,7 @@ const pChalk = dynamicImport<typeof import('chalk')>('chalk', import.meta.url);
|
|
|
32
32
|
|
|
33
33
|
### Example ESM files
|
|
34
34
|
|
|
35
|
-
**TypeScript
|
|
35
|
+
**TypeScript CommonJS**
|
|
36
36
|
|
|
37
37
|
```ts
|
|
38
38
|
import { dynamicImport } from '@cspell/dynamic-import';
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public",
|
|
5
5
|
"provenance": true
|
|
6
6
|
},
|
|
7
|
-
"version": "10.3.
|
|
7
|
+
"version": "10.3.2-alpha.0",
|
|
8
8
|
"description": "Dynamic Module Loader",
|
|
9
9
|
"keywords": [
|
|
10
10
|
"module",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"node": ">=22.18.0"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@cspell/url": "10.3.
|
|
62
|
+
"@cspell/url": "10.3.2-alpha.0",
|
|
63
63
|
"import-meta-resolve": "^4.2.0"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "c7193065b82df0646e24ab6f6d370c12148f0efc"
|
|
66
66
|
}
|