Skip to content

Commit 3429f02

Browse files
committed
Feat: Add dart_grog_lint package
1 parent 5094fdd commit 3429f02

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+854
-37
lines changed

.github/workflows/dart_frog_lint.yaml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: dart_frog_lint
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- ".github/workflows/dart_frog_lint.yaml"
7+
- "packages/dart_frog_lint/example/**"
8+
- "packages/dart_frog_lint/lib/**"
9+
- "packages/dart_frog_lint/test/**"
10+
- "packages/dart_frog_lint/pubspec.yaml"
11+
push:
12+
branches:
13+
- main
14+
paths:
15+
- ".github/workflows/dart_frog_lint.yaml"
16+
- "packages/dart_frog_lint/example/**"
17+
- "packages/dart_frog_lint/lib/**"
18+
- "packages/dart_frog_lint/test/**"
19+
- "packages/dart_frog_lint/pubspec.yaml"
20+
21+
jobs:
22+
build:
23+
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
24+
with:
25+
working_directory: packages/dart_frog
26+
27+
custom_lint:
28+
runs-on: ubuntu-latest
29+
defaults:
30+
run:
31+
working-directory: packages/dart_frog_lint
32+
33+
steps:
34+
# Bootstrap project
35+
- uses: actions/[email protected]
36+
with:
37+
fetch-depth: 2
38+
- uses: subosito/[email protected]
39+
- name: Add pub cache bin to PATH
40+
run: echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH
41+
- name: Add pub cache to PATH
42+
run: echo "PUB_CACHE="$HOME/.pub-cache"" >> $GITHUB_ENV
43+
- name: Install dependencies
44+
run: flutter pub get
45+
46+
# Finally do some checks
47+
- name: Run custom_lint
48+
run: dart run custom_lint
49+
50+
pana:
51+
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/pana.yml@v1
52+
with:
53+
working_directory: packages/dart_frog

docs/docs/basics/resources.md

+2-8
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,12 @@ title: 📚 Additional Resources
55

66
# Additional Resources 📚
77

8-
- [Examples][examples_link]
9-
- [Roadmap][roadmap_link]
10-
- [Blog post][blog_link]
11-
- [Livestream demo][livestream_link]
8+
- [Awesome Dart Frog repo][awesome_dart_frog_link]: Highlights awesome Dart Frog resources — articles, videos, open source projects, and more!
129

1310
:::info
1411
Fun fact: Did you know the [dart2js][dart2js_compiler_link] compiler [used to be called frog][dart2js_frog_pr_link]?
1512
:::
1613

17-
[blog_link]: https://verygood.ventures/blog/dart-frog
1814
[dart2js_compiler_link]: https://dart.dev/tools/dart2js
1915
[dart2js_frog_pr_link]: https://github.com/dart-lang/sdk/issues/2194
20-
[examples_link]: https://github.com/VeryGoodOpenSource/dart_frog/tree/main/examples
21-
[livestream_link]: https://youtu.be/N7l0b09c6DA
22-
[roadmap_link]: /docs/roadmap
16+
[awesome_dart_frog_link]: https://github.com/VeryGoodOpenSource/awesome-dart-frog

docs/docs/overview.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Dart Frog provides a simple core with a small API surface area in order to reduc
1818
In order to use Dart Frog you must have the [Dart SDK][dart_installation_link] installed on your machine.
1919

2020
:::info
21-
Dart Frog requires Dart `">=2.17.0 <3.0.0"`
21+
Dart Frog requires Dart `">=2.19.0 <3.0.0"`
2222
:::
2323

2424
### Installing 🧑‍💻

docs/docs/tutorials/todos.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ version: 0.1.0+1
167167
publish_to: none
168168

169169
environment:
170-
sdk: '>=2.17.0 <3.0.0'
170+
sdk: '>=2.19.0 <3.0.0'
171171

172172
dependencies:
173173
equatable: ^2.0.3
@@ -179,7 +179,7 @@ dev_dependencies:
179179
json_serializable: ^6.3.1
180180
mocktail: ^0.3.0
181181
test: ^1.19.2
182-
very_good_analysis: ^3.1.0
182+
very_good_analysis: ^4.0.0
183183
```
184184
185185
Install the newly added dependencies via:
@@ -368,7 +368,7 @@ version: 0.1.0+1
368368
publish_to: none
369369

370370
environment:
371-
sdk: '>=2.17.0 <3.0.0'
371+
sdk: '>=2.19.0 <3.0.0'
372372

373373
dependencies:
374374
todos_data_source:
@@ -378,7 +378,7 @@ dependencies:
378378
dev_dependencies:
379379
mocktail: ^0.3.0
380380
test: ^1.19.2
381-
very_good_analysis: ^3.1.0
381+
very_good_analysis: ^4.0.0
382382
```
383383
384384
:::note
@@ -445,10 +445,10 @@ version: 1.0.0+1
445445
publish_to: none
446446
447447
environment:
448-
sdk: '>=2.17.0 <3.0.0'
448+
sdk: '>=2.19.0 <3.0.0'
449449
450450
dependencies:
451-
dart_frog: ^0.0.1-dev
451+
dart_frog: ^0.3.0
452452
in_memory_todos_data_source:
453453
path: packages/in_memory_todos_data_source
454454
todos_data_source:
@@ -457,7 +457,7 @@ dependencies:
457457
dev_dependencies:
458458
mocktail: ^0.3.0
459459
test: ^1.19.2
460-
very_good_analysis: ^3.1.0
460+
very_good_analysis: ^4.0.0
461461
```
462462

463463
Install the newly added dependencies via:

docs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@babel/eslint-parser": "^7.19.1",
3030
"@docusaurus/eslint-plugin": "^2.3.1",
3131
"@docusaurus/module-type-aliases": "^2.3.1",
32-
"eslint": "^8.34.0",
32+
"eslint": "^8.35.0",
3333
"prettier": "^2.8.4"
3434
},
3535
"browserslist": {

docs/yarn.lock

+20-14
Original file line numberDiff line numberDiff line change
@@ -1775,10 +1775,10 @@
17751775
url-loader "^4.1.1"
17761776
webpack "^5.73.0"
17771777

1778-
"@eslint/eslintrc@^1.4.1":
1779-
version "1.4.1"
1780-
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.4.1.tgz#af58772019a2d271b7e2d4c23ff4ddcba3ccfb3e"
1781-
integrity sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==
1778+
"@eslint/eslintrc@^2.0.0":
1779+
version "2.0.0"
1780+
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.0.0.tgz#943309d8697c52fc82c076e90c1c74fbbe69dbff"
1781+
integrity sha512-fluIaaV+GyV24CCu/ggiHdV+j4RNh85yQnAYS/G2mZODZgGmmlrgCydjUcV3YvxCm9x8nMAfThsqTni4KiXT4A==
17821782
dependencies:
17831783
ajv "^6.12.4"
17841784
debug "^4.3.2"
@@ -1790,6 +1790,11 @@
17901790
minimatch "^3.1.2"
17911791
strip-json-comments "^3.1.1"
17921792

1793+
1794+
version "8.35.0"
1795+
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.35.0.tgz#b7569632b0b788a0ca0e438235154e45d42813a7"
1796+
integrity sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw==
1797+
17931798
"@hapi/hoek@^9.0.0":
17941799
version "9.3.0"
17951800
resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb"
@@ -3867,12 +3872,13 @@ eslint-visitor-keys@^3.3.0:
38673872
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826"
38683873
integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==
38693874

3870-
eslint@^8.34.0:
3871-
version "8.34.0"
3872-
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.34.0.tgz#fe0ab0ef478104c1f9ebc5537e303d25a8fb22d6"
3873-
integrity sha512-1Z8iFsucw+7kSqXNZVslXS8Ioa4u2KM7GPwuKtkTFAqZ/cHMcEaR+1+Br0wLlot49cNxIiZk5wp8EAbPcYZxTg==
3875+
eslint@^8.35.0:
3876+
version "8.35.0"
3877+
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.35.0.tgz#fffad7c7e326bae606f0e8f436a6158566d42323"
3878+
integrity sha512-BxAf1fVL7w+JLRQhWl2pzGeSiGqbWumV4WNvc9Rhp6tiCtm4oHnyPBSEtMGZwrQgudFQ+otqzWoPB7x+hxoWsw==
38743879
dependencies:
3875-
"@eslint/eslintrc" "^1.4.1"
3880+
"@eslint/eslintrc" "^2.0.0"
3881+
"@eslint/js" "8.35.0"
38763882
"@humanwhocodes/config-array" "^0.11.8"
38773883
"@humanwhocodes/module-importer" "^1.0.1"
38783884
"@nodelib/fs.walk" "^1.2.8"
@@ -3886,7 +3892,7 @@ eslint@^8.34.0:
38863892
eslint-utils "^3.0.0"
38873893
eslint-visitor-keys "^3.3.0"
38883894
espree "^9.4.0"
3889-
esquery "^1.4.0"
3895+
esquery "^1.4.2"
38903896
esutils "^2.0.2"
38913897
fast-deep-equal "^3.1.3"
38923898
file-entry-cache "^6.0.1"
@@ -3926,10 +3932,10 @@ esprima@^4.0.0:
39263932
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
39273933
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
39283934

3929-
esquery@^1.4.0:
3930-
version "1.4.0"
3931-
resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5"
3932-
integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==
3935+
esquery@^1.4.2:
3936+
version "1.4.2"
3937+
resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.2.tgz#c6d3fee05dd665808e2ad870631f221f5617b1d1"
3938+
integrity sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==
39333939
dependencies:
39343940
estraverse "^5.1.0"
39353941

packages/dart_frog_cli/CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 0.3.3
2+
3+
- fix: adjust `InternetAddress` to `anyIPv6`
4+
- refactor: update to Dart 2.19 and `very_good_analysis ^4.0.0`
5+
16
# 0.3.2
27

38
- fix: update silently fails when the sdk is incompatible

packages/dart_frog_cli/lib/src/commands/dev/dev.dart

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import 'dart:collection';
22
import 'dart:convert';
33
import 'dart:io' as io;
4-
import 'dart:io';
54

65
import 'package:dart_frog_cli/src/command.dart';
76
import 'package:dart_frog_cli/src/commands/commands.dart';
@@ -54,7 +53,7 @@ class DevCommand extends DartFrogCommand {
5453
/// {@macro dev_command}
5554
DevCommand({
5655
super.logger,
57-
void Function(Directory)? ensureRuntimeCompatibility,
56+
void Function(io.Directory)? ensureRuntimeCompatibility,
5857
DirectoryWatcherBuilder? directoryWatcher,
5958
GeneratorBuilder? generator,
6059
RestorableDirectoryGeneratorTargetBuilder? generatorTarget,
@@ -81,7 +80,7 @@ class DevCommand extends DartFrogCommand {
8180
);
8281
}
8382

84-
final void Function(Directory) _ensureRuntimeCompatibility;
83+
final void Function(io.Directory) _ensureRuntimeCompatibility;
8584
final DirectoryWatcherBuilder _directoryWatcher;
8685
final GeneratorBuilder _generator;
8786
final Exit _exit;

packages/dart_frog_cli/lib/src/version.dart

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/dart_frog_cli/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: dart_frog_cli
22
description: The official command line interface for Dart Frog. Built by Very Good Ventures.
3-
version: 0.3.2
3+
version: 0.3.3
44
homepage: https://dartfrog.vgv.dev
55
repository: https://github.com/VeryGoodOpenSource/dart_frog
66
issue_tracker: https://github.com/VeryGoodOpenSource/dart_frog/issues
@@ -11,7 +11,7 @@ environment:
1111

1212
dependencies:
1313
args: ^2.1.0
14-
cli_completion: ^0.2.0
14+
cli_completion: ^0.3.0
1515
mason: ^0.1.0-dev.39
1616
meta: ^1.7.0
1717
path: ^1.8.1

packages/dart_frog_lint/.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# See https://www.dartlang.org/guides/libraries/private-files
2+
3+
# Files and directories created by pub
4+
.dart_tool/
5+
.packages
6+
build/
7+
pubspec.lock
8+
9+
# Test related files
10+
coverage/

packages/dart_frog_lint/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Unreleased
2+
3+
Initial release

packages/dart_frog_lint/LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Very Good Ventures
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)