Skip to content

Conversation

@Pankraz76
Copy link
Contributor

@Pankraz76 Pankraz76 commented Nov 24, 2025

nice to see rewrite also fixing .js stuff as well.

Changes have been made to lib/src/main/resources/com/diffplug/spotless/npm/common-serve.js by:
    org.openrewrite.codemods.ecmascript.5to6.ECMAScript6BestPractices
        org.openrewrite.codemods.ecmascript.5to6.varToLet
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/let.js}
        org.openrewrite.codemods.ecmascript.5to6.amdToEsm
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/amd.js}
        org.openrewrite.codemods.ecmascript.5to6.cjsToEsm
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/cjs.js, codemodArgs=[hoist=true]}
Changes have been made to lib/src/main/resources/com/diffplug/spotless/npm/eslint-serve.js by:
    org.openrewrite.codemods.ecmascript.5to6.ECMAScript6BestPractices
        org.openrewrite.codemods.ecmascript.5to6.cjsToEsm
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/cjs.js, codemodArgs=[hoist=true]}
Changes have been made to lib/src/main/resources/com/diffplug/spotless/npm/prettier-serve.js by:
    org.openrewrite.codemods.ecmascript.5to6.ECMAScript6BestPractices
        org.openrewrite.codemods.ecmascript.5to6.cjsToEsm
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/cjs.js, codemodArgs=[hoist=true]}
Changes have been made to lib/src/main/resources/com/diffplug/spotless/npm/tsfmt-serve.js by:
    org.openrewrite.codemods.ecmascript.5to6.ECMAScript6BestPractices
        org.openrewrite.codemods.ecmascript.5to6.varToLet
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/let.js}
        org.openrewrite.codemods.ecmascript.5to6.cjsToEsm
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/cjs.js, codemodArgs=[hoist=true]}
Please review and commit the results.
Estimate time saved: 20m

Changes have been made to lib/src/main/resources/com/diffplug/spotless/npm/common-serve.js by:
    org.openrewrite.codemods.ecmascript.5to6.ECMAScript6BestPractices
        org.openrewrite.codemods.ecmascript.5to6.varToLet
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/let.js}
        org.openrewrite.codemods.ecmascript.5to6.amdToEsm
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/amd.js}
        org.openrewrite.codemods.ecmascript.5to6.cjsToEsm
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/cjs.js, codemodArgs=[hoist=true]}
Changes have been made to lib/src/main/resources/com/diffplug/spotless/npm/eslint-serve.js by:
    org.openrewrite.codemods.ecmascript.5to6.ECMAScript6BestPractices
        org.openrewrite.codemods.ecmascript.5to6.cjsToEsm
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/cjs.js, codemodArgs=[hoist=true]}
Changes have been made to lib/src/main/resources/com/diffplug/spotless/npm/prettier-serve.js by:
    org.openrewrite.codemods.ecmascript.5to6.ECMAScript6BestPractices
        org.openrewrite.codemods.ecmascript.5to6.cjsToEsm
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/cjs.js, codemodArgs=[hoist=true]}
Changes have been made to lib/src/main/resources/com/diffplug/spotless/npm/tsfmt-serve.js by:
    org.openrewrite.codemods.ecmascript.5to6.ECMAScript6BestPractices
        org.openrewrite.codemods.ecmascript.5to6.varToLet
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/let.js}
        org.openrewrite.codemods.ecmascript.5to6.cjsToEsm
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/cjs.js, codemodArgs=[hoist=true]}
Please review and commit the results.
Estimate time saved: 20m

Signed-off-by: Vincent Potucek <vpotucek@me.com>
@Pankraz76 Pankraz76 force-pushed the fix-ECMAScript6BestPractices branch from 9fdd689 to dedb8c8 Compare November 24, 2025 10:31
const debug_serve = false; // set to true for debug log output in node process
const shutdownServer = require("http-graceful-shutdown");
const express = require("express");
// this file will be glued to the top of the specific xy-serve.js file
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moving here as its a bug to rewrite.

endless copying the comment every run:

// this file will be glued to the top of the specific xy-serve.js file
// this file will be glued to the top of the specific xy-serve.js file
// this file will be glued to the top of the specific xy-serve.js file
// this file will be glued to the top of the specific xy-serve.js file

Vincent Potucek added 3 commits November 24, 2025 13:46
Changes have been made to lib/src/main/resources/com/diffplug/spotless/npm/common-serve.js by:
    org.openrewrite.codemods.ecmascript.5to6.ECMAScript6BestPractices
        org.openrewrite.codemods.ecmascript.5to6.varToLet
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/let.js}
        org.openrewrite.codemods.ecmascript.5to6.amdToEsm
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/amd.js}
        org.openrewrite.codemods.ecmascript.5to6.cjsToEsm
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/cjs.js, codemodArgs=[hoist=true]}
Changes have been made to lib/src/main/resources/com/diffplug/spotless/npm/eslint-serve.js by:
    org.openrewrite.codemods.ecmascript.5to6.ECMAScript6BestPractices
        org.openrewrite.codemods.ecmascript.5to6.cjsToEsm
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/cjs.js, codemodArgs=[hoist=true]}
Changes have been made to lib/src/main/resources/com/diffplug/spotless/npm/prettier-serve.js by:
    org.openrewrite.codemods.ecmascript.5to6.ECMAScript6BestPractices
        org.openrewrite.codemods.ecmascript.5to6.cjsToEsm
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/cjs.js, codemodArgs=[hoist=true]}
Changes have been made to lib/src/main/resources/com/diffplug/spotless/npm/tsfmt-serve.js by:
    org.openrewrite.codemods.ecmascript.5to6.ECMAScript6BestPractices
        org.openrewrite.codemods.ecmascript.5to6.varToLet
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/let.js}
        org.openrewrite.codemods.ecmascript.5to6.cjsToEsm
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/cjs.js, codemodArgs=[hoist=true]}
Please review and commit the results.
Estimate time saved: 20m

