You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

angular-estree-parser

Package Overview
Dependencies
Maintainers
3
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-estree-parser - npm Package Compare versions

Comparing version

to
11.1.1

22

lib/transform-node.js

@@ -356,20 +356,8 @@ import * as angular from '@angular/compiler';

if (node instanceof angular.TemplateLiteralElement) {
const templateLiteral = options.parent;
const elementIndex = templateLiteral.elements.indexOf(node);
const { elements } = options.parent;
const elementIndex = elements.indexOf(node);
const isFirst = elementIndex === 0;
const isLast = elementIndex === templateLiteral.elements.length - 1;
// The `TemplateLiteralElement` don't have correct location information
const start = isFirst
? templateLiteral.sourceSpan.start + 1
: node.sourceSpan.start;
let end;
if (isLast) {
end = templateLiteral.sourceSpan.end - 1;
}
else {
const nextExpression = templateLiteral.expressions[elementIndex];
// TODO: Support search multiple characters in `getCharacterLastIndex()`
// FIXME: Search `${` instead
end = this.getCharacterLastIndex('$', nextExpression.sourceSpan.start);
}
const isLast = elementIndex === elements.length - 1;
const end = node.sourceSpan.end - (isLast ? 1 : 0);
const start = node.sourceSpan.start + (isFirst ? 1 : 0);
const raw = this.text.slice(start, end);

@@ -376,0 +364,0 @@ return this.#create({

{
"name": "angular-estree-parser",
"version": "11.1.0",
"version": "11.1.1",
"description": "A parser that converts Angular source code into an ESTree-compatible form",

@@ -30,6 +30,6 @@ "keywords": [],

"devDependencies": {
"@angular/compiler": "19.2.1",
"@angular/compiler": "19.2.2",
"@babel/code-frame": "7.26.2",
"@babel/parser": "7.26.9",
"@babel/types": "7.26.9",
"@babel/parser": "7.26.10",
"@babel/types": "7.26.10",
"@types/babel__code-frame": "7.0.6",

@@ -54,3 +54,3 @@ "@types/node": "22.13.10",

"peerDependencies": {
"@angular/compiler": "^19.0.0"
"@angular/compiler": ">=19.2.2"
},

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