Skip to content

Commit 134f5a0

Browse files
committed
Remove workaround for bug fixed upstream
This removes a workaround that was added for a bug in `babel-helper-compilation-targets` that was fixed upstream and is included in the version that is required by this addon. The bugfix in `babel-helpers-compilation-targets` was included in [`v7.10.2`](https://github.com/babel/babel/releases/tag/v7.10.2) `ember-cli-babel` began requiring a version of `babel-helpers-compilation-targets` that includes the bugfix since [`v7.21.0`](https://github.com/babel/ember-cli-babel/releases/tag/v7.21.0) --- - [Original bugfix workaround PR](#345) - [Dependency upgrade PR](#354) - [`[email protected]` Release notes](https://github.com/babel/ember-cli-babel/releases/tag/v7.21.0) - [`[email protected]` Release notes](https://github.com/babel/babel/releases/tag/v7.10.2)
1 parent 315df8a commit 134f5a0

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

index.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const {
1010
} = require("./lib/babel-options-util");
1111

1212
const VersionChecker = require('ember-cli-version-checker');
13-
const clone = require('clone');
1413
const babel = require('@babel/core');
1514
const path = require('path');
1615
const getBabelOptions = require('./lib/get-babel-options');
@@ -332,14 +331,7 @@ module.exports = {
332331

333332
let parser = require('@babel/helper-compilation-targets').default;
334333
if (typeof targets === 'object' && targets !== null) {
335-
// babel version 7.10.0 introduced a change that mutates the input:
336-
// https://github.com/babel/babel/pull/11500
337-
// copy the object to guard against it, otherwise subsequent calls to
338-
// _getTargets() will only have a mutated copy and lose all config from `config/targets.js`
339-
// in the host application.
340-
// PR to fix this upstream in babel: https://github.com/babel/babel/pull/11648
341-
const copy = clone(targets);
342-
return parser(copy);
334+
return parser(targets);
343335
} else {
344336
return targets;
345337
}

0 commit comments

Comments
 (0)