Closed scinos closed 4 years ago
To generate the tests, I copy/pasted a few existing tests from prettier
(so they covers most of what prettier js covers), specially those related to parentheses.
Then I enabled parenSpacing: true
and re-generated the snapshots.
For reference, these are the differences between parenSpacing: true
and parenSpacing: false
(i.e. the difference between wp-prettier and prettier, so to speak):
spacing.diff.txt (download it and open it with your favourite diff viewer)
Here's the diff in an easy to review format:
The paren spacing snapshot diff looks about right to me. Let's apply this change (https://github.com/Automattic/wp-prettier/pull/20/files#r411954955) verify it's working correctly, then merge.
I can't figure out why the tests are failing. What I know is they are not related to this particular change.
So I propose merge this as-is to fix #19, release it as wp-prettier@2.0.5-alpha-1
, and investigate the broken test later.
@sirreal @sgomes @griffbrad @jsnajdr opinions?
Note about the numbering scheme:
2.0.4-xxx
will have a lower precedence (so people won't get it if they already have 2.0.4)2.0.5-alpha-1
, 2.0.5-alpha-2
... for all the patches we apply on top of 2.0.4
.2.0.5
, we merge it an release it as 2.0.5-beta-1
2.0.5-beta-2
...2.0.5-beta-xxx
series is stable, we can release it as just 2.0.5
.Ugly, but I can't figure out a less-ugly option. Open to suggestions
I can't reproduce the CI failures locally either 😕
I did notice that the checkout is a merge, it merges this branch into wp-prettier-2.0.4
before running the tests. I've done that locally and run yarn test --clearCache; yarn test --ci
. Everything still passes.
Changes:
parenSpace
Fixes #19