Skip to content

Commit 5051889

Browse files
author
Lars Ködderitzsch
committed
#2801 Use 1.8.0 as minimal supported biome version
1 parent e9e5ffa commit 5051889

5 files changed

Lines changed: 51 additions & 51 deletions

File tree

lib/src/main/java/com/diffplug/spotless/biome/BiomeSettings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static String getDownloadFilePattern() {
5858
}
5959

6060
/**
61-
* @param version The biome version for which to get the URL pattern, e.g. 1.2.0 or 2.0.6.
61+
* @param version The biome version for which to get the URL pattern, e.g. 1.8.3 or 2.3.11.
6262
* @return The pattern for {@link String#formatted(Object...)
6363
* String.format()} for the URL where the executables can be downloaded.
6464
* The first parameter is the version, the second parameter is the OS /

plugin-gradle/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,7 +1543,7 @@ To download the Biome binary from the network, just specify a version:
15431543
spotless {
15441544
format 'biome', {
15451545
target '**/*.js','**/*.ts','**/*.json'
1546-
biome('1.2.0')
1546+
biome('2.3.11')
15471547
}
15481548
}
15491549
```
@@ -1558,7 +1558,7 @@ spotless {
15581558
format 'biome', {
15591559
target '**/*.js','**/*.ts','**/*.json'
15601560
// Relative paths are resolved against the project's base directory
1561-
biome('1.2.0').downloadDir("${project.gradle.gradleUserHomeDir}/biome")
1561+
biome('2.3.11').downloadDir("${project.gradle.gradleUserHomeDir}/biome")
15621562
}
15631563
}
15641564
```
@@ -1639,7 +1639,7 @@ you can force a certain language like this:
16391639
spotless {
16401640
format 'biome', {
16411641
target 'src/**/typescript/**/*.mjson'
1642-
biome('1.2.0').language('json')
1642+
biome('2.3.11').language('json')
16431643
}
16441644
}
16451645
```

plugin-gradle/src/test/java/com/diffplug/gradle/spotless/BiomeIntegrationTest.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ void asGenericStep() throws Exception {
9595
"spotless {",
9696
" format 'mybiome', {",
9797
" target '**/*.js'",
98-
" biome('1.2.0')",
98+
" biome('2.3.11')",
9999
" }",
100100
"}");
101101
setFile("biome_test.js").toResource("biome/js/fileBefore.js");
@@ -120,7 +120,7 @@ void asJavaScriptStep() throws Exception {
120120
"spotless {",
121121
" javascript {",
122122
" target '**/*.js'",
123-
" biome('1.2.0')",
123+
" biome('2.3.11')",
124124
" }",
125125
"}");
126126
setFile("biome_test.js").toResource("biome/js/fileBefore.js");
@@ -145,7 +145,7 @@ void asJsonStep() throws Exception {
145145
"spotless {",
146146
" json {",
147147
" target '**/*.json'",
148-
" biome('1.2.0')",
148+
" biome('2.3.11')",
149149
" }",
150150
"}");
151151
setFile("biome_test.json").toResource("biome/json/fileBefore.json");
@@ -170,7 +170,7 @@ void asTypeScriptStep() throws Exception {
170170
"spotless {",
171171
" typescript {",
172172
" target '**/*.ts'",
173-
" biome('1.2.0')",
173+
" biome('2.3.11')",
174174
" }",
175175
"}");
176176
setFile("biome_test.ts").toResource("biome/ts/fileBefore.ts");
@@ -195,7 +195,7 @@ void canSetLanguageForGenericStep() throws Exception {
195195
"spotless {",
196196
" format 'mybiome', {",
197197
" target '**/*.nosj'",
198-
" biome('1.2.0').language('json')",
198+
" biome('2.3.11').language('json')",
199199
" }",
200200
"}");
201201
setFile("biome_test.nosj").toResource("biome/json/fileBefore.json");
@@ -221,7 +221,7 @@ void configPathAbsolute() throws Exception {
221221
"spotless {",
222222
" format 'mybiome', {",
223223
" target '**/*.js'",
224-
" biome('1.2.0').configPath('" + Encode.forJava(path) + "')",
224+
" biome('2.3.11').configPath('" + Encode.forJava(path) + "')",
225225
" }",
226226
"}");
227227
setFile("biome_test.js").toResource("biome/js/longLineBefore.js");
@@ -276,7 +276,7 @@ void configPathLineWidth120() throws Exception {
276276
"spotless {",
277277
" format 'mybiome', {",
278278
" target '**/*.js'",
279-
" biome('1.2.0').configPath('configs')",
279+
" biome('2.3.11').configPath('configs')",
280280
" }",
281281
"}");
282282
setFile("biome_test.js").toResource("biome/js/longLineBefore.js");
@@ -303,7 +303,7 @@ void configPathLineWidth80() throws Exception {
303303
"spotless {",
304304
" format 'mybiome', {",
305305
" target '**/*.js'",
306-
" biome('1.2.0').configPath('configs')",
306+
" biome('2.3.11').configPath('configs')",
307307
" }",
308308
"}");
309309
setFile("biome_test.js").toResource("biome/js/longLineBefore.js");
@@ -330,7 +330,7 @@ void downloadDirAbsolute() throws Exception {
330330
"spotless {",
331331
" format 'mybiome', {",
332332
" target '**/*.js'",
333-
" biome('1.2.0').downloadDir('" + Encode.forJava(path) + "')",
333+
" biome('2.3.11').downloadDir('" + Encode.forJava(path) + "')",
334334
" }",
335335
"}");
336336
setFile("biome_test.js").toResource("biome/js/fileBefore.js");
@@ -358,7 +358,7 @@ void downloadDirRelative() throws Exception {
358358
"spotless {",
359359
" format 'mybiome', {",
360360
" target '**/*.js'",
361-
" biome('1.2.0').downloadDir('target/bin/biome')",
361+
" biome('2.3.11').downloadDir('target/bin/biome')",
362362
" }",
363363
"}");
364364
setFile("biome_test.js").toResource("biome/js/fileBefore.js");
@@ -385,7 +385,7 @@ void failureWhenExeNotFound() throws Exception {
385385
"spotless {",
386386
" format 'mybiome', {",
387387
" target '**/*.js'",
388-
" biome('1.2.0').pathToExe('biome/is/missing')",
388+
" biome('2.3.11').pathToExe('biome/is/missing')",
389389
" }",
390390
"}");
391391
setFile("biome_test.js").toResource("biome/js/fileBefore.js");
@@ -412,7 +412,7 @@ void failureWhenNotParseable() throws Exception {
412412
"spotless {",
413413
" format 'mybiome', {",
414414
" target '**/*.js'",
415-
" biome('1.2.0').language('json')",
415+
" biome('2.3.11').language('json')",
416416
" }",
417417
"}");
418418
setFile("biome_test.js").toResource("biome/js/fileBefore.js");

plugin-maven/src/test/java/com/diffplug/spotless/maven/biome/BiomeMavenTest.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void asCssStepStable() throws Exception {
6767
*/
6868
@Test
6969
void asGenericStep() throws Exception {
70-
writePomWithBiomeSteps("**/*.js", "<biome><version>1.2.0</version></biome>");
70+
writePomWithBiomeSteps("**/*.js", "<biome><version>1.8.0</version></biome>");
7171
setFile("biome_test.js").toResource("biome/js/fileBefore.js");
7272
mavenRunner().withArguments("spotless:apply").runNoError();
7373
assertFile("biome_test.js").sameAsResource("biome/js/fileAfter.js");
@@ -80,7 +80,7 @@ void asGenericStep() throws Exception {
8080
*/
8181
@Test
8282
void asJavaScriptStep() throws Exception {
83-
writePomWithJavascriptSteps("**/*.js", "<biome><version>1.2.0</version></biome>");
83+
writePomWithJavascriptSteps("**/*.js", "<biome><version>1.8.0</version></biome>");
8484
setFile("biome_test.js").toResource("biome/js/fileBefore.js");
8585
mavenRunner().withArguments("spotless:apply").runNoError();
8686
assertFile("biome_test.js").sameAsResource("biome/js/fileAfter.js");
@@ -93,7 +93,7 @@ void asJavaScriptStep() throws Exception {
9393
*/
9494
@Test
9595
void asJsonStep() throws Exception {
96-
writePomWithJsonSteps("**/*.json", "<biome><version>1.2.0</version></biome>");
96+
writePomWithJsonSteps("**/*.json", "<biome><version>1.8.0</version></biome>");
9797
setFile("biome_test.json").toResource("biome/json/fileBefore.json");
9898
mavenRunner().withArguments("spotless:apply").runNoError();
9999
assertFile("biome_test.json").sameAsResource("biome/json/fileAfter.json");
@@ -106,7 +106,7 @@ void asJsonStep() throws Exception {
106106
*/
107107
@Test
108108
void asTypeScriptStep() throws Exception {
109-
writePomWithTypescriptSteps("**/*.ts", "<biome><version>1.2.0</version></biome>");
109+
writePomWithTypescriptSteps("**/*.ts", "<biome><version>1.8.0</version></biome>");
110110
setFile("biome_test.ts").toResource("biome/ts/fileBefore.ts");
111111
mavenRunner().withArguments("spotless:apply").runNoError();
112112
assertFile("biome_test.ts").sameAsResource("biome/ts/fileAfter.ts");
@@ -119,7 +119,7 @@ void asTypeScriptStep() throws Exception {
119119
*/
120120
@Test
121121
void canSetLanguageForGenericStep() throws Exception {
122-
writePomWithBiomeSteps("**/*.nosj", "<biome><version>1.2.0</version><language>json</language></biome>");
122+
writePomWithBiomeSteps("**/*.nosj", "<biome><version>1.8.0</version><language>json</language></biome>");
123123
setFile("biome_test.nosj").toResource("biome/json/fileBefore.json");
124124
mavenRunner().withArguments("spotless:apply").runNoError();
125125
assertFile("biome_test.nosj").sameAsResource("biome/json/fileAfter.json");
@@ -134,7 +134,7 @@ void canSetLanguageForGenericStep() throws Exception {
134134
void configPathAbsolute() throws Exception {
135135
var path = newFile("configs").getAbsolutePath();
136136
writePomWithBiomeSteps("**/*.js",
137-
"<biome><version>1.2.0</version><configPath>" + forXml(path) + "</configPath></biome>");
137+
"<biome><version>1.8.0</version><configPath>" + forXml(path) + "</configPath></biome>");
138138
setFile("biome_test.js").toResource("biome/js/longLineBefore.js");
139139
setFile("configs/biome.json").toResource("biome/config/line-width-120.json");
140140
mavenRunner().withArguments("spotless:apply").runNoError();
@@ -166,7 +166,7 @@ void configPathFile() throws Exception {
166166
*/
167167
@Test
168168
void configPathLineWidth120() throws Exception {
169-
writePomWithBiomeSteps("**/*.js", "<biome><version>1.2.0</version><configPath>configs</configPath></biome>");
169+
writePomWithBiomeSteps("**/*.js", "<biome><version>1.8.0</version><configPath>configs</configPath></biome>");
170170
setFile("biome_test.js").toResource("biome/js/longLineBefore.js");
171171
setFile("configs/biome.json").toResource("biome/config/line-width-120.json");
172172
mavenRunner().withArguments("spotless:apply").runNoError();
@@ -181,7 +181,7 @@ void configPathLineWidth120() throws Exception {
181181
*/
182182
@Test
183183
void configPathLineWidth80() throws Exception {
184-
writePomWithBiomeSteps("**/*.js", "<biome><version>1.2.0</version><configPath>configs</configPath></biome>");
184+
writePomWithBiomeSteps("**/*.js", "<biome><version>1.8.0</version><configPath>configs</configPath></biome>");
185185
setFile("biome_test.js").toResource("biome/js/longLineBefore.js");
186186
setFile("configs/biome.json").toResource("biome/config/line-width-80.json");
187187
mavenRunner().withArguments("spotless:apply").runNoError();
@@ -197,7 +197,7 @@ void configPathLineWidth80() throws Exception {
197197
void downloadDirAbsolute() throws Exception {
198198
var path = newFile("target/bin/biome").getAbsoluteFile().toString();
199199
writePomWithBiomeSteps("**/*.js",
200-
"<biome><version>1.2.0</version><downloadDir>" + forXml(path) + "</downloadDir></biome>");
200+
"<biome><version>1.8.0</version><downloadDir>" + forXml(path) + "</downloadDir></biome>");
201201
setFile("biome_test.js").toResource("biome/js/fileBefore.js");
202202
assertTrue(!newFile("target/bin/biome").exists() || newFile("target/bin/biome").list().length == 0);
203203
mavenRunner().withArguments("spotless:apply").runNoError();
@@ -214,7 +214,7 @@ void downloadDirAbsolute() throws Exception {
214214
@Test
215215
void downloadDirRelative() throws Exception {
216216
writePomWithBiomeSteps("**/*.js",
217-
"<biome><version>1.2.0</version><downloadDir>target/bin/biome</downloadDir></biome>");
217+
"<biome><version>1.8.0</version><downloadDir>target/bin/biome</downloadDir></biome>");
218218
setFile("biome_test.js").toResource("biome/js/fileBefore.js");
219219
assertTrue(!newFile("target/bin/biome").exists() || newFile("target/bin/biome").list().length == 0);
220220
mavenRunner().withArguments("spotless:apply").runNoError();
@@ -229,7 +229,7 @@ void downloadDirRelative() throws Exception {
229229
*/
230230
@Test
231231
void failureWhenExeNotFound() throws Exception {
232-
writePomWithBiomeSteps("**/*.js", "<biome><version>1.2.0</version><pathToExe>biome/is/missing</pathToExe></biome>");
232+
writePomWithBiomeSteps("**/*.js", "<biome><version>1.8.0</version><pathToExe>biome/is/missing</pathToExe></biome>");
233233
setFile("biome_test.js").toResource("biome/js/fileBefore.js");
234234
var result = mavenRunner().withArguments("spotless:apply").runHasError();
235235
assertFile("biome_test.js").sameAsResource("biome/js/fileBefore.js");
@@ -243,7 +243,7 @@ void failureWhenExeNotFound() throws Exception {
243243
*/
244244
@Test
245245
void failureWhenNotParseable() throws Exception {
246-
writePomWithBiomeSteps("**/*.js", "<biome><version>1.2.0</version><language>json</language></biome>");
246+
writePomWithBiomeSteps("**/*.js", "<biome><version>1.8.0</version><language>json</language></biome>");
247247
setFile("biome_test.js").toResource("biome/js/fileBefore.js");
248248
var result = mavenRunner().withArguments("spotless:apply").runHasError();
249249
assertFile("biome_test.js").sameAsResource("biome/js/fileBefore.js");

0 commit comments

Comments
 (0)