Skip to content

Commit

Permalink
Fix compiling API (#5190)
Browse files Browse the repository at this point in the history
- Since Typescript 4.2 some Helpers to transpile to 4.2 are deprecated/removed. This includes __spread and __spreadArrays microsoft/TypeScript#41523.
- We heavily use the spread syntax in Dark Reader and thus need those helper functions.
- Due the upgrade of 4.2, tslib was outdated and didn't had the new helper function `__spreadArray`.
- After good hours of skimming trough the compiler and using the wrong commands to update tslib(default to 1.x). manually updating it to 2.1 which includes this new functions microsoft/tslib#133
https://github.com/microsoft/tslib/releases/tag/2.1.0
the API can be properly compiled again.
- Resolves #My personal issues with the API.

Note to myself: Now their are 2 versions installed `2.1.10` and `1.14.1` properly configuration setups should default to 2.1.10. But for sakes if I get into problems with this I hope I remember this note and don't waste some hours. Why `1.14.1`, I don't know. `npm --save-dev -E tslib` defaults to 1.14.1. It seems like an NPM bug `yarn add --dev -E tslib` gives the correct 2.1.10. Damn dependency hell =).
  • Loading branch information
Gusted committed Mar 7, 2021
1 parent c994e30 commit 904842e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 18 deletions.
51 changes: 33 additions & 18 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Expand Up @@ -97,6 +97,7 @@
"ts-jest": "26.5.2",
"ts-node": "9.1.1",
"tsconfig-paths": "3.9.0",
"tslib": "2.1.0",
"typescript": "4.2.2",
"web-ext": "5.5.0",
"ws": "7.4.3",
Expand Down

0 comments on commit 904842e

Please sign in to comment.