Socket
Socket
Sign inDemoInstall

is-core-module

Package Overview
Dependencies
1
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.6.0 to 2.7.0

10

CHANGELOG.md

@@ -8,2 +8,12 @@ # Changelog

## [v2.7.0](https://github.com/inspect-js/is-core-module/compare/v2.6.0...v2.7.0) - 2021-09-27
### Commits
- [New] node `v14.18` added `node:`-prefixed core modules to `require` [`6d943ab`](https://github.com/inspect-js/is-core-module/commit/6d943abe81382b9bbe344384d80fbfebe1cc0526)
- [Tests] add coverage for Object.prototype pollution [`c6baf5f`](https://github.com/inspect-js/is-core-module/commit/c6baf5f942311a1945c1af41167bb80b84df2af7)
- [Dev Deps] update `@ljharb/eslint-config` [`6717f00`](https://github.com/inspect-js/is-core-module/commit/6717f000d063ea57beb772bded36c2f056ac404c)
- [eslint] fix linter warning [`594c10b`](https://github.com/inspect-js/is-core-module/commit/594c10bb7d39d7eb00925c90924199ff596184b2)
- [meta] add `sideEffects` flag [`c32cfa5`](https://github.com/inspect-js/is-core-module/commit/c32cfa5195632944c4dd4284a142b8476e75be13)
## [v2.6.0](https://github.com/inspect-js/is-core-module/compare/v2.5.0...v2.6.0) - 2021-08-17

@@ -10,0 +20,0 @@

112

core.json
{
"assert": true,
"node:assert": ">= 16",
"node:assert": [">= 14.18 && < 15", ">= 16"],
"assert/strict": ">= 15",
"node:assert/strict": ">= 16",
"async_hooks": ">= 8",
"node:async_hooks": ">= 16",
"node:async_hooks": [">= 14.18 && < 15", ">= 16"],
"buffer_ieee754": "< 0.9.7",
"buffer": true,
"node:buffer": ">= 16",
"node:buffer": [">= 14.18 && < 15", ">= 16"],
"child_process": true,
"node:child_process": ">= 16",
"node:child_process": [">= 14.18 && < 15", ">= 16"],
"cluster": true,
"node:cluster": ">= 16",
"node:cluster": [">= 14.18 && < 15", ">= 16"],
"console": true,
"node:console": ">= 16",
"node:console": [">= 14.18 && < 15", ">= 16"],
"constants": true,
"node:constants": ">= 16",
"node:constants": [">= 14.18 && < 15", ">= 16"],
"crypto": true,
"node:crypto": ">= 16",
"node:crypto": [">= 14.18 && < 15", ">= 16"],
"_debug_agent": ">= 1 && < 8",
"_debugger": "< 8",
"dgram": true,
"node:dgram": ">= 16",
"node:dgram": [">= 14.18 && < 15", ">= 16"],
"diagnostics_channel": [">= 14.17 && < 15", ">= 15.1"],
"node:diagnostics_channel": ">= 16",
"node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"],
"dns": true,
"node:dns": ">= 16",
"node:dns": [">= 14.18 && < 15", ">= 16"],
"dns/promises": ">= 15",
"node:dns/promises": ">= 16",
"domain": ">= 0.7.12",
"node:domain": ">= 16",
"node:domain": [">= 14.18 && < 15", ">= 16"],
"events": true,
"node:events": ">= 16",
"node:events": [">= 14.18 && < 15", ">= 16"],
"freelist": "< 6",
"fs": true,
"node:fs": ">= 16",
"node:fs": [">= 14.18 && < 15", ">= 16"],
"fs/promises": [">= 10 && < 10.1", ">= 14"],
"node:fs/promises": ">= 16",
"node:fs/promises": [">= 14.18 && < 15", ">= 16"],
"_http_agent": ">= 0.11.1",
"node:_http_agent": ">= 16",
"node:_http_agent": [">= 14.18 && < 15", ">= 16"],
"_http_client": ">= 0.11.1",
"node:_http_client": ">= 16",
"node:_http_client": [">= 14.18 && < 15", ">= 16"],
"_http_common": ">= 0.11.1",
"node:_http_common": ">= 16",
"node:_http_common": [">= 14.18 && < 15", ">= 16"],
"_http_incoming": ">= 0.11.1",
"node:_http_incoming": ">= 16",
"node:_http_incoming": [">= 14.18 && < 15", ">= 16"],
"_http_outgoing": ">= 0.11.1",
"node:_http_outgoing": ">= 16",
"node:_http_outgoing": [">= 14.18 && < 15", ">= 16"],
"_http_server": ">= 0.11.1",
"node:_http_server": ">= 16",
"node:_http_server": [">= 14.18 && < 15", ">= 16"],
"http": true,
"node:http": ">= 16",
"node:http": [">= 14.18 && < 15", ">= 16"],
"http2": ">= 8.8",
"node:http2": ">= 16",
"node:http2": [">= 14.18 && < 15", ">= 16"],
"https": true,
"node:https": ">= 16",
"node:https": [">= 14.18 && < 15", ">= 16"],
"inspector": ">= 8",
"node:inspector": ">= 16",
"node:inspector": [">= 14.18 && < 15", ">= 16"],
"_linklist": "< 8",
"module": true,
"node:module": ">= 16",
"node:module": [">= 14.18 && < 15", ">= 16"],
"net": true,
"node:net": ">= 16",
"node:net": [">= 14.18 && < 15", ">= 16"],
"node-inspect/lib/_inspect": ">= 7.6 && < 12",

@@ -69,5 +69,5 @@ "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12",

"os": true,
"node:os": ">= 16",
"node:os": [">= 14.18 && < 15", ">= 16"],
"path": true,
"node:path": ">= 16",
"node:path": [">= 14.18 && < 15", ">= 16"],
"path/posix": ">= 15.3",

@@ -78,28 +78,28 @@ "node:path/posix": ">= 16",

"perf_hooks": ">= 8.5",
"node:perf_hooks": ">= 16",
"node:perf_hooks": [">= 14.18 && < 15", ">= 16"],
"process": ">= 1",
"node:process": ">= 16",
"node:process": [">= 14.18 && < 15", ">= 16"],
"punycode": true,
"node:punycode": ">= 16",
"node:punycode": [">= 14.18 && < 15", ">= 16"],
"querystring": true,
"node:querystring": ">= 16",
"node:querystring": [">= 14.18 && < 15", ">= 16"],
"readline": true,
"node:readline": ">= 16",
"node:readline": [">= 14.18 && < 15", ">= 16"],
"repl": true,
"node:repl": ">= 16",
"node:repl": [">= 14.18 && < 15", ">= 16"],
"smalloc": ">= 0.11.5 && < 3",
"_stream_duplex": ">= 0.9.4",
"node:_stream_duplex": ">= 16",
"node:_stream_duplex": [">= 14.18 && < 15", ">= 16"],
"_stream_transform": ">= 0.9.4",
"node:_stream_transform": ">= 16",
"node:_stream_transform": [">= 14.18 && < 15", ">= 16"],
"_stream_wrap": ">= 1.4.1",
"node:_stream_wrap": ">= 16",
"node:_stream_wrap": [">= 14.18 && < 15", ">= 16"],
"_stream_passthrough": ">= 0.9.4",
"node:_stream_passthrough": ">= 16",
"node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"],
"_stream_readable": ">= 0.9.4",
"node:_stream_readable": ">= 16",
"node:_stream_readable": [">= 14.18 && < 15", ">= 16"],
"_stream_writable": ">= 0.9.4",
"node:_stream_writable": ">= 16",
"node:_stream_writable": [">= 14.18 && < 15", ">= 16"],
"stream": true,
"node:stream": ">= 16",
"node:stream": [">= 14.18 && < 15", ">= 16"],
"stream/consumers": ">= 16.7",

@@ -112,24 +112,24 @@ "node:stream/consumers": ">= 16.7",

"string_decoder": true,
"node:string_decoder": ">= 16",
"node:string_decoder": [">= 14.18 && < 15", ">= 16"],
"sys": [">= 0.6 && < 0.7", ">= 0.8"],
"node:sys": ">= 16",
"node:sys": [">= 14.18 && < 15", ">= 16"],
"timers": true,
"node:timers": ">= 16",
"node:timers": [">= 14.18 && < 15", ">= 16"],
"timers/promises": ">= 15",
"node:timers/promises": ">= 16",
"_tls_common": ">= 0.11.13",
"node:_tls_common": ">= 16",
"node:_tls_common": [">= 14.18 && < 15", ">= 16"],
"_tls_legacy": ">= 0.11.3 && < 10",
"_tls_wrap": ">= 0.11.3",
"node:_tls_wrap": ">= 16",
"node:_tls_wrap": [">= 14.18 && < 15", ">= 16"],
"tls": true,
"node:tls": ">= 16",
"node:tls": [">= 14.18 && < 15", ">= 16"],
"trace_events": ">= 10",
"node:trace_events": ">= 16",
"node:trace_events": [">= 14.18 && < 15", ">= 16"],
"tty": true,
"node:tty": ">= 16",
"node:tty": [">= 14.18 && < 15", ">= 16"],
"url": true,
"node:url": ">= 16",
"node:url": [">= 14.18 && < 15", ">= 16"],
"util": true,
"node:util": ">= 16",
"node:util": [">= 14.18 && < 15", ">= 16"],
"util/types": ">= 15.3",

@@ -145,10 +145,10 @@ "node:util/types": ">= 16",

"v8": ">= 1",
"node:v8": ">= 16",
"node:v8": [">= 14.18 && < 15", ">= 16"],
"vm": true,
"node:vm": ">= 16",
"node:vm": [">= 14.18 && < 15", ">= 16"],
"wasi": ">= 13.4 && < 13.5",
"worker_threads": ">= 11.7",
"node:worker_threads": ">= 16",
"node:worker_threads": [">= 14.18 && < 15", ">= 16"],
"zlib": true,
"node:zlib": ">= 16"
"node:zlib": [">= 14.18 && < 15", ">= 16"]
}
{
"name": "is-core-module",
"version": "2.6.0",
"version": "2.7.0",
"description": "Is this specifier a node.js core module?",
"main": "index.js",
"sideEffects": false,
"exports": {

@@ -51,3 +52,3 @@ ".": [

"devDependencies": {
"@ljharb/eslint-config": "^17.6.0",
"@ljharb/eslint-config": "^18.0.0",
"aud": "^1.1.5",

@@ -54,0 +55,0 @@ "auto-changelog": "^2.3.0",

@@ -107,3 +107,25 @@ 'use strict';

t.test('Object.prototype pollution', function (st) {
/* eslint no-extend-native: 1 */
var nonKey = 'not a core module';
st.teardown(function () {
delete Object.prototype.fs;
delete Object.prototype.path;
delete Object.prototype.http;
delete Object.prototype[nonKey];
});
Object.prototype.fs = false;
Object.prototype.path = '>= 999999999';
Object.prototype.http = data.http;
Object.prototype[nonKey] = true;
st.equal(isCore('fs'), true, 'fs is a core module even if Object.prototype lies');
st.equal(isCore('path'), true, 'path is a core module even if Object.prototype lies');
st.equal(isCore('http'), true, 'path is a core module even if Object.prototype matches data');
st.equal(isCore(nonKey), false, '"' + nonKey + '" is not a core module even if Object.prototype lies');
st.end();
});
t.end();
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc