We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prettier-Java 2.6.0
Input:
2.5.0
.map(v -> v .getPreRelease() .stream() .filter(p -> p.matches("^\\d+-+g\\p{XDigit}{7}$")) .findFirst() .map(p -> v.withClearedPreRelease().withPreRelease(SNAPSHOT).withBuild(p)) .orElse(v)
Output: 2.6.0
.map( v -> v .getPreRelease() .stream() .filter(p -> p.matches("^\\d+-+g\\p{XDigit}{7}$")) .findFirst() .map(p -> v.withClearedPreRelease().withPreRelease(SNAPSHOT).withBuild(p)) .orElse(v)
Expected behavior: Prettier TS
.map(v -> v .getPreRelease() .stream() .filter((p) => p.matches("^\\d+-+g\\p{XDigit}{7}$")) .findFirst() .map((p) => v.withClearedPreRelease().withPreRelease(SNAPSHOT).withBuild(p)) .orElse(v), )
oddly, I think that this would be better, but doesn't really match typescript, I find it weird to have v by itself on a line
v
.map(v -> v.getPreRelease() .stream() .filter((p) => p.matches("^\\d+-+g\\p{XDigit}{7}$")) .findFirst() .map((p) => v.withClearedPreRelease().withPreRelease(SNAPSHOT).withBuild(p)) .orElse(v), )
Here's the complete method (as per 2.6.0), I line break at 120
public Semver getMaven() { return describe() .map(v -> null == v ? PRE_VERSION : v) .map(Semver::coerce) .map(v -> Objects.equals(v.getVersion(), PRE_VERSION) ? v.withPreRelease(SNAPSHOT) : v) .map( v -> v .getPreRelease() .stream() .filter(p -> p.matches("^\\d+-+g\\p{XDigit}{7}$")) .findFirst() .map(p -> v.withClearedPreRelease().withPreRelease(SNAPSHOT).withBuild(p)) .orElse(v) ) .map(v -> new MavenSemver(v.getVersion())) .get(); }
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Prettier-Java 2.6.0
Input:
2.5.0
Output:
2.6.0
Expected behavior:
Prettier TS
oddly, I think that this would be better, but doesn't really match typescript, I find it weird to have
v
by itself on a lineHere's the complete method (as per 2.6.0), I line break at 120
The text was updated successfully, but these errors were encountered: