Skip to content

Commit

Permalink
db-console: downgrade to prettier 1.x
Browse files Browse the repository at this point in the history
Bazel only installs a single version of each NPM dependency, even if a
yarn workspace would typically ensure multiple versions are available
for the various workspaces. Before using segmented Bazel repositories
for NPM dependencies, Bazel would consistently select [email protected] when
linting db-console despite the presence of `prettier: ^2.2.1` in its
package.json. What's worse is that linting db-console outside of Bazel
_also_ used [email protected], for reasons that are still unclear. Switching
to segmented Bazel NPM repositories caused db-console to start using
prettier^2.x, which has backwards-incompatible changes to the default
settings. We don't provide a prettier config file, so those changes
resulted in lint a very large number of failures. Downgrade db-console
to prettier 1.x in its package.json, making its declared dependency
match what's actually used at runtime. Upgrading everything to prettier
2.x is left as an exercise for a later date.

Release note: None
  • Loading branch information
sjbarag committed May 5, 2022
1 parent 87e0529 commit 636895b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/ui/workspaces/db-console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"minimist": "^1.2.0",
"mocha": "^6.2.1",
"nib": "^1.1.2",
"prettier": "^2.2.1",
"prettier": "^1.19.1",
"prop-types": "^15.5.10",
"protobufjs": "6.8.6",
"redux-saga-test-plan": "^4.0.0-beta.2",
Expand Down
5 changes: 0 additions & 5 deletions pkg/ui/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13697,11 +13697,6 @@ prettier@^1.19.1:
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==

prettier@^2.2.1:
version "2.3.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d"
integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==

prettier@~2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5"
Expand Down

0 comments on commit 636895b

Please sign in to comment.