Skip to content

Commit

Permalink
Merge pull request #396 from ef4/fix-modules-polyfill-version-checker
Browse files Browse the repository at this point in the history
fix modules-api version checker
  • Loading branch information
rwjblue authored Mar 26, 2021
2 parents c08c7d4 + 7cabee0 commit 0520ee5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions lib/babel-options-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function _shouldHighlightCode(parent) {
return checker.gte("2.1.0");
}

function _getDebugMacroPlugins(config, parent) {
function _getDebugMacroPlugins(config, project) {
let addonOptions = config["ember-cli-babel"] || {};

if (addonOptions.disableDebugTooling) {
Expand Down Expand Up @@ -84,7 +84,7 @@ function _getDebugMacroPlugins(config, parent) {
},
};

if (_emberVersionRequiresModulesAPIPolyfill(parent)) {
if (_emberVersionRequiresModulesAPIPolyfill(project)) {
emberDebugOptions.externalizeHelpers = {
global: "Ember",
};
Expand Down Expand Up @@ -114,8 +114,8 @@ function _getDebugMacroPlugins(config, parent) {
];
}

function _emberVersionRequiresModulesAPIPolyfill(parent) {
let checker = new VersionChecker(parent).for("ember-source", "npm");
function _emberVersionRequiresModulesAPIPolyfill(project) {
let checker = new VersionChecker(project).for("ember-source", "npm");
if (!checker.exists()) {
return true;
}
Expand Down Expand Up @@ -144,7 +144,7 @@ function _getEmberModulesAPIPolyfill(config, parent, project) {
return;
}

if (_emberVersionRequiresModulesAPIPolyfill(parent)) {
if (_emberVersionRequiresModulesAPIPolyfill(project)) {
const ignore = _getEmberModulesAPIIgnore(parent, project);

return [
Expand Down
2 changes: 1 addition & 1 deletion lib/get-babel-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ module.exports = function getBabelOptions(config, appInstance) {
.concat(
shouldIncludeHelpers && _getHelpersPlugin(project),
userPlugins,
_getDebugMacroPlugins(config, parent),
_getDebugMacroPlugins(config, project),
_getEmberModulesAPIPolyfill(config, parent, project),
_getEmberDataPackagesPolyfill(config, parent),
_shouldCompileModules(config, project) && _getModulesPlugin(),
Expand Down

0 comments on commit 0520ee5

Please sign in to comment.