@vanillaes/esmtk 0.9.0 → 0.10.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/.vscode/launch.json +14 -2
- package/README.md +1 -0
- package/bin/commands/types.js +16 -7
- package/bin/esmtk.js +3 -2
- package/package.json +4 -7
package/.vscode/launch.json
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "0.2.0",
|
|
3
3
|
"configurations": [
|
|
4
|
+
{
|
|
5
|
+
"name": "Version",
|
|
6
|
+
"type": "node",
|
|
7
|
+
"request": "launch",
|
|
8
|
+
"skipFiles": [
|
|
9
|
+
"<node_internals>/**"
|
|
10
|
+
],
|
|
11
|
+
"program": "${workspaceFolder}/bin/esmtk.js",
|
|
12
|
+
"cwd": "${workspaceFolder}",
|
|
13
|
+
"args": ["--version"],
|
|
14
|
+
"console": "integratedTerminal",
|
|
15
|
+
},
|
|
4
16
|
{
|
|
5
17
|
"name": "Lint",
|
|
6
18
|
"type": "node",
|
|
@@ -22,7 +34,7 @@
|
|
|
22
34
|
],
|
|
23
35
|
"program": "${workspaceFolder}/bin/esmtk.js",
|
|
24
36
|
"cwd": "${workspaceFolder}",
|
|
25
|
-
"args": ["types", "./
|
|
37
|
+
"args": ["types", "./src/index.js"],
|
|
26
38
|
"console": "integratedTerminal",
|
|
27
39
|
},
|
|
28
40
|
{
|
|
@@ -34,7 +46,7 @@
|
|
|
34
46
|
],
|
|
35
47
|
"program": "${workspaceFolder}/bin/esmtk.js",
|
|
36
48
|
"cwd": "${workspaceFolder}",
|
|
37
|
-
"args": ["typings", "./
|
|
49
|
+
"args": ["typings", "./src/index.js"],
|
|
38
50
|
"console": "integratedTerminal",
|
|
39
51
|
},
|
|
40
52
|
{
|
package/README.md
CHANGED
package/bin/commands/types.js
CHANGED
|
@@ -5,7 +5,7 @@ import { spawn } from 'child_process'
|
|
|
5
5
|
* Type Check the JSDOC typings
|
|
6
6
|
* @param {string} entry the entry point
|
|
7
7
|
*/
|
|
8
|
-
export async function types (entry) {
|
|
8
|
+
export async function types (entry, options) {
|
|
9
9
|
const npmExists = await which('npm')
|
|
10
10
|
if (!npmExists) {
|
|
11
11
|
console.error('npm not found')
|
|
@@ -20,10 +20,19 @@ export async function types (entry) {
|
|
|
20
20
|
process.exit(1)
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
if (options?.strict) {
|
|
24
|
+
spawn('tsc', [entry, '-t', 'esnext', '--allowJS', '--checkJS', '--skipLibCheck', '--noEmit', '--strict'], {
|
|
25
|
+
cwd: process.cwd(),
|
|
26
|
+
stdio: ['pipe', process.stdout, process.stderr]
|
|
27
|
+
}).on('error', err => {
|
|
28
|
+
console.error(err)
|
|
29
|
+
})
|
|
30
|
+
} else {
|
|
31
|
+
spawn('tsc', [entry, '-t', 'esnext', '--allowJS', '--checkJS', '--skipLibCheck', '--noEmit'], {
|
|
32
|
+
cwd: process.cwd(),
|
|
33
|
+
stdio: ['pipe', process.stdout, process.stderr]
|
|
34
|
+
}).on('error', err => {
|
|
35
|
+
console.error(err)
|
|
36
|
+
})
|
|
37
|
+
}
|
|
29
38
|
}
|
package/bin/esmtk.js
CHANGED
|
@@ -18,8 +18,9 @@ program.command('lint')
|
|
|
18
18
|
|
|
19
19
|
program.command('types <entry>')
|
|
20
20
|
.description('Type check the JSDoc typings using Typescript')
|
|
21
|
-
.
|
|
22
|
-
|
|
21
|
+
.option('--strict', 'Enable strict type checks')
|
|
22
|
+
.action((entry, options) => {
|
|
23
|
+
types(entry, options)
|
|
23
24
|
})
|
|
24
25
|
|
|
25
26
|
program.command('typings <entry>')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vanillaes/esmtk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "ES Module Toolkit",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"esm",
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
"author": "Evan Plaice <evanplaice@gmail.com> (https://evanplaice.com/)",
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"type": "module",
|
|
16
|
+
"bin": {
|
|
17
|
+
"esmtk": "bin/esmtk.js"
|
|
18
|
+
},
|
|
16
19
|
"exports": {
|
|
17
20
|
".": {
|
|
18
21
|
"types": "./src/index.d.ts",
|
|
@@ -27,9 +30,6 @@
|
|
|
27
30
|
"default": "./src/rm.js"
|
|
28
31
|
}
|
|
29
32
|
},
|
|
30
|
-
"bin": {
|
|
31
|
-
"esmtk": "bin/esmtk.js"
|
|
32
|
-
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"lint": "./bin/esmtk.js lint",
|
|
35
35
|
"types": "./bin/esmtk.js types src/index.js",
|
|
@@ -41,9 +41,6 @@
|
|
|
41
41
|
"commander": "^14.0.3",
|
|
42
42
|
"standard": "^17.1.2"
|
|
43
43
|
},
|
|
44
|
-
"engines": {
|
|
45
|
-
"node": ">=17"
|
|
46
|
-
},
|
|
47
44
|
"devDependencies": {
|
|
48
45
|
"@types/node": "^25.3.5"
|
|
49
46
|
}
|