[go: nahoru, domu]

Skip to content

Commit

Permalink
Update samples for Dart v3.1 and package:lints v3 (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
parlough committed Oct 20, 2023
1 parent e6e5ea4 commit 82f2ed4
Show file tree
Hide file tree
Showing 22 changed files with 40 additions and 38 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Created with package:mono_repo v6.5.7
# Created with package:mono_repo v6.6.0
name: Dart CI
on:
push:
Expand Down Expand Up @@ -33,7 +33,7 @@ jobs:
name: Checkout repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
- name: mono_repo self validate
run: dart pub global activate mono_repo 6.5.7
run: dart pub global activate mono_repo 6.6.0
- name: mono_repo self validate
run: dart pub global run mono_repo generate --validate
job_002:
Expand Down Expand Up @@ -935,7 +935,7 @@ jobs:
if: "always() && steps.package_constraint_solver_pub_upgrade.conclusion == 'success'"
working-directory: package_constraint_solver
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@main
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
path-to-lcov: package_constraint_solver/coverage/lcov.info
Expand Down Expand Up @@ -1204,7 +1204,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Mark Coveralls job finished
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@main
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
parallel-finished: true
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ See the [Contributing guide][contributing] for details on how to contribute.

[dart]: https://dart.dev
[awesome-dart]: https://github.com/yissachar/awesome-dart
[contributing]: https://github.com/dart-lang/samples/blob/master/CONTRIBUTING.md
[contributing]: https://github.com/dart-lang/samples/blob/main/CONTRIBUTING.md
[pop-pop-win]: https://github.com/dart-lang/sample-pop_pop_win
[dart-tutorials]: https://dart.dev/tutorials
4 changes: 2 additions & 2 deletions command_line/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >
publish_to: none

environment:
sdk: ^3.0.0
sdk: ^3.1.0

dependencies:
args: ^2.4.0
Expand All @@ -18,7 +18,7 @@ dependencies:
dev_dependencies:
build_cli: ^2.2.2
build_runner: ^2.4.6
lints: ^2.1.0
lints: ^3.0.0
test: ^1.24.0

executables:
Expand Down
4 changes: 2 additions & 2 deletions enhanced_enums/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ description: Samples that demonstrates the enhanced enums syntax
publish_to: none

environment:
sdk: ^3.0.0
sdk: ^3.1.0

dev_dependencies:
lints: ^2.1.0
lints: ^3.0.0
test: ^1.24.0
4 changes: 2 additions & 2 deletions extension_methods/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ description: >
publish_to: none

environment:
sdk: ^3.0.0
sdk: ^3.1.0

dev_dependencies:
lints: ^2.1.0
lints: ^3.0.0
test: ^1.24.0
4 changes: 2 additions & 2 deletions ffi/hello_world/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ description: >-
publish_to: none

environment:
sdk: ^3.0.0
sdk: ^3.1.0

dependencies:
path: ^1.8.3

dev_dependencies:
lints: ^2.1.0
lints: ^3.0.0
test: ^1.24.0
# test_utils depends on code elsewhere in the samples repository.
# You can reference it for useful cross-platform testing functionality
Expand Down
4 changes: 2 additions & 2 deletions ffi/primitives/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ description: A super simple example of calling C code from Dart with FFI
publish_to: none

environment:
sdk: ^3.0.0
sdk: ^3.1.0

dependencies:
ffi: ^2.1.0
path: ^1.8.3

dev_dependencies:
lints: ^2.1.0
lints: ^3.0.0
test: ^1.24.0
# test_utils depends on code elsewhere in the samples repository.
# You can reference it for useful cross-platform testing functionality
Expand Down
4 changes: 2 additions & 2 deletions ffi/structs/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ description: >-
publish_to: none

environment:
sdk: ^3.0.0
sdk: ^3.1.0

dependencies:
ffi: ^2.1.0
path: ^1.8.3

dev_dependencies:
lints: ^2.1.0
lints: ^3.0.0
test: ^1.24.0
# test_utils depends on code elsewhere in the samples repository.
# You can reference it for useful cross-platform testing functionality
Expand Down
4 changes: 2 additions & 2 deletions ffi/system-command/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ description: A FFI application that invokes system commands.
publish_to: none

environment:
sdk: ^3.0.0
sdk: ^3.1.0

dependencies:
ffi: ^2.1.0

dev_dependencies:
lints: ^2.1.0
lints: ^3.0.0
test: ^1.24.0
4 changes: 2 additions & 2 deletions ffi/test_utils/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ name: test_utils
publish_to: none

environment:
sdk: ^3.0.0
sdk: ^3.1.0

dependencies:
path: ^1.8.3

dev_dependencies:
lints: ^2.1.0
lints: ^3.0.0
4 changes: 2 additions & 2 deletions isolates/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ description: A sample command-line application.
publish_to: none

environment:
sdk: ^3.0.0
sdk: ^3.1.0

dependencies:
async: ^2.11.0

dev_dependencies:
lints: ^2.1.0
lints: ^3.0.0
test: ^1.24.0
4 changes: 2 additions & 2 deletions native_app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ description: >
publish_to: none

environment:
sdk: ^3.0.0
sdk: ^3.1.0

dev_dependencies:
lints: ^2.1.0
lints: ^3.0.0

executables:
main: hello_world
4 changes: 2 additions & 2 deletions null_safety/calculate_lix/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ version: 1.3.0
publish_to: none

environment:
sdk: ^3.0.0
sdk: ^3.1.0

dependencies:
collection: ^1.18.0

dev_dependencies:
lints: ^2.1.0
lints: ^3.0.0
4 changes: 2 additions & 2 deletions package_constraint_solver/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ repository: https://github.com/dart-lang/samples/tree/main/package_constraint_so
publish_to: none

environment:
sdk: ^3.0.0
sdk: ^3.1.0

dependencies:
path: ^1.8.3

dev_dependencies:
checks: ^0.2.0
lints: ^2.1.0
lints: ^3.0.0
intl: ^0.18.1
test: ^1.24.0
1 change: 1 addition & 0 deletions parameters/lib/named_parameters.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/// This example shows the use of named arguments and parameters.
///
/// See the test under `../test/named_parameters_test.dart` for its use.
library;

/// Function that counts the amount of [items] that match a given [predicate],
/// with the option to skip the first [skip] elements.
Expand Down
1 change: 1 addition & 0 deletions parameters/lib/super_initalizer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/// Super-initializer parameters allow to forward constructor parameters
/// to the superclass, avoiding having to write the parameter multiple times
/// in the superclass constructor invocation.
library;

/// This example contains multiple classes representing different types of
/// synthesizers, a musical instrument similar to a piano
Expand Down
4 changes: 2 additions & 2 deletions parameters/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ version: 1.0.0
publish_to: none

environment:
sdk: ^3.0.0
sdk: ^3.1.0

dev_dependencies:
lints: ^2.1.0
lints: ^3.0.0
test: ^1.24.0
2 changes: 1 addition & 1 deletion server/google_apis/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include: package:dart_flutter_team_lints/analysis_options.yaml
include: package:lints/recommended.yaml
4 changes: 2 additions & 2 deletions server/google_apis/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: cloud_run_google_apis
publish_to: none # not intended for publication to pub.dev

environment:
sdk: ^3.0.0
sdk: ^3.1.0

dependencies:
google_cloud: ^0.2.0
Expand All @@ -12,4 +12,4 @@ dependencies:
shelf_router: ^1.1.0

dev_dependencies:
dart_flutter_team_lints: ^1.0.0
lints: ^3.0.0
2 changes: 1 addition & 1 deletion server/simple/bin/server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Future<void> main() async {
// First, serve files from the 'public' directory
.add(_staticHandler)
// If a corresponding file is not found, send requests to a `Router`
.add(_router);
.add(_router.call);

// See https://pub.dev/documentation/shelf/latest/shelf_io/serve.html
final server = await shelf_io.serve(
Expand Down
4 changes: 2 additions & 2 deletions server/simple/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: container_server_example
publish_to: none # not intended for publication to pub.dev

environment:
sdk: ^3.0.0
sdk: ^3.1.0

dependencies:
shelf: ^1.4.0
Expand All @@ -11,6 +11,6 @@ dependencies:

dev_dependencies:
http: ^1.1.0
lints: ^2.1.0
lints: ^3.0.0
test: ^1.24.0
test_process: ^2.1.0
2 changes: 1 addition & 1 deletion tool/ci.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Created with package:mono_repo v6.5.7
# Created with package:mono_repo v6.6.0

# Support built in commands on windows out of the box.
# When it is a flutter repo (check the pubspec.yaml for "sdk: flutter")
Expand Down

0 comments on commit 82f2ed4

Please sign in to comment.