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

ember-template-recast

Package Overview
Dependencies
Maintainers
7
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.2.1 to 4.3.0

lib/bin.js

9

CHANGELOG.md

@@ -0,1 +1,10 @@

## v4.3.0 (2020-11-04)
#### :rocket: Enhancement
* [#384](https://github.com/ember-template-lint/ember-template-recast/pull/384) Allow passing `filePath` to `transform`. ([@rwjblue](https://github.com/rwjblue))
* [#255](https://github.com/ember-template-lint/ember-template-recast/pull/255) Convert to TypeScript. ([@rwjblue](https://github.com/rwjblue))
#### Committers: 1
- Robert Jackson ([@rwjblue](https://github.com/rwjblue))
## v4.2.1 (2020-10-14)

@@ -2,0 +11,0 @@

45

package.json
{
"name": "ember-template-recast",
"version": "4.2.1",
"version": "4.3.0",
"description": "Non-destructive template transformer.",

@@ -19,18 +19,25 @@ "keywords": [

"files": [
"bin/",
"src/"
"lib/",
"!lib/**/*.test.*"
],
"main": "src/index.js",
"bin": "bin/ember-template-recast.js",
"main": "lib/index.js",
"bin": "lib/bin.js",
"scripts": {
"changelog": "lerna-changelog",
"lint:js": "eslint .",
"build": "tsc",
"lint": "npm-run-all lint:*",
"lint:files": "eslint .",
"lint:tsc": "tsc --noEmit",
"prepare": "tsc",
"release": "release-it",
"test": "jest"
"test": "npm-run-all lint test:*",
"test:jest": "jest"
},
"dependencies": {
"@glimmer/syntax": "^0.62.3",
"@glimmer/reference": "^0.62.4",
"@glimmer/syntax": "^0.62.4",
"@glimmer/validator": "^0.62.4",
"async-promise-queue": "^1.0.5",
"colors": "^1.4.0",
"commander": "^6.1.0",
"commander": "^6.2.0",
"globby": "^11.0.1",

@@ -40,17 +47,25 @@ "ora": "^5.1.0",

"tmp": "^0.2.1",
"workerpool": "^6.0.2"
"workerpool": "^6.0.3"
},
"devDependencies": {
"@types/common-tags": "^1.8.0",
"@types/jest": "^26.0.14",
"@types/workerpool": "^6.0.0",
"@typescript-eslint/eslint-plugin": "^4.3.0",
"@typescript-eslint/parser": "^4.3.0",
"broccoli-test-helper": "^2.0.0",
"common-tags": "^1.8.0",
"eslint": "^7.11.0",
"eslint-config-prettier": "^6.12.0",
"eslint": "^7.12.1",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.1.4",
"execa": "^4.0.3",
"jest": "^26.5.3",
"jest": "^26.6.1",
"lerna-changelog": "^1.0.1",
"npm-run-all": "^4.1.5",
"prettier": "^2.1.2",
"release-it": "^14.1.0",
"release-it-lerna-changelog": "^2.4.0"
"release-it": "14.1.0",
"release-it-lerna-changelog": "^2.4.0",
"ts-jest": "^26.4.1",
"typescript": "^4.0.3"
},

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

@@ -83,11 +83,2 @@ # ember-template-recast

```ts
export interface ASTPluginBuilder {
(env: ASTPluginEnvironment): NodeVisitor;
}
export interface ASTPluginEnvironment {
meta?: any;
syntax: Syntax;
}
export interface Syntax {

@@ -100,6 +91,19 @@ parse: typeof preprocess;

}
export interface TransformPluginEnv {
syntax: Syntax;
contents: string;
filePath?: string;
parseOptions: {
srcName?: string;
};
}
export interface TransformPluginBuilder {
(env: TransformPluginEnv): NodeVisitor;
}
```
The list of known builders on the `env.syntax.builders` are [found
here](https://github.com/glimmerjs/glimmer-vm/blob/v0.50.4/packages/%40glimmer/syntax/lib/builders.ts#L547-L578).
here](https://github.com/glimmerjs/glimmer-vm/blob/v0.62.4/packages/%40glimmer/syntax/lib/builders.ts#L547-L578).

@@ -109,2 +113,3 @@ Example:

const { transform } = require('ember-template-recast');
const template = `

@@ -115,10 +120,14 @@ {{foo-bar

`;
let { code } = transform(template, env => {
let { builders: b } = env.syntax;
return {
MustacheStatement() {
return b.mustache(b.path('wat-wat'));
},
};
let { code } = transform({
template,
plugin(env) {
let { builders: b } = env.syntax;
return {
MustacheStatement() {
return b.mustache(b.path('wat-wat'));
},
};
}
});

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