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

@lezer/javascript

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lezer/javascript - npm Package Compare versions

Comparing version 1.4.14 to 1.4.15

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 1.4.15 (2024-04-23)
### Bug fixes
Add support for `new.target` syntax.
## 1.4.14 (2024-03-30)

@@ -2,0 +8,0 @@

2

package.json
{
"name": "@lezer/javascript",
"version": "1.4.14",
"version": "1.4.15",
"description": "lezer-based JavaScript grammar",

@@ -5,0 +5,0 @@ "main": "dist/index.cjs",

// This file was generated by lezer-generator. You probably shouldn't edit it.
export const
noSemi = 309,
noSemi = 310,
incdec = 1,
incdecPrefix = 2,
JSXStartTag = 3,
insertSemi = 310,
spaces = 312,
newline = 313,
insertSemi = 311,
spaces = 313,
newline = 314,
LineComment = 4,

@@ -53,121 +53,121 @@ BlockComment = 5,

Block = 65,
_new = 194,
TypeArgList = 69,
LessThan = 70,
ArgList = 74,
UnaryExpression = 75,
_delete = 76,
YieldExpression = 79,
_yield = 80,
AwaitExpression = 81,
_await = 82,
ParenthesizedExpression = 83,
ClassExpression = 84,
_class = 85,
ClassBody = 86,
MethodDeclaration = 87,
Decorator = 88,
PrivatePropertyName = 91,
declare = 219,
Privacy = 113,
_static = 95,
abstract = 202,
override = 97,
PrivatePropertyDefinition = 98,
PropertyDeclaration = 99,
readonly = 114,
accessor = 101,
Optional = 102,
TypeAnnotation = 103,
StaticBlock = 105,
FunctionExpression = 106,
ArrowFunction = 107,
ParamList = 109,
ArrayPattern = 110,
ObjectPattern = 111,
PatternProperty = 112,
MemberExpression = 116,
BinaryExpression = 117,
divide = 119,
_instanceof = 124,
satisfies = 125,
_in = 126,
_const = 127,
questionOp = 135,
AssignmentExpression = 137,
_import = 143,
JSXElement = 145,
JSXSelfCloseEndTag = 146,
JSXSelfClosingTag = 147,
JSXIdentifier = 148,
JSXLowerIdentifier = 150,
JSXNamespacedName = 151,
JSXMemberExpression = 152,
JSXAttributeValue = 155,
JSXEndTag = 157,
JSXOpenTag = 158,
JSXFragmentTag = 159,
JSXText = 160,
JSXEscape = 161,
JSXStartCloseTag = 162,
JSXCloseTag = 163,
SequenceExpression = 167,
keyof = 169,
unique = 171,
infer = 174,
TypeName = 175,
ParamTypeList = 178,
IndexedType = 180,
Label = 182,
ObjectType = 185,
MethodType = 186,
PropertyType = 187,
IndexSignature = 188,
TypePredicate = 191,
is = 192,
unionOp = 196,
intersectionOp = 198,
ClassDeclaration = 201,
_implements = 203,
type = 204,
VariableDeclaration = 205,
_let = 206,
_var = 207,
using = 208,
TypeAliasDeclaration = 209,
InterfaceDeclaration = 210,
_interface = 211,
EnumDeclaration = 212,
_enum = 213,
NamespaceDeclaration = 215,
namespace = 216,
module = 217,
AmbientDeclaration = 218,
global = 221,
ExportGroup = 225,
ImportDeclaration = 228,
ImportGroup = 229,
_for = 231,
ForSpec = 232,
ForInSpec = 233,
ForOfSpec = 234,
of = 235,
_while = 237,
_with = 239,
_do = 241,
_if = 243,
_else = 244,
_switch = 246,
_case = 249,
_try = 252,
_catch = 254,
_finally = 256,
_return = 258,
_throw = 260,
_break = 262,
_continue = 264,
_debugger = 266,
SingleExpression = 269,
SingleClassItem = 270,
_new = 195,
TypeArgList = 70,
LessThan = 71,
ArgList = 75,
UnaryExpression = 76,
_delete = 77,
YieldExpression = 80,
_yield = 81,
AwaitExpression = 82,
_await = 83,
ParenthesizedExpression = 84,
ClassExpression = 85,
_class = 86,
ClassBody = 87,
MethodDeclaration = 88,
Decorator = 89,
PrivatePropertyName = 92,
declare = 220,
Privacy = 114,
_static = 96,
abstract = 203,
override = 98,
PrivatePropertyDefinition = 99,
PropertyDeclaration = 100,
readonly = 115,
accessor = 102,
Optional = 103,
TypeAnnotation = 104,
StaticBlock = 106,
FunctionExpression = 107,
ArrowFunction = 108,
ParamList = 110,
ArrayPattern = 111,
ObjectPattern = 112,
PatternProperty = 113,
MemberExpression = 117,
BinaryExpression = 118,
divide = 120,
_instanceof = 125,
satisfies = 126,
_in = 127,
_const = 128,
questionOp = 136,
AssignmentExpression = 138,
_import = 144,
JSXElement = 146,
JSXSelfCloseEndTag = 147,
JSXSelfClosingTag = 148,
JSXIdentifier = 149,
JSXLowerIdentifier = 151,
JSXNamespacedName = 152,
JSXMemberExpression = 153,
JSXAttributeValue = 156,
JSXEndTag = 158,
JSXOpenTag = 159,
JSXFragmentTag = 160,
JSXText = 161,
JSXEscape = 162,
JSXStartCloseTag = 163,
JSXCloseTag = 164,
SequenceExpression = 168,
keyof = 170,
unique = 172,
infer = 175,
TypeName = 176,
ParamTypeList = 179,
IndexedType = 181,
Label = 183,
ObjectType = 186,
MethodType = 187,
PropertyType = 188,
IndexSignature = 189,
TypePredicate = 192,
is = 193,
unionOp = 197,
intersectionOp = 199,
ClassDeclaration = 202,
_implements = 204,
type = 205,
VariableDeclaration = 206,
_let = 207,
_var = 208,
using = 209,
TypeAliasDeclaration = 210,
InterfaceDeclaration = 211,
_interface = 212,
EnumDeclaration = 213,
_enum = 214,
NamespaceDeclaration = 216,
namespace = 217,
module = 218,
AmbientDeclaration = 219,
global = 222,
ExportGroup = 226,
ImportDeclaration = 229,
ImportGroup = 230,
_for = 232,
ForSpec = 233,
ForInSpec = 234,
ForOfSpec = 235,
of = 236,
_while = 238,
_with = 240,
_do = 242,
_if = 244,
_else = 245,
_switch = 247,
_case = 250,
_try = 253,
_catch = 255,
_finally = 257,
_return = 259,
_throw = 261,
_break = 263,
_continue = 265,
_debugger = 267,
SingleExpression = 270,
SingleClassItem = 271,
Dialect_jsx = 0,
Dialect_ts = 1

@@ -386,1 +386,16 @@ # Variable declaration

Script(Hashbang,ExpressionStatement(CallExpression(VariableName,ArgList)))
# new.target
function MyObj() {
if (!new.target) {
throw new Error('Must construct MyObj with new');
}
}
==>
Script(
FunctionDeclaration(function,VariableDefinition,ParamList,Block(
IfStatement(if,ParenthesizedExpression(UnaryExpression(LogicOp,NewTarget(new,PropertyName))), Block(
ThrowStatement(throw,NewExpression(new,VariableName,ArgList(String))))))))

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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