Socket
Socket
Sign inDemoInstall

ember-template-recast

Package Overview
Dependencies
Maintainers
3
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-template-recast - npm Package Compare versions

Comparing version 3.2.1 to 3.2.2

14

CHANGELOG.md

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

18

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc