ember-cli-htmlbars
Advanced tools
Comparing version 4.0.2 to 4.0.3
@@ -0,1 +1,13 @@ | ||
## v4.0.3 (2019-10-01) | ||
#### :bug: Bug Fix | ||
* [#317](https://github.com/ember-cli/ember-cli-htmlbars/pull/317) Avoid conflicts with ember-cli-htmlbars-inline-precompile ([@rwjblue](https://github.com/rwjblue)) | ||
#### :memo: Documentation | ||
* [#318](https://github.com/ember-cli/ember-cli-htmlbars/pull/318) Ensure all debug logging is emitted with `DEBUG=ember-cli-htmlbars:*` ([@rwjblue](https://github.com/rwjblue)) | ||
#### Committers: 2 | ||
- Robert Jackson ([@rwjblue](https://github.com/rwjblue)) | ||
- [@dependabot-preview[bot]](https://github.com/apps/dependabot-preview) | ||
## v4.0.2 (2019-09-30) | ||
@@ -2,0 +14,0 @@ |
@@ -5,3 +5,3 @@ 'use strict'; | ||
const utils = require('./utils'); | ||
const logger = require('heimdalljs-logger')('ember-cli-htmlbars'); | ||
const logger = require('heimdalljs-logger')('ember-cli-htmlbars:addon'); | ||
const hasEdition = require('@ember/edition-utils').has; | ||
@@ -90,2 +90,39 @@ | ||
} | ||
let legacyInlinePrecompileAddon = this.parent.addons.find( | ||
a => a.name === 'ember-cli-htmlbars-inline-precompile' | ||
); | ||
if (legacyInlinePrecompileAddon !== undefined) { | ||
let heirarchy = ['ember-cli-htmlbars-inline-precompile']; | ||
let pointer = this; | ||
while (pointer.parent) { | ||
heirarchy.push(pointer.pkg.name); | ||
pointer = pointer.parent; | ||
} | ||
this.ui.writeDeprecateLine( | ||
`${heirarchy | ||
.reverse() | ||
.join( | ||
' > ' | ||
)} is no longer needed with ember-cli-htmlbars versions 4.0.0 and higher, please remove it from \`${ | ||
this.parent.root | ||
}/package.json\`` | ||
); | ||
// overwrite the `included` method on the | ||
// ember-cli-htmlbars-inline-precompile instance this prevents issues | ||
// when using ember-cli-htmlbars-inline-precompile < 3.0.1 (where both | ||
// this addon and ember-cli-htmlbars-inline-precompile use the same | ||
// babel-plugin-htmlbars-inline-precompile version and get confused about | ||
// whether or not it registers its replacements) | ||
// | ||
// this only mutates the local addon _instance_ (not **all** instances of | ||
// the addon) because we _know_ that this instance of ember-cli-htmlbars | ||
// will take care of the precompilation of: | ||
// | ||
// import hbs from 'htmlbars-inline-precompile'; | ||
// import hbs from 'ember-cli-htmlbars-inline-precompile'; | ||
legacyInlinePrecompileAddon.included = function() {}; | ||
} | ||
}, | ||
@@ -109,12 +146,6 @@ | ||
'ember-cli-htmlbars': 'hbs', | ||
'ember-cli-htmlbars-inline-precompile': 'default', | ||
'htmlbars-inline-precompile': 'default', | ||
}; | ||
// TODO: add deprecation to migrate import paths to use | ||
// ember-cli-htmlbars instead of htmlbars-inline-precompile or | ||
// ember-cli-htmlbars-inline-precompile | ||
if (!this.parent.addons.find(a => a.name === 'ember-cli-htmlbars-inline-precompile')) { | ||
modules['ember-cli-htmlbars-inline-precompile'] = 'default'; | ||
modules['htmlbars-inline-precompile'] = 'default'; | ||
} | ||
if (pluginInfo.canParallelize) { | ||
@@ -170,3 +201,3 @@ logger.debug('using parallel API with for babel inline precompilation plugin'); | ||
/** | ||
* This function checks if 'ember-cli-htmlbars-inline-precompile' is already present in babelPlugins. | ||
* This function checks if 'babel-plugin-htmlbars-inline-precompile' is already present in babelPlugins. | ||
* The plugin object will be different for non parallel API and parallel API. | ||
@@ -180,3 +211,9 @@ * For parallel api, check the `baseDir` of a plugin to see if it has current dirname | ||
if (Array.isArray(plugin)) { | ||
return plugin[0] === require.resolve('babel-plugin-htmlbars-inline-precompile'); | ||
let [pluginPathOrInstance, options] = plugin; | ||
return ( | ||
pluginPathOrInstance === require.resolve('babel-plugin-htmlbars-inline-precompile') && | ||
typeof options.modules === 'object' && | ||
options.modules['ember-cli-htmlbars'] === 'hbs' | ||
); | ||
} else if ( | ||
@@ -188,3 +225,7 @@ plugin !== null && | ||
return ( | ||
plugin._parallelBabel.requireFile === path.resolve(__dirname, 'lib/require-from-worker') | ||
plugin._parallelBabel.requireFile === | ||
path.resolve(__dirname, 'lib/require-from-worker') && | ||
typeof plugin._parallelBabel.params === 'object' && | ||
typeof plugin._parallelBabel.params.modules === 'object' && | ||
plugin._parallelBabel.params.modules['ember-cli-htmlbars'] === 'hbs' | ||
); | ||
@@ -191,0 +232,0 @@ } else { |
@@ -7,3 +7,3 @@ 'use strict'; | ||
const debugGenerator = require('heimdalljs-logger'); | ||
const logger = debugGenerator('ember-cli-htmlbars'); | ||
const logger = debugGenerator('ember-cli-htmlbars:utils'); | ||
const addDependencyTracker = require('./addDependencyTracker'); | ||
@@ -10,0 +10,0 @@ |
{ | ||
"name": "ember-cli-htmlbars", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "A library for adding htmlbars to ember CLI", | ||
@@ -38,3 +38,3 @@ "keywords": [ | ||
"broccoli-persistent-filter": "^2.3.1", | ||
"broccoli-plugin": "^2.0.0", | ||
"broccoli-plugin": "^3.0.0", | ||
"common-tags": "^1.8.0", | ||
@@ -48,4 +48,4 @@ "ember-cli-babel-plugin-helpers": "^1.1.0", | ||
"semver": "^6.3.0", | ||
"strip-bom": "^3.0.0", | ||
"walk-sync": "^1.1.3" | ||
"strip-bom": "^4.0.0", | ||
"walk-sync": "^2.0.2" | ||
}, | ||
@@ -61,3 +61,3 @@ "devDependencies": { | ||
"ember-cli-app-version": "^3.2.0", | ||
"ember-cli-babel": "^7.11.1", | ||
"ember-cli-babel": "^7.12.0", | ||
"ember-cli-dependency-checker": "^3.2.0", | ||
@@ -75,3 +75,3 @@ "ember-cli-inject-live-reload": "^2.0.1", | ||
"ember-try": "^1.2.1", | ||
"eslint": "^6.4.0", | ||
"eslint": "^6.5.1", | ||
"eslint-config-prettier": "^6.3.0", | ||
@@ -84,3 +84,3 @@ "eslint-plugin-ember": "^7.1.0", | ||
"loader.js": "^4.7.0", | ||
"mocha": "^6.2.0", | ||
"mocha": "^6.2.1", | ||
"module-name-inliner": "link:./tests/dummy/lib/module-name-inliner", | ||
@@ -87,0 +87,0 @@ "prettier": "^1.18.2", |
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
40826
784
+ Addedbroccoli-node-api@1.7.0(transitive)
+ Addedbroccoli-node-info@2.2.0(transitive)
+ Addedbroccoli-output-wrapper@2.0.0(transitive)
+ Addedbroccoli-plugin@3.1.0(transitive)
+ Addedfs-extra@8.1.0(transitive)
+ Addedfs-merger@3.2.1(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedjsonfile@4.0.0(transitive)
+ Addedmatcher-collection@2.0.1(transitive)
+ Addedstrip-bom@4.0.0(transitive)
+ Addeduniversalify@0.1.2(transitive)
+ Addedwalk-sync@2.2.0(transitive)
- Removedbroccoli-plugin@2.1.0(transitive)
- Removedstrip-bom@3.0.0(transitive)
Updatedbroccoli-plugin@^3.0.0
Updatedstrip-bom@^4.0.0
Updatedwalk-sync@^2.0.2