Socket
Socket
Sign inDemoInstall

ember-cli-htmlbars

Package Overview
Dependencies
4
Maintainers
2
Versions
112
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

test/fixtures/template-with-bom.hbs

3

index.js

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

var stringify = require('json-stable-stringify');
var stripBom = require('strip-bom');

@@ -68,3 +69,3 @@ function TemplateCompiler (inputTree, _options) {

TemplateCompiler.prototype.processString = function (string, relativePath) {
return 'export default ' + utils.template(this.options.templateCompiler, string, {
return 'export default ' + utils.template(this.options.templateCompiler, stripBom(string), {
moduleName: relativePath

@@ -71,0 +72,0 @@ }) + ';';

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

@@ -38,4 +38,5 @@ "main": "index.js",

"ember-cli-version-checker": "^1.0.2",
"json-stable-stringify": "^1.0.0"
"json-stable-stringify": "^1.0.0",
"strip-bom": "^2.0.0"
}
}

@@ -42,2 +42,15 @@ 'use strict';

it('ignores utf-8 byte order marks', function(){
var tree = templateCompilerFilter(sourcePath, htmlbarsOptions);
builder = new broccoli.Builder(tree);
return builder.build().then(function(results) {
var actual = fs.readFileSync(results.directory + '/template-with-bom.js', { encoding: 'utf8'});
var source = fs.readFileSync(sourcePath + '/template.hbs', { encoding: 'utf8' });
var expected = 'export default Ember.HTMLBars.template(' + htmlbarsPrecompile(source, { moduleName: 'template-with-bom.hbs' }) + ');';
assert.equal(actual,expected,'They dont match!');
});
});
it('passes FEATURES to compiler when provided as `FEATURES` [DEPRECATED]', function(){

@@ -44,0 +57,0 @@ htmlbarsOptions.FEATURES = {

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc