Socket
Socket
Sign inDemoInstall

ember-template-recast

Package Overview
Dependencies
Maintainers
5
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 4.1.1 to 4.1.2

2

bin/ember-template-recast.js

@@ -19,3 +19,3 @@ #!/usr/bin/env node

'determines the number of processes started.',
n => parseInt(n, 10),
(n) => parseInt(n, 10),
Math.max(os.cpus().length - 1, 1)

@@ -22,0 +22,0 @@ )

@@ -0,1 +1,13 @@

## v4.1.2 (2020-04-04)
#### :bug: Bug Fix
* [#251](https://github.com/ember-template-lint/ember-template-recast/pull/251) Fix issue when swapping ElementNode from self closing with attributes to block. ([@rwjblue](https://github.com/rwjblue))
#### :house: Internal
* [#252](https://github.com/ember-template-lint/ember-template-recast/pull/252) Make CI job names easier to read. ([@rwjblue](https://github.com/rwjblue))
#### Committers: 2
- Robert Jackson ([@rwjblue](https://github.com/rwjblue))
- [@dependabot-preview[bot]](https://github.com/apps/dependabot-preview)
## v4.1.1 (2020-02-27)

@@ -2,0 +14,0 @@

{
"name": "ember-template-recast",
"version": "4.1.1",
"version": "4.1.2",
"description": "Non-destructive template transformer.",

@@ -31,6 +31,6 @@ "keywords": [

"dependencies": {
"@glimmer/syntax": "^0.47.9",
"@glimmer/syntax": "^0.50.0",
"async-promise-queue": "^1.0.5",
"colors": "^1.4.0",
"commander": "^4.1.1",
"commander": "^5.0.0",
"globby": "^11.0.0",

@@ -46,11 +46,11 @@ "ora": "^4.0.3",

"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-node": "^11.0.0",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.1.2",
"execa": "^4.0.0",
"lerna-changelog": "^1.0.0",
"prettier": "^1.19.1",
"lerna-changelog": "^1.0.1",
"prettier": "^2.0.2",
"qunit": "^2.9.3",
"release-it": "^12.6.1",
"release-it-lerna-changelog": "^1.0.3"
"release-it": "^13.5.1",
"release-it-lerna-changelog": "^2.1.2"
},

@@ -57,0 +57,0 @@ "engines": {

@@ -282,3 +282,3 @@ const { preprocess, print: _print, traverse } = require('@glimmer/syntax');

nodeInfo.hashSource = ast.hash.pairs
.map(pair => {
.map((pair) => {
return this.print(pair);

@@ -316,3 +316,3 @@ })

}
nodeInfo.paramsSource = ast.params.map(param => this.print(param)).join(joinWith);
nodeInfo.paramsSource = ast.params.map((param) => this.print(param)).join(joinWith);

@@ -340,3 +340,3 @@ if (nodeInfo.hadParams && ast.params.length === 0) {

override: ast => {
override: (ast) => {
if (this.nodeInfo.has(ast)) {

@@ -374,3 +374,3 @@ return this.print(ast);

if (dirtyFields.has('body')) {
bodySource = ast.body.map(node => this.print(node)).join('');
bodySource = ast.body.map((node) => this.print(node)).join('');

@@ -428,3 +428,3 @@ dirtyFields.delete('body');

let openPartsSource = originalOpenParts
.map(part => this.sourceForLoc(part.loc))
.map((part) => this.sourceForLoc(part.loc))
.join(joinOpenPartsWith);

@@ -499,9 +499,16 @@

if (dirtyFields.has('children')) {
childrenSource = ast.children.map(child => this.print(child)).join('');
childrenSource = ast.children.map((child) => this.print(child)).join('');
if (selfClosing) {
closeOpen = `>`;
postTagWhitespace = '';
closeSource = `</${ast.tag}>`;
ast.selfClosing = false;
if (originalOpenParts.length === 0 && postTagWhitespace === ' ') {
postTagWhitespace = '';
}
if (originalOpenParts.length > 0 && postPartsWhitespace === ' ') {
postPartsWhitespace = '';
}
}

@@ -519,3 +526,3 @@

openPartsSource = openParts.map(part => this.print(part)).join(joinOpenPartsWith);
openPartsSource = openParts.map((part) => this.print(part)).join(joinOpenPartsWith);

@@ -638,3 +645,3 @@ if (originalOpenParts.length === 0) {

if (dirtyFields.has('parts')) {
partsSource = ast.parts.map(part => this.print(part)).join('');
partsSource = ast.parts.map((part) => this.print(part)).join('');

@@ -806,3 +813,3 @@ dirtyFields.delete('parts');

if (programDirtyFields.has('body')) {
programSource = ast.program.body.map(child => this.print(child)).join('');
programSource = ast.program.body.map((child) => this.print(child)).join('');

@@ -832,3 +839,3 @@ programDirtyFields.delete('body');

} else {
inverseSource = ast.inverse.body.map(child => this.print(child)).join('');
inverseSource = ast.inverse.body.map((child) => this.print(child)).join('');
}

@@ -835,0 +842,0 @@

@@ -163,6 +163,6 @@ const http = require('http');

transport
.get(url, res =>
res.on('data', data => (contents += data.toString())).on('end', () => resolve(contents))
.get(url, (res) =>
res.on('data', (data) => (contents += data.toString())).on('end', () => resolve(contents))
)
.on('error', err => reject(err));
.on('error', (err) => reject(err));
});

@@ -218,3 +218,3 @@ }

let i = 0;
const worker = queue.async.asyncify(async file => {
const worker = queue.async.asyncify(async (file) => {
const message = await pool.exec('run', [transformPath, file, { dry }]);

@@ -221,0 +221,0 @@

@@ -73,3 +73,3 @@ function sourceForLoc(sourceLines, loc) {

const newArray = [];
array.forEach(a => {
array.forEach((a) => {
if (typeof a !== 'undefined' && a !== null && a !== '') {

@@ -76,0 +76,0 @@ newArray.push(a);

@@ -27,5 +27,5 @@ const fs = require('fs');

return readFile(filePath)
.then(contents => applyTransform(plugin, filePath, contents))
.then(output => writeFile(filePath, output, options))
.then(output => ({
.then((contents) => applyTransform(plugin, filePath, contents))
.then((output) => writeFile(filePath, output, options))
.then((output) => ({
type: 'update',

@@ -35,3 +35,3 @@ file: filePath,

}))
.catch(err => ({
.catch((err) => ({
type: 'error',

@@ -98,3 +98,3 @@ file: filePath,

return new Promise((resolve, reject) => {
fs.writeFile(filePath, source, 'utf8', err => {
fs.writeFile(filePath, source, 'utf8', (err) => {
err ? reject(err) : resolve(output);

@@ -101,0 +101,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