From 4bd243bee3dff6b7c1ea11d03c7769c03045a469 Mon Sep 17 00:00:00 2001 From: Oleh Dokuka <5380167+OlegDokuka@users.noreply.github.com> Date: Fri, 4 Oct 2024 12:20:03 +0300 Subject: [PATCH] add file-source handler (#123) --- build.gradle.kts | 2 +- src/main/java/org/openrewrite/javascript/JavaScriptParser.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index c3f814c6..06027a9c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -12,7 +12,7 @@ dependencies { implementation(platform("org.openrewrite:rewrite-bom:$latest")) implementation("org.openrewrite:rewrite-java") - implementation("org.openrewrite:rewrite-remote-java:latest.integration") { + implementation("org.openrewrite:rewrite-remote-java:$latest") { exclude(group = "org.openrewrite", module = "rewrite-javascript") } diff --git a/src/main/java/org/openrewrite/javascript/JavaScriptParser.java b/src/main/java/org/openrewrite/javascript/JavaScriptParser.java index 56240d6f..fc45f6e1 100644 --- a/src/main/java/org/openrewrite/javascript/JavaScriptParser.java +++ b/src/main/java/org/openrewrite/javascript/JavaScriptParser.java @@ -100,6 +100,7 @@ public Stream parseInputs(Iterable inputs, @Nullable Path rel } else { generator.writeString("parse-javascript-file"); generator.writeString(input.getPath().toString()); + generator.writeString(relativeTo.toString()); } }, parser -> { Tree tree = new ReceiverContext(remotingContext.newReceiver(parser), remotingContext).receiveTree(null);