Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expanded EnsureNonEmptyArrayDecodable to EnsureNonEmptyCollectionDecodable #3002

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

NachoSoto
Copy link
Contributor

This will be used for ensuring PaywallData localization isn't empty.

@codecov
Copy link

codecov bot commented Aug 11, 2023

Codecov Report

Merging #3002 (60b1cfa) into main (161b04d) will decrease coverage by 0.11%.
Report is 2 commits behind head on main.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #3002      +/-   ##
==========================================
- Coverage   86.68%   86.57%   -0.11%     
==========================================
  Files         219      219              
  Lines       15619    15619              
==========================================
- Hits        13539    13522      -17     
- Misses       2080     2097      +17     
Files Changed Coverage Δ
...sc/Codable/EnsureNonEmptyCollectionDecodable.swift 100.00% <100.00%> (ø)

... and 5 files with indirect coverage changes

@NachoSoto NachoSoto force-pushed the ensure-non-empty-collection branch from 4166f76 to 60b1cfa Compare August 11, 2023 21:32
@NachoSoto NachoSoto merged commit 7a23d5b into main Aug 14, 2023
@NachoSoto NachoSoto deleted the ensure-non-empty-collection branch August 14, 2023 14:35
NachoSoto added a commit that referenced this pull request Aug 14, 2023
Depends on #3002.

This is the new logic for finding the locale to use

```swift
var localizedConfiguration: LocalizedConfiguration {
    let locales: [Locale] = [.current] + Locale.preferredLocales

    return locales
        .lazy
        .compactMap(self.config(for:))
        .first ?? self.fallbackLocalizedConfiguration
}
```

