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

Moved JSONSafeEncoding to v2.0 #335

Merged
merged 4 commits into from
Apr 23, 2024
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
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/segmentio/jsonsafeencoding-swift.git",
"state" : {
"revision" : "13449de3474c97ca6b7a25b3288f188b7417b34a",
"version" : "1.0.2"
"revision" : "af6a8b360984085e36c6341b21ecb35c12f47ebd",
"version" : "2.0.0"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ let package = Package(
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(url: "https://github.com/segmentio/sovran-swift.git", from: "1.1.1"),
.package(url: "https://github.com/segmentio/jsonsafeencoding-swift.git", from: "1.0.2")
.package(url: "https://github.com/segmentio/jsonsafeencoding-swift.git", from: "2.0.0")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand Down
6 changes: 5 additions & 1 deletion Sources/Segment/Utilities/Utils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ extension DispatchQueue {
workItem.wait()
}
}

// Linux doesn't have autoreleasepool.
func autoreleasepool(closure: () -> Void) {
closure()
}
#endif

/// Inquire as to whether we are within a Unit Testing environment.
Expand Down Expand Up @@ -84,4 +89,3 @@ internal func eventStorageDirectory(writeKey: String) -> URL {
try? FileManager.default.createDirectory(at: segmentURL, withIntermediateDirectories: true, attributes: nil)
return segmentURL
}

2 changes: 1 addition & 1 deletion Tests/Segment-Tests/Analytics_Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ final class Analytics_Tests: XCTestCase {
expectation.fulfill()
}

wait(for: [expectation], timeout: 10)
wait(for: [expectation], timeout: 60)

XCTAssertNil(analytics.pendingUploads)
}
Expand Down
Loading