commit | 05508d7bbc449968a6da7edd7c7e7a4b59fbe05d | [log] [tgz] |
---|---|---|
author | dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> | Tue Feb 01 23:48:23 2022 -0800 |
committer | Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> | Tue Feb 01 23:51:22 2022 -0800 |
tree | f413b6fd413be7d01e838f35e443ef3a1ef41111 | |
parent | 412f155742cbf2f9256559c440f9de816cb420cf [diff] |
Bump postcss from 7.0.35 to 7.0.39 in /website (#272) Summary: Bumps [postcss](https://github.com/postcss/postcss) from 7.0.35 to 7.0.39. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/postcss/postcss/releases">postcss's releases</a>.</em></p> <blockquote> <h2>7.0.39</h2> <ul> <li>Reduce package size.</li> <li>Backport <code>nanocolors</code> to <code>picocolors</code> migration.</li> </ul> <h2>7.0.38</h2> <ul> <li>Update <code>Processor#version</code>.</li> </ul> <h2>7.0.37</h2> <ul> <li>Backport <code>chalk</code> to <code>nanocolors</code> migration.</li> </ul> <h2>7.0.36</h2> <ul> <li>Backport ReDoS vulnerabilities from PostCSS 8.</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/postcss/postcss/blob/7.0.39/CHANGELOG.md">postcss's changelog</a>.</em></p> <blockquote> <h2>7.0.39</h2> <ul> <li>Reduce package size.</li> <li>Backport <code>nanocolors</code> to <code>picocolors</code> migration.</li> </ul> <h2>7.0.38</h2> <ul> <li>Update <code>Processor#version</code>.</li> </ul> <h2>7.0.37</h2> <ul> <li>Backport <code>chalk</code> to <code>nanocolors</code> migration.</li> </ul> <h2>7.0.36</h2> <ul> <li>Backport ReDoS vulnerabilities from PostCSS 8.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/postcss/postcss/commit/e17c1ef7623a71be5732432ca8499bc9928aa08d"><code>e17c1ef</code></a> Release 7.0.39 version</li> <li><a href="https://github.com/postcss/postcss/commit/6791bd3d5f7ab27ad36dc075033a5beb4bdbfe9e"><code>6791bd3</code></a> Reduce npm package</li> <li><a href="https://github.com/postcss/postcss/commit/44c581a55a9aab339ee319aa67c264b02c4a6448"><code>44c581a</code></a> Replace nanocolors with picocolors</li> <li><a href="https://github.com/postcss/postcss/commit/8ba21fd8f4c3bff146b8a71d2d12f31435444394"><code>8ba21fd</code></a> Remove eslint-ci</li> <li><a href="https://github.com/postcss/postcss/commit/3994c4aa3ce1835c9b36ae17ab94e45c21b56fb2"><code>3994c4a</code></a> Release 7.0.38 version</li> <li><a href="https://github.com/postcss/postcss/commit/6944e1dd808da66cee4ebf287c66c6aa0fc5c2a0"><code>6944e1d</code></a> Remove development keys from package.json</li> <li><a href="https://github.com/postcss/postcss/commit/4dd0af024a915bd12d2d53990c5a4fa4129563d5"><code>4dd0af0</code></a> Release 7.0.37 version</li> <li><a href="https://github.com/postcss/postcss/commit/8408eb4105755c43dbf09a000fd2f1308f240232"><code>8408eb4</code></a> Add compilation step</li> <li><a href="https://github.com/postcss/postcss/commit/0c680639c3d717b4c8c0b2b2a9d1799fbf239a76"><code>0c68063</code></a> Move tests to GitHub Actions</li> <li><a href="https://github.com/postcss/postcss/commit/98b61ba5b46622de48bb2592583757ab846212ad"><code>98b61ba</code></a> Replace chalk to nanocolors</li> <li>Additional commits viewable in <a href="https://github.com/postcss/postcss/compare/7.0.35...7.0.39">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=postcss&package-manager=npm_and_yarn&previous-version=7.0.35&new-version=7.0.39)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `dependabot rebase` will rebase this PR - `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `dependabot merge` will merge this PR after your CI passes on it - `dependabot squash and merge` will squash and merge this PR after your CI passes on it - `dependabot cancel merge` will cancel a previously requested merge and block automerging - `dependabot reopen` will reopen this PR if it is closed - `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebookincubator/ktfmt/network/alerts). </details> Pull Request resolved: https://github.com/facebookincubator/ktfmt/pull/272 Reviewed By: hick209 Differential Revision: D33917855 Pulled By: cgrushko fbshipit-source-id: 821d9f3192374739dba75601172e451ac6d4d7e5
ktfmt
is a program that pretty-prints (formats) Kotlin code, based on google-java-format.
Note that ktfmt
still has some rough edges which we're constantly working on fixing.
The minimum supported runtime version is JDK 11, released September 2018.
Before Formatting | Formatted by ktfmt |
---|---|
For comparison, the same code formatted by ktlint
and IntelliJ:
Formatted by ktlint | Formatted by IntelliJ |
---|---|
A ktfmt IntelliJ plugin is available from the plugin repository. To install it, go to your IDE's settings and select the Plugins
category. Click the Marketplace
tab, search for the ktfmt
plugin, and click the Install
button.
The plugin will be disabled by default. To enable it in the current project, go to File→Settings...→ktfmt Settings
(or IntelliJ IDEA→Preferences...→Editor→ktfmt Settings
on macOS) and check the Enable ktfmt
checkbox. (A notification will be presented when you first open a project offering to do this for you.)
To enable it by default in new projects, use File→New Project Settings→Preferences for new Projects→Editor→ktfmt Settings
.
When enabled, it will replace the normal Reformat Code
action, which can be triggered from the Code
menu or with the Ctrl-Alt-L (by default) keyboard shortcut.
To configure IntelliJ to approximate ktfmt's formatting rules during code editing, you can edit your project's .editorconfig
file to include the Kotlin section from one of the files inside docs/editorconfig
. Not all of ktfmt's rules can be represented as IntelliJ editor settings, so you will still need to run ktfmt. Alternately, that file can be used as a reference to manually change the project's code style settings.
Download the formatter and run it with:
java -jar /path/to/ktfmt-<VERSION>-jar-with-dependencies.jar [--dropbox-style] [files...]
--dropbox-style
makes ktfmt
use a block indent of 4 spaces instead of 2. See below for details.
Note: There is no configurability as to the formatter's algorithm for formatting (apart from --dropbox-style
). This is a deliberate design decision to unify our code formatting on a single format.
A Gradle plugin (ktfmt-gradle) is available on the Gradle Plugin Portal. To set it up, just follow the instructions in the How-to-use section.
Alternatively, you can use Spotless with the ktfmt Gradle plugin.
Consider using Spotless with the ktfmt Maven plugin.
ktfmt
vs ktlint
vs IntelliJktfmt
uses google-java-format's underlying engine, and as such, many items on google-java-format's FAQ apply to ktfmt
as well.
In particular,
ktfmt
ignores most existing formatting. It respects existing newlines in some places, but in general, its output is deterministic and is independent of the input code.ktfmt
exposes no configuration options that govern formatting behavior. See https://github.com/google/google-java-format/wiki/FAQ#i-just-need-to-configure-it-a-bit-differently-how for the rationale.These two properties make ktfmt
a good fit in large Kotlin code bases, where consistency is very important.
We created ktfmt
because ktlint
and IntelliJ sometime fail to produce nice-looking code that fits in 100 columns, as can be seen in the Demo section.
ktfmt
uses a 2-space indent; why not 4? any way to change that?Two reasons -
However, we do offer an escape-hatch for projects that absolutely cannot make the move to ktfmt
because of 2-space: the --dropbox-style
flag changes block indents to 4-space.
pom.xml
in IntelliJ. Choose "Open as a Project"FormatterTest.kt
.mvn install
java -jar core/target/ktfmt-<VERSION>-jar-with-dependencies.jar
See RELEASING.md.
Apache License 2.0