Skip to content

Commit

Permalink
Stop depending on @ungap/global-this.
Browse files Browse the repository at this point in the history
I will happily reach for this package again for any code that needs
reliable access to the global object (without calling Function), but we no
longer need it for the ts-invariant package, after PR #94.
  • Loading branch information
benjamn committed Mar 18, 2021
1 parent 34b000e commit 1e4f161
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 28 deletions.
36 changes: 24 additions & 12 deletions packages/rollup-plugin-invariant/package-lock.json

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

10 changes: 0 additions & 10 deletions 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: 0 additions & 2 deletions packages/ts-invariant/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
"test:no-node": "! grep -i node lib/invariant.d.ts"
},
"dependencies": {
"@types/ungap__global-this": "^0.3.1",
"@ungap/global-this": "^0.4.2",
"tslib": "^1.9.3"
},
"devDependencies": {
Expand Down
4 changes: 0 additions & 4 deletions packages/ts-invariant/src/invariant.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import globalThis from "@ungap/global-this";
const global = globalThis as any;
const console = global.console;

const genericMessage = "Invariant Violation";
const {
setPrototypeOf = function (obj: any, proto: any) {
Expand Down

0 comments on commit 1e4f161

Please sign in to comment.