Skip to content

Commit 819fed5

Browse files
committed
Fixup TsFmtFormatterStep for roundtripping.
1 parent 783ee73 commit 819fed5

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

lib/src/main/java/com/diffplug/spotless/npm/TsFmtFormatterStep.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public State(String stepName, Map<String, String> versions, File projectDir, Fil
9494
public FormatterFunc createFormatterFunc() {
9595
try {
9696
Map<String, Object> tsFmtOptions = unifyOptions();
97-
ServerProcessInfo tsfmtRestServer = npmRunServer();
97+
ServerProcessInfo tsfmtRestServer = toRuntime().npmRunServer();
9898
TsFmtRestService restService = new TsFmtRestService(tsfmtRestServer.getBaseUrl());
9999
return Closeable.ofDangerous(() -> endServer(restService, tsfmtRestServer), input -> restService.format(input, tsFmtOptions));
100100
} catch (IOException e) {

lib/src/main/java/com/diffplug/spotless/npm/TypedTsFmtConfigFile.java

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 DiffPlug
2+
* Copyright 2016-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.
@@ -18,15 +18,9 @@
1818
import static java.util.Objects.requireNonNull;
1919

2020
import java.io.File;
21-
import java.io.IOException;
2221
import java.io.Serializable;
2322
import java.util.Locale;
2423

25-
import com.diffplug.spotless.FileSignature;
26-
import com.diffplug.spotless.ThrowingEx;
27-
28-
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
29-
3024
public class TypedTsFmtConfigFile implements Serializable {
3125

3226
private static final long serialVersionUID = -4442310349275775501L;
@@ -35,18 +29,9 @@ public class TypedTsFmtConfigFile implements Serializable {
3529

3630
private final File configFile;
3731

38-
@SuppressFBWarnings("SE_TRANSIENT_FIELD_NOT_RESTORED")
39-
@SuppressWarnings("unused")
40-
private final FileSignature configFileSignature;
41-
4232
public TypedTsFmtConfigFile(TsConfigFileType configFileType, File configFile) {
4333
this.configFileType = requireNonNull(configFileType);
4434
this.configFile = requireNonNull(configFile);
45-
try {
46-
this.configFileSignature = FileSignature.signAsList(configFile);
47-
} catch (IOException e) {
48-
throw ThrowingEx.asRuntime(e);
49-
}
5035
}
5136

5237
TsConfigFileType configFileType() {

0 commit comments

Comments
 (0)