Skip to content

Commit

Permalink
Merge branch 'google:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
oliatienza authored Sep 4, 2024
2 parents 9b6625f + 55d68f4 commit d4ccec6
Show file tree
Hide file tree
Showing 153 changed files with 1,510 additions and 1,565 deletions.
12 changes: 9 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: github-actions
directory: /
schedule:
interval: "monthly"
interval: monthly
labels:
- autosubmit
groups:
dependencies:
patterns:
- "*"
387 changes: 122 additions & 265 deletions .github/workflows/dart.yml

Large diffs are not rendered by default.

18 changes: 4 additions & 14 deletions .github/workflows/markdown_linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,10 @@ jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- uses: gaurav-nelson/github-action-markdown-link-check@v1
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: gaurav-nelson/github-action-markdown-link-check@5c5dfc0ac2e225883c0e5f03a85311ec2830d368
markdown_lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 14.x ]
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install --global markdownlint-cli2
- name: Run lint check
run: markdownlint-cli2-fix "**/*.md"
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: DavidAnson/markdownlint-cli2-action@b4c9feab76d8025d1e83c653fa3990936df0e6c8
36 changes: 20 additions & 16 deletions .github/workflows/no-response.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,37 @@
# A workflow to close issues where the author hasn't responded to a request for
# more information; see https://github.com/godofredoc/no-response for docs.
# more information; see https://github.com/actions/stale.

name: No Response

# Both `issue_comment` and `scheduled` event types are required.
# Run as a daily cron.
on:
issue_comment:
types: [created]
schedule:
# Every day at 8am
- cron: '0 8 * * *'

# All permissions not specified are set to 'none'.
permissions:
issues: write
pull-requests: write

jobs:
noResponse:
no-response:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'google' }}
steps:
- uses: godofredoc/no-response@0ce2dc0e63e1c7d2b87752ceed091f6d32c9df09
with:
responseRequiredLabel: "State: needs info"
daysUntilClose: 14
# Comment to post when closing an Issue for lack of response.
closeComment: >
Without additional information we're not able to resolve this
issue, so it will be closed at this time. You're still free to add
more info and respond to any questions above, though. We'll reopen
the case if you do. Thanks for your contribution!
token: ${{ github.token }}
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e
with:
# Don't automatically mark inactive issues+PRs as stale.
days-before-stale: -1
# Close needs-info issues and PRs after 14 days of inactivity.
days-before-close: 14
stale-issue-label: "needs-info"
close-issue-message: >
Without additional information we're not able to resolve this issue.
Feel free to add more info or respond to any questions above and we
can reopen the case. Thanks for your contribution!
stale-pr-label: "needs-info"
close-pr-message: >
Without additional information we're not able to resolve this PR.
Feel free to add more info or respond to any questions above.
Thanks for your contribution!
3 changes: 3 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ jobs:
publish:
if: ${{ github.repository_owner == 'google' }}
uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main
permissions:
id-token: write # Required for authentication using OIDC
pull-requests: write # Required for writing the pull request note
4 changes: 4 additions & 0 deletions _test_yaml/mono_pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ stages:
- group:
- format
- analyze: --fatal-infos .
sdk: dev
- group:
- analyze
sdk: pubspec
- unit_test:
- test
- ensure_build:
Expand Down
23 changes: 8 additions & 15 deletions _test_yaml/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,18 @@ name: _test_yaml
publish_to: none

environment:
sdk: ^3.0.0
sdk: ^3.5.0

resolution: workspace

dev_dependencies:
_json_serial_shared_test:
path: ../shared_test
build_runner: ^2.0.0
build_runner: ^2.2.1
build_verify: ^3.0.0
checked_yaml: any
dart_flutter_team_lints: ^1.0.0
json_annotation: ^4.7.0
json_serializable: any
checked_yaml: ^2.0.4-wip
json_annotation: ^4.9.0
json_serializable: ^6.8.0
path: ^1.8.2
test: ^1.6.0
test: ^1.21.6
yaml: ^3.0.0

dependency_overrides:
checked_yaml:
path: ../checked_yaml
json_annotation:
path: ../json_annotation
json_serializable:
path: ../json_serializable
2 changes: 1 addition & 1 deletion _test_yaml/test/ensure_build_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

@TestOn('vm')
@Tags(['presubmit-only'])
library test;
library;

import 'package:build_verify/build_verify.dart';
import 'package:test/test.dart';
Expand Down
43 changes: 19 additions & 24 deletions _test_yaml/test/src/build_config.g.dart

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

2 changes: 1 addition & 1 deletion _test_yaml/test/yaml_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.

@TestOn('vm')
library test;
library;

import 'dart:io';

Expand Down
6 changes: 0 additions & 6 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,17 @@ linter:
- avoid_void_async
- cancel_subscriptions
- cascade_invocations
- comment_references
- invalid_case_patterns
- join_return_with_assignment
- literal_only_boolean_expressions
- missing_whitespace_between_adjacent_strings
- no_runtimeType_toString
- package_api_docs
- prefer_const_constructors
- prefer_const_declarations
- prefer_expression_function_bodies
- prefer_final_locals
- prefer_relative_imports
- sort_child_properties_last
- test_types_in_equals
- type_literal_in_constant_pattern
- unnecessary_breaks
- unsafe_html
- use_full_hex_values_for_flutter_colors
- use_string_buffers
- use_super_parameters
4 changes: 4 additions & 0 deletions checked_yaml/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.0.4-wip

- Require Dart 3.5

## 2.0.3

- Require Dart 2.19
Expand Down
2 changes: 1 addition & 1 deletion checked_yaml/example/example.g.dart

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

5 changes: 4 additions & 1 deletion checked_yaml/mono_pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ stages:
- group:
- format
- analyze: --fatal-infos .

sdk: dev
- group:
- analyze
sdk: pubspec
- unit_test:
- test
- ensure_build:
Expand Down
19 changes: 7 additions & 12 deletions checked_yaml/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: checked_yaml
version: 2.0.3
version: 2.0.4-wip

description: >-
Generate more helpful exceptions when decoding YAML documents using
Expand All @@ -13,24 +13,19 @@ topics:
- codegen

environment:
sdk: '>=2.19.0 <3.0.0'
sdk: ^3.5.0

resolution: workspace

dependencies:
json_annotation: ^4.3.0
source_span: ^1.8.0
yaml: ^3.0.0

dev_dependencies:
build_runner: ^2.0.0
build_runner: ^2.0.6
build_verify: ^3.0.0
dart_flutter_team_lints: ^1.0.0
json_serializable: ^6.0.0
path: ^1.0.0
test: ^1.16.0
path: ^1.8.0
test: ^1.17.10
test_process: ^2.0.0

#dependency_overrides:
# json_annotation:
# path: ../json_annotation
# json_serializable:
# path: ../json_serializable
2 changes: 1 addition & 1 deletion checked_yaml/test/ensure_build_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

@TestOn('vm')
@Tags(['presubmit-only'])
library test;
library;

import 'package:build_verify/build_verify.dart';
import 'package:test/test.dart';
Expand Down
4 changes: 2 additions & 2 deletions checked_yaml/test/example_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ line 1, column 1: Required keys are missing: name.
_expectThrows(
'{"name":"something"}',
r'''
line 1, column 1: Missing key "count". type 'Null' is not a subtype of type 'int' in type cast
line 1, column 1: Missing key "count". type 'Null' is not a subtype of type 'num' in type cast
1 │ {"name":"something"}
│ ^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -114,7 +114,7 @@ line 1, column 10: Unsupported value for "name". Cannot be empty.
});
}

void _expectThrows(String yamlContent, matcher) => expect(
void _expectThrows(String yamlContent, String matcher) => expect(
() => _run(yamlContent),
throwsA(
isA<ParsedYamlException>().having(
Expand Down
9 changes: 3 additions & 6 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ dependencies to your `pubspec.yaml`.

```yaml
dependencies:
json_annotation: ^4.8.0
json_annotation: ^4.9.0

dev_dependencies:
build_runner: ^2.3.3
json_serializable: ^6.6.0
json_serializable: ^6.8.0
```
Annotate your code with classes defined in
Expand All @@ -23,7 +23,7 @@ Annotate your code with classes defined in
Run `dart run build_runner build` to generate files into your source directory.

```console
> dart pub run build_runner build
> dart run build_runner build
[INFO] ensureBuildScript: Generating build script completed, took 368ms
[INFO] BuildDefinition: Reading cached asset graph completed, took 54ms
[INFO] BuildDefinition: Checking for updates since last build completed, took 663ms
Expand All @@ -32,9 +32,6 @@ Run `dart run build_runner build` to generate files into your source directory.
[INFO] Build: Succeeded after 4687ms with 1 outputs
```

_NOTE_: If you're using Flutter, replace `dart run` with
`flutter pub run`.

[example]: lib/example.dart
[example_g]: lib/example.g.dart
[json_annotation]: https://pub.dev/packages/json_annotation
Expand Down
Loading

0 comments on commit d4ccec6

Please sign in to comment.