Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ts-invariant

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-invariant - npm Package Compare versions

Comparing version 0.6.2 to 0.7.0

5

lib/invariant.d.ts

@@ -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;

20

lib/invariant.esm.js

@@ -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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc