ts-invariant
Advanced tools
Comparing version 0.6.2 to 0.7.0
@@ -15,4 +15,7 @@ export declare class InvariantError extends Error { | ||
export declare function setVerbosity(level: VerbosityLevel): VerbosityLevel; | ||
declare const processStub: any; | ||
export declare const processStub: { | ||
env: Record<string, any>; | ||
[key: string]: any; | ||
}; | ||
export { processStub as process }; | ||
export default invariant; |
@@ -53,20 +53,10 @@ import { __extends } from 'tslib'; | ||
// as tsInvariant.process, which prevents proper replacement by minifiers, we | ||
// also attempt to define the stub globally when it is not already defined. | ||
var processStub = global.process || { env: {} }; | ||
if (!global.process) | ||
try { | ||
Object.defineProperty(globalThis, "process", { | ||
value: processStub, | ||
writable: true, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
} | ||
catch (_b) { | ||
// If this fails, it isn't the end of the world. | ||
} | ||
// also export processStub, so you can import { invariant, processStub } from | ||
// "ts-invariant" and assign processStub to a local variable named process. | ||
var processStub = (typeof process === "object" && | ||
typeof process.env === "object") ? process : { env: {} }; | ||
var invariant$1 = invariant; | ||
export default invariant$1; | ||
export { InvariantError, invariant, processStub as process, setVerbosity }; | ||
export { InvariantError, invariant, processStub as process, processStub, setVerbosity }; | ||
//# sourceMappingURL=invariant.esm.js.map |
@@ -61,16 +61,6 @@ 'use strict'; | ||
// as tsInvariant.process, which prevents proper replacement by minifiers, we | ||
// also attempt to define the stub globally when it is not already defined. | ||
var processStub = global.process || { env: {} }; | ||
if (!global.process) | ||
try { | ||
Object.defineProperty(globalThis__default['default'], "process", { | ||
value: processStub, | ||
writable: true, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
} | ||
catch (_b) { | ||
// If this fails, it isn't the end of the world. | ||
} | ||
// also export processStub, so you can import { invariant, processStub } from | ||
// "ts-invariant" and assign processStub to a local variable named process. | ||
var processStub = (typeof process === "object" && | ||
typeof process.env === "object") ? process : { env: {} }; | ||
var invariant$1 = invariant; | ||
@@ -82,3 +72,4 @@ | ||
exports.process = processStub; | ||
exports.processStub = processStub; | ||
exports.setVerbosity = setVerbosity; | ||
//# sourceMappingURL=invariant.js.map |
{ | ||
"name": "ts-invariant", | ||
"version": "0.6.2", | ||
"version": "0.7.0", | ||
"author": "Ben Newman <ben@apollographql.com>", | ||
@@ -48,3 +48,3 @@ "description": "TypeScript implementation of invariant(condition, message)", | ||
}, | ||
"gitHead": "ee0e656829d9e465a9ece49324b02a14faeedab4" | ||
"gitHead": "10fcc227361a68cbbfdf30fa15a3ab552be8e58b" | ||
} |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
19313
197
2