And note that `config(for:)` is a fuzzy-lookup (#2847).
This was referenced Aug 16, 2023
NachoSoto pushed a commit that referenced this pull request Aug 17, 2023
**This is an automatic release.**

### Bugfixes
* `PurchasesOrchestrator`: fixed callback not invoked regression during
downgrades (#3028) via NachoSoto (@NachoSoto)
* `TransactionPoster`: don't finish transactions for non-subscriptions
if they're not processed (#2841) via NachoSoto (@NachoSoto)
### Performance Improvements
* `StoreKit 2`: only listen to `StoreKit.Transaction.updates` when SK2
is enabled (#3032) via NachoSoto (@NachoSoto)
* `CustomerInfoManager`: post transactions in parallel to POST receipts
only once (#2954) via NachoSoto (@NachoSoto)
### Other Changes
* `PostedTransactionCache`: remove implementation (#3030) via NachoSoto
(@NachoSoto)
* `Integration Tests`: improved `testCanPurchaseMultipleSubscriptions`
(#3025) via NachoSoto (@NachoSoto)
* `GitHub`: improved `ISSUE_TEMPLATE` (#3022) via NachoSoto (@NachoSoto)
* `TransactionPoster`: added transaction ID and Date to log (#3026) via
NachoSoto (@NachoSoto)
* `TransactionPoster`: fix iOS 12 test (#3018) via NachoSoto
(@NachoSoto)
* `SystemInfo`: added `ClockType` (#3014) via NachoSoto (@NachoSoto)
* `Integration Tests`: begin tests with
`UIApplication.willEnterForegroundNotification` to simulate a real app
(#3015) via NachoSoto (@NachoSoto)
* `Integration Tests`: add tests to verify `CustomerInfo`+`Offerings`
request de-dupping (#3013) via NachoSoto (@NachoSoto)
* `SwiftLint`: disable `unneeded_synthesized_initializer` (#3010) via
NachoSoto (@NachoSoto)
* Added `internal`
`NonSubscriptionTransaction.storeTransactionIdentifier` (#3009) via
NachoSoto (@NachoSoto)
* `Integration Tests`: added tests for non-renewing and non-consumable
packages (#3008) via NachoSoto (@NachoSoto)
* Expanded `EnsureNonEmptyArrayDecodable` to
`EnsureNonEmptyCollectionDecodable` (#3002) via NachoSoto (@NachoSoto)
NachoSoto added a commit that referenced this pull request Aug 17, 2023
Depends on #3002.

This is the new logic for finding the locale to use

```swift
var localizedConfiguration: LocalizedConfiguration {
    let locales: [Locale] = [.current] + Locale.preferredLocales

    return locales
        .lazy
        .compactMap(self.config(for:))
        .first ?? self.fallbackLocalizedConfiguration
}
```

And note that `config(for:)` is a fuzzy-lookup (#2847).
NachoSoto added a commit that referenced this pull request Aug 24, 2023
Depends on #3002.

This is the new logic for finding the locale to use

```swift
var localizedConfiguration: LocalizedConfiguration {
    let locales: [Locale] = [.current] + Locale.preferredLocales

    return locales
        .lazy
        .compactMap(self.config(for:))
        .first ?? self.fallbackLocalizedConfiguration
}
```

And note that `config(for:)` is a fuzzy-lookup (#2847).
NachoSoto added a commit that referenced this pull request Aug 28, 2023
Depends on #3002.

This is the new logic for finding the locale to use

```swift
var localizedConfiguration: LocalizedConfiguration {
    let locales: [Locale] = [.current] + Locale.preferredLocales

    return locales
        .lazy
        .compactMap(self.config(for:))
        .first ?? self.fallbackLocalizedConfiguration
}
```

And note that `config(for:)` is a fuzzy-lookup (#2847).
NachoSoto added a commit that referenced this pull request Aug 31, 2023
Depends on #3002.

This is the new logic for finding the locale to use

```swift
var localizedConfiguration: LocalizedConfiguration {
    let locales: [Locale] = [.current] + Locale.preferredLocales

    return locales
        .lazy
        .compactMap(self.config(for:))
        .first ?? self.fallbackLocalizedConfiguration
}
```

And note that `config(for:)` is a fuzzy-lookup (#2847).
NachoSoto added a commit that referenced this pull request Sep 1, 2023
Depends on #3002.

This is the new logic for finding the locale to use

```swift
var localizedConfiguration: LocalizedConfiguration {
    let locales: [Locale] = [.current] + Locale.preferredLocales

    return locales
        .lazy
        .compactMap(self.config(for:))
        .first ?? self.fallbackLocalizedConfiguration
}
```

And note that `config(for:)` is a fuzzy-lookup (#2847).
NachoSoto added a commit that referenced this pull request Sep 6, 2023
Depends on #3002.

This is the new logic for finding the locale to use

```swift
var localizedConfiguration: LocalizedConfiguration {
    let locales: [Locale] = [.current] + Locale.preferredLocales

    return locales
        .lazy
        .compactMap(self.config(for:))
        .first ?? self.fallbackLocalizedConfiguration
}
```

And note that `config(for:)` is a fuzzy-lookup (#2847).
NachoSoto added a commit that referenced this pull request Sep 6, 2023
Depends on #3002.

This is the new logic for finding the locale to use

```swift
var localizedConfiguration: LocalizedConfiguration {
    let locales: [Locale] = [.current] + Locale.preferredLocales

    return locales
        .lazy
        .compactMap(self.config(for:))
        .first ?? self.fallbackLocalizedConfiguration
}
```

And note that `config(for:)` is a fuzzy-lookup (#2847).
NachoSoto added a commit that referenced this pull request Sep 6, 2023
Depends on #3002.

This is the new logic for finding the locale to use

```swift
var localizedConfiguration: LocalizedConfiguration {
    let locales: [Locale] = [.current] + Locale.preferredLocales

    return locales
        .lazy
        .compactMap(self.config(for:))
        .first ?? self.fallbackLocalizedConfiguration
}
```

And note that `config(for:)` is a fuzzy-lookup (#2847).
MarkVillacampa pushed a commit that referenced this pull request Sep 6, 2023
**This is an automatic release.**

### Bugfixes
* `PurchasesOrchestrator`: fixed callback not invoked regression during
downgrades (#3028) via NachoSoto (@NachoSoto)
* `TransactionPoster`: don't finish transactions for non-subscriptions
if they're not processed (#2841) via NachoSoto (@NachoSoto)
### Performance Improvements
* `StoreKit 2`: only listen to `StoreKit.Transaction.updates` when SK2
is enabled (#3032) via NachoSoto (@NachoSoto)
* `CustomerInfoManager`: post transactions in parallel to POST receipts
only once (#2954) via NachoSoto (@NachoSoto)
### Other Changes
* `PostedTransactionCache`: remove implementation (#3030) via NachoSoto
(@NachoSoto)
* `Integration Tests`: improved `testCanPurchaseMultipleSubscriptions`
(#3025) via NachoSoto (@NachoSoto)
* `GitHub`: improved `ISSUE_TEMPLATE` (#3022) via NachoSoto (@NachoSoto)
* `TransactionPoster`: added transaction ID and Date to log (#3026) via
NachoSoto (@NachoSoto)
* `TransactionPoster`: fix iOS 12 test (#3018) via NachoSoto
(@NachoSoto)
* `SystemInfo`: added `ClockType` (#3014) via NachoSoto (@NachoSoto)
* `Integration Tests`: begin tests with
`UIApplication.willEnterForegroundNotification` to simulate a real app
(#3015) via NachoSoto (@NachoSoto)
* `Integration Tests`: add tests to verify `CustomerInfo`+`Offerings`
request de-dupping (#3013) via NachoSoto (@NachoSoto)
* `SwiftLint`: disable `unneeded_synthesized_initializer` (#3010) via
NachoSoto (@NachoSoto)
* Added `internal`
`NonSubscriptionTransaction.storeTransactionIdentifier` (#3009) via
NachoSoto (@NachoSoto)
* `Integration Tests`: added tests for non-renewing and non-consumable
packages (#3008) via NachoSoto (@NachoSoto)
* Expanded `EnsureNonEmptyArrayDecodable` to
`EnsureNonEmptyCollectionDecodable` (#3002) via NachoSoto (@NachoSoto)
NachoSoto added a commit that referenced this pull request Sep 7, 2023
Depends on #3002.

This is the new logic for finding the locale to use

```swift
var localizedConfiguration: LocalizedConfiguration {
    let locales: [Locale] = [.current] + Locale.preferredLocales

    return locales
        .lazy
        .compactMap(self.config(for:))
        .first ?? self.fallbackLocalizedConfiguration
}
```

And note that `config(for:)` is a fuzzy-lookup (#2847).
NachoSoto added a commit that referenced this pull request Sep 7, 2023
Depends on #3002.

This is the new logic for finding the locale to use

```swift
var localizedConfiguration: LocalizedConfiguration {
    let locales: [Locale] = [.current] + Locale.preferredLocales

    return locales
        .lazy
        .compactMap(self.config(for:))
        .first ?? self.fallbackLocalizedConfiguration
}
```

And note that `config(for:)` is a fuzzy-lookup (#2847).
NachoSoto added a commit that referenced this pull request Sep 8, 2023
Depends on #3002.

This is the new logic for finding the locale to use

```swift
var localizedConfiguration: LocalizedConfiguration {
    let locales: [Locale] = [.current] + Locale.preferredLocales

    return locales
        .lazy
        .compactMap(self.config(for:))
        .first ?? self.fallbackLocalizedConfiguration
}
```

And note that `config(for:)` is a fuzzy-lookup (#2847).
NachoSoto added a commit that referenced this pull request Sep 14, 2023
Depends on #3002.

This is the new logic for finding the locale to use

```swift
var localizedConfiguration: LocalizedConfiguration {
    let locales: [Locale] = [.current] + Locale.preferredLocales

    return locales
        .lazy
        .compactMap(self.config(for:))
        .first ?? self.fallbackLocalizedConfiguration
}
```

And note that `config(for:)` is a fuzzy-lookup (#2847).
NachoSoto added a commit that referenced this pull request Sep 14, 2023
Depends on #3002.

This is the new logic for finding the locale to use

```swift
var localizedConfiguration: LocalizedConfiguration {
    let locales: [Locale] = [.current] + Locale.preferredLocales

    return locales
        .lazy
        .compactMap(self.config(for:))
        .first ?? self.fallbackLocalizedConfiguration
}
```

And note that `config(for:)` is a fuzzy-lookup (#2847).
NachoSoto added a commit that referenced this pull request Sep 15, 2023
Depends on #3002.

This is the new logic for finding the locale to use

```swift
var localizedConfiguration: LocalizedConfiguration {
    let locales: [Locale] = [.current] + Locale.preferredLocales

    return locales
        .lazy
        .compactMap(self.config(for:))
        .first ?? self.fallbackLocalizedConfiguration
}
```

And note that `config(for:)` is a fuzzy-lookup (#2847).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants