babel-plugin-htmlbars-inline-precompile
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -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 @@ |
@@ -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( |
{ | ||
"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 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37153
490