Socket
Socket
Sign inDemoInstall

ember-cli-htmlbars

Package Overview
Dependencies
Maintainers
7
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 6.1.1 to 6.2.0

68

lib/utils.js

@@ -199,41 +199,39 @@ 'use strict';

let { templateCompiler } = htmlbarsOptions;
if (options.requiresModuleApiPolyfill) {
let templatePrecompile = templateCompiler.precompile;
let templatePrecompile = templateCompiler.precompile;
let precompile = (template, _options) => {
// we have to reverse these for reasons that are a bit bonkers. the initial
// version of this system used `registeredPlugin` from
// `ember-template-compiler.js` to set up these plugins (because Ember ~ 1.13
// only had `registerPlugin`, and there was no way to pass plugins directly
// to the call to `compile`/`precompile`). calling `registerPlugin`
// unfortunately **inverted** the order of plugins (it essentially did
// `PLUGINS = [plugin, ...PLUGINS]`).
//
// sooooooo...... we are forced to maintain that **absolutely bonkers** ordering
let astPlugins = [...pluginInfo.plugins].reverse();
let precompile = (template, _options) => {
// we have to reverse these for reasons that are a bit bonkers. the initial
// version of this system used `registeredPlugin` from
// `ember-template-compiler.js` to set up these plugins (because Ember ~ 1.13
// only had `registerPlugin`, and there was no way to pass plugins directly
// to the call to `compile`/`precompile`). calling `registerPlugin`
// unfortunately **inverted** the order of plugins (it essentially did
// `PLUGINS = [plugin, ...PLUGINS]`).
//
// sooooooo...... we are forced to maintain that **absolutely bonkers** ordering
let astPlugins = [...pluginInfo.plugins].reverse();
let options = {
plugins: {
ast: astPlugins,
},
let options = {
plugins: {
ast: astPlugins,
},
..._options,
};
..._options,
return templatePrecompile(template, options);
};
return templatePrecompile(template, options);
};
precompile.baseDir = () => path.resolve(__dirname, '..');
precompile.baseDir = () => path.resolve(__dirname, '..');
let cacheKey;
precompile.cacheKey = () => {
if (cacheKey === undefined) {
cacheKey = makeCacheKey(templateCompilerPath, pluginInfo);
}
cacheKey;
};
let cacheKey;
precompile.cacheKey = () => {
if (cacheKey === undefined) {
cacheKey = makeCacheKey(templateCompilerPath, pluginInfo);
}
cacheKey;
};
let plugin;
if (options.requiresModuleApiPolyfill) {
plugin = [
return [
require.resolve('babel-plugin-htmlbars-inline-precompile'),

@@ -249,6 +247,8 @@ {

} else {
plugin = [
return [
require.resolve('babel-plugin-ember-template-compilation'),
{
precompile,
// As above, we present the AST transforms in reverse order
transforms: [...pluginInfo.plugins].reverse(),
compilerPath: require.resolve(templateCompilerPath),
enableLegacyModules: [

@@ -263,4 +263,2 @@ 'ember-cli-htmlbars',

}
return plugin;
}

@@ -267,0 +265,0 @@

{
"name": "ember-cli-htmlbars",
"version": "6.1.1",
"version": "6.2.0",
"description": "A library for adding htmlbars to ember CLI",

@@ -36,3 +36,3 @@ "keywords": [

"@ember/edition-utils": "^1.2.0",
"babel-plugin-ember-template-compilation": "^1.0.0",
"babel-plugin-ember-template-compilation": "^2.0.0",
"babel-plugin-htmlbars-inline-precompile": "^5.3.0",

@@ -39,0 +39,0 @@ "broccoli-debug": "^0.6.5",

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