Skip to content

Commit 5315e28

Browse files
authored
Support the latest pkg:analyzer, prepare to release v2.2.4 (#1137)
1 parent abcdae6 commit 5315e28

File tree

5 files changed

+32
-36
lines changed

5 files changed

+32
-36
lines changed

.github/workflows/test-package.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
push:
66
branches: [ master ]
77
pull_request:
8-
branches: [ master, bump-2.0.2 ]
8+
branches: [ master]
99
schedule:
1010
- cron: "0 0 * * 0"
1111

@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
sdk: [dev]
23+
sdk: [2.17.0, dev]
2424
steps:
2525
- uses: actions/checkout@v2
2626
- uses: dart-lang/[email protected]
@@ -31,10 +31,13 @@ jobs:
3131
run: dart pub get
3232
- name: Check formatting
3333
run: dart format --output=none --set-exit-if-changed .
34-
if: always() && steps.install.outcome == 'success'
34+
if: always() && steps.install.outcome == 'success' && matrix.sdk == 'dev'
3535
- name: Analyze code
3636
run: dart analyze --fatal-infos
37-
if: always() && steps.install.outcome == 'success'
37+
if: always() && steps.install.outcome == 'success' && matrix.sdk == 'dev'
38+
- name: Analyze code
39+
run: dart analyze
40+
if: always() && steps.install.outcome == 'success' && matrix.sdk != 'dev'
3841

3942
# Run tests on a matrix consisting of two dimensions:
4043
# 1. OS: ubuntu-latest, (macos-latest, windows-latest)
@@ -47,7 +50,7 @@ jobs:
4750
matrix:
4851
# Add macos-latest and/or windows-latest if relevant for this package.
4952
os: [ubuntu-latest]
50-
sdk: [dev]
53+
sdk: [2.17.0, dev]
5154
steps:
5255
- uses: actions/checkout@v2
5356
- uses: dart-lang/[email protected]

CHANGELOG.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,22 @@
1-
# 2.2.4-dev
1+
# 2.2.4
22

33
* Unify how brace-delimited syntax is formatted. This is mostly an internal
44
refactoring, but slightly changes how a type body containing only an inline
55
block comment is formatted.
6-
76
* Refactor Chunk to store split before text instead of after. This mostly does
87
not affect the visible behavior of the formatter, but a few edge cases are
98
handled slightly differently. These are all bug fixes where the previous
109
behavior was unintentional. The changes are:
11-
12-
* Consistently discard blank lines between a `{` or `[` and a subsequent
13-
comment. It used to do this before the `{` in type bodies, but not switch
14-
bodies, optional parameter sections, or named parameter sections.
15-
16-
* Don't allow splitting an empty class body.
17-
18-
* Allow splitting after an inline block comment in some places where it makes
19-
sense.
20-
21-
* Don't allow a line comment in an argument list to cause preceding arguments
22-
to be misformatted.
23-
24-
* Remove blank lines after a line comment at the end of a body.
25-
26-
* Require `package:analyzer` version `4.4.0`.
10+
* Consistently discard blank lines between a `{` or `[` and a subsequent
11+
comment. It used to do this before the `{` in type bodies, but not switch
12+
bodies, optional parameter sections, or named parameter sections.
13+
* Don't allow splitting an empty class body.
14+
* Allow splitting after an inline block comment in some places where it makes
15+
sense.
16+
* Don't allow a line comment in an argument list to cause preceding arguments
17+
to be misformatted.
18+
* Remove blank lines after a line comment at the end of a body.
19+
* Require `package:analyzer` `>=4.4.0 <6.0.0`.
2720

2821
# 2.2.3
2922

lib/src/cli/formatter_options.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import 'show.dart';
1111
import 'summary.dart';
1212

1313
// Note: The following line of code is modified by tool/grind.dart.
14-
const dartStyleVersion = '2.2.2';
14+
const dartStyleVersion = '2.2.4';
1515

1616
/// Global options that affect how the formatter produces and uses its outputs.
1717
class FormatterOptions {

pubspec.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ packages:
77
name: _fe_analyzer_shared
88
url: "https://pub.dartlang.org"
99
source: hosted
10-
version: "44.0.0"
10+
version: "48.0.0"
1111
analyzer:
1212
dependency: "direct main"
1313
description:
1414
name: analyzer
1515
url: "https://pub.dartlang.org"
1616
source: hosted
17-
version: "4.4.0"
17+
version: "5.0.0"
1818
args:
1919
dependency: "direct main"
2020
description:
@@ -63,7 +63,7 @@ packages:
6363
name: coverage
6464
url: "https://pub.dartlang.org"
6565
source: hosted
66-
version: "1.5.0"
66+
version: "1.6.0"
6767
crypto:
6868
dependency: transitive
6969
description:
@@ -84,7 +84,7 @@ packages:
8484
name: frontend_server_client
8585
url: "https://pub.dartlang.org"
8686
source: hosted
87-
version: "2.1.3"
87+
version: "3.0.0"
8888
glob:
8989
dependency: transitive
9090
description:
@@ -280,21 +280,21 @@ packages:
280280
name: test
281281
url: "https://pub.dartlang.org"
282282
source: hosted
283-
version: "1.21.4"
283+
version: "1.21.6"
284284
test_api:
285285
dependency: transitive
286286
description:
287287
name: test_api
288288
url: "https://pub.dartlang.org"
289289
source: hosted
290-
version: "0.4.12"
290+
version: "0.4.14"
291291
test_core:
292292
dependency: transitive
293293
description:
294294
name: test_core
295295
url: "https://pub.dartlang.org"
296296
source: hosted
297-
version: "0.4.16"
297+
version: "0.4.18"
298298
test_descriptor:
299299
dependency: "direct dev"
300300
description:
@@ -322,7 +322,7 @@ packages:
322322
name: vm_service
323323
url: "https://pub.dartlang.org"
324324
source: hosted
325-
version: "9.3.0"
325+
version: "9.4.0"
326326
watcher:
327327
dependency: transitive
328328
description:
@@ -343,7 +343,7 @@ packages:
343343
name: webkit_inspection_protocol
344344
url: "https://pub.dartlang.org"
345345
source: hosted
346-
version: "1.1.0"
346+
version: "1.2.0"
347347
yaml:
348348
dependency: "direct dev"
349349
description:
@@ -352,4 +352,4 @@ packages:
352352
source: hosted
353353
version: "3.1.1"
354354
sdks:
355-
dart: ">=2.17.0 <3.0.0"
355+
dart: ">=2.18.0 <3.0.0"

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: dart_style
22
# Note: See tool/grind.dart for how to bump the version.
3-
version: 2.2.4-dev
3+
version: 2.2.4
44
description: >-
55
Opinionated, automatic Dart source code formatter.
66
Provides an API and a CLI tool.
@@ -9,7 +9,7 @@ environment:
99
sdk: ">=2.17.0 <3.0.0"
1010

1111
dependencies:
12-
analyzer: '>=4.4.0 <5.0.0'
12+
analyzer: '>=4.4.0 <6.0.0'
1313
args: ">=1.0.0 <3.0.0"
1414
path: ^1.0.0
1515
pub_semver: ">=1.4.4 <3.0.0"

0 commit comments

Comments
 (0)