gatsby-core-utils
Advanced tools
Comparing version 1.0.15 to 1.0.16
@@ -6,2 +6,6 @@ # Change Log | ||
## [1.0.16](https://github.com/gatsbyjs/gatsby/compare/gatsby-core-utils@1.0.15...gatsby-core-utils@1.0.16) (2019-10-28) | ||
**Note:** Version bump only for package gatsby-core-utils | ||
## [1.0.15](https://github.com/gatsbyjs/gatsby/compare/gatsby-core-utils@1.0.14...gatsby-core-utils@1.0.15) (2019-10-14) | ||
@@ -8,0 +12,0 @@ |
@@ -5,3 +5,4 @@ "use strict"; | ||
exports.joinPath = require(`./path`).joinPath; | ||
exports.isNodeInternalModulePath = require(`./path`).isNodeInternalModulePath; | ||
exports.cpuCoreCount = require(`./cpu-core-count`); | ||
exports.urlResolve = require(`./url`).resolve; |
@@ -5,2 +5,3 @@ "use strict"; | ||
exports.joinPath = joinPath; | ||
exports.isNodeInternalModulePath = void 0; | ||
@@ -23,2 +24,13 @@ const path = require(`path`); | ||
return joinedPath; | ||
} | ||
} // copied from https://runpkg.com/?pretty-error@2.1.1/lib/nodePaths.js | ||
// and added `^internal/` test | ||
const nodePaths = [/^_debugger.js$/, /^_http_agent.js$/, /^_http_client.js$/, /^_http_common.js$/, /^_http_incoming.js$/, /^_http_outgoing.js$/, /^_http_server.js$/, /^_linklist.js$/, /^_stream_duplex.js$/, /^_stream_passthrough.js$/, /^_stream_readable.js$/, /^_stream_transform.js$/, /^_stream_writable.js$/, /^_tls_legacy.js$/, /^_tls_wrap.js$/, /^assert.js$/, /^buffer.js$/, /^child_process.js$/, /^cluster.js$/, /^console.js$/, /^constants.js$/, /^crypto.js$/, /^dgram.js$/, /^dns.js$/, /^domain.js$/, /^events.js$/, /^freelist.js$/, /^fs.js$/, /^http.js$/, /^https.js$/, /^module.js$/, /^net.js$/, /^os.js$/, /^path.js$/, /^punycode.js$/, /^querystring.js$/, /^readline.js$/, /^repl.js$/, /^smalloc.js$/, /^stream.js$/, /^string_decoder.js$/, /^sys.js$/, /^timers.js$/, /^tls.js$/, /^tty.js$/, /^url.js$/, /^util.js$/, /^vm.js$/, /^zlib.js$/, /^node.js$/, /^internal[/\\]/]; | ||
/** | ||
* @type {import('../index').isNodeInternalModulePath} | ||
*/ | ||
const isNodeInternalModulePath = fileName => nodePaths.some(regTest => regTest.test(fileName)); | ||
exports.isNodeInternalModulePath = isNodeInternalModulePath; |
@@ -16,2 +16,8 @@ /** | ||
/** | ||
* Checks if the file name matches a node path | ||
* @param {string} fileName File name | ||
*/ | ||
export declare function isNodeInternalModulePath(fileName: string): boolean | ||
/** | ||
* Calculate CPU core count | ||
@@ -18,0 +24,0 @@ * |
{ | ||
"name": "gatsby-core-utils", | ||
"version": "1.0.15", | ||
"version": "1.0.16", | ||
"description": "A collection of gatsby utils used in different gatsby packages", | ||
@@ -37,3 +37,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "868b44f5522edd3fd09fbe68aaa6e995e3cdfe03" | ||
"gitHead": "53e34a58d25ef29567875bdbdb5871b0718ce61c" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13654
161
17