@tapjs/processinfo
Advanced tools
Comparing version 2.2.0 to 2.2.1
export declare const defaultExclude: RegExp; | ||
export declare const getExclude: (k: string) => RegExp; | ||
export declare const getExclude: (k: string, useDefault?: boolean) => RegExp; | ||
//# sourceMappingURL=get-exclude.d.ts.map |
@@ -16,5 +16,5 @@ "use strict"; | ||
}; | ||
const getExclude = (k) => { | ||
const getExclude = (k, useDefault = true) => { | ||
const src = process.env[k]; | ||
const exclude = parseExclude(src) || exports.defaultExclude; | ||
const exclude = parseExclude(src) || (useDefault ? exports.defaultExclude : /$./); | ||
process.env[k] = String(exclude); | ||
@@ -21,0 +21,0 @@ return exclude; |
@@ -14,3 +14,4 @@ "use strict"; | ||
g[kRegisterCJS] = true; | ||
const exclude = (0, get_exclude_js_1.getExclude)('_TAPJS_PROCESSINFO_EXCLUDE_'); | ||
// by default we include everything in processInfo.files | ||
const exclude = (0, get_exclude_js_1.getExclude)('_TAPJS_PROCESSINFO_EXCLUDE_', false); | ||
(0, pirates_1.addHook)((code, filename) => { | ||
@@ -17,0 +18,0 @@ (0, get_process_info_js_1.getProcessInfo)().files.push(filename); |
export declare const defaultExclude: RegExp; | ||
export declare const getExclude: (k: string) => RegExp; | ||
export declare const getExclude: (k: string, useDefault?: boolean) => RegExp; | ||
//# sourceMappingURL=get-exclude.d.ts.map |
@@ -13,5 +13,5 @@ export const defaultExclude = /(^|[\\\/])(node_modules|\.tap|tap-testdir-.*?|tap-snapshots|tests?|[^\\\/]+\.test\.([cm]?[jt]s|[jt]sx?)|__tests?__)([\\\/]|$)/i; | ||
}; | ||
export const getExclude = (k) => { | ||
export const getExclude = (k, useDefault = true) => { | ||
const src = process.env[k]; | ||
const exclude = parseExclude(src) || defaultExclude; | ||
const exclude = parseExclude(src) || (useDefault ? defaultExclude : /$./); | ||
process.env[k] = String(exclude); | ||
@@ -18,0 +18,0 @@ return exclude; |
@@ -11,3 +11,4 @@ // commonjs style loader hook, modifying require.extensions | ||
g[kRegisterCJS] = true; | ||
const exclude = getExclude('_TAPJS_PROCESSINFO_EXCLUDE_'); | ||
// by default we include everything in processInfo.files | ||
const exclude = getExclude('_TAPJS_PROCESSINFO_EXCLUDE_', false); | ||
addHook((code, filename) => { | ||
@@ -14,0 +15,0 @@ getProcessInfo().files.push(filename); |
{ | ||
"name": "@tapjs/processinfo", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"main": "./dist/cjs/index.js", | ||
@@ -87,2 +87,3 @@ "types": "./dist/cjs/index.d.ts", | ||
"ts-node": "^10.9.1", | ||
"typedoc": "^0.24.8", | ||
"typescript": "^5.0.4" | ||
@@ -89,0 +90,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
307073
2360
12