Skip to content

Upgrade Spotless to fix npm compatibility - #12003

Open
dhruv9b wants to merge 1 commit into
testcontainers:mainfrom
dhruv9b:fix/11997-spotless-npm
Open

Upgrade Spotless to fix npm compatibility#12003
dhruv9b wants to merge 1 commit into
testcontainers:mainfrom
dhruv9b:fix/11997-spotless-npm

Conversation

@dhruv9b

@dhruv9b dhruv9b commented Aug 31, 2026

Copy link
Copy Markdown

Description

This pull request fixes the Spotless/Prettier build failure reported in #11997.

Spotless 6.22.0 invokes npm with the --scripts-prepend-node-path option, which is no longer supported by current npm versions and causes the build to fail with:

npm error Unknown cli flag: --scripts-prepend-node-path

This change upgrades the Spotless Gradle plugin from 6.22.0 to 8.10.1, which contains the upstream fix for this issue.

Verification

  • ./gradlew :test-support:spotlessJava --rerun-tasks
  • ./gradlew :test-support:test --rerun-tasks
  • git diff --check

Fixes #11997.

Summary by CodeRabbit

  • Chores
    • Updated the code formatting tooling to a newer version across the project, examples, and smoke-test builds.
    • No user-facing functionality or public APIs were changed.

@dhruv9b
dhruv9b requested a review from a team as a code owner August 31, 2026 18:31
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 13eea9de-0595-45cd-9a90-b76763c9510a

📥 Commits

Reviewing files that changed from the base of the PR and between a4d3a03 and 918f465.

📒 Files selected for processing (3)
  • build.gradle
  • examples/build.gradle
  • smoke-test/build.gradle

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The Gradle configurations update the Spotless plugin from 6.22.0 to 8.10.1 in the root, examples, and smoke-test projects. The apply false setting remains unchanged.

Changes

Spotless plugin upgrade

Layer / File(s) Summary
Align Spotless plugin versions
build.gradle, examples/build.gradle, smoke-test/build.gradle
All three Gradle configurations use Spotless version 8.10.1 and retain apply false.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 918f4

This localized build-tool upgrade addresses the npm compatibility failure while preserving existing plugin behavior; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: eddumelendez, kiview, pioorg

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the Spotless upgrade and its purpose of fixing npm compatibility.
Description check ✅ Passed The description explains the failure, identifies the deprecated npm option, describes the Spotless upgrade, references issue #11997, and lists verification steps.
Linked Issues check ✅ Passed The changes satisfy issue #11997 by upgrading Spotless from 6.22.0 to 8.10.1, which addresses the unsupported --scripts-prepend-node-path option used by npm.
Out of Scope Changes check ✅ Passed All changes update the Spotless plugin version in the root, examples, and smoke-test Gradle files. These changes directly support the linked issue and no unrelated changes are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (3 skipped: 3 unsupported.)


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

[Bug]: Build fails with "Unknown cli flag: --scripts-prepend-node-path" due to outdated Spotless plugin

1 participant