Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More β†’
Socket
Sign inDemoInstall
Socket

babel-plugin-htmlbars-inline-precompile

Package Overview
Dependencies
Maintainers
5
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-htmlbars-inline-precompile - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

19

__tests__/tests.js

@@ -90,2 +90,21 @@ 'use strict';

it('escapes any */ included in the template string', function() {
let transformed = transform(stripIndent`
import hbs from 'htmlbars-inline-precompile';
if ('foo') {
const template = hbs\`hello */\`;
}
`);
expect(transformed).toEqual(stripIndent`
if ('foo') {
const template = Ember.HTMLBars.template(
/*
hello *\\/
*/
"precompiled(hello */)");
}
`);
});
it('passes options when used as a tagged template string', function() {

@@ -92,0 +111,0 @@ let source = 'hello';

@@ -0,1 +1,9 @@

## v3.0.1 (2019-12-11)
#### :bug: Bug Fix
* [#134](https://github.com/ember-cli/babel-plugin-htmlbars-inline-precompile/pull/134) Ensure `*/` included in a template does break surrounding JS. ([@rwjblue](https://github.com/rwjblue))
#### Committers: 1
- Robert Jackson ([@rwjblue](https://github.com/rwjblue))
## v3.0.0 (2019-10-01)

@@ -2,0 +10,0 @@

7

index.js

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

t.addComment(templateExpression, 'leading', `\n ${template}\n`, /* line comment? */ false);
t.addComment(
templateExpression,
'leading',
`\n ${template.replace(/\*\//g, '*\\/')}\n`,
/* line comment? */ false
);

@@ -99,0 +104,0 @@ return t.callExpression(

18

package.json
{
"name": "babel-plugin-htmlbars-inline-precompile",
"version": "3.0.0",
"version": "3.0.1",
"description": "Babel plugin to replace tagged template strings with precompiled HTMLBars templates",

@@ -18,14 +18,14 @@ "repository": "https://github.com/ember-cli/babel-plugin-htmlbars-inline-precompile",

"devDependencies": {
"@babel/core": "^7.6.2",
"@babel/plugin-transform-modules-amd": "^7.5.0",
"@babel/plugin-transform-template-literals": "^7.4.4",
"@babel/core": "^7.7.5",
"@babel/plugin-transform-modules-amd": "^7.7.5",
"@babel/plugin-transform-template-literals": "^7.7.4",
"common-tags": "^1.8.0",
"ember-source": "^3.13.2",
"eslint": "^6.5.0",
"eslint-config-prettier": "^6.3.0",
"ember-source": "^3.15.0",
"eslint": "^6.7.2",
"eslint-config-prettier": "^6.7.0",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-prettier": "^3.1.1",
"jest": "^24.9.0",
"prettier": "^1.18.2",
"release-it": "^12.4.1",
"prettier": "^1.19.1",
"release-it": "^12.4.3",
"release-it-lerna-changelog": "^1.0.3"

@@ -32,0 +32,0 @@ },

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