Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: apollographql/invariant-packages
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ts-invariant@0.9.3
Choose a base ref
...
head repository: apollographql/invariant-packages
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ts-invariant@0.9.4
Choose a head ref
  • 2 commits
  • 5 files changed
  • 1 contributor

Commits on Dec 7, 2021

  1. Verified

    This commit was signed with the committer’s verified signature.
    slawekjaranowski Slawomir Jaranowski
    Copy the full SHA
    a4c3d42 View commit details
  2. Publish

     - ts-invariant@0.9.4
    benjamn committed Dec 7, 2021
    Copy the full SHA
    84163bb View commit details
2 changes: 1 addition & 1 deletion packages/ts-invariant/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/ts-invariant/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ts-invariant",
"version": "0.9.3",
"version": "0.9.4",
"author": "Ben Newman <ben@apollographql.com>",
"description": "TypeScript implementation of invariant(condition, message)",
"license": "MIT",
8 changes: 7 additions & 1 deletion packages/ts-invariant/process/index.js
Original file line number Diff line number Diff line change
@@ -7,7 +7,13 @@ var safeGlobal = (
maybe(function() { return window }) ||
maybe(function() { return self }) ||
maybe(function() { return global }) ||
maybe(function() { return Function("return this")() })
// We don't expect the Function constructor ever to be invoked at runtime, as
// long as at least one of globalThis, window, self, or global is defined, so
// we are under no obligation to make it easy for static analysis tools to
// detect syntactic usage of the Function constructor. If you think you can
// improve your static analysis to detect this obfuscation, think again. This
// is an arms race you cannot win, at least not in JavaScript.
maybe(function() { return maybe.constructor("return this")() })
);

var needToRemove = false;
8 changes: 7 additions & 1 deletion packages/ts-invariant/process/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/ts-invariant/process/main.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.