Signed-off-by: Vincent Potucek <vpotucek@me.com>
Changes have been made to lib/src/main/resources/com/diffplug/spotless/npm/common-serve.js by:
    org.openrewrite.codemods.ecmascript.5to6.ECMAScript6BestPractices
        org.openrewrite.codemods.ecmascript.5to6.varToLet
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/let.js}
        org.openrewrite.codemods.ecmascript.5to6.amdToEsm
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/amd.js}
        org.openrewrite.codemods.ecmascript.5to6.cjsToEsm
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/cjs.js, codemodArgs=[hoist=true]}
Changes have been made to lib/src/main/resources/com/diffplug/spotless/npm/eslint-serve.js by:
    org.openrewrite.codemods.ecmascript.5to6.ECMAScript6BestPractices
        org.openrewrite.codemods.ecmascript.5to6.cjsToEsm
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/cjs.js, codemodArgs=[hoist=true]}
Changes have been made to lib/src/main/resources/com/diffplug/spotless/npm/prettier-serve.js by:
    org.openrewrite.codemods.ecmascript.5to6.ECMAScript6BestPractices
        org.openrewrite.codemods.ecmascript.5to6.cjsToEsm
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/cjs.js, codemodArgs=[hoist=true]}
Changes have been made to lib/src/main/resources/com/diffplug/spotless/npm/tsfmt-serve.js by:
    org.openrewrite.codemods.ecmascript.5to6.ECMAScript6BestPractices
        org.openrewrite.codemods.ecmascript.5to6.varToLet
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/let.js}
        org.openrewrite.codemods.ecmascript.5to6.cjsToEsm
            org.openrewrite.codemods.ApplyCodemod: {transform=5to6-codemod/transforms/cjs.js, codemodArgs=[hoist=true]}
Please review and commit the results.
Estimate time saved: 20m

Signed-off-by: Vincent Potucek <vpotucek@me.com>
@Pankraz76
Copy link
Contributor Author

might be IO-flaky CI:

5-11-24 13:02:31] Identified 17.0.17 as the newest version of Java supported by the version of Gradle in use. The system default of 17.0.17 is compatible with this.
  [2025-11-24 13:02:31] [autobuild] > ./gradlew --no-daemon -S -Dorg.gradle.dependency.verification=off -Dorg.gradle.warning.mode=none --init-script "/tmp/semmleTempDir11433629524650825132/init.gradle" clean
  [2025-11-24 13:02:31] [autobuild] Picked up JAVA_TOOL_OPTIONS:  -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false
  [2025-11-24 13:02:32] [autobuild] Downloading https://services.gradle.org/distributions/gradle-9.2.1-bin.zip
  [2025-11-24 13:02:37] [autobuild] Exception in thread "main" java.io.IOException: Server returned HTTP response code: 503 for URL: https://services.gradle.org/distributions/gradle-9.2.1-bin.zip
  [2025-11-24 13:02:37] [autobuild] 	at org.gradle.wrapper.Install.forceFetch(SourceFile:2)
  [2025-11-24 13:02:37] [autobuild] 	at org.gradle.wrapper.Install$1.call(SourceFile:8)
  [2025-11-24 13:02:37] [autobuild] 	at org.gradle.wrapper.GradleWrapperMain.main(SourceFile:67)
  Error: 1-24 13:02:37] [ERROR] Spawned process exited abnormally (code 1; tried to run: [./gradlew, --no-daemon, -S, -Dorg.gradle.dependency.verification=off, -Dorg.gradle.warning.mode=none, --init-script, /tmp/semmleTempDir11433629524650825132/init.gradle, clean])
  Error: We were unable to automatically build your code. Please replace the call to the autobuild action with your custom build steps. Encountered a fatal error while running "/opt/hostedtoolcache/CodeQL/2.23.5/x64/codeql/java/tools/autobuild.sh". Exit code was 1 and last log line was: Picked up JAVA_TOOL_OPTIONS:  -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false. See the logs for more details.

public class NpmTestsWithDynamicallyInstalledNpmInstallationTest extends MavenIntegrationHarness {

@Test
@Disabled
Copy link
Contributor Author

@Pankraz76 Pankraz76 Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this one failing, please?

item:

  at app//com.diffplug.gradle.spotless.NpmTestsWithoutNpmInstallationTest.useNpmFromNodeGradlePlugin_example2(NpmTestsWithoutNpmInstallationTest.java:94)

@Pankraz76
Copy link
Contributor Author

consider reopen.

@Pankraz76 Pankraz76 closed this Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant