Skip to content

Commit

Permalink
Release 2.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Sep 16, 2021
1 parent 59b5eb4 commit 7ced9e6
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/formatting.md
Expand Up @@ -26,7 +26,7 @@ Don't fill the form below manually! Let a program create a report for you:
-->

**Prettier 2.4.0**
**Prettier 2.4.1**
[Playground link](https://prettier.io/playground/#.....)

```sh
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/integration.md
Expand Up @@ -20,7 +20,7 @@ BEFORE SUBMITTING AN ISSUE:

**Environments:**

- Prettier Version: 2.4.0
- Prettier Version: 2.4.1
- Running Prettier via: <!-- CLI, Node.js API, Browser API, etc. -->
- Runtime: <!-- Node.js v14, Chrome v83, etc. -->
- Operating System: <!-- Windows, Linux, macOS, etc. -->
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,25 @@
# 2.4.1

[diff](https://github.com/prettier/prettier/compare/2.4.0...2.4.1)

#### Fix wildcard syntax in `@forward` ([#11482](https://github.com/prettier/prettier/pull/11482)) ([#11487](https://github.com/prettier/prettier/pull/11487) by [@niksy](https://github.com/niksy))

<!-- prettier-ignore -->
```scss
// Input
@forward "library" as btn-*;

// Prettier 2.4.0
@forward "library" as btn- *;

// Prettier 2.4.1
@forward "library" as btn-*;
```

#### Add new CLI option `debug-print-ast` ([#11514](https://github.com/prettier/prettier/pull/11514) by [@sosukesuzuki](https://github.com/sosukesuzuki))

A new `--debug-print-ast` CLI flag for debugging.

# 2.4.0

[diff](https://github.com/prettier/prettier/compare/2.3.2...2.4.0)
Expand Down
26 changes: 13 additions & 13 deletions docs/browser.md
Expand Up @@ -32,8 +32,8 @@ See below for examples.
### Global

```html
<script src="https://unpkg.com/prettier@2.4.0/standalone.js"></script>
<script src="https://unpkg.com/prettier@2.4.0/parser-graphql.js"></script>
<script src="https://unpkg.com/prettier@2.4.1/standalone.js"></script>
<script src="https://unpkg.com/prettier@2.4.1/parser-graphql.js"></script>
<script>
prettier.format("type Query { hello: String }", {
parser: "graphql",
Expand All @@ -48,8 +48,8 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack

```html
<script type="module">
import prettier from "https://unpkg.com/prettier@2.4.0/esm/standalone.mjs";
import parserGraphql from "https://unpkg.com/prettier@2.4.0/esm/parser-graphql.mjs";
import prettier from "https://unpkg.com/prettier@2.4.1/esm/standalone.mjs";
import parserGraphql from "https://unpkg.com/prettier@2.4.1/esm/parser-graphql.mjs";
prettier.format("type Query { hello: String }", {
parser: "graphql",
Expand All @@ -62,8 +62,8 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack

```js
define([
"https://unpkg.com/prettier@2.4.0/standalone.js",
"https://unpkg.com/prettier@2.4.0/parser-graphql.js",
"https://unpkg.com/prettier@2.4.1/standalone.js",
"https://unpkg.com/prettier@2.4.1/parser-graphql.js",
], (prettier, ...plugins) => {
prettier.format("type Query { hello: String }", {
parser: "graphql",
Expand All @@ -88,8 +88,8 @@ This syntax doesn’t necessarily work in the browser, but it can be used when b
### Worker

```js
importScripts("https://unpkg.com/prettier@2.4.0/standalone.js");
importScripts("https://unpkg.com/prettier@2.4.0/parser-graphql.js");
importScripts("https://unpkg.com/prettier@2.4.1/standalone.js");
importScripts("https://unpkg.com/prettier@2.4.1/parser-graphql.js");
prettier.format("type Query { hello: String }", {
parser: "graphql",
plugins: prettierPlugins,
Expand All @@ -102,8 +102,8 @@ If you want to format [embedded code](options.md#embedded-language-formatting),

```html
<script type="module">
import prettier from "https://unpkg.com/prettier@2.4.0/esm/standalone.mjs";
import parserBabel from "https://unpkg.com/prettier@2.4.0/esm/parser-babel.mjs";
import prettier from "https://unpkg.com/prettier@2.4.1/esm/standalone.mjs";
import parserBabel from "https://unpkg.com/prettier@2.4.1/esm/parser-babel.mjs";
console.log(
prettier.format("const html=/* HTML */ `<DIV> </DIV>`", {
Expand All @@ -119,9 +119,9 @@ The HTML code embedded in JavaScript stays unformatted because the `html` parser

```html
<script type="module">
import prettier from "https://unpkg.com/prettier@2.4.0/esm/standalone.mjs";
import parserBabel from "https://unpkg.com/prettier@2.4.0/esm/parser-babel.mjs";
import parserHtml from "https://unpkg.com/prettier@2.4.0/esm/parser-html.mjs";
import prettier from "https://unpkg.com/prettier@2.4.1/esm/standalone.mjs";
import parserBabel from "https://unpkg.com/prettier@2.4.1/esm/parser-babel.mjs";
import parserHtml from "https://unpkg.com/prettier@2.4.1/esm/parser-html.mjs";
console.log(
prettier.format("const html=/* HTML */ `<DIV> </DIV>`", {
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "prettier",
"version": "2.5.0-dev",
"version": "2.4.1",
"description": "Prettier is an opinionated code formatter",
"bin": "./bin/prettier.js",
"repository": "prettier/prettier",
Expand Down
26 changes: 13 additions & 13 deletions website/versioned_docs/version-stable/browser.md
Expand Up @@ -33,8 +33,8 @@ See below for examples.
### Global

```html
<script src="https://unpkg.com/prettier@2.4.0/standalone.js"></script>
<script src="https://unpkg.com/prettier@2.4.0/parser-graphql.js"></script>
<script src="https://unpkg.com/prettier@2.4.1/standalone.js"></script>
<script src="https://unpkg.com/prettier@2.4.1/parser-graphql.js"></script>
<script>
prettier.format("type Query { hello: String }", {
parser: "graphql",
Expand All @@ -49,8 +49,8 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack

```html
<script type="module">
import prettier from "https://unpkg.com/prettier@2.4.0/esm/standalone.mjs";
import parserGraphql from "https://unpkg.com/prettier@2.4.0/esm/parser-graphql.mjs";
import prettier from "https://unpkg.com/prettier@2.4.1/esm/standalone.mjs";
import parserGraphql from "https://unpkg.com/prettier@2.4.1/esm/parser-graphql.mjs";
prettier.format("type Query { hello: String }", {
parser: "graphql",
Expand All @@ -63,8 +63,8 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack

```js
define([
"https://unpkg.com/prettier@2.4.0/standalone.js",
"https://unpkg.com/prettier@2.4.0/parser-graphql.js",
"https://unpkg.com/prettier@2.4.1/standalone.js",
"https://unpkg.com/prettier@2.4.1/parser-graphql.js",
], (prettier, ...plugins) => {
prettier.format("type Query { hello: String }", {
parser: "graphql",
Expand All @@ -89,8 +89,8 @@ This syntax doesn’t necessarily work in the browser, but it can be used when b
### Worker

```js
importScripts("https://unpkg.com/prettier@2.4.0/standalone.js");
importScripts("https://unpkg.com/prettier@2.4.0/parser-graphql.js");
importScripts("https://unpkg.com/prettier@2.4.1/standalone.js");
importScripts("https://unpkg.com/prettier@2.4.1/parser-graphql.js");
prettier.format("type Query { hello: String }", {
parser: "graphql",
plugins: prettierPlugins,
Expand All @@ -103,8 +103,8 @@ If you want to format [embedded code](options.md#embedded-language-formatting),

```html
<script type="module">
import prettier from "https://unpkg.com/prettier@2.4.0/esm/standalone.mjs";
import parserBabel from "https://unpkg.com/prettier@2.4.0/esm/parser-babel.mjs";
import prettier from "https://unpkg.com/prettier@2.4.1/esm/standalone.mjs";
import parserBabel from "https://unpkg.com/prettier@2.4.1/esm/parser-babel.mjs";
console.log(
prettier.format("const html=/* HTML */ `<DIV> </DIV>`", {
Expand All @@ -120,9 +120,9 @@ The HTML code embedded in JavaScript stays unformatted because the `html` parser

```html
<script type="module">
import prettier from "https://unpkg.com/prettier@2.4.0/esm/standalone.mjs";
import parserBabel from "https://unpkg.com/prettier@2.4.0/esm/parser-babel.mjs";
import parserHtml from "https://unpkg.com/prettier@2.4.0/esm/parser-html.mjs";
import prettier from "https://unpkg.com/prettier@2.4.1/esm/standalone.mjs";
import parserBabel from "https://unpkg.com/prettier@2.4.1/esm/parser-babel.mjs";
import parserHtml from "https://unpkg.com/prettier@2.4.1/esm/parser-html.mjs";
console.log(
prettier.format("const html=/* HTML */ `<DIV> </DIV>`", {
Expand Down
Expand Up @@ -32,7 +32,7 @@ The downsides of those plugins are:
- They are slower than running Prettier directly.
- They’re yet one layer of indirection where things may break.

Finally, we have tools that runs `prettier` and then immediately for example `eslint --fix` on files.
Finally, we have tools that run `prettier` and then immediately for example `eslint --fix` on files.

- [prettier-eslint](https://github.com/prettier/prettier-eslint)
- [prettier-tslint](https://github.com/azz/prettier-tslint)
Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-stable/precommit.md
Expand Up @@ -13,7 +13,7 @@ You can use Prettier with a pre-commit tool. This can re-format your files that
_Make sure Prettier is installed and is in your [`devDependencies`](https://docs.npmjs.com/specifying-dependencies-and-devdependencies-in-a-package-json-file) before you proceed._

```bash
npx mrm lint-staged
npx mrm@2 lint-staged
```

This will install [husky](https://github.com/typicode/husky) and [lint-staged](https://github.com/okonet/lint-staged), then add a configuration to the project’s `package.json` that will automatically format supported files in a pre-commit hook.
Expand Down

0 comments on commit 7ced9e6

Please sign in to comment.