Socket
Socket
Sign inDemoInstall

ember-cli-htmlbars

Package Overview
Dependencies
Maintainers
4
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-cli-htmlbars - npm Package Compare versions

Comparing version 4.0.4 to 4.0.5

11

CHANGELOG.md

@@ -0,1 +1,12 @@

## v4.0.5 (2019-10-04)
#### :bug: Bug Fix
* [#324](https://github.com/ember-cli/ember-cli-htmlbars/pull/324) More fixes for proper babel plugin deduplication. ([@rwjblue](https://github.com/rwjblue))
#### :memo: Documentation
* [#323](https://github.com/ember-cli/ember-cli-htmlbars/pull/323) Ensure deprecation message shows correct heirarchy. ([@rwjblue](https://github.com/rwjblue))
#### Committers: 1
- Robert Jackson ([@rwjblue](https://github.com/rwjblue))
## v4.0.4 (2019-10-02)

@@ -2,0 +13,0 @@

33

lib/ember-addon-main.js

@@ -94,4 +94,4 @@ 'use strict';

if (legacyInlinePrecompileAddon !== undefined) {
let heirarchy = ['ember-cli-htmlbars-inline-precompile'];
let pointer = this;
let heirarchy = [];
let pointer = legacyInlinePrecompileAddon;
while (pointer.parent) {

@@ -143,33 +143,11 @@ heirarchy.push(pointer.pkg.name);

let modules = {
'ember-cli-htmlbars': 'hbs',
'ember-cli-htmlbars-inline-precompile': 'default',
'htmlbars-inline-precompile': 'default',
};
if (pluginInfo.canParallelize) {
logger.debug('using parallel API with for babel inline precompilation plugin');
let parallelBabelInfo = {
requireFile: path.join(__dirname, 'require-from-worker'),
buildUsing: 'build',
params: {
templateCompilerPath,
parallelConfigs: pluginInfo.parallelConfigs,
modules,
},
};
// parallelBabelInfo will not be used in the cache unless it is explicitly included
let cacheKey = utils.makeCacheKey(
templateCompilerPath,
let htmlbarsInlinePrecompilePlugin = utils.buildParalleizedBabelPlugin(
pluginInfo,
JSON.stringify(parallelBabelInfo)
templateCompilerPath
);
babelPlugins.push({
_parallelBabel: parallelBabelInfo,
baseDir: () => __dirname,
cacheKey: () => cacheKey,
});
babelPlugins.push(htmlbarsInlinePrecompilePlugin);
} else {

@@ -182,3 +160,2 @@ logger.debug('NOT using parallel API with for babel inline precompilation plugin');

templateCompilerPath,
modules,
});

@@ -185,0 +162,0 @@

@@ -10,2 +10,8 @@ 'use strict';

const INLINE_PRECOMPILE_MODULES = Object.freeze({
'ember-cli-htmlbars': 'hbs',
'ember-cli-htmlbars-inline-precompile': 'default',
'htmlbars-inline-precompile': 'default',
});
function isInlinePrecompileBabelPluginRegistered(plugins) {

@@ -44,2 +50,23 @@ return plugins.some(plugin => {

function buildParalleizedBabelPlugin(pluginInfo, templateCompilerPath) {
let parallelBabelInfo = {
requireFile: require.resolve('./require-from-worker'),
buildUsing: 'build',
params: {
templateCompilerPath,
parallelConfigs: pluginInfo.parallelConfigs,
modules: INLINE_PRECOMPILE_MODULES,
},
};
// parallelBabelInfo will not be used in the cache unless it is explicitly included
let cacheKey = makeCacheKey(templateCompilerPath, pluginInfo, JSON.stringify(parallelBabelInfo));
return {
_parallelBabel: parallelBabelInfo,
baseDir: () => __dirname,
cacheKey: () => cacheKey,
};
}
function buildOptions(projectConfig, templateCompilerPath, pluginInfo) {

@@ -176,3 +203,3 @@ let EmberENV = projectConfig.EmberENV || {};

require.resolve('babel-plugin-htmlbars-inline-precompile'),
{ precompile, modules: options.modules },
{ precompile, modules: INLINE_PRECOMPILE_MODULES },
'ember-cli-htmlbars:inline-precompile',

@@ -262,2 +289,3 @@ ];

isInlinePrecompileBabelPluginRegistered,
buildParalleizedBabelPlugin,
};
{
"name": "ember-cli-htmlbars",
"version": "4.0.4",
"version": "4.0.5",
"description": "A library for adding htmlbars to ember CLI",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc