Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ jobs:
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # 4.0.0

- name: Setup Dart
uses: dart-lang/setup-dart@fe21d53e1e27c70b5c8e8273d4bcc0d23c071577 # main
uses: dart-lang/setup-dart@21e68f4d54916e6c2f68f8c290b2aed9b02cbd3e # main
with:
sdk: 3.9.0

- name: Setup pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # 4.1.0
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # 4.2.0
with:
version: 9

Expand All @@ -61,7 +61,7 @@ jobs:
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # 4.0.0

- name: Setup Dart
uses: dart-lang/setup-dart@fe21d53e1e27c70b5c8e8273d4bcc0d23c071577 # main
uses: dart-lang/setup-dart@21e68f4d54916e6c2f68f8c290b2aed9b02cbd3e # main
with:
sdk: 3.9.0

Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
- name: Git Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # 4.0.0

- uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # 5.0.0
- uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # 5.2.0
with:
distribution: "corretto" # Amazon Corretto Build of OpenJDK
java-version: "17"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/aft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
git config --global user.name "Amplify Flutter"

- name: Setup Dart
uses: dart-lang/setup-dart@fe21d53e1e27c70b5c8e8273d4bcc0d23c071577 # main
uses: dart-lang/setup-dart@21e68f4d54916e6c2f68f8c290b2aed9b02cbd3e # main
with:
sdk: stable

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/amplify_canaries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
channel: ${{ matrix.channel }}
flutter-version: ${{ matrix.flutter-version }}

- uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # 5.0.0
- uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # 5.2.0
with:
distribution: "corretto" # Amazon Corretto Build of OpenJDK
java-version: "17"
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
channel: ${{ matrix.channel }}
flutter-version: ${{ matrix.flutter-version }}

- uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # 5.0.0
- uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # 5.2.0
with:
distribution: "corretto" # Amazon Corretto Build of OpenJDK
java-version: "17"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dart_dart2js.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- sdk: ${{ (github.event_name == 'pull_request') && 'beta' || 'NONE' }}
steps:
- name: Cache Pub dependencies
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # 4.2.3
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # 5.0.3
with:
path: |
~/.pub-cache/hosted
Expand All @@ -51,7 +51,7 @@ jobs:
run: git submodule update --init

- name: Setup Dart
uses: dart-lang/setup-dart@fe21d53e1e27c70b5c8e8273d4bcc0d23c071577 # main
uses: dart-lang/setup-dart@21e68f4d54916e6c2f68f8c290b2aed9b02cbd3e # main
with:
sdk: ${{ matrix.sdk }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dart_ddc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- sdk: ${{ (github.event_name == 'pull_request') && 'beta' || 'NONE' }}
steps:
- name: Cache Pub dependencies
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # 4.2.3
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # 5.0.3
with:
path: |
~/.pub-cache/hosted
Expand All @@ -51,7 +51,7 @@ jobs:
run: git submodule update --init

- name: Setup Dart
uses: dart-lang/setup-dart@fe21d53e1e27c70b5c8e8273d4bcc0d23c071577 # main
uses: dart-lang/setup-dart@21e68f4d54916e6c2f68f8c290b2aed9b02cbd3e # main
with:
sdk: ${{ matrix.sdk }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dart_native.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Cache Pub dependencies
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # 4.2.3
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # 5.0.3
with:
path: |
~/.pub-cache/hosted
Expand All @@ -48,7 +48,7 @@ jobs:
run: git submodule update --init

- name: Setup Dart
uses: dart-lang/setup-dart@fe21d53e1e27c70b5c8e8273d4bcc0d23c071577 # main
uses: dart-lang/setup-dart@21e68f4d54916e6c2f68f8c290b2aed9b02cbd3e # main
with:
sdk: stable

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dart_vm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- sdk: ${{ (github.event_name == 'pull_request') && 'beta' || 'NONE' }}
steps:
- name: Cache Pub dependencies
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # 4.2.3
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # 5.0.3
with:
path: |
~/.pub-cache/hosted
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
channel: stable

- name: Setup Dart
uses: dart-lang/setup-dart@fe21d53e1e27c70b5c8e8273d4bcc0d23c071577 # main
uses: dart-lang/setup-dart@21e68f4d54916e6c2f68f8c290b2aed9b02cbd3e # main
with:
sdk: ${{ matrix.sdk }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e_android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
persist-credentials: false
submodules: true

- uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # 5.0.0
- uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # 5.2.0
with:
distribution: "corretto" # Amazon Corretto Build of OpenJDK
java-version: "17"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/flutter_android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- channel: ${{ (github.event_name == 'pull_request') && 'beta' || 'NONE' }}
steps:
- name: Setup Java
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # 5.0.0
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # 5.2.0
with:
distribution: "corretto" # Amazon Corretto Build of OpenJDK
java-version: "17"
Expand All @@ -50,7 +50,7 @@ jobs:
channel: ${{ matrix.channel }}

- name: Setup Java
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # 5.0.0
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # 5.2.0
with:
distribution: "corretto" # Amazon Corretto Build of OpenJDK
java-version: "17"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flutter_vm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:

- name: Archive golden failures
if: "always() && inputs.has-goldens && steps.testJob.conclusion == 'failure'"
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # 6.0.0
with:
name: golden-failures-${{ matrix.channel }}-${{ matrix.flutter-version }}
path: ${{ inputs.working-directory }}/test/ui/failures/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate_workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
submodules: true

- name: Setup Dart
uses: dart-lang/setup-dart@fe21d53e1e27c70b5c8e8273d4bcc0d23c071577 # main
uses: dart-lang/setup-dart@21e68f4d54916e6c2f68f8c290b2aed9b02cbd3e # main
with:
sdk: stable

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ dependencies {
// See https://github.com/aws-amplify/amplify-flutter/issues/2640
implementation 'com.google.crypto.tink:tink-android:[1.8.0, )'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.robolectric:robolectric:4.15.1'
testImplementation 'org.robolectric:robolectric:4.16.1'
testImplementation 'androidx.test:core-ktx:1.6.1'
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class AmplifySecureStorageCupertino extends AmplifySecureStorageInterface {
final attributes = _createCFDictionary(
map: {
security.kSecValueData: data,
if (_accessible != null) security.kSecAttrAccessible: _accessible!,
security.kSecAttrAccessible: ?_accessible,
},
arena: arena,
);
Expand All @@ -128,7 +128,7 @@ class AmplifySecureStorageCupertino extends AmplifySecureStorageInterface {
final query = _createCFDictionary(
map: {
...baseQueryAttributes,
if (_accessible != null) security.kSecAttrAccessible: _accessible!,
security.kSecAttrAccessible: ?_accessible,
security.kSecValueData: secret,
},
arena: arena,
Expand Down Expand Up @@ -183,7 +183,7 @@ class AmplifySecureStorageCupertino extends AmplifySecureStorageInterface {
final query = _createCFDictionary(
map: {
...baseQueryAttributes,
if (_accessible != null) security.kSecAttrAccessible: _accessible!,
security.kSecAttrAccessible: ?_accessible,
security.kSecMatchLimit: security.kSecMatchLimitOne,
security.kSecReturnData: security.kCFBooleanTrue,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class StructureGenerator extends LibraryGenerator<StructureShape>
if (shape.isOutputShape || shape.isError) fromResponseConstructor,
])
..methods.addAll([
if (_initializer case final init?) init,
?_initializer,
..._fieldGetters(isPayload: false),
..._httpInputOverrides,
if (shape.isInputShape || hasPayload) _getPayload,
Expand Down Expand Up @@ -110,7 +110,7 @@ class StructureGenerator extends LibraryGenerator<StructureShape>
..mixins.addAll([DartTypes.awsCommon.awsEquatable(payloadSymbol)])
..constructors.addAll([_payloadFactoryConstructor, _privateConstructor])
..methods.addAll([
if (_payloadInitializer case final init?) init,
?_payloadInitializer,
..._fieldGetters(isPayload: true),
_props(payloadMembers),
_toString(isPayload: true),
Expand Down Expand Up @@ -212,9 +212,7 @@ class StructureGenerator extends LibraryGenerator<StructureShape>

return Parameter(
(p) => p
..annotations.addAll([
if (deprecatedAnnotation != null) deprecatedAnnotation,
])
..annotations.addAll([?deprecatedAnnotation])
..required = !isNullable
..name = member.dartName(ShapeType.structure)
..named = true
Expand Down
19 changes: 7 additions & 12 deletions packages/smithy/smithy_codegen/lib/src/generator/types.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ class _Core {
(t) => t
..symbol = 'Iterable'
..url = _url
..types.addAll([if (ref != null) ref]),
..types.addAll([?ref]),
);

/// Creates a [core.List] reference.
Reference list([Reference? ref]) => TypeReference(
(t) => t
..symbol = 'List'
..url = _url
..types.addAll([if (ref != null) ref]),
..types.addAll([?ref]),
);

/// Creates a [core.Map] reference.
Expand Down Expand Up @@ -190,7 +190,7 @@ class _Async {
(t) => t
..symbol = 'Stream'
..url = _url
..types.addAll([if (ref != null) ref]),
..types.addAll([?ref]),
);

/// Creates a `runZoned` refererence.
Expand Down Expand Up @@ -587,12 +587,7 @@ class _Smithy {
(t) => t
..symbol = 'HttpProtocol'
..url = _url
..types.addAll([
if (inputPayload != null) inputPayload,
if (input != null) input,
if (outputPayload != null) outputPayload,
if (output != null) output,
]),
..types.addAll([?inputPayload, ?input, ?outputPayload, ?output]),
);

/// Creates a [smithy.HttpRequest] AST reference.
Expand Down Expand Up @@ -656,7 +651,7 @@ class _Smithy {
(t) => t
..symbol = 'PrimitiveSmithySerializer'
..url = _url
..types.addAll([if (ref != null) ref]),
..types.addAll([?ref]),
);

/// Creates a [smithy.RpcRouter] reference.
Expand Down Expand Up @@ -728,7 +723,7 @@ class _Smithy {
(t) => t
..symbol = 'SmithySerializer'
..url = _url
..types.addAll([if (ref != null) ref]),
..types.addAll([?ref]),
);

/// Creates a [smithy.StructuredSmithySerializer] reference for [ref], the
Expand All @@ -737,7 +732,7 @@ class _Smithy {
(t) => t
..symbol = 'StructuredSmithySerializer'
..url = _url
..types.addAll([if (ref != null) ref]),
..types.addAll([?ref]),
);

/// Creates a [smithy.Timestamp] reference.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,7 @@ class UnionGenerator extends LibraryGenerator<UnionShape>
..name = variantClassName(member)
..modifier = ClassModifier.final$
..extend = symbol
..constructors.addAll([
ctor,
if (privateConstructor != null) privateConstructor,
])
..constructors.addAll([ctor, ?privateConstructor])
..fields.addAll([
if (member.target != Shape.unit)
Field(
Expand Down
2 changes: 1 addition & 1 deletion packages/worker_bee/worker_bee/lib/src/js/impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ mixin WorkerBeeImpl<Request extends Object, Response>
Future<void> spawn({String? jsEntrypoint}) async {
return runTraced(() async {
for (final entrypoint in [
if (jsEntrypoint != null) jsEntrypoint,
?jsEntrypoint,
this.jsEntrypoint,
...fallbackUrls,
]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class _Core {
Reference list([Reference? ref]) => TypeReference(
(t) => t
..symbol = 'List'
..types.addAll([if (ref != null) ref]),
..types.addAll([?ref]),
);

/// Creates a [core.Map] reference.
Expand Down
Loading