Skip to content

Commit

Permalink
Merge pull request #63 from airbnb/browser-targets
Browse files Browse the repository at this point in the history
breaking: Update browser targets.
  • Loading branch information
milesj authored Apr 2, 2020
2 parents 5f5f7c6 + 78137b5 commit 705b9fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
19 changes: 6 additions & 13 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
const { declare } = require('@babel/helper-plugin-utils');

const defaultTargets = {
android: 30,
chrome: 35,
edge: 14,
ie: 9,
firefox: 52,
safari: 8,
android: 35,
chrome: 40,
edge: 18,
ie: 11,
firefox: 72,
safari: 12,
};

function buildTargets({ additionalTargets }) {
Expand All @@ -29,12 +29,6 @@ module.exports = declare((api, options) => {
transformRuntime = true,
} = options;

// jscript option is deprecated in favor of using the ie target version
// TODO: remove this option entirely in the next major release.
const jscript = Object.prototype.hasOwnProperty.call(options, 'jscript')
? options.jscript
: (targets.ie >= 6 && targets.ie <= 8);

if (typeof modules !== 'boolean' && modules !== 'auto') {
throw new TypeError('babel-preset-airbnb only accepts `true`, `false`, or `"auto"` as the value of the "modules" option');
}
Expand Down Expand Up @@ -79,7 +73,6 @@ module.exports = declare((api, options) => {
require('@babel/plugin-proposal-numeric-separator'),
require('@babel/plugin-proposal-optional-catch-binding'),
require('@babel/plugin-proposal-optional-chaining'),
jscript ? require('@babel/plugin-transform-jscript') : null,
[require('@babel/plugin-proposal-object-rest-spread'), {
useBuiltIns: true,
}],
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"@babel/plugin-proposal-optional-chaining": "^7.9.0",
"@babel/plugin-transform-classes": "^7.9.2",
"@babel/plugin-transform-exponentiation-operator": "^7.8.3",
"@babel/plugin-transform-jscript": "^7.8.3",
"@babel/plugin-transform-member-expression-literals": "^7.8.3",
"@babel/plugin-transform-property-literals": "^7.8.3",
"@babel/plugin-transform-property-mutators": "^7.8.3",
Expand Down

0 comments on commit 705b9fd

Please sign in to comment.