Skip to content

Commit 53f7c1d

Browse files
committed
chore: flatten repo and update changelog
1 parent f4774de commit 53f7c1d

File tree

289 files changed

+185
-422
lines changed

Some content is hidden

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

289 files changed

+185
-422
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@
44

55
## Example
66

7+
### Input
8+
79
```java
8-
// Input
910

10-
// Output
11+
```
12+
13+
### Output
14+
15+
```java
1116

1217
```
1318

1419
## Relative issues or prs:
15-
16-
<!--
17-
Please also reference the issue number in a commit message to [automatically close the related Github issue](https://help.github.com/articles/closing-issues-via-commit-messages/)
18-
-->

.github/workflows/binaries.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@ jobs:
2222
sudo apt update
2323
sudo apt install jq
2424
npm i -g pkg
25-
- name: Installing/Linking dependencies
26-
run: |
27-
cd $GITHUB_WORKSPACE/prettier-java/packages/java-parser
28-
npm i
29-
npm link
30-
cd $GITHUB_WORKSPACE/prettier-java/packages/prettier-plugin-java
31-
npm i
32-
npm link java-parser
3325
- name: Checkout Prettier
3426
uses: actions/checkout@v2
3527
with:

.github/workflows/github-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ jobs:
4646
- name: Install dependencies
4747
run: yarn
4848
- name: Build prettier-plugin-java
49-
run: yarn run build:prettier-plugin-java
49+
run: yarn run build
5050
- name: Run e2e tests
51-
run: yarn run test:prettier-plugin-java test:${{ matrix.test_repository }}
51+
run: yarn run test:${{ matrix.test_repository }}

.github/workflows/github-pages-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
cache: yarn
2424

2525
- name: Install prettier-plugin-java dependencies
26-
working-directory: ./packages/prettier-plugin-java
26+
working-directory: .
2727
run: yarn install --frozen-lockfile
2828
- name: Build prettier-plugin-java
29-
working-directory: ./packages/prettier-plugin-java
29+
working-directory: .
3030
run: yarn build
3131

3232
- name: Install dependencies

.github/workflows/github-pages-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
cache: yarn
2424

2525
- name: Install prettier-plugin-java dependencies
26-
working-directory: ./packages/prettier-plugin-java
26+
working-directory: .
2727
run: yarn install --frozen-lockfile
2828
- name: Build prettier-plugin-java
29-
working-directory: ./packages/prettier-plugin-java
29+
working-directory: .
3030
run: yarn build
3131

3232
- name: Install dependencies
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# Tests
1212
/samples
13-
/test-samples
13+
/test-samples/**/*
1414
!/test-samples/.eslintrc.json
1515

1616
# Misc

packages/prettier-plugin-java/.mocharc.json renamed to .mocharc.json

File renamed without changes.

.prettierignore

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
samples
2-
lerna.json
3-
packages/prettier-plugin-java/samples
4-
packages/prettier-plugin-java/test-samples
5-
packages/prettier-plugin-java/README.md
6-
packages/prettier-plugin-java/dist
7-
CHANGELOG*
8-
website/build
9-
website/.docusaurus
101
/.nx/workspace-data
2+
/src/tree-sitter-java.d.ts
3+
/website/.docusaurus
4+
/website/build
5+
/CHANGELOG.md
6+
/lerna.json

CHANGELOG.md

Lines changed: 105 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,85 @@
1-
# Latest v2.6.7
1+
# Latest v2.8.1
2+
3+
## What's Changed
4+
* fix: indent ternary binary expressions in return statements by @jtkiesel in https://github.com/jhipster/prettier-java/pull/803
5+
6+
**Full Changelog**: https://github.com/jhipster/prettier-java/compare/prettier-plugin-java@2.8.0...prettier-plugin-java@2.8.1
7+
8+
# v2.8.0
9+
10+
## What's Changed
11+
* feat: improve class/enum/interface/record clause wrapping/indentation by @jtkiesel in https://github.com/jhipster/prettier-java/pull/783
12+
* fix: break empty switch/rule, try/catch/finally, and if blocks by @jtkiesel in https://github.com/jhipster/prettier-java/pull/791
13+
* feat: support `prettier-ignore-start`/`-end` in addition to `@formatter:off`/`:on` by @jtkiesel in https://github.com/jhipster/prettier-java/pull/796
14+
* fix: improve binary expression assignment breaking by @jtkiesel in https://github.com/jhipster/prettier-java/pull/797
15+
* fix: proper breaking of parenthesized expressions by @jtkiesel in https://github.com/jhipster/prettier-java/pull/800
16+
17+
**Full Changelog**: https://github.com/jhipster/prettier-java/compare/prettier-plugin-java@2.7.7...prettier-plugin-java@2.8.0
18+
19+
# v2.7.7
20+
21+
## What's Changed
22+
* fix: remove extra indent from ternary/lambda expressions in parentheses by @jtkiesel in https://github.com/jhipster/prettier-java/pull/787
23+
24+
**Full Changelog**: https://github.com/jhipster/prettier-java/compare/prettier-plugin-java@2.7.6...prettier-plugin-java@2.7.7
25+
26+
# v2.7.6
27+
28+
## What's Changed
29+
* fix: indent non-block switch rule bodies with leading comments by @jtkiesel in https://github.com/jhipster/prettier-java/pull/778
30+
* fix: ternary comment placement and indentation by @jtkiesel in https://github.com/jhipster/prettier-java/pull/780
31+
* fix: avoid unwrapping empty array initializer with comments by @jtkiesel in https://github.com/jhipster/prettier-java/pull/784
32+
33+
**Full Changelog**: https://github.com/jhipster/prettier-java/compare/prettier-plugin-java@2.7.5...prettier-plugin-java@2.7.6
34+
35+
# v2.7.5
36+
37+
## What's Changed
38+
* fix: eliminate repeated printer function execution from our naively-implemented 'call' helper by @jtkiesel in https://github.com/jhipster/prettier-java/pull/771
39+
* fix: correct indentation of some method argument lists containing lambda bodies by @jtkiesel in https://github.com/jhipster/prettier-java/pull/772
40+
* fix: correct indentation of non-root instanceof expressions by @jtkiesel in https://github.com/jhipster/prettier-java/pull/773
41+
* fix: indent binary expressions in annotation element value or argument lists by @jtkiesel in https://github.com/jhipster/prettier-java/pull/774
42+
* fix: break nested ternaries together by @jtkiesel in https://github.com/jhipster/prettier-java/pull/775
43+
44+
**Full Changelog**: https://github.com/jhipster/prettier-java/compare/prettier-plugin-java@2.7.4...prettier-plugin-java@2.7.5
45+
46+
# v2.7.4
47+
48+
## What's Changed
49+
* fix: print class type arguments and dots in the proper order by @jtkiesel in https://github.com/jhipster/prettier-java/pull/754
50+
* fix: revert connection of trailing semicolon to trailingComma option by @jtkiesel in https://github.com/jhipster/prettier-java/pull/755
51+
52+
**Full Changelog**: https://github.com/jhipster/prettier-java/compare/prettier-plugin-java@2.7.3...prettier-plugin-java@2.7.4
53+
54+
# v2.7.3
55+
56+
## What's Changed
57+
* fix: align arrowParens option's default with Prettier by @jtkiesel in https://github.com/jhipster/prettier-java/pull/749
58+
59+
# v2.7.2
60+
61+
## What's Changed
62+
* docs: Add arrowParens and experimentalOperatorPosition options to plugin and website playground by @jtkiesel in https://github.com/jhipster/prettier-java/pull/743
63+
* Fix update-test-outputs script to use test-specific prettier options. by @motlin in https://github.com/jhipster/prettier-java/pull/741
64+
* chore: add packageManager field to package.json for corepack by @mshima in https://github.com/jhipster/prettier-java/pull/744
65+
* chore: fix generated types by @mshima in https://github.com/jhipster/prettier-java/pull/747
66+
* chore: run lerna repair by @mshima in https://github.com/jhipster/prettier-java/pull/745
67+
68+
# v2.7.1
69+
70+
## What's Changed
71+
* feat: support `experimentalOperatorPosition` option (issue #534) by @jtkiesel in #731
72+
* fix: make formatting of comments on if statements stable (issue #592) by @jtkiesel in #731
73+
* fix: break nested statements without braces at the top level first (issue #720) by @jtkiesel in #731
74+
* fix: do not add a blank line at the end of embedded Java (issue #737) by @jtkiesel in #731
75+
76+
# v2.6.8
77+
78+
## What's Changed
79+
* fix: break hugged lambda body when closing parenthesis wraps by @jtkiesel in https://github.com/jhipster/prettier-java/pull/721
80+
* fix: limit TypePattern's VariableDeclaratorList to a single VariableDeclarator by @jtkiesel in https://github.com/jhipster/prettier-java/pull/734
81+
82+
# v2.6.7
283

384
## Fixes
485

@@ -15,6 +96,29 @@
1596

1697
- Support dims in record patterns (Issue [#707](https://github.com/jhipster/prettier-java/issues/707) closed by [#708](https://github.com/jhipster/prettier-java/pull/708) by [@clementdessoude](https://github.com/clementdessoude))
1798

99+
# v2.6.5
100+
101+
## Fixes
102+
103+
- Print comment before first binary operator without failing (Issue #685) fixed by #688 by @jtkiesel
104+
- Add whitespace between label and statement (Issue #686) fixed by #689 by @jtkiesel
105+
- Break and indent assignments like declarations (Issue #687) fixed by #690 by @jtkiesel
106+
107+
# v2.6.4
108+
109+
## Fixes
110+
111+
- Add es5 as trailingComma option (Issue #652) fixed by #655 by @jtkiesel
112+
- Add types to exports in package.json (Issue #663) fixed by #664 by @mshima
113+
- Hug lambdas without blocks (Issue #650) fixed by #653 by @jtkiesel
114+
- Align with JDK 22 spec (Issue #665) fixed by #666 by @jtkiesel
115+
116+
## Misc
117+
118+
- Update advanced_usage.md with current working configuration for IntelliJ (#669 by @tfield)
119+
- Update trailingComma option on advanced_usage.md (#451 by @jslivane)
120+
- Automate GitHub Pages deployment (#672 by @jtkiesel)
121+
18122
# v2.6.0
19123

20124
## Enhancements

CONTRIBUTING.md

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Contributing to Prettier
1+
# Contributing to Prettier Java
22

33
To get up and running, install the dependencies and run the full build:
44

@@ -13,54 +13,8 @@ You can also inspect the other available dev flows scripts:
1313
yarn run
1414
```
1515

16-
## Linking the java-parser to the printer
17-
18-
If you want to use the main java-parser for the prettier-plugin-java (printer), you will need to link it by running these commands in the root folder:
19-
20-
```bash
21-
cd packages/java-parser
22-
yarn link
23-
cd ../prettier-plugin-java
24-
yarn link java-parser
25-
```
26-
27-
To unlink the java-parser, run the following command inside packages/prettier-plugin-java.
28-
29-
```bash
30-
yarn unlink java-parser
31-
```
32-
3316
## Testing your changes
3417

35-
### java-parser
36-
37-
In this section, we suppose you are in the packages/java-parser folder.
38-
39-
When working on the parser, you can test the java-parser inside scripts/single-sample-runner.js. This is a simple way to check the impact of your changes on the built CST.
40-
You can then print the CST with this code:
41-
42-
```javascript
43-
console.log(
44-
JSON.stringify(
45-
resultingCST,
46-
(key, value) => (key !== "START_CHARS_HINT" ? value : undefined),
47-
2
48-
)
49-
);
50-
```
51-
52-
You can also run the parser tests with the following command:
53-
54-
```bash
55-
yarn test
56-
```
57-
58-
It will basically clone some java repositories and try to parse every java file.
59-
60-
### prettier-java-plugin
61-
62-
In this section, we suppose you are in the packages/prettier-plugin-java folder.
63-
6418
If you would like to check the impact of your changes on a sample code, edit the scripts/single-printer-run/\_input.java file and run
6519

6620
```bash
@@ -91,7 +45,7 @@ node scripts/update-test-ouput.js
9145

9246
It will simply update all the tests located in test/unit-test folder.
9347

94-
If you would like to run all the prettier-java-plugin tests, simple use the following command:
48+
If you would like to run all the tests, simple use the following command:
9549

9650
```bash
9751
yarn test

0 commit comments

Comments
 (0)