You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@lezer/javascript

Package Overview
Dependencies
Maintainers
1
Versions
38
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

to
1.4.4

.tern-port

@@ -0,1 +1,9 @@

## 1.4.4 (2023-07-03)
### Bug fixes
Add support for `using` syntax.
Make the package work with new TS resolution styles.
## 1.4.3 (2023-04-24)

@@ -2,0 +10,0 @@

6

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

@@ -8,6 +8,6 @@ "main": "dist/index.cjs",

"exports": {
"import": "./dist/index.es.js",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"module": "dist/index.es.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",

@@ -14,0 +14,0 @@ "author": "Marijn Haverbeke <marijn@haverbeke.berlin>",

@@ -10,3 +10,3 @@ import {nodeResolve} from "@rollup/plugin-node-resolve"

format: "es",
file: "./dist/index.es.js"
file: "./dist/index.js"
}],

@@ -13,0 +13,0 @@ external(id) { return !/^[\.\/]/.test(id) },

// This file was generated by lezer-generator. You probably shouldn't edit it.
export const
noSemi = 302,
noSemi = 303,
incdec = 1,
incdecPrefix = 2,
insertSemi = 303,
spaces = 305,
newline = 306,
insertSemi = 304,
spaces = 306,
newline = 307,
LineComment = 3,

@@ -92,16 +92,16 @@ BlockComment = 4,

VariableDeclaration = 203,
TypeAliasDeclaration = 206,
InterfaceDeclaration = 207,
EnumDeclaration = 209,
NamespaceDeclaration = 212,
AmbientDeclaration = 215,
ExportGroup = 222,
ImportDeclaration = 225,
ImportGroup = 226,
ForSpec = 229,
ForInSpec = 230,
ForOfSpec = 231,
SingleExpression = 266,
SingleClassItem = 267,
TypeAliasDeclaration = 207,
InterfaceDeclaration = 208,
EnumDeclaration = 210,
NamespaceDeclaration = 213,
AmbientDeclaration = 216,
ExportGroup = 223,
ImportDeclaration = 226,
ImportGroup = 227,
ForSpec = 230,
ForInSpec = 231,
ForOfSpec = 232,
SingleExpression = 267,
SingleClassItem = 268,
Dialect_jsx = 0,
Dialect_ts = 1

@@ -6,4 +6,3 @@ /* Hand-written tokenizers for JavaScript tokens that can't be

import {insertSemi, noSemi, incdec, incdecPrefix,
spaces, newline, BlockComment, LineComment,
Dialect_ts} from "./parser.terms.js"
spaces, newline, BlockComment, LineComment} from "./parser.terms.js"

@@ -13,5 +12,3 @@ const space = [9, 10, 11, 12, 13, 32, 133, 160, 5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200,

const braceR = 125, semicolon = 59, slash = 47, star = 42,
plus = 43, minus = 45, backslash = 92,
angleL = 60, angleR = 62, period = 46
const braceR = 125, semicolon = 59, slash = 47, star = 42, plus = 43, minus = 45

@@ -28,3 +25,3 @@ export const trackNewline = new ContextTracker({

let {next} = input
if ((next == braceR || next == -1 || stack.context) && stack.canShift(insertSemi))
if (next == braceR || next == -1 || stack.context)
input.acceptToken(insertSemi)

@@ -37,3 +34,3 @@ }, {contextual: true, fallback: true})

if (next == slash && ((after = input.peek(1)) == slash || after == star)) return
if (next != braceR && next != semicolon && next != -1 && !stack.context && stack.canShift(noSemi))
if (next != braceR && next != semicolon && next != -1 && !stack.context)
input.acceptToken(noSemi)

@@ -40,0 +37,0 @@ }, {contextual: true})

@@ -1,2 +0,2 @@

import {parser} from "../dist/index.es.js"
import {parser} from "../dist/index.js"
import {fileTests} from "@lezer/generator/dist/test"

@@ -6,3 +6,3 @@

import * as path from "path"
import { fileURLToPath } from 'url';
import {fileURLToPath} from "url"
let caseDir = path.dirname(fileURLToPath(import.meta.url))

@@ -9,0 +9,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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