ember-template-recast
Advanced tools
Comparing version 3.2.1 to 3.2.2
@@ -0,1 +1,15 @@ | ||
## v3.2.2 (2019-10-11) | ||
#### :bug: Bug Fix | ||
* [#137](https://github.com/ember-template-lint/ember-template-recast/pull/137) Ensure AttrNode and HashPair values are preserved if changing name/key. ([@rwjblue](https://github.com/rwjblue)) | ||
* [#136](https://github.com/ember-template-lint/ember-template-recast/pull/136) Fix issues with adding to a `ConcatStatement` ([@rwjblue](https://github.com/rwjblue)) | ||
* [#135](https://github.com/ember-template-lint/ember-template-recast/pull/135) Ensure `TextNode`s are quoted in `AttrNode.value` ([@rwjblue](https://github.com/rwjblue)) | ||
#### :house: Internal | ||
* [#134](https://github.com/ember-template-lint/ember-template-recast/pull/134) package.json: Add more metadata ([@Turbo87](https://github.com/Turbo87)) | ||
#### Committers: 2 | ||
- Robert Jackson ([@rwjblue](https://github.com/rwjblue)) | ||
- Tobias Bieniek ([@Turbo87](https://github.com/Turbo87)) | ||
## v3.2.1 (2019-10-10) | ||
@@ -2,0 +16,0 @@ |
{ | ||
"name": "ember-template-recast", | ||
"version": "3.2.1", | ||
"version": "3.2.2", | ||
"description": "Non-destructive template transformer.", | ||
"keywords": [ | ||
"codemod", | ||
"ember", | ||
"glimmer", | ||
"handlebars", | ||
"recast", | ||
"templates" | ||
], | ||
"homepage": "https://github.com/ember-template-lint/ember-template-recast", | ||
"bugs": "https://github.com/ember-template-lint/ember-template-recast/issues", | ||
"repository": "github:ember-template-lint/ember-template-recast", | ||
"license": "MIT", | ||
@@ -20,3 +31,3 @@ "author": "Robert Jackson <me@rwjblue.com>", | ||
"dependencies": { | ||
"@glimmer/syntax": "^0.42.0", | ||
"@glimmer/syntax": "^0.42.2", | ||
"async-promise-queue": "^1.0.5", | ||
@@ -71,6 +82,3 @@ "colors": "^1.3.3", | ||
} | ||
}, | ||
"resolutions": { | ||
"handlebars": "4.1.2" | ||
} | ||
} |
@@ -829,5 +829,4 @@ const { preprocess, print: _print, traverse } = require('@glimmer/syntax'); | ||
let { source } = nodeInfo; | ||
let [, keySource, postKeyWhitespace, postEqualsWhitespace, valueSource] = source.match( | ||
hashPairParts | ||
); | ||
let [, keySource, postKeyWhitespace, postEqualsWhitespace] = source.match(hashPairParts); | ||
let valueSource = this.sourceForLoc(original.value.loc); | ||
@@ -852,11 +851,11 @@ if (dirtyFields.has('key')) { | ||
let { source } = nodeInfo; | ||
let [ | ||
, | ||
nameSource, | ||
postNameWhitespace, | ||
equals, | ||
postEqualsWhitespace, | ||
valueSource, | ||
] = source.match(attrNodeParts); | ||
let [, nameSource, postNameWhitespace, equals, postEqualsWhitespace] = source.match( | ||
attrNodeParts | ||
); | ||
let valueSource = this.sourceForLoc(original.value.loc); | ||
// does not include ConcatStatement because `_print` automatically | ||
// adds a `"` around them, meaning we do not need to add our own quotes | ||
let wasQuotableValue = original.value.type === 'TextNode'; | ||
let openQuote = ''; | ||
@@ -883,2 +882,9 @@ let closeQuote = ''; | ||
if (dirtyFields.has('value')) { | ||
let newValueNeedsQuotes = ast.value.type === 'TextNode'; | ||
if (!wasQuotableValue && newValueNeedsQuotes) { | ||
openQuote = '"'; | ||
closeQuote = '"'; | ||
} | ||
valueSource = this.print(ast.value); | ||
@@ -885,0 +891,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
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
57873
1231
0
Updated@glimmer/syntax@^0.42.2