Skip to content

Commit

Permalink
bump ember-cli-babel
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Garrett committed Mar 17, 2021
1 parent b66e57e commit 3697751
Show file tree
Hide file tree
Showing 5 changed files with 257 additions and 25 deletions.
4 changes: 2 additions & 2 deletions lib/colocated-babel-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = function (babel) {
state._colocationEnsureImport = (exportName, moduleName) => {
let addedImports = (allAddedImports[moduleName] = allAddedImports[moduleName] || {});

if (addedImports[exportName]) return addedImports[exportName];
if (addedImports[exportName]) return t.identifier(addedImports[exportName].name);

let importDeclarations = path.get('body').filter((n) => n.type === 'ImportDeclaration');

Expand Down Expand Up @@ -62,7 +62,7 @@ module.exports = function (babel) {
path.unshiftContainer('body', newImport);
}

return addedImports[exportName];
return t.identifier(addedImports[exportName].name);
};
},

Expand Down
2 changes: 1 addition & 1 deletion lib/template-compiler-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function rethrowBuildError(error) {
}

class TemplateCompiler extends Filter {
constructor(inputTree, _options, requiresModuleApiPolyfill) {
constructor(inputTree, _options, requiresModuleApiPolyfill = true) {
let options = _options || {};

if (!('persist' in options)) {
Expand Down
13 changes: 2 additions & 11 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,18 +228,9 @@ function setup(pluginInfo, options) {
plugins: {
ast: astPlugins,
},
};

for (let option in _options) {
if (option === 'scope') {
// The template compiler expects this option to be named `locals`, but
// we want users to pass it in as `scope`. In the future, we should update
// the template compiler to accept scope as well and remove this.
options.locals = _options.scope;
} else {
options[option] = _options[option];
}
}
..._options,
};

return templatePrecompile(template, options);
};
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"dependencies": {
"@ember/edition-utils": "^1.2.0",
"babel-plugin-htmlbars-inline-precompile": "^4.4.6",
"babel-plugin-htmlbars-inline-precompile": "^5.0.0",
"broccoli-debug": "^0.6.5",
"broccoli-persistent-filter": "^3.1.2",
"broccoli-plugin": "^4.0.3",
Expand Down Expand Up @@ -67,7 +67,7 @@
"core-object": "^3.1.5",
"ember-cli": "~3.25.2",
"ember-cli-app-version": "^4.0.0",
"ember-cli-babel": "^7.23.1",
"ember-cli-babel": "^7.25.0",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-inject-live-reload": "^2.0.2",
"ember-compatibility-helpers": "^1.2.2",
Expand Down
Loading

0 comments on commit 3697751

Please sign in to comment.