From c68b23264de4c2d3aa2d28fa25dc76c71e5316c7 Mon Sep 17 00:00:00 2001 From: Kevin Jones Date: Thu, 28 Mar 2024 12:41:07 +0000 Subject: [PATCH 1/2] Update JVM packages to io.github.apexdevtools.apexparser --- CHANGELOG.md | 3 ++- .../github/apexdevtools}/apexparser/.gitignore | 0 .../apexparser/CaseInsensitiveInputStream.java | 2 +- .../github/apexdevtools}/apexparser/Check.java | 2 +- .../apexdevtools}/apexparser/ApexLexerTest.java | 2 +- .../apexparser/ApexListenerTest.java | 2 +- .../apexdevtools}/apexparser/ApexParserTest.java | 4 ++-- .../apexdevtools}/apexparser/ApexTriggerTest.java | 4 ++-- .../apexdevtools}/apexparser/ApexVisitorTest.java | 2 +- .../apexdevtools}/apexparser/SOQLParserTest.java | 4 ++-- .../apexdevtools}/apexparser/SOSLParserTest.java | 4 ++-- .../apexparser/SyntaxErrorCounter.java | 2 +- package.json | 15 ++++++--------- 13 files changed, 22 insertions(+), 24 deletions(-) rename jvm/src/main/antlr4/{com/nawforce => io/github/apexdevtools}/apexparser/.gitignore (100%) rename jvm/src/main/java/{com/nawforce => io/github/apexdevtools}/apexparser/CaseInsensitiveInputStream.java (98%) rename jvm/src/main/java/{com/nawforce => io/github/apexdevtools}/apexparser/Check.java (98%) rename jvm/src/test/java/{com/nawforce => io/github/apexdevtools}/apexparser/ApexLexerTest.java (98%) rename jvm/src/test/java/{com/nawforce => io/github/apexdevtools}/apexparser/ApexListenerTest.java (97%) rename jvm/src/test/java/{com/nawforce => io/github/apexdevtools}/apexparser/ApexParserTest.java (98%) rename jvm/src/test/java/{com/nawforce => io/github/apexdevtools}/apexparser/ApexTriggerTest.java (96%) rename jvm/src/test/java/{com/nawforce => io/github/apexdevtools}/apexparser/ApexVisitorTest.java (97%) rename jvm/src/test/java/{com/nawforce => io/github/apexdevtools}/apexparser/SOQLParserTest.java (97%) rename jvm/src/test/java/{com/nawforce => io/github/apexdevtools}/apexparser/SOSLParserTest.java (95%) rename jvm/src/test/java/{com/nawforce => io/github/apexdevtools}/apexparser/SyntaxErrorCounter.java (97%) diff --git a/CHANGELOG.md b/CHANGELOG.md index d95580f..24556ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,10 @@ # apex-parser - Changelog -## 4.0.0 - 2023-03-01 +## 4.0.0 - 2023-03-28 - Correct trigger body parsing to allow member declarations - Add support for TYPEOF in SOQL subqueries +- Change com.nawforce.apexparser packages to io.github.apexdevtools.apexparser ## 3.6.0 - 2024-02-15 diff --git a/jvm/src/main/antlr4/com/nawforce/apexparser/.gitignore b/jvm/src/main/antlr4/io/github/apexdevtools/apexparser/.gitignore similarity index 100% rename from jvm/src/main/antlr4/com/nawforce/apexparser/.gitignore rename to jvm/src/main/antlr4/io/github/apexdevtools/apexparser/.gitignore diff --git a/jvm/src/main/java/com/nawforce/apexparser/CaseInsensitiveInputStream.java b/jvm/src/main/java/io/github/apexdevtools/apexparser/CaseInsensitiveInputStream.java similarity index 98% rename from jvm/src/main/java/com/nawforce/apexparser/CaseInsensitiveInputStream.java rename to jvm/src/main/java/io/github/apexdevtools/apexparser/CaseInsensitiveInputStream.java index cbee4c5..680fe03 100644 --- a/jvm/src/main/java/com/nawforce/apexparser/CaseInsensitiveInputStream.java +++ b/jvm/src/main/java/io/github/apexdevtools/apexparser/CaseInsensitiveInputStream.java @@ -25,7 +25,7 @@ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package com.nawforce.apexparser; +package io.github.apexdevtools.apexparser; import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CharStreams; diff --git a/jvm/src/main/java/com/nawforce/apexparser/Check.java b/jvm/src/main/java/io/github/apexdevtools/apexparser/Check.java similarity index 98% rename from jvm/src/main/java/com/nawforce/apexparser/Check.java rename to jvm/src/main/java/io/github/apexdevtools/apexparser/Check.java index edc8031..c563c94 100644 --- a/jvm/src/main/java/com/nawforce/apexparser/Check.java +++ b/jvm/src/main/java/io/github/apexdevtools/apexparser/Check.java @@ -1,7 +1,7 @@ /* * Copyright (c) 2022 FinancialForce.com, inc. All rights reserved. */ -package com.nawforce.apexparser; +package io.github.apexdevtools.apexparser; import org.antlr.v4.runtime.*; diff --git a/jvm/src/test/java/com/nawforce/apexparser/ApexLexerTest.java b/jvm/src/test/java/io/github/apexdevtools/apexparser/ApexLexerTest.java similarity index 98% rename from jvm/src/test/java/com/nawforce/apexparser/ApexLexerTest.java rename to jvm/src/test/java/io/github/apexdevtools/apexparser/ApexLexerTest.java index f03421d..974cf80 100644 --- a/jvm/src/test/java/com/nawforce/apexparser/ApexLexerTest.java +++ b/jvm/src/test/java/io/github/apexdevtools/apexparser/ApexLexerTest.java @@ -11,7 +11,7 @@ 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. */ -package com.nawforce.apexparser; +package io.github.apexdevtools.apexparser; import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; diff --git a/jvm/src/test/java/com/nawforce/apexparser/ApexListenerTest.java b/jvm/src/test/java/io/github/apexdevtools/apexparser/ApexListenerTest.java similarity index 97% rename from jvm/src/test/java/com/nawforce/apexparser/ApexListenerTest.java rename to jvm/src/test/java/io/github/apexdevtools/apexparser/ApexListenerTest.java index f459912..f5f67eb 100644 --- a/jvm/src/test/java/com/nawforce/apexparser/ApexListenerTest.java +++ b/jvm/src/test/java/io/github/apexdevtools/apexparser/ApexListenerTest.java @@ -11,7 +11,7 @@ 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. */ -package com.nawforce.apexparser; +package io.github.apexdevtools.apexparser; import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; diff --git a/jvm/src/test/java/com/nawforce/apexparser/ApexParserTest.java b/jvm/src/test/java/io/github/apexdevtools/apexparser/ApexParserTest.java similarity index 98% rename from jvm/src/test/java/com/nawforce/apexparser/ApexParserTest.java rename to jvm/src/test/java/io/github/apexdevtools/apexparser/ApexParserTest.java index 8633c03..98e0148 100644 --- a/jvm/src/test/java/com/nawforce/apexparser/ApexParserTest.java +++ b/jvm/src/test/java/io/github/apexdevtools/apexparser/ApexParserTest.java @@ -11,14 +11,14 @@ 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. */ -package com.nawforce.apexparser; +package io.github.apexdevtools.apexparser; import org.junit.jupiter.api.Test; import java.util.List; import java.util.Map; -import static com.nawforce.apexparser.SyntaxErrorCounter.createParser; +import static io.github.apexdevtools.apexparser.SyntaxErrorCounter.createParser; import static org.junit.jupiter.api.Assertions.*; public class ApexParserTest { diff --git a/jvm/src/test/java/com/nawforce/apexparser/ApexTriggerTest.java b/jvm/src/test/java/io/github/apexdevtools/apexparser/ApexTriggerTest.java similarity index 96% rename from jvm/src/test/java/com/nawforce/apexparser/ApexTriggerTest.java rename to jvm/src/test/java/io/github/apexdevtools/apexparser/ApexTriggerTest.java index b42b6a5..a154980 100644 --- a/jvm/src/test/java/com/nawforce/apexparser/ApexTriggerTest.java +++ b/jvm/src/test/java/io/github/apexdevtools/apexparser/ApexTriggerTest.java @@ -11,13 +11,13 @@ 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. */ -package com.nawforce.apexparser; +package io.github.apexdevtools.apexparser; import org.junit.jupiter.api.Test; import java.util.Map; -import static com.nawforce.apexparser.SyntaxErrorCounter.createParser; +import static io.github.apexdevtools.apexparser.SyntaxErrorCounter.createParser; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/jvm/src/test/java/com/nawforce/apexparser/ApexVisitorTest.java b/jvm/src/test/java/io/github/apexdevtools/apexparser/ApexVisitorTest.java similarity index 97% rename from jvm/src/test/java/com/nawforce/apexparser/ApexVisitorTest.java rename to jvm/src/test/java/io/github/apexdevtools/apexparser/ApexVisitorTest.java index e5ae6fb..cf4cd4c 100644 --- a/jvm/src/test/java/com/nawforce/apexparser/ApexVisitorTest.java +++ b/jvm/src/test/java/io/github/apexdevtools/apexparser/ApexVisitorTest.java @@ -11,7 +11,7 @@ 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. */ -package com.nawforce.apexparser; +package io.github.apexdevtools.apexparser; import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; diff --git a/jvm/src/test/java/com/nawforce/apexparser/SOQLParserTest.java b/jvm/src/test/java/io/github/apexdevtools/apexparser/SOQLParserTest.java similarity index 97% rename from jvm/src/test/java/com/nawforce/apexparser/SOQLParserTest.java rename to jvm/src/test/java/io/github/apexdevtools/apexparser/SOQLParserTest.java index 2b4f414..4998b42 100644 --- a/jvm/src/test/java/com/nawforce/apexparser/SOQLParserTest.java +++ b/jvm/src/test/java/io/github/apexdevtools/apexparser/SOQLParserTest.java @@ -11,13 +11,13 @@ 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. */ -package com.nawforce.apexparser; +package io.github.apexdevtools.apexparser; import org.junit.jupiter.api.Test; import java.util.Map; -import static com.nawforce.apexparser.SyntaxErrorCounter.createParser; +import static io.github.apexdevtools.apexparser.SyntaxErrorCounter.createParser; import static org.junit.jupiter.api.Assertions.*; public class SOQLParserTest { diff --git a/jvm/src/test/java/com/nawforce/apexparser/SOSLParserTest.java b/jvm/src/test/java/io/github/apexdevtools/apexparser/SOSLParserTest.java similarity index 95% rename from jvm/src/test/java/com/nawforce/apexparser/SOSLParserTest.java rename to jvm/src/test/java/io/github/apexdevtools/apexparser/SOSLParserTest.java index c4d437f..7d47146 100644 --- a/jvm/src/test/java/com/nawforce/apexparser/SOSLParserTest.java +++ b/jvm/src/test/java/io/github/apexdevtools/apexparser/SOSLParserTest.java @@ -11,13 +11,13 @@ 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. */ -package com.nawforce.apexparser; +package io.github.apexdevtools.apexparser; import org.junit.jupiter.api.Test; import java.util.Map; -import static com.nawforce.apexparser.SyntaxErrorCounter.createParser; +import static io.github.apexdevtools.apexparser.SyntaxErrorCounter.createParser; import static org.junit.jupiter.api.Assertions.*; public class SOSLParserTest { diff --git a/jvm/src/test/java/com/nawforce/apexparser/SyntaxErrorCounter.java b/jvm/src/test/java/io/github/apexdevtools/apexparser/SyntaxErrorCounter.java similarity index 97% rename from jvm/src/test/java/com/nawforce/apexparser/SyntaxErrorCounter.java rename to jvm/src/test/java/io/github/apexdevtools/apexparser/SyntaxErrorCounter.java index 5d89b4b..3bc516d 100644 --- a/jvm/src/test/java/com/nawforce/apexparser/SyntaxErrorCounter.java +++ b/jvm/src/test/java/io/github/apexdevtools/apexparser/SyntaxErrorCounter.java @@ -11,7 +11,7 @@ 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. */ -package com.nawforce.apexparser; +package io.github.apexdevtools.apexparser; import org.antlr.v4.runtime.*; diff --git a/package.json b/package.json index f94424e..fc5bce3 100644 --- a/package.json +++ b/package.json @@ -2,21 +2,18 @@ "name": "apex-parser-init", "private": true, "version": "0.0.1", - "homepage": "https://github.com/nawforce/apex-parser", - "repository": "nawforce/apex-parser", + "homepage": "https://github.com/apex-dev-tools/apex-parser", + "repository": "apex-dev-tools/apex-parser", "scripts": { "build": "npm run build-npm && npm run build-jvm", "build-npm": "npm run init-npm && cd npm && npm run build && npm run test && cd ..", "build-jvm": "npm run init-jvm && cd jvm && mvn package && cd ..", "init-npm": "cp antlr/* npm/antlr && (cd npm; npm ci)", - "init-jvm": "cp antlr/* jvm/src/main/antlr4/com/nawforce/apexparser" - }, - "files": [ - ], - "dependencies": { - }, - "devDependencies": { + "init-jvm": "cp antlr/* jvm/src/main/antlr4/io/github/apexdevtools/apexparser" }, + "files": [], + "dependencies": {}, + "devDependencies": {}, "engines": { "node": ">=8.0.0" } From 7cdf460b6bb01a7897045056f1f25cfde48a3e6f Mon Sep 17 00:00:00 2001 From: Kevin Jones Date: Thu, 28 Mar 2024 16:40:33 +0000 Subject: [PATCH 2/2] Fix Check package for sample tests --- npm/src/__tests__/system/SampleParseSys.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm/src/__tests__/system/SampleParseSys.ts b/npm/src/__tests__/system/SampleParseSys.ts index 4d75874..6a1b980 100644 --- a/npm/src/__tests__/system/SampleParseSys.ts +++ b/npm/src/__tests__/system/SampleParseSys.ts @@ -41,7 +41,7 @@ describe("Parse samples", () => { [ "-cp", "jvm/target/dependency/*:jvm/target/apex-parser.jar", - "com.nawforce.apexparser.Check", + "io.github.apexdevtools.apexparser.Check", resolve(path, r.path) ], {