ember-cli-htmlbars
Advanced tools
Comparing version 6.1.0 to 6.1.1
@@ -5,2 +5,11 @@ # Changelog | ||
## v6.1.1 (2022-09-08) | ||
#### :bug: Bug Fix | ||
* [#755](https://github.com/ember-cli/ember-cli-htmlbars/pull/755) Fix template compilation in addons on ember-cli < 3.13. This was a regression in 6.1.0. ([@mansona](https://github.com/mansona)) | ||
#### Committers: 1 | ||
- Chris Manson ([@mansona](https://github.com/mansona)) | ||
## v6.1.0 (2022-07-04) | ||
@@ -7,0 +16,0 @@ |
@@ -99,3 +99,3 @@ 'use strict'; | ||
this._addon.logger.debug(`setup *.hbs compiler with ${htmlbarsOptions.pluginNames}`); | ||
return debugTree( | ||
let output = debugTree( | ||
this._addon.transpileTree(inputTree, { | ||
@@ -107,2 +107,25 @@ isProduction, | ||
); | ||
let checker = new VersionChecker(this._addon.project).for('ember-cli', 'npm'); | ||
let requiresBabelTree = checker.lt('3.13.0'); | ||
let isAddon = this._addon.parent !== this._addon.project; | ||
// as a result of https://github.com/ember-cli/ember-cli-htmlbars/pull/749 we are relying | ||
// on babel for all template comilation. This works fine since ember-cli@3.13 but before | ||
// that there was a different path for **addon** templates and they would not be compiled | ||
// correctly. This change wraps the output of addons in a babel tree since ember-cli | ||
// isn't doing that properly. | ||
if (requiresBabelTree && isAddon) { | ||
let babelAddon = this._addon.parent.addons.find( | ||
(addon) => addon.name === 'ember-cli-babel' | ||
); | ||
output = babelAddon.transpileTree(output, { | ||
babel: this._addon.parent.options.babel, | ||
'ember-cli-babel': { | ||
compileModules: false, | ||
}, | ||
}); | ||
} | ||
return output; | ||
}, | ||
@@ -109,0 +132,0 @@ |
{ | ||
"name": "ember-cli-htmlbars", | ||
"version": "6.1.0", | ||
"version": "6.1.1", | ||
"description": "A library for adding htmlbars to ember CLI", | ||
@@ -82,2 +82,3 @@ "keywords": [ | ||
"ember-source-channel-url": "^3.0.0", | ||
"ember-styleguide": "^5.0.0", | ||
"ember-template-lint": "^3.6.0", | ||
@@ -113,2 +114,5 @@ "ember-try": "^1.4.0", | ||
}, | ||
"resolutions": { | ||
"ember-cli-htmlbars": "link:." | ||
}, | ||
"release-it": { | ||
@@ -115,0 +119,0 @@ "plugins": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
70566
1012
51