ember-cli-htmlbars
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -12,2 +12,25 @@ 'use strict'; | ||
purgeModule(templateCompilerPath) { | ||
// ensure we get a fresh templateCompilerModuleInstance per ember-addon | ||
// instance NOTE: this is a quick hack, and will only work as long as | ||
// templateCompilerPath is a single file bundle | ||
// | ||
// (╯°□°)╯︵ ɹǝqɯǝ | ||
// | ||
// we will also fix this in ember for future releases | ||
// Module will be cached in .parent.children as well. So deleting from require.cache alone is not sufficient. | ||
let mod = require.cache[templateCompilerPath]; | ||
if (mod && mod.parent) { | ||
let index = mod.parent.children.indexOf(mod); | ||
if (index >= 0) { | ||
mod.parent.children.splice(index, 1); | ||
} else { | ||
throw new TypeError(`ember-cli-htmlbars attempted to purge '${templateCompilerPath}' but something went wrong.`); | ||
} | ||
} | ||
delete require.cache[templateCompilerPath]; | ||
}, | ||
setupPreprocessorRegistry(type, registry) { | ||
@@ -68,10 +91,3 @@ // ensure that broccoli-ember-hbs-template-compiler is not processing hbs files | ||
// ensure we get a fresh templateCompilerModuleInstance per ember-addon | ||
// instance NOTE: this is a quick hack, and will only work as long as | ||
// templateCompilerPath is a single file bundle | ||
// | ||
// (╯°□°)╯︵ ɹǝqɯǝ | ||
// | ||
// we will also fix this in ember for future releases | ||
delete require.cache[templateCompilerPath]; | ||
this.purgeModule(templateCompilerPath); | ||
@@ -98,3 +114,4 @@ // do a full clone of the EmberENV (it is guaranteed to be structured | ||
delete require.cache[templateCompilerPath]; | ||
this.purgeModule(templateCompilerPath); | ||
delete global.Ember; | ||
@@ -101,0 +118,0 @@ delete global.EmberENV; |
{ | ||
"name": "ember-cli-htmlbars", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "A library for adding htmlbars to ember CLI", | ||
@@ -42,4 +42,5 @@ "main": "index.js", | ||
"devDependencies": { | ||
"broccoli": "^0.16.7", | ||
"broccoli": "^2.0.0-beta.4", | ||
"broccoli-concat": "^3.5.1", | ||
"chai": "^4.2.0", | ||
"co": "^4.6.0", | ||
@@ -49,3 +50,3 @@ "ember-cli": "~3.3.0", | ||
"ember-cli-babel": "^6.6.0", | ||
"ember-cli-dependency-checker": "^2.0.0", | ||
"ember-cli-dependency-checker": "^3.0.0", | ||
"ember-cli-eslint": "^4.2.1", | ||
@@ -58,3 +59,3 @@ "ember-cli-inject-live-reload": "^1.4.1", | ||
"ember-maybe-import-regenerator": "^0.1.6", | ||
"ember-resolver": "^4.0.0", | ||
"ember-resolver": "^5.0.0", | ||
"ember-source": "~3.3.1", | ||
@@ -68,3 +69,3 @@ "ember-source-channel-url": "^1.1.0", | ||
"mocha": "^5.2.0", | ||
"qunit-dom": "^0.6.2" | ||
"qunit-dom": "^0.7.1" | ||
}, | ||
@@ -71,0 +72,0 @@ "dependencies": { |
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
13919
245
25