Skip to content

Commit

Permalink
Merge pull request #1271 from parvez/fix-deprecated-polyfill-issue
Browse files Browse the repository at this point in the history
Fix deprecated polyfill issue
  • Loading branch information
orta committed Apr 21, 2022
2 parents 4b2d659 + faf62af commit b0ca81d
Show file tree
Hide file tree
Showing 5 changed files with 1,127 additions and 651 deletions.
4 changes: 3 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"presets": [["@babel/preset-env", { "targets": { "node": "6" }, "useBuiltIns": "usage" }]],
"presets": [
["@babel/preset-env", { "useBuiltIns": "usage", "corejs": "3.8", "exclude": ["transform-typeof-symbol"] }]
],
"plugins": ["@babel/plugin-transform-flow-strip-types"]
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@

<!-- Your comment below this -->

- *Chore:* Switch from tslint to eslint (tslint is end-of-life) - [#1205](https://github.com/danger/danger-js/pull/1205) [@fbartho]
- Bump up @babel/* plugins for Core-JS support. [@parvez]
- Replace deprecated @Babel/polyfill dependency with Core-JS + Regenerator-Runtime. [@gpetrioli]


<!-- Your comment above this -->

Expand Down Expand Up @@ -1909,6 +1913,7 @@ Not usable for others, only stubs of classes etc. - [@orta]
[@fwal]: https://github.com/fwal
[@g3offrey]: https://github.com/g3offrey
[@gantman]: https://github.com/gantman
[@gpetrioli]: https:/github.com/gpetrioli
[@gzaripov]: https://github.com/gzaripov
[@hanneskaeufler]: https://github.com/hanneskaeufler
[@happylinks]: https://github.com/happylinks
Expand Down Expand Up @@ -1952,6 +1957,7 @@ Not usable for others, only stubs of classes etc. - [@orta]
[@orta]: https://github.com/orta
[@osmestad]: https://github.com/osmestad
[@ozzieorca]: https://github.com/ozzieorca
[@parvez]: https:/github.com/parvez
[@patrickkempff]: https://github.com/patrickkempff
[@paulmelnikow]: https://github.com/paulmelnikow
[@peterjgrainger]: https://github.com/peterjgrainger
Expand Down
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@
"node": ">=14.13.1"
},
"devDependencies": {
"@babel/cli": "7.1.2",
"@babel/core": "7.1.2",
"@babel/plugin-transform-flow-strip-types": "7.0.0",
"@babel/plugin-transform-typescript": "7.1.0",
"@babel/preset-env": "7.1.0",
"@babel/traverse": "7.1.0",
"@babel/cli": "7.16.7",
"@babel/core": "7.16.7",
"@babel/plugin-transform-flow-strip-types": "7.16.7",
"@babel/plugin-transform-typescript": "7.16.7",
"@babel/preset-env": "7.16.7",
"@babel/traverse": "7.16.7",
"@octokit/openapi-types": "^11.2.0",
"@types/async-retry": "^1.4.1",
"@types/debug": "0.0.30",
Expand Down Expand Up @@ -142,11 +142,11 @@
"typescript-json-schema": "^0.32.0"
},
"dependencies": {
"@babel/polyfill": "^7.2.5",
"@octokit/rest": "^18.12.0",
"async-retry": "1.2.3",
"chalk": "^2.3.0",
"commander": "^2.18.0",
"core-js": "^3.8.2",
"debug": "^4.1.1",
"fast-json-patch": "^3.0.0-1",
"get-stdin": "^6.0.0",
Expand Down Expand Up @@ -176,6 +176,7 @@
"pinpoint": "^1.1.0",
"prettyjson": "^1.2.1",
"readline-sync": "^1.4.9",
"regenerator-runtime": "^0.13.9",
"require-from-string": "^2.0.2",
"supports-hyperlinks": "^1.0.1"
},
Expand Down
4 changes: 2 additions & 2 deletions source/runner/runners/utils/transpiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ export const checkForNodeModules = () => {
}

if (hasBabel) {
// @babel/polyfill is a direct dependency of Danger.
require("@babel/polyfill")
require("core-js/stable") // tslint:disable-line
require("regenerator-runtime/runtime") // tslint:disable-line
try {
require.resolve(`${babelPackagePrefix}plugin-transform-typescript`)
hasBabelTypeScript = true
Expand Down

0 comments on commit b0ca81d

Please sign in to comment.