summaryrefslogtreecommitdiff
path: root/node_modules/is-core-module
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2024-08-30 17:21:18 +0800
committerlittleblack111 <littleblack11111@gmail.com>2024-08-30 17:21:18 +0800
commitefbc2ffe6a1ee5ec38a4396305561d6515d0943e (patch)
tree2b4c94f18f2c792dfda813050755d5c0273fae22 /node_modules/is-core-module
parent43acceb75957c880a5ba5a31aae221394a36d5f6 (diff)
node fixes, updates
Diffstat (limited to 'node_modules/is-core-module')
-rw-r--r--node_modules/is-core-module/CHANGELOG.md25
-rw-r--r--node_modules/is-core-module/core.json3
-rw-r--r--node_modules/is-core-module/package.json19
-rw-r--r--node_modules/is-core-module/test/index.js23
4 files changed, 61 insertions, 9 deletions
diff --git a/node_modules/is-core-module/CHANGELOG.md b/node_modules/is-core-module/CHANGELOG.md
index c4db1ace..ae847dfb 100644
--- a/node_modules/is-core-module/CHANGELOG.md
+++ b/node_modules/is-core-module/CHANGELOG.md
@@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [v2.15.1](https://github.com/inspect-js/is-core-module/compare/v2.15.0...v2.15.1) - 2024-08-21
+
+### Commits
+
+- [Tests] add `process.getBuiltinModule` tests [`28c7791`](https://github.com/inspect-js/is-core-module/commit/28c7791c196d58c64cfdf638b7e68ed1b62a4da0)
+- [Fix] `test/mock_loader` is no longer exposed as of v22.7 [`68b08b0`](https://github.com/inspect-js/is-core-module/commit/68b08b0d7963447dbffa5142e8810dca550383af)
+- [Tests] replace `aud` with `npm audit` [`32f8060`](https://github.com/inspect-js/is-core-module/commit/32f806026dac14f9016be4401a643851240c76b9)
+- [Dev Deps] update `mock-property` [`f7d3c8f`](https://github.com/inspect-js/is-core-module/commit/f7d3c8f01e922be49621683eb41477c4f50522e1)
+- [Dev Deps] add missing peer dep [`eaee885`](https://github.com/inspect-js/is-core-module/commit/eaee885b67238819e9c8ed5bd2098766e1d05331)
+
+## [v2.15.0](https://github.com/inspect-js/is-core-module/compare/v2.14.0...v2.15.0) - 2024-07-17
+
+### Commits
+
+- [New] add `node:sea` [`2819fb3`](https://github.com/inspect-js/is-core-module/commit/2819fb3eae312fa64643bc5430ebd06ec0f3fb88)
+
+## [v2.14.0](https://github.com/inspect-js/is-core-module/compare/v2.13.1...v2.14.0) - 2024-06-20
+
+### Commits
+
+- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `mock-property`, `npmignore`, `tape` [`0e43200`](https://github.com/inspect-js/is-core-module/commit/0e432006d97237cc082d41e6a593e87c81068364)
+- [meta] add missing `engines.node` [`4ea3af8`](https://github.com/inspect-js/is-core-module/commit/4ea3af88891a1d4f96026f0ec0ef08c67cd1bd24)
+- [New] add `test/mock_loader` [`e9fbd29`](https://github.com/inspect-js/is-core-module/commit/e9fbd2951383be070aeffb9ebbf3715237282610)
+- [Deps] update `hasown` [`57f1940`](https://github.com/inspect-js/is-core-module/commit/57f1940947b3e368abdf529232d2f17d88909358)
+
## [v2.13.1](https://github.com/inspect-js/is-core-module/compare/v2.13.0...v2.13.1) - 2023-10-20
### Commits
diff --git a/node_modules/is-core-module/core.json b/node_modules/is-core-module/core.json
index 3cda693d..91890bee 100644
--- a/node_modules/is-core-module/core.json
+++ b/node_modules/is-core-module/core.json
@@ -89,6 +89,7 @@
"node:readline/promises": ">= 17",
"repl": true,
"node:repl": [">= 14.18 && < 15", ">= 16"],
+ "node:sea": [">= 20.12 && < 21", ">= 21.7"],
"smalloc": ">= 0.11.5 && < 3",
"_stream_duplex": ">= 0.9.4",
"node:_stream_duplex": [">= 14.18 && < 15", ">= 16"],
@@ -116,6 +117,8 @@
"node:sys": [">= 14.18 && < 15", ">= 16"],
"test/reporters": ">= 19.9 && < 20.2",
"node:test/reporters": [">= 18.17 && < 19", ">= 19.9", ">= 20"],
+ "test/mock_loader": ">= 22.3 && < 22.7",
+ "node:test/mock_loader": ">= 22.3 && < 22.7",
"node:test": [">= 16.17 && < 17", ">= 18"],
"timers": true,
"node:timers": [">= 14.18 && < 15", ">= 16"],
diff --git a/node_modules/is-core-module/package.json b/node_modules/is-core-module/package.json
index 1bac5851..3aba4a01 100644
--- a/node_modules/is-core-module/package.json
+++ b/node_modules/is-core-module/package.json
@@ -1,6 +1,6 @@
{
"name": "is-core-module",
- "version": "2.13.1",
+ "version": "2.15.1",
"description": "Is this specifier a node.js core module?",
"main": "index.js",
"sideEffects": false,
@@ -16,7 +16,7 @@
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
- "posttest": "aud --production",
+ "posttest": "npx npm@'>=10.2' audit --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
@@ -42,20 +42,20 @@
},
"homepage": "https://github.com/inspect-js/is-core-module",
"dependencies": {
- "hasown": "^2.0.0"
+ "hasown": "^2.0.2"
},
"devDependencies": {
- "@ljharb/eslint-config": "^21.1.0",
- "aud": "^2.0.3",
+ "@ljharb/eslint-config": "^21.1.1",
"auto-changelog": "^2.4.0",
+ "encoding": "^0.1.13",
"eslint": "=8.8.0",
"in-publish": "^2.0.1",
- "mock-property": "^1.0.2",
- "npmignore": "^0.3.0",
+ "mock-property": "^1.1.0",
+ "npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"semver": "^6.3.1",
- "tape": "^5.7.1"
+ "tape": "^5.8.1"
},
"auto-changelog": {
"output": "CHANGELOG.md",
@@ -69,5 +69,8 @@
"ignore": [
".github"
]
+ },
+ "engines": {
+ "node": ">= 0.4"
}
}
diff --git a/node_modules/is-core-module/test/index.js b/node_modules/is-core-module/test/index.js
index 912808b9..746e72a3 100644
--- a/node_modules/is-core-module/test/index.js
+++ b/node_modules/is-core-module/test/index.js
@@ -72,7 +72,8 @@ test('core modules', function (t) {
});
t.test('core via builtinModules list', { skip: !data.module }, function (st) {
- var libs = require('module').builtinModules;
+ var Module = require('module');
+ var libs = Module.builtinModules;
if (!libs) {
st.skip('module.builtinModules does not exist');
} else {
@@ -83,18 +84,37 @@ test('core modules', function (t) {
'v8/tools/tickprocessor',
'v8/tools/profile'
];
+
// see https://github.com/nodejs/node/issues/42785
if (semver.satisfies(process.version, '>= 18')) {
libs = libs.concat('node:test');
}
+ if (semver.satisfies(process.version, '^20.12 || >= 21.7')) {
+ libs = libs.concat('node:sea');
+ }
+
for (var i = 0; i < libs.length; ++i) {
var mod = libs[i];
if (excludeList.indexOf(mod) === -1) {
st.ok(data[mod], mod + ' is a core module');
+
+ if (Module.isBuiltin) {
+ st.ok(Module.isBuiltin(mod), 'module.isBuiltin(' + mod + ') is true');
+ }
+
st.doesNotThrow(
function () { require(mod); }, // eslint-disable-line no-loop-func
'requiring ' + mod + ' does not throw'
);
+
+ if (process.getBuiltinModule) {
+ st.equal(
+ process.getBuiltinModule(mod),
+ require(mod),
+ 'process.getBuiltinModule(' + mod + ') === require(' + mod + ')'
+ );
+ }
+
if (mod.slice(0, 5) !== 'node:') {
if (supportsNodePrefix) {
st.doesNotThrow(
@@ -111,6 +131,7 @@ test('core modules', function (t) {
}
}
}
+
st.end();
});