@yao-pkg/pkg 6.4.0 → 6.5.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/lib-es5/walker.js +7 -3
- package/package.json +2 -2
package/lib-es5/walker.js
CHANGED
|
@@ -30,7 +30,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
30
30
|
const assert_1 = __importDefault(require("assert"));
|
|
31
31
|
const promises_1 = __importDefault(require("fs/promises"));
|
|
32
32
|
const path_1 = __importDefault(require("path"));
|
|
33
|
-
const module_1 = require("module");
|
|
33
|
+
const module_1 = __importStar(require("module"));
|
|
34
34
|
const picomatch_1 = __importDefault(require("picomatch"));
|
|
35
35
|
const tinyglobby_1 = require("tinyglobby");
|
|
36
36
|
const common_1 = require("./common");
|
|
@@ -50,10 +50,14 @@ const strictVerify = Boolean(process.env.PKG_STRICT_VER);
|
|
|
50
50
|
const win32 = process.platform === 'win32';
|
|
51
51
|
/**
|
|
52
52
|
* Checks if a module is a core module
|
|
53
|
-
* module.isBuiltin is available in Node.js 16.17.0 or later.
|
|
54
|
-
*
|
|
53
|
+
* module.isBuiltin is available in Node.js 16.17.0 or later. Use that if available
|
|
54
|
+
* as prefix-only modules (those starting with 'node:') can only be checked that way.
|
|
55
55
|
*/
|
|
56
56
|
function isBuiltin(moduleName) {
|
|
57
|
+
if (Reflect.has(module_1.default, 'isBuiltin') &&
|
|
58
|
+
typeof module_1.default.isBuiltin === 'function') {
|
|
59
|
+
return module_1.default.isBuiltin(moduleName);
|
|
60
|
+
}
|
|
57
61
|
const moduleNameWithoutPrefix = moduleName.startsWith('node:')
|
|
58
62
|
? moduleName.slice(5)
|
|
59
63
|
: moduleName;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yao-pkg/pkg",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.5.0",
|
|
4
4
|
"description": "Package your Node.js project into an executable",
|
|
5
5
|
"main": "lib-es5/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@babel/generator": "^7.23.0",
|
|
26
26
|
"@babel/parser": "^7.23.0",
|
|
27
27
|
"@babel/types": "^7.23.0",
|
|
28
|
-
"@yao-pkg/pkg-fetch": "3.5.
|
|
28
|
+
"@yao-pkg/pkg-fetch": "3.5.22",
|
|
29
29
|
"into-stream": "^6.0.0",
|
|
30
30
|
"minimist": "^1.2.6",
|
|
31
31
|
"multistream": "^4.1.0",
|