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.7.5 to 0.8.0

process/main.js

20

lib/invariant.d.ts

@@ -10,12 +10,16 @@ export declare class InvariantError extends Error {

export declare namespace invariant {
const log: (message?: any, ...optionalParams: any[]) => void;
const warn: (message?: any, ...optionalParams: any[]) => void;
const error: (message?: any, ...optionalParams: any[]) => void;
const log: {
(...data: any[]): void;
(message?: any, ...optionalParams: any[]): void;
};
const warn: {
(...data: any[]): void;
(message?: any, ...optionalParams: any[]): void;
};
const error: {
(...data: any[]): void;
(message?: any, ...optionalParams: any[]): void;
};
}
export declare function setVerbosity(level: VerbosityLevel): VerbosityLevel;
export declare const processStub: {
env: Record<string, any>;
[key: string]: any;
};
export { processStub as process };
export default invariant;

10

lib/invariant.esm.js

@@ -46,14 +46,6 @@ import { __extends } from 'tslib';

}
// Code that uses ts-invariant with rollup-plugin-invariant may want to
// import this process stub to avoid errors evaluating process.env.NODE_ENV.
// However, because most ESM-to-CJS compilers will rewrite the process import
// as tsInvariant.process, which prevents proper replacement by minifiers, we
// 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, processStub, setVerbosity };
export { InvariantError, invariant, setVerbosity };
//# sourceMappingURL=invariant.esm.js.map

@@ -50,10 +50,2 @@ 'use strict';

}
// Code that uses ts-invariant with rollup-plugin-invariant may want to
// import this process stub to avoid errors evaluating process.env.NODE_ENV.
// However, because most ESM-to-CJS compilers will rewrite the process import
// as tsInvariant.process, which prevents proper replacement by minifiers, we
// 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;

@@ -64,5 +56,3 @@

exports.invariant = invariant;
exports.process = processStub;
exports.processStub = processStub;
exports.setVerbosity = setVerbosity;
//# sourceMappingURL=invariant.js.map
{
"name": "ts-invariant",
"version": "0.7.5",
"version": "0.8.0",
"author": "Ben Newman <ben@apollographql.com>",

@@ -45,3 +45,3 @@ "description": "TypeScript implementation of invariant(condition, message)",

},
"gitHead": "ddf99bc9b5e35edadab65779f1248406c8cda12b"
"gitHead": "d21f39c386d41ae6769f48b724c693a2ac0a28a7"
}

@@ -14,3 +14,6 @@ import typescriptPlugin from 'rollup-plugin-typescript2';

export default [{
const jobs = [];
export default jobs;
jobs.push({
input: "src/invariant.ts",

@@ -30,3 +33,5 @@ external,

],
}, {
});
jobs.push({
input: "lib/invariant.esm.js",

@@ -43,2 +48,15 @@ external,

},
}];
});
jobs.push({
input: "process/module.js",
external,
output: {
file: "process/main.js",
format: "cjs",
exports: "named",
sourcemap: true,
name: "ts-invariant/process",
globals,
},
});

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