Skip to content

Commit f102212

Browse files
committed
Merge branch 'main' into expandWildcardImports
# Conflicts: # CHANGES.md # plugin-gradle/CHANGES.md
2 parents 89c6f76 + 198e77c commit f102212

File tree

16 files changed

+29
-27
lines changed

16 files changed

+29
-27
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# BUILDCACHE_USER
22
# BUILDCACHE_PASS
33
# - rw access to buildcache.diffplug.com
4-
4+
name: CI 🏭
55
on:
66
pull_request:
77
push:
@@ -13,7 +13,7 @@ concurrency:
1313
cancel-in-progress: true
1414
jobs:
1515
sanity-check:
16-
name: SanityCheck
16+
name: Sanity Check 🦢
1717
runs-on: ubuntu-latest
1818
env:
1919
buildcacheuser: ${{ secrets.BUILDCACHE_USER }}
@@ -29,9 +29,9 @@ jobs:
2929
java-version: 21
3030
- name: gradle caching
3131
uses: gradle/actions/setup-gradle@v5
32-
- name: spotlessCheck
32+
- name: Spotless ✨
3333
run: ./gradlew spotlessCheck
34-
- name: rewriteDryRun
34+
- name: Rewrite ♻️
3535
run: ./gradlew rewriteDryRun
3636
- name: assemble testClasses
3737
run: ./gradlew assemble testClasses

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
1313
### Added
1414
- Add a `expandWildcardImports` API for java ([#2679](https://github.com/diffplug/spotless/issues/2594))
1515
- Add the ability to specify a wildcard version (`*`) for external formatter executables. ([#2757](https://github.com/diffplug/spotless/issues/2757))
16+
### Fixed
17+
- Prevent race conditions when multiple npm-based formatters launch the server process simultaneously while sharing the same `node_modules` directory. ([#2786](https://github.com/diffplug/spotless/pull/2786))
1618
### Changes
19+
- Bump default `ktfmt` version to latest `0.59` -> `0.61`. ([2804](https://github.com/diffplug/spotless/pull/2804))
1720
- Bump default `ktlint` version to latest `1.7.1` -> `1.8.0`. ([2763](https://github.com/diffplug/spotless/pull/2763))
1821
- Bump default `gherkin-utils` version to latest `9.2.0` -> `10.0.0`. ([#2619](https://github.com/diffplug/spotless/pull/2619))
1922

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ VER_SLF4J=[1.6,2.0[
3030
# Used in multiple places
3131
VER_DURIAN=1.2.0
3232
VER_JGIT=7.5.0.202512021534-r
33-
VER_JUNIT=6.0.1
33+
VER_JUNIT=6.0.2
3434
VER_ASSERTJ=3.27.6
3535
VER_MOCKITO=5.21.0
3636
VER_SELFIE=2.5.5

gradle/rewrite.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ rewrite {
2222
}
2323
dependencies {
2424
rewrite('org.openrewrite.recipe:rewrite-migrate-java:3.22.0')
25-
rewrite('org.openrewrite.recipe:rewrite-java-security:3.22.0')
2625
rewrite('org.openrewrite.recipe:rewrite-rewrite:0.16.0')
2726
rewrite('org.openrewrite.recipe:rewrite-static-analysis:2.22.0')
2827
rewrite('org.openrewrite.recipe:rewrite-third-party:0.31.2')

gradle/wrapper/gradle-wrapper.jar

542 Bytes
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
3+
distributionSha256Sum=0d585f69da091fc5b2beced877feab55a3064d43b8a1d46aeb07996b0915e0e0
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.0-bin.zip
45
networkTimeout=10000
56
validateDistributionUrl=true
67
zipStoreBase=GRADLE_USER_HOME
78
zipStorePath=wrapper/dists
8-
distributionSha256Sum=72f44c9f8ebcb1af43838f45ee5c4aa9c5444898b3468ab3f4af7b6076c5bc3f

lib/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,13 @@ dependencies {
104104
// javaParser
105105
javaParserCompileOnly "com.github.javaparser:javaparser-symbol-solver-core:3.27.1"
106106
// ktfmt
107-
ktfmtCompileOnly "com.facebook:ktfmt:0.59"
107+
ktfmtCompileOnly "com.facebook:ktfmt:0.61"
108108
ktfmtCompileOnly("com.google.googlejavaformat:google-java-format") {
109109
version {
110110
strictly '1.7' // for JDK 8 compatibility
111111
}
112112
}
113+
ktfmtCompileOnly "com.google.code.findbugs:jsr305:${VER_JSR_305}"
113114
// ktlint latest supported version
114115
compatKtLint1Dot0Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-rule-engine:1.8.0'
115116
compatKtLint1Dot0Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-ruleset-standard:1.8.0'

lib/src/main/java/com/diffplug/spotless/kotlin/KtfmtStep.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2025 DiffPlug
2+
* Copyright 2016-2026 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -41,7 +41,7 @@
4141
public final class KtfmtStep implements Serializable {
4242
@Serial
4343
private static final long serialVersionUID = 1L;
44-
private static final String DEFAULT_VERSION = "0.59";
44+
private static final String DEFAULT_VERSION = "0.61";
4545
private static final String NAME = "ktfmt";
4646
private static final String MAVEN_COORDINATE = "com.facebook:ktfmt:";
4747

lib/src/main/resources/com/diffplug/spotless/npm/common-serve.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ function getInstanceId() {
3535

3636
var listener = app.listen(0, "127.0.0.1", () => {
3737
const instanceId = getInstanceId();
38+
const tempFileName = `server-${instanceId}.port.tmp`;
39+
const finalFileName = `server-${instanceId}.port`;
3840
debugLog("Server running on port " + listener.address().port + " for instance " + instanceId);
39-
fs.writeFile("server.port.tmp", "" + listener.address().port, function (err) {
41+
fs.writeFile(tempFileName, "" + listener.address().port, function (err) {
4042
if (err) {
4143
return console.log(err);
4244
} else {
43-
fs.rename("server.port.tmp", `server-${instanceId}.port`, function (err) {
45+
fs.rename(tempFileName, finalFileName, function (err) {
4446
if (err) {
4547
return console.log(err);
4648
}

lib/src/main/resources/com/diffplug/spotless/npm/eslint-package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "spotless-eslint",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"description": "Spotless formatter step for running eslint as a rest service.",
55
"repository": "https://github.com/diffplug/spotless",
66
"license": "Apache-2.0",

0 commit comments

Comments
 (0)