Skip to content

Commit

Permalink
Merge branch 'release/1.5.0' into website-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Dec 30, 2023
2 parents c39b7f1 + df9129b commit 34f88f5
Show file tree
Hide file tree
Showing 26 changed files with 609 additions and 88 deletions.
32 changes: 27 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Read our [guidelines to categorize a change](https://biomejs.dev/internals/versi
New entries must be placed in a section entitled `Unreleased`.
Read our [guidelines for writing a good changelog entry](https://github.com/biomejs/biome/blob/main/CONTRIBUTING.md#changelog).

## Unreleased
## 1.5.0

Biome now scores 97% compatibility with Prettier and features more than 180 linter rules.

Expand All @@ -22,9 +22,15 @@ Biome now scores 97% compatibility with Prettier and features more than 180 lint

- The command `biome migrate` now updates the `$schema` if there's an outdated version.

- The commands `format`, `lint`, `check` and `ci` now accepts two new arguments: `--changed` and `--since`.
Use these options when the VCS integration is enabled to process only the files that were changed.
Contributed by @simonxabris
- The CLI now takes in consideration the `.gitignore` in the home directory of the user, if it exists. Contributed by @ematipico
- The `biome ci` command is now able to print [GitHub Workflow Commands](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions) when there are diagnostics in our code. Contributed by @nikeee
This will **might** require setting the proper permissions on your GitHub action:
```yaml
permissions:
pull-requests: write
```
- The commands `format`, `lint`, `check` and `ci` now accepts two new arguments: `--changed` and `--since`. Use these options when the VCS integration
is enabled to process only the files that were changed. Contributed by @simonxabris

```shell
biome format --write --changed
Expand Down Expand Up @@ -69,7 +75,7 @@ Biome now scores 97% compatibility with Prettier and features more than 180 lint
"files": {
"ignore": [
"node_modules/**",
"!**/dist/**" // this is now accepted and allow list files inside the `dist` folder
"!**/dist/**" // this is now accepted and allow files inside the `dist` folder
]
}
}
Expand All @@ -88,6 +94,22 @@ Biome now scores 97% compatibility with Prettier and features more than 180 lint
#### Bug fixes
- Fix [#1169](https://github.com/biomejs/biome/issues/1169). Account for escaped strings when computing layout for assignments. Contributed by @kalleep
- Fix [#851](https://github.com/biomejs/biome/issues/851). Allow regular function expressions to group and break as call arguments, just like arrow function expressions. [#1003](https://github.com/biomejs/biome/issues/1003) Contributed by @faultyserver
- Fix [#914](https://github.com/biomejs/biome/issues/914). Only parenthesize type-casted function expressions as default exports. [#1023](https://github.com/biomejs/biome/issues/1023) Contributed by @faultyserver
- Fix [#1112](https://github.com/biomejs/biome/issues/1112). Break block bodies in case clauses onto their own lines and preserve trailing fallthrough comments. [#1035](https://github.com/biomejs/biome/pull/1035) Contributed by @faultyserver
- Fix `RemoveSoftLinesBuffer` behavior to also removed conditional expanded content, ensuring no accidental, unused line breaks are included [#1032](https://github.com/biomejs/biome/pull/1032) Contributed by @faultyserver
- Fix [#1024](https://github.com/biomejs/biome/issues/1024). Allow JSX expressions to nestle in arrow chains [#1033](https://github.com/biomejs/biome/pull/1033) Contributed by @faultyserver
- Fix incorrect breaking on the left side of assignments by always using fluid assignment. [#1021](https://github.com/biomejs/biome/pull/1021) Contributed by @faultyserver
- Fix breaking strategy for nested object patterns in function parameters [#1054](https://github.com/biomejs/biome/pull/1054) Contributed by @faultyserver
- Fix over-indention of arrow chain expressions by simplifying the way each chain is grouped [#1036](https://github.com/biomejs/biome/pull/1036), [#1136](https://github.com/biomejs/biome/pull/1136), and [#1162](https://github.com/biomejs/biome/pull/1162) Contributed by @faultyserver.
- Fix "simple" checks for calls and member expressions to correctly handle array accesses, complex arguments to single-argument function calls, and multiple-argument function calls. [#1057](https://github.com/biomejs/biome/pull/1057) Contributed by @faultyserver
- Fix text wrapping and empty line handling for JSX Text elements to match Prettier's behavior. [#1075](https://github.com/biomejs/biome/pull/1075) Contributed by @faultyserver
- Fix leading comments in concisely-printed arrays to prevent unwanted line breaks. [#1135](https://github.com/biomejs/biome/pull/1135) Contributed by @faultyserver
- Fix `best_fitting` and interned elements preventing expansion propagation from sibling elements. [#1141](https://github.com/biomejs/biome/pull/1141) Contributed by @faultyserver
- Fix heuristic for grouping function parameters when type parameters with constraints are present. [#1153](https://github.com/biomejs/biome/pull/1153). Contributed by @faultyserver.
- Fix binary-ish and type annotation handling for grouping call arguments in function expressions and call signatures. [#1152](https://github.com/biomejs/biome/pull/1152) and [#1160](https://github.com/biomejs/biome/pull/1160) Contributed by @faultyserver
- Fix handling of nestled JSDoc comments to preserve behavior for overloads. [#1195](https://github.com/biomejs/biome/pull/1195) Contributed by @faultyserver
- Fix [#1208](https://github.com/biomejs/biome/issues/1208). Fix extraction of inner types when checking for simple type annotations in call arguments. [#1195](https://github.com/biomejs/biome/pull/1195) Contributed by @faultyserver

- Fix [#1220](https://github.com/biomejs/biome/issues/1220). Avoid duplicating comments in type unions for mapped, empty object, and empty tuple types. [#1240](https://github.com/biomejs/biome/pull/1240) Contributed by @faultyserver

Expand Down
12 changes: 6 additions & 6 deletions crates/biome_js_parser/src/syntax/stmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1472,22 +1472,22 @@ fn parse_variable_declarator(
)
{
let err = p
.err_builder("Object and Array patterns require initializers", id_range)
.err_builder("Object and Array patterns require initializers.", id_range)
.with_hint(
"this pattern is declared, but it is not given an initialized value",
"This pattern is declared, but it is not given an initialized value.",
);

p.error(err);
} else if initializer.is_none() && context.is_const() && !p.state().in_ambient_context() {
let err = p
.err_builder("Const declarations must have an initialized value", id_range)
.with_hint( "this variable needs to be initialized");
.err_builder("Const declarations must have an initialized value.", id_range)
.with_hint( "This variable needs to be initialized.");

p.error(err);
} else if initializer.is_none() && context.is_using() {
let err = p
.err_builder("Using declarations must have an initialized value", id_range)
.with_hint( "this variable needs to be initialized");
.err_builder("Using declarations must have an initialized value.", id_range)
.with_hint( "This variable needs to be initialized.");

p.error(err);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,15 +344,15 @@ array_binding_err.js:4:15 parse ━━━━━━━━━━━━━━━━
--
array_binding_err.js:4:5 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× Object and Array patterns require initializers
× Object and Array patterns require initializers.

2 │ let [="default"] = [1, 2];
3 │ let ["default"] = [1, 2];
> 4 │ let [[c ] = [];
│ ^^^^^^^^^^
5 │

i this pattern is declared, but it is not given an initialized value
i This pattern is declared, but it is not given an initialized value.

--
let [a b] = [1, 2];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,15 @@ export_variable_clause_error.js:1:16 parse ━━━━━━━━━━━━
--
export_variable_clause_error.js:2:14 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× Const declarations must have an initialized value
× Const declarations must have an initialized value.

1 │ export let a = ;
> 2 │ export const b;
│ ^
3 │ export let d, c;
4 │

i this variable needs to be initialized
i This variable needs to be initialized.

--
export let a = ;
Expand Down
4 changes: 2 additions & 2 deletions crates/biome_js_parser/test_data/inline/err/for_stmt_err.rast
Original file line number Diff line number Diff line change
Expand Up @@ -652,15 +652,15 @@ for_stmt_err.js:7:5 parse ━━━━━━━━━━━━━━━━━━
--
for_stmt_err.js:8:10 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× Object and Array patterns require initializers
× Object and Array patterns require initializers.

6 │ for await (let a in []) {}
7 │ for await (let i = 0; i < 10; ++i) {}
> 8 │ for (let [a];;) {}
│ ^^^
9 │

i this pattern is declared, but it is not given an initialized value
i This pattern is declared, but it is not given an initialized value.

--
for ;; {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ JsModule {
--
invalid_using_declarations_inside_for_statement.js:1:18 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× Using declarations must have an initialized value
× Using declarations must have an initialized value.

> 1 │ for (await using of x) {};
│ ^^
2 │ for await (await using of x) {};
3 │

i this variable needs to be initialized
i This variable needs to be initialized.

--
invalid_using_declarations_inside_for_statement.js:1:21 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Expand Down Expand Up @@ -168,14 +168,14 @@ invalid_using_declarations_inside_for_statement.js:1:22 parse ━━━━━━
--
invalid_using_declarations_inside_for_statement.js:2:24 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× Using declarations must have an initialized value
× Using declarations must have an initialized value.

1 │ for (await using of x) {};
> 2 │ for await (await using of x) {};
│ ^^
3 │

i this variable needs to be initialized
i This variable needs to be initialized.

--
invalid_using_declarations_inside_for_statement.js:2:27 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,14 +354,14 @@ object_binding_pattern.js:1:9 parse ━━━━━━━━━━━━━━
--
object_binding_pattern.js:1:5 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× Object and Array patterns require initializers
× Object and Array patterns require initializers.

> 1 │ let { 5 } } = { eval: "foo" };
│ ^^^^^
2 │ let { eval } = { eval: "foo" };
3 │ let { 5, 6 } = { eval: "foo" };

i this pattern is declared, but it is not given an initialized value
i This pattern is declared, but it is not given an initialized value.

--
object_binding_pattern.js:1:11 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,14 +441,14 @@ JsModule {
--
using_declaration_statement_err.js:1:7 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× Using declarations must have an initialized value
× Using declarations must have an initialized value.

> 1 │ using a;
│ ^
2 │ using {b};
3 │ using c = d, e;

i this variable needs to be initialized
i This variable needs to be initialized.

--
using_declaration_statement_err.js:2:7 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Expand Down Expand Up @@ -480,7 +480,7 @@ using_declaration_statement_err.js:2:7 parse ━━━━━━━━━━━
--
using_declaration_statement_err.js:3:14 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× Using declarations must have an initialized value
× Using declarations must have an initialized value.

1 │ using a;
2 │ using {b};
Expand All @@ -489,7 +489,7 @@ using_declaration_statement_err.js:3:14 parse ━━━━━━━━━━━
4 │ export using m = n;
5 │ await using f;

i this variable needs to be initialized
i This variable needs to be initialized.

--
using_declaration_statement_err.js:4:8 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Expand All @@ -515,7 +515,7 @@ using_declaration_statement_err.js:4:8 parse ━━━━━━━━━━━
--
using_declaration_statement_err.js:5:13 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× Using declarations must have an initialized value
× Using declarations must have an initialized value.

3 │ using c = d, e;
4 │ export using m = n;
Expand All @@ -524,12 +524,12 @@ using_declaration_statement_err.js:5:13 parse ━━━━━━━━━━━
6 │ await using g = h, j;
7 │ await using [o] = p;

i this variable needs to be initialized
i This variable needs to be initialized.

--
using_declaration_statement_err.js:6:20 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× Using declarations must have an initialized value
× Using declarations must have an initialized value.

4 │ export using m = n;
5 │ await using f;
Expand All @@ -538,7 +538,7 @@ using_declaration_statement_err.js:6:20 parse ━━━━━━━━━━━
7 │ await using [o] = p;
8 │ export await using q = r;

i this variable needs to be initialized
i This variable needs to be initialized.

--
using_declaration_statement_err.js:7:1 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ JsModule {
--
variable_declaration_statement_err.js:3:7 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× Const declarations must have an initialized value
× Const declarations must have an initialized value.

1 │ let a, { b } = { a: 10 }
2 │ const c = 1, { d } = { a: 10 }
Expand All @@ -307,12 +307,12 @@ variable_declaration_statement_err.js:3:7 parse ━━━━━━━━━━
4 │ let [f];
5 │ const { g };

i this variable needs to be initialized
i This variable needs to be initialized.

--
variable_declaration_statement_err.js:4:5 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× Object and Array patterns require initializers
× Object and Array patterns require initializers.

2 │ const c = 1, { d } = { a: 10 }
3 │ const e;
Expand All @@ -321,20 +321,20 @@ variable_declaration_statement_err.js:4:5 parse ━━━━━━━━━━
5 │ const { g };
6 │

i this pattern is declared, but it is not given an initialized value
i This pattern is declared, but it is not given an initialized value.

--
variable_declaration_statement_err.js:5:7 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× Object and Array patterns require initializers
× Object and Array patterns require initializers.

3 │ const e;
4 │ let [f];
> 5 │ const { g };
│ ^^^^^
6 │

i this pattern is declared, but it is not given an initialized value
i This pattern is declared, but it is not given an initialized value.

--
let a, { b } = { a: 10 }
Expand Down
2 changes: 1 addition & 1 deletion packages/@biomejs/biome/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@biomejs/biome",
"version": "1.4.1",
"version": "1.5.0",
"bin": "bin/biome",
"scripts": {
"postinstall": "node scripts/postinstall.js"
Expand Down
4 changes: 4 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions website/astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ export default defineConfig({
"pt-BR": "Integrando o Biome no seu editor",
},
},
{
label: "Integrate Biome with your VCS",
link: "/guides/integrate-in-vcs",
},
],
},
{
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified website/src/assets/old-social-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion website/src/content/blog/annoucing-biome.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ authors:
- core
pubDate: 2023-08-29
coverImage:
src: ../../assets/old-social-logo.png
lightSrc: ../../assets/old-social-logo.png
darkSrc: ../../assets/old-social-logo.png
alt: The name of the project - "Biome", with the slogan underneath that says "Toolchain of the web"
socialImage: ../../assets/old-social-logo.png
---
Expand Down
Loading

0 comments on commit 34f88f5

Please sign in to comment.