Skip to content

Commit

Permalink
Update babel-plugin-ember-modules-api-polyfill from 2.13.4 to 3.0.0
Browse files Browse the repository at this point in the history
Migrate the term `blacklist` to `ignore` for that dependency.
  • Loading branch information
mydea committed Jul 29, 2020
1 parent a869cce commit caa1866
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
22 changes: 11 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -501,9 +501,9 @@ module.exports = {
if (addonOptions.disableEmberModulesAPIPolyfill) { return; }

if (this._emberVersionRequiresModulesAPIPolyfill()) {
const blacklist = this._getEmberModulesAPIBlacklist();
const ignore = this._getEmberModulesAPIIgnore();

return [[require.resolve('babel-plugin-ember-modules-api-polyfill'), { blacklist }]];
return [[require.resolve('babel-plugin-ember-modules-api-polyfill'), { ignore }]];
}
},

Expand Down Expand Up @@ -607,26 +607,26 @@ module.exports = {
return false;
},

_getEmberModulesAPIBlacklist() {
const blacklist = {
_getEmberModulesAPIIgnore() {
const ignore = {
'@ember/debug': ['assert', 'deprecate', 'warn'],
'@ember/application/deprecations': ['deprecate'],
};

if (this._shouldBlacklistEmberString()) {
blacklist['@ember/string'] = [
if (this._shouldIgnoreEmberString()) {
ignore['@ember/string'] = [
'fmt', 'loc', 'w',
'decamelize', 'dasherize', 'camelize',
'classify', 'underscore', 'capitalize',
'setStrings', 'getStrings', 'getString'
];
}

if (this._shouldBlacklistJQuery()) {
blacklist['jquery'] = ['default'];
if (this._shouldIgnoreJQuery()) {
ignore['jquery'] = ['default'];
}

return blacklist;
return ignore;
},

_isProjectName(dependency) {
Expand All @@ -640,7 +640,7 @@ module.exports = {
)
},

_shouldBlacklistEmberString() {
_shouldIgnoreEmberString() {
let packageName = '@ember/string';
if (this._isProjectName(packageName)) { return true; }
if (this._isTransitiveDependency(packageName)) { return false; }
Expand All @@ -650,7 +650,7 @@ module.exports = {
return checker.exists();
},

_shouldBlacklistJQuery() {
_shouldIgnoreJQuery() {
let packageName = '@ember/jquery';
if (this._isProjectName(packageName)) { return true; }
if (this._isTransitiveDependency(packageName)) { return false; }
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"amd-name-resolver": "^1.2.1",
"babel-plugin-debug-macros": "^0.3.3",
"babel-plugin-ember-data-packages-polyfill": "^0.1.2",
"babel-plugin-ember-modules-api-polyfill": "^2.13.4",
"babel-plugin-ember-modules-api-polyfill": "^3.0.0",
"babel-plugin-module-resolver": "^3.1.1",
"broccoli-babel-transpiler": "^7.5.0",
"broccoli-debug": "^0.6.4",
Expand Down
9 changes: 8 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2204,13 +2204,20 @@ babel-plugin-ember-data-packages-polyfill@^0.1.2:
dependencies:
"@ember-data/rfc395-data" "^0.0.4"

babel-plugin-ember-modules-api-polyfill@^2.12.0, babel-plugin-ember-modules-api-polyfill@^2.13.4, babel-plugin-ember-modules-api-polyfill@^2.6.0:
babel-plugin-ember-modules-api-polyfill@^2.12.0, babel-plugin-ember-modules-api-polyfill@^2.6.0:
version "2.13.4"
resolved "https://registry.yarnpkg.com/babel-plugin-ember-modules-api-polyfill/-/babel-plugin-ember-modules-api-polyfill-2.13.4.tgz#cf62bc9bfd808c48d810d5194f4329e9453bd603"
integrity sha512-uxQPkEQAzCYdwhZk16O9m1R4xtCRNy4oEUTBrccOPfzlIahRZJic/JeP/ZEL0BC6Mfq6r55eOg6gMF/zdFoCvA==
dependencies:
ember-rfc176-data "^0.3.13"

babel-plugin-ember-modules-api-polyfill@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/babel-plugin-ember-modules-api-polyfill/-/babel-plugin-ember-modules-api-polyfill-3.0.0.tgz#570e5992fda2516a933b8a512925e36a1ce1908c"
integrity sha512-enuGb9M4XYX2+OwfhoergyHqyYMj9btcWgX7f7Mq2k23ULGmj7wWU76AxwbhhT0dodjL6j5mju41Kh3Hm18uZA==
dependencies:
ember-rfc176-data "^0.3.13"

babel-plugin-htmlbars-inline-precompile@^0.2.5:
version "0.2.6"
resolved "https://registry.yarnpkg.com/babel-plugin-htmlbars-inline-precompile/-/babel-plugin-htmlbars-inline-precompile-0.2.6.tgz#c00b8a3f4b32ca04bf0f0d5169fcef3b5a66d69d"
Expand Down

0 comments on commit caa1866

Please sign in to comment.