Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into codegen-vaildation-re…
Browse files Browse the repository at this point in the history
…factor
  • Loading branch information
AnthonyMDev committed Dec 16, 2023
2 parents 65075c2 + 707e93d commit b780737
Show file tree
Hide file tree
Showing 35 changed files with 82 additions and 71 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
secops: apollo/[email protected].3
secops: apollo/[email protected].4

workflows:
security-scans:
Expand Down
2 changes: 1 addition & 1 deletion .tuist-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.19.0
3.35.5
3 changes: 2 additions & 1 deletion Configuration/Shared/Workspace-Target-Framework.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ FRAMEWORK_VERSION[sdk=macosx*] = A

APPLICATION_EXTENSION_API_ONLY = YES

DEFINES_MODULE = YES
DEFINES_MODULE = NO

Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ let package = Package(
name: "TestApp",
dependencies: [
.product(name: "ApolloAPI", package: "apollo-ios")
],
swiftSettings: [
.unsafeFlags(["-warnings-as-errors"])
]),
.testTarget(
name: "TestAppTests",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

swift test
swift test -Xswiftc -warnings-as-errors
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ let package = Package(
"graphql/PetDetails.graphql",
"graphql/AllAnimalsIncludeSkipQuery.graphql",
"graphql/PetAdoptionMutation.graphql"
],
swiftSettings: [
.unsafeFlags(["-warnings-as-errors"])
]),
.testTarget(
name: "PackageOneTests",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ let package = Package(
name: "PackageTwo",
dependencies: [
.product(name: "ApolloAPI", package: "apollo-ios"),
],
swiftSettings: [
.unsafeFlags(["-warnings-as-errors"])
]),
.target(
name: "TestMocks",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash
set -e

echo "Testing PackageOne.."
cd PackageOne
swift test
swift test -Xswiftc -warnings-as-errors

echo "Testing PackageTwo.."
cd ../PackageTwo
swift test
swift test -Xswiftc -warnings-as-errors
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ let package = Package(
dependencies: [
.product(name: "Apollo", package: "apollo-ios"),
.product(name: "AnimalKingdomAPI", package: "AnimalKingdomAPI")
],
swiftSettings: [
.unsafeFlags(["-warnings-as-errors"])
]
),
.testTarget(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

swift test
swift test -Xswiftc -warnings-as-errors
40 changes: 30 additions & 10 deletions Tuist/ProjectDescriptionHelpers/Enums/ApolloTarget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,28 +87,48 @@ public enum ApolloTarget {
return "Apollo-Target-UploadAPI"
}
}

public var destinations: Destinations {
switch self {
case .animalKingdomAPI,
.apolloCodegenLibWrapper,
.apolloCodegenInternalTestHelpers,
.apolloCodegenTests,
.apolloInternalTestHelpers,
.apolloPaginationTests,
.apolloPerformanceTests,
.apolloServerIntegrationTests,
.apolloTests,
.apolloWrapper,
.codegenCLITests,
.gitHubAPI,
.starWarsAPI,
.subscriptionAPI,
.uploadAPI:
return Destinations([.mac])
}
}

public var deploymentTarget: DeploymentTarget {
var version = "10.15"
public var deploymentTargets: DeploymentTargets {
switch self {
case .animalKingdomAPI,
.apolloCodegenLibWrapper,
.apolloWrapper,
.gitHubAPI,
.starWarsAPI,
.subscriptionAPI,
.uploadAPI:
version = "10.15"
case .apolloCodegenInternalTestHelpers,
.apolloCodegenTests,
.apolloInternalTestHelpers,
return DeploymentTargets(macOS: "10.15")
case .apolloInternalTestHelpers,
.apolloPerformanceTests,
.apolloServerIntegrationTests,
.apolloTests,
.apolloPaginationTests,
.apolloPaginationTests:
return DeploymentTargets(macOS: "12.0")
case .apolloCodegenInternalTestHelpers,
.apolloCodegenLibWrapper,
.apolloCodegenTests,
.codegenCLITests:
version = "12.5"
return DeploymentTargets(macOS: "12.0")
}
return .macOS(targetVersion: version)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ extension Settings {
let debugConfig = Configuration.debug(name: .debug, xcconfig: configPath)
let releaseConfig = Configuration.release(name: .release, xcconfig: configPath)
let performanceTestingConfig = Configuration.release(name: .performanceTesting, xcconfig: configPath)
let settings = Settings.settings(configurations: [
let settings = Settings.settings(
configurations: [
debugConfig,
releaseConfig,
performanceTestingConfig
])
],
defaultSettings: .none
)
return settings
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ extension Target {

return Target(
name: target.name,
platform: .macOS,
destinations: target.destinations,
product: .framework,
bundleId: "com.apollographql.\(target.name.lowercased())",
deploymentTarget: target.deploymentTarget,
deploymentTargets: target.deploymentTargets,
infoPlist: .file(path: "Sources/\(target.name)/Info.plist"),
sources: [
"Sources/\(target.name)/\(target.name)/Sources/**",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ extension Target {

return Target(
name: target.name,
platform: .macOS,
destinations: target.destinations,
product: .framework,
bundleId: "com.apollographql.\(target.name.lowercased())",
deploymentTarget: target.deploymentTarget,
deploymentTargets: target.deploymentTargets,
infoPlist: .file(path: "Tests/\(target.name)/Info.plist"),
sources: [
"Tests/\(target.name)/**",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ extension Target {

return Target(
name: target.name,
platform: .macOS,
destinations: target.destinations,
product: .framework,
bundleId: "com.apollographql.\(target.name.lowercased())",
deploymentTarget: target.deploymentTarget,
deploymentTargets: target.deploymentTargets,
infoPlist: .file(path: "Tests/\(target.name)/Info.plist"),
dependencies: [
.package(product: "ApolloCodegenLib")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ extension Target {

return Target(
name: target.name,
platform: .macOS,
destinations: target.destinations,
product: .unitTests,
bundleId: "com.apollographql.\(target.name.lowercased())",
deploymentTarget: target.deploymentTarget,
deploymentTargets: target.deploymentTargets,
infoPlist: .file(path: "Tests/\(target.name)/Info.plist"),
sources: [
"Tests/\(target.name)/**",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ extension Target {

return Target(
name: target.name,
platform: .macOS,
destinations: target.destinations,
product: .framework,
bundleId: "com.apollographql.\(target.name.lowercased())",
deploymentTarget: target.deploymentTarget,
deploymentTargets: target.deploymentTargets,
infoPlist: .file(path: "Tests/\(target.name)/Info.plist"),
sources: [
"Tests/\(target.name)/**",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ extension Target {

return Target(
name: target.name,
platform: .macOS,
destinations: target.destinations,
product: .unitTests,
bundleId: "com.apollographql.\(target.name.lowercased())",
deploymentTarget: target.deploymentTarget,
deploymentTargets: target.deploymentTargets,
sources: [
"Tests/\(target.name)/**",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ extension Target {

return Target(
name: target.name,
platform: .macOS,
destinations: target.destinations,
product: .unitTests,
bundleId: "com.apollographql.\(target.name.lowercased())",
deploymentTarget: target.deploymentTarget,
deploymentTargets: target.deploymentTargets,
infoPlist: .file(path: "Tests/\(target.name)/Info.plist"),
sources: [
"Tests/\(target.name)/**",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ extension Target {

return Target(
name: target.name,
platform: .macOS,
destinations: target.destinations,
product: .unitTests,
bundleId: "com.apollographql.\(target.name.lowercased())",
deploymentTarget: target.deploymentTarget,
deploymentTargets: target.deploymentTargets,
infoPlist: .file(path: "Tests/\(target.name)/Info.plist"),
sources: [
"Tests/\(target.name)/**",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ extension Target {

return Target(
name: target.name,
platform: .macOS,
destinations: target.destinations,
product: .unitTests,
bundleId: "com.apollographql.\(target.name.lowercased())",
deploymentTarget: target.deploymentTarget,
deploymentTargets: target.deploymentTargets,
infoPlist: .file(path: "Tests/\(target.name)/Info.plist"),
sources: [
"Tests/\(target.name)/**",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ extension Target {

return Target(
name: target.name,
platform: .macOS,
destinations: target.destinations,
product: .framework,
bundleId: "com.apollographql.\(target.name.lowercased())",
deploymentTarget: target.deploymentTarget,
deploymentTargets: target.deploymentTargets,
infoPlist: .file(path: "Tests/\(target.name)/Info.plist"),
dependencies: [
.package(product: "Apollo")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ extension Target {

return Target(
name: target.name,
platform: .macOS,
destinations: target.destinations,
product: .unitTests,
bundleId: "com.apollographql.\(target.name.lowercased())",
deploymentTarget: target.deploymentTarget,
deploymentTargets: target.deploymentTargets,
infoPlist: .file(path: "Tests/\(target.name)/Info.plist"),
sources: [
"Tests/\(target.name)/*.swift",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ extension Target {

return Target(
name: target.name,
platform: .macOS,
destinations: target.destinations,
product: .framework,
bundleId: "com.apollographql.\(target.name.lowercased())",
deploymentTarget: target.deploymentTarget,
deploymentTargets: target.deploymentTargets,
infoPlist: .file(path: "Sources/\(target.name)/Info.plist"),
sources: [
"Sources/\(target.name)/\(target.name)/Sources/**"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ extension Target {

return Target(
name: target.name,
platform: .macOS,
destinations: target.destinations,
product: .framework,
bundleId: "com.apollographql.\(target.name.lowercased())",
deploymentTarget: target.deploymentTarget,
deploymentTargets: target.deploymentTargets,
infoPlist: .file(path: "Sources/\(target.name)/Info.plist"),
sources: [
"Sources/\(target.name)/\(target.name)/Sources/**"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ extension Target {

return Target(
name: target.name,
platform: .macOS,
destinations: target.destinations,
product: .framework,
bundleId: "com.apollographql.\(target.name.lowercased())",
deploymentTarget: target.deploymentTarget,
deploymentTargets: target.deploymentTargets,
infoPlist: .file(path: "Sources/\(target.name)/Info.plist"),
sources: [
"Sources/\(target.name)/\(target.name)/Sources/**"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ extension Target {

return Target(
name: target.name,
platform: .macOS,
destinations: target.destinations,
product: .framework,
bundleId: "com.apollographql.\(target.name.lowercased())",
deploymentTarget: target.deploymentTarget,
deploymentTargets: target.deploymentTargets,
infoPlist: .file(path: "Sources/\(target.name)/Info.plist"),
sources: [
"Sources/\(target.name)/\(target.name)/Sources/**"
Expand Down
2 changes: 1 addition & 1 deletion apollo-ios-codegen/.circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
secops: apollo/[email protected].3
secops: apollo/[email protected].4

workflows:
security-scans:
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"npm": ">=7"
},
"dependencies": {
"graphql": "17.0.0-alpha.2",
"graphql": "17.0.0-alpha.3",
"tslib": "^2.3.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const options = {
}),
replace({
preventAssignment: true,
"process.env.NODE_ENV": JSON.stringify("production"),
"globalThis.process.env.NODE_ENV": JSON.stringify("production"),
}),
terser({
keep_classnames: true,
Expand Down
2 changes: 1 addition & 1 deletion apollo-ios-pagination/.circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
secops: apollo/[email protected].3
secops: apollo/[email protected].4

workflows:
security-scans:
Expand Down
2 changes: 1 addition & 1 deletion apollo-ios/.circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
secops: apollo/[email protected].3
secops: apollo/[email protected].4

workflows:
security-scans:
Expand Down
Loading

0 comments on commit b780737

Please sign in to comment.