Socket
Socket
Sign inDemoInstall

ember-template-imports

Package Overview
Dependencies
Maintainers
3
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-template-imports - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

9

CHANGELOG.md

@@ -0,1 +1,10 @@

## v1.1.1 (2021-03-25)
#### :bug: Bug Fix
* [#16](https://github.com/ember-template-imports/ember-template-imports/pull/16) Make getting the template compiler path lazy ([@pzuraq](https://github.com/pzuraq))
#### Committers: 1
- Chris Garrett ([@pzuraq](https://github.com/pzuraq))
## v1.1.0 (2021-03-25)

@@ -2,0 +11,0 @@

13

index.js

@@ -45,2 +45,6 @@ 'use strict';

};
this.templateCompilerPath = this.parent.addons
.find((a) => a.name === 'ember-cli-htmlbars')
.templateCompilerPath();
},

@@ -58,10 +62,9 @@

if (type === 'parent') {
let templateCompilerPath = this.parent.addons
.find((a) => a.name === 'ember-cli-htmlbars')
.templateCompilerPath();
let TemplateImportPreprocessor = require('./lib/preprocessor-plugin');
registry.add('js', new TemplateImportPreprocessor(templateCompilerPath));
registry.add(
'js',
new TemplateImportPreprocessor(() => this.templateCompilerPath)
);
}
},
};

@@ -8,3 +8,3 @@ const stew = require('broccoli-stew');

constructor(
templateCompilerPath,
getTemplateCompilerPath,
importIdentifier = 'hbs',

@@ -16,5 +16,5 @@ importPath = 'ember-template-imports',

this.name = 'template-imports-preprocessor';
this.getTemplateCompilerPath = getTemplateCompilerPath;
this.templateTagConfig = {
getTemplateLocalsRequirePath: templateCompilerPath,
getTemplateLocalsExportPath: '_GlimmerSyntax.getTemplateLocals',

@@ -30,3 +30,2 @@

this.templateLiteralConfig = {
getTemplateLocalsRequirePath: templateCompilerPath,
getTemplateLocalsExportPath: '_GlimmerSyntax.getTemplateLocals',

@@ -47,13 +46,14 @@

(string, relativePath) => {
let config = {
relativePath,
getTemplateLocalsRequirePath: this.getTemplateCompilerPath(),
};
if (relativePath.match(/\.(gjs|gts)$/)) {
return preprocessEmbeddedTemplates(
string,
Object.assign({ relativePath }, this.templateTagConfig)
).output;
Object.assign(config, this.templateTagConfig);
} else {
return preprocessEmbeddedTemplates(
string,
Object.assign({ relativePath }, this.templateLiteralConfig)
).output;
Object.assign(config, this.templateLiteralConfig);
}
return preprocessEmbeddedTemplates(string, config).output;
}

@@ -60,0 +60,0 @@ );

{
"name": "ember-template-imports",
"version": "1.1.0",
"version": "1.1.1",
"description": "The default blueprint for ember-cli addons.",

@@ -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