Skip to content

Commit d5d816a

Browse files
committed
Merge branch 'renovate/ver_jackson' into renovate/org.scalameta-scalafmt-core_2.13-3.x
2 parents 0670d5a + 92c2219 commit d5d816a

File tree

135 files changed

+1501
-2679
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+1501
-2679
lines changed

CHANGES.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,24 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
1313
### Added
1414
* `FileSignature.Promised` and `JarState.Promised` to facilitate round-trip serialization for the Gradle configuration cache. ([#1945](https://github.com/diffplug/spotless/pull/1945))
1515
* Respect `.editorconfig` settings for formatting shell via `shfmt` ([#2031](https://github.com/diffplug/spotless/pull/2031))
16+
### Fixed
17+
* Ignore system git config when running tests ([#1990](https://github.com/diffplug/spotless/issues/1990))
18+
* Correctly provide EditorConfig property types for Ktlint ([#2052](https://github.com/diffplug/spotless/issues/2052))
19+
* Made ShadowCopy (`npmInstallCache`) more robust by re-creating the cache dir if it goes missing ([#1984](https://github.com/diffplug/spotless/issues/1984),[2096](https://github.com/diffplug/spotless/pull/2096))
20+
* scalafmt.conf fileOverride section now works correctly ([#1854](https://github.com/diffplug/spotless/pull/1854))
1621
### Changes
22+
* Bump default `jackson` version to latest `2.14.2` -> `2.17.1`. ([#1685](https://github.com/diffplug/spotless/pull/1685))
1723
* Bump default `ktfmt` version to latest `0.46` -> `0.47`. ([#2045](https://github.com/diffplug/spotless/pull/2045))
1824
* Bump default `sortpom` version to latest `3.2.1` -> `3.4.0`. ([#2049](https://github.com/diffplug/spotless/pull/2049))
1925
* Bump default `shfmt` version to latest `3.7.0` -> `3.8.0`. ([#2050](https://github.com/diffplug/spotless/pull/2050))
26+
* Bump default `ktlint` version to latest `1.1.1` -> `1.2.1`. ([#2057](https://github.com/diffplug/spotless/pull/2057))
27+
* Bump default `sortpom` version to latest `3.4.0` -> `3.4.1`. ([#2078](https://github.com/diffplug/spotless/pull/2078))
28+
* Bump default `sortpom` version to latest `3.4.1` -> `4.0.0` and support versions back to `3.2.1`. ([#2115](https://github.com/diffplug/spotless/pull/2115))
29+
* Bump default `zjsonpatch` version to latest `0.4.14` -> `0.4.16`. ([#1969](https://github.com/diffplug/spotless/pull/1969))
2030
### Removed
2131
* **BREAKING** Remove `JarState.getMavenCoordinate(String prefix)`. ([#1945](https://github.com/diffplug/spotless/pull/1945))
2232
* **BREAKING** Replace `PipeStepPair` with `FenceStep`. ([#1954](https://github.com/diffplug/spotless/pull/1954))
23-
### Fixed
24-
* Ignore system git config when running tests ([#1990](https://github.com/diffplug/spotless/issues/1990))
33+
* **BREAKING** Fully removed `Rome`, use `Biome` instead. ([#2119](https://github.com/diffplug/spotless/pull/2119))
2534

2635
## [2.45.0] - 2024-01-23
2736
### Added

PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Please **DO NOT FORCE PUSH**. Don't worry about messy history, it's easier to do code review if we can tell what happened after the review, and force pushing breaks that.
22

3-
Please make sure that your [PR allows edits from maintainers](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/). Sometimes its faster for us to just fix something than it is to describe how to fix it.
3+
Please make sure that your [PR allows edits from maintainers](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork). Sometimes it's faster for us to just fix something than it is to describe how to fix it.
44

5-
![Allow edits from maintainers](https://help.github.com/assets/images/help/pull_requests/allow-maintainers-to-make-edits-sidebar-checkbox.png)
5+
<img src="https://docs.github.com/assets/cb-87454/images/help/pull_requests/allow-edits-and-access-by-maintainers.png" height="297" alt="Allow edits from maintainers">
66

77
After creating the PR, please add a commit that adds a bullet-point under the `[Unreleased]` section of [CHANGES.md](https://github.com/diffplug/spotless/blob/main/CHANGES.md), [plugin-gradle/CHANGES.md](https://github.com/diffplug/spotless/blob/main/plugin-gradle/CHANGES.md), and [plugin-maven/CHANGES.md](https://github.com/diffplug/spotless/blob/main/plugin-maven/CHANGES.md) which includes:
88

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ lib('markdown.FlexmarkStep') +'{{yes}} | {{yes}}
100100
lib('npm.EslintFormatterStep') +'{{yes}} | {{yes}} | {{no}} | {{no}} |',
101101
lib('npm.PrettierFormatterStep') +'{{yes}} | {{yes}} | {{no}} | {{no}} |',
102102
lib('npm.TsFmtFormatterStep') +'{{yes}} | {{yes}} | {{no}} | {{no}} |',
103-
lib('pom.SortPomStepStep') +'{{no}} | {{yes}} | {{no}} | {{no}} |',
103+
lib('pom.SortPomStep') +'{{yes}} | {{yes}} | {{no}} | {{no}} |',
104104
lib('protobuf.BufStep') +'{{yes}} | {{no}} | {{no}} | {{no}} |',
105105
lib('python.BlackStep') +'{{yes}} | {{no}} | {{no}} | {{no}} |',
106106
lib('scala.ScalaFmtStep') +'{{yes}} | {{yes}} | {{yes}} | {{no}} |',
@@ -154,7 +154,7 @@ lib('yaml.JacksonYamlStep') +'{{yes}} | {{yes}}
154154
| [`npm.EslintFormatterStep`](lib/src/main/java/com/diffplug/spotless/npm/EslintFormatterStep.java) | :+1: | :+1: | :white_large_square: | :white_large_square: |
155155
| [`npm.PrettierFormatterStep`](lib/src/main/java/com/diffplug/spotless/npm/PrettierFormatterStep.java) | :+1: | :+1: | :white_large_square: | :white_large_square: |
156156
| [`npm.TsFmtFormatterStep`](lib/src/main/java/com/diffplug/spotless/npm/TsFmtFormatterStep.java) | :+1: | :+1: | :white_large_square: | :white_large_square: |
157-
| [`pom.SortPomStepStep`](lib/src/main/java/com/diffplug/spotless/pom/SortPomStepStep.java) | :white_large_square: | :+1: | :white_large_square: | :white_large_square: |
157+
| [`pom.SortPomStep`](lib/src/main/java/com/diffplug/spotless/pom/SortPomStep.java) | :+1: | :+1: | :white_large_square: | :white_large_square: |
158158
| [`protobuf.BufStep`](lib/src/main/java/com/diffplug/spotless/protobuf/BufStep.java) | :+1: | :white_large_square: | :white_large_square: | :white_large_square: |
159159
| [`python.BlackStep`](lib/src/main/java/com/diffplug/spotless/python/BlackStep.java) | :+1: | :white_large_square: | :white_large_square: | :white_large_square: |
160160
| [`scala.ScalaFmtStep`](lib/src/main/java/com/diffplug/spotless/scala/ScalaFmtStep.java) | :+1: | :+1: | :+1: | :white_large_square: |

gradle/build-scans.gradle

Lines changed: 0 additions & 40 deletions
This file was deleted.

lib-extra/src/main/java/com/diffplug/spotless/extra/EclipseBasedStepBuilder.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import com.diffplug.spotless.FormatterStep;
3434
import com.diffplug.spotless.JarState;
3535
import com.diffplug.spotless.Provisioner;
36-
import com.diffplug.spotless.RoundedStep;
3736
import com.diffplug.spotless.SerializedFunction;
3837

3938
/**
@@ -127,7 +126,7 @@ public void setPreferences(Iterable<File> settingsFiles) {
127126
this.settingsFiles = settingsFiles;
128127
}
129128

130-
static class EclipseStep implements RoundedStep {
129+
static class EclipseStep implements java.io.Serializable {
131130
private static final long serialVersionUID = 1;
132131
private final String semanticVersion;
133132
private final String formatterStepExt;

lib-extra/src/main/java/com/diffplug/spotless/extra/EquoBasedStepBuilder.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
import com.diffplug.spotless.FormatterStep;
3535
import com.diffplug.spotless.JarState;
3636
import com.diffplug.spotless.Provisioner;
37-
import com.diffplug.spotless.RoundedStep;
3837
import com.diffplug.spotless.SerializedFunction;
3938

4039
import dev.equo.solstice.NestedJars;
@@ -54,12 +53,6 @@ public abstract class EquoBasedStepBuilder {
5453
private Iterable<File> settingsFiles = new ArrayList<>();
5554
private Map<String, String> p2Mirrors = Map.of();
5655

57-
/** @deprecated if you use this constructor you *must* call {@link #setVersion(String)} before calling {@link #build()} */
58-
@Deprecated
59-
public EquoBasedStepBuilder(String formatterName, Provisioner mavenProvisioner, SerializedFunction<State, FormatterFunc> stateToFormatter) {
60-
this(formatterName, mavenProvisioner, null, stateToFormatter);
61-
}
62-
6356
/** Initialize valid default configuration, taking latest version */
6457
public EquoBasedStepBuilder(String formatterName, Provisioner mavenProvisioner, @Nullable String defaultVersion, SerializedFunction<State, FormatterFunc> stateToFormatter) {
6558
this.formatterName = formatterName;
@@ -150,7 +143,7 @@ private P2Model createModelWithMirrors() {
150143
return model;
151144
}
152145

153-
static class EquoStep implements RoundedStep {
146+
static class EquoStep implements java.io.Serializable {
154147
private static final long serialVersionUID = 1;
155148
private final String semanticVersion;
156149
private final FileSignature.Promised settingsPromise;

lib/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ dependencies {
9797
// gson
9898
gsonCompileOnly 'com.google.code.gson:gson:2.10.1'
9999
// jackson
100-
String VER_JACKSON='2.14.2'
100+
String VER_JACKSON='2.17.1'
101101
jacksonCompileOnly "com.fasterxml.jackson.core:jackson-databind:$VER_JACKSON"
102102
jacksonCompileOnly "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$VER_JACKSON"
103103
// ktfmt
@@ -128,10 +128,10 @@ dependencies {
128128
// scalafmt
129129
scalafmtCompileOnly "org.scalameta:scalafmt-core_2.13:3.8.1"
130130
// sortPom
131-
sortPomCompileOnly 'com.github.ekryd.sortpom:sortpom-sorter:3.4.0'
131+
sortPomCompileOnly 'com.github.ekryd.sortpom:sortpom-sorter:4.0.0'
132132
sortPomCompileOnly 'org.slf4j:slf4j-api:2.0.12'
133133
// zjsonPatch
134-
zjsonPatchCompileOnly 'com.flipkart.zjsonpatch:zjsonpatch:0.4.14'
134+
zjsonPatchCompileOnly 'com.flipkart.zjsonpatch:zjsonpatch:0.4.16'
135135
}
136136

137137
// we'll hold the core lib to a high standard

lib/src/compatKtLint0Dot49Dot0/java/com/diffplug/spotless/glue/ktlint/compat/KtLintCompat0Dot49Dot0Adapter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023 DiffPlug
2+
* Copyright 2023-2024 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.
@@ -38,6 +38,7 @@
3838
import com.pinterest.ktlint.rule.engine.api.LintError;
3939
import com.pinterest.ktlint.rule.engine.core.api.Rule;
4040
import com.pinterest.ktlint.rule.engine.core.api.RuleProvider;
41+
import com.pinterest.ktlint.rule.engine.core.api.RuleProviderKt;
4142
import com.pinterest.ktlint.rule.engine.core.api.editorconfig.CodeStyleEditorConfigPropertyKt;
4243
import com.pinterest.ktlint.rule.engine.core.api.editorconfig.EditorConfigProperty;
4344
import com.pinterest.ktlint.rule.engine.core.api.editorconfig.EndOfLinePropertyKt;
@@ -142,7 +143,7 @@ public String format(
142143
if (editorConfigPath == null || !Files.exists(editorConfigPath)) {
143144
editorConfig = EditorConfigDefaults.Companion.getEMPTY_EDITOR_CONFIG_DEFAULTS();
144145
} else {
145-
editorConfig = EditorConfigDefaults.Companion.load(editorConfigPath);
146+
editorConfig = EditorConfigDefaults.Companion.load(editorConfigPath, RuleProviderKt.propertyTypes(allRuleProviders));
146147
}
147148

148149
return new KtLintRuleEngine(

lib/src/compatKtLint0Dot50Dot0/java/com/diffplug/spotless/glue/ktlint/compat/KtLintCompat0Dot50Dot0Adapter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023 DiffPlug
2+
* Copyright 2023-2024 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.
@@ -17,7 +17,6 @@
1717

1818
import java.nio.file.Files;
1919
import java.nio.file.Path;
20-
import java.util.Collections;
2120
import java.util.List;
2221
import java.util.Map;
2322
import java.util.Objects;
@@ -38,6 +37,7 @@
3837
import com.pinterest.ktlint.rule.engine.core.api.Rule;
3938
import com.pinterest.ktlint.rule.engine.core.api.RuleId;
4039
import com.pinterest.ktlint.rule.engine.core.api.RuleProvider;
40+
import com.pinterest.ktlint.rule.engine.core.api.RuleProviderKt;
4141
import com.pinterest.ktlint.rule.engine.core.api.RuleSetId;
4242
import com.pinterest.ktlint.rule.engine.core.api.editorconfig.CodeStyleEditorConfigPropertyKt;
4343
import com.pinterest.ktlint.rule.engine.core.api.editorconfig.EditorConfigProperty;
@@ -105,7 +105,7 @@ public String format(
105105
if (editorConfigPath == null || !Files.exists(editorConfigPath)) {
106106
editorConfig = EditorConfigDefaults.Companion.getEMPTY_EDITOR_CONFIG_DEFAULTS();
107107
} else {
108-
editorConfig = EditorConfigDefaults.Companion.load(editorConfigPath, Collections.emptySet());
108+
editorConfig = EditorConfigDefaults.Companion.load(editorConfigPath, RuleProviderKt.propertyTypes(allRuleProviders));
109109
}
110110

111111
return new KtLintRuleEngine(

lib/src/compatKtLint1Dot0Dot0/java/com/diffplug/spotless/glue/ktlint/compat/KtLintCompat1Dot0Dot0Adapter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023 DiffPlug
2+
* Copyright 2023-2024 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.
@@ -17,7 +17,6 @@
1717

1818
import java.nio.file.Files;
1919
import java.nio.file.Path;
20-
import java.util.Collections;
2120
import java.util.List;
2221
import java.util.Map;
2322
import java.util.Objects;
@@ -38,6 +37,7 @@
3837
import com.pinterest.ktlint.rule.engine.core.api.Rule;
3938
import com.pinterest.ktlint.rule.engine.core.api.RuleId;
4039
import com.pinterest.ktlint.rule.engine.core.api.RuleProvider;
40+
import com.pinterest.ktlint.rule.engine.core.api.RuleProviderKt;
4141
import com.pinterest.ktlint.rule.engine.core.api.RuleSetId;
4242
import com.pinterest.ktlint.rule.engine.core.api.editorconfig.CodeStyleEditorConfigPropertyKt;
4343
import com.pinterest.ktlint.rule.engine.core.api.editorconfig.EditorConfigProperty;
@@ -105,7 +105,7 @@ public String format(
105105
if (editorConfigPath == null || !Files.exists(editorConfigPath)) {
106106
editorConfig = EditorConfigDefaults.Companion.getEMPTY_EDITOR_CONFIG_DEFAULTS();
107107
} else {
108-
editorConfig = EditorConfigDefaults.Companion.load(editorConfigPath, Collections.emptySet());
108+
editorConfig = EditorConfigDefaults.Companion.load(editorConfigPath, RuleProviderKt.propertyTypes(allRuleProviders));
109109
}
110110

111111
return new KtLintRuleEngine(

0 commit comments

Comments
 (0)