From ec9339de9c7ef92d1eb301d2627215988ec74aeb Mon Sep 17 00:00:00 2001 From: Mike Lischke Date: Sat, 10 Feb 2024 14:25:42 +0100 Subject: [PATCH] Revert changes for removing the node_modules folder from the extension Close #242 Visual parse tree not showing for version 2.4.5 Signed-off-by: Mike Lischke --- .vscodeignore | 2 -- build/copyFiles.cjs | 13 ------------- cspell.json | 2 ++ package-lock.json | 4 ++-- package.json | 2 +- src/backend/SourceContext.ts | 3 ++- 6 files changed, 7 insertions(+), 19 deletions(-) delete mode 100644 build/copyFiles.cjs diff --git a/.vscodeignore b/.vscodeignore index 3aad4d8..5bd4a3e 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -9,9 +9,7 @@ images/ grammars/ doc/ coverage/ -node_modules/ **/*.map -build/ cspell.json jest.config.js diff --git a/build/copyFiles.cjs b/build/copyFiles.cjs deleted file mode 100644 index 6f36b14..0000000 --- a/build/copyFiles.cjs +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (c) Mike Lischke. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - */ - -const fs = require("fs"); - -const source = "node_modules/antlr4ng-cli/antlr4-4.13.2-SNAPSHOT-complete.jar"; -const target = "out/antlr4-4.13.2-SNAPSHOT-complete.jar"; - -if (!fs.existsSync(target)) { - fs.copyFileSync(source, target); -} diff --git a/cspell.json b/cspell.json index 6817514..c8b9fc5 100644 --- a/cspell.json +++ b/cspell.json @@ -110,11 +110,13 @@ "codicon", "codicons", "coloncolon", + "customcss", "darkgray", "debugprotocol", "dlanguage", "eval", "fullwidth", + "graps", "halfwidth", "idarray", "interp", diff --git a/package-lock.json b/package-lock.json index ff7aa17..8827a26 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "vscode-antlr4", - "version": "2.4.4", + "version": "2.4.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "vscode-antlr4", - "version": "2.4.4", + "version": "2.4.5", "license": "SEE LICENSE IN License.txt", "dependencies": { "@unicode/unicode-11.0.0": "1.5.2", diff --git a/package.json b/package.json index 56ac170..c457f90 100644 --- a/package.json +++ b/package.json @@ -587,7 +587,7 @@ "test": "node --no-warnings --experimental-vm-modules node_modules/jest/bin/jest.js --no-coverage", "generate": "antlr4ng -Dlanguage=TypeScript -visitor -Xexact-output-dir grammars/LexBasic.g4 grammars/ANTLRv4Lexer.g4 grammars/ANTLRv4Parser.g4 -o src/parser", "lint": "eslint \"./src/**/*.ts\"", - "build": "tsc -b && esbuild ./src/extension.ts --bundle --outfile=out/main.cjs --external:vscode --format=cjs --platform=node --sourcemap=external --loader:.svg=file && node build/copyFiles.cjs", + "build": "tsc -b && esbuild ./src/extension.ts --bundle --outfile=out/main.cjs --external:vscode --format=cjs --platform=node --sourcemap=external --loader:.svg=file", "build-watch": "npm run build -- --sourcemap --watch" }, "dependencies": { diff --git a/src/backend/SourceContext.ts b/src/backend/SourceContext.ts index cb72881..ea0c1ce 100644 --- a/src/backend/SourceContext.ts +++ b/src/backend/SourceContext.ts @@ -1065,7 +1065,8 @@ export class SourceContext { if (options.alternativeJar) { parameters.push(options.alternativeJar); } else { - parameters.push(path.join(this.extensionDir, "out/antlr4-4.13.2-SNAPSHOT-complete.jar")); + parameters.push(path.join(this.extensionDir, + "node_modules/antlr4ng-cli/antlr4-4.13.2-SNAPSHOT-complete.jar")); } if (options.language) {