Skip to content

Commit

Permalink
Allow calculations in the address bar (#2012)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/0/1206262563462715/f

Description:
Treat strings like "1.4" in address bar as search queries, not as IPs (1.0.0.4).
  • Loading branch information
ayoy authored Jan 3, 2024
1 parent e7eadc6 commit f6f7ac4
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 16 deletions.
6 changes: 3 additions & 3 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13058,7 +13058,7 @@
repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit";
requirement = {
kind = exactVersion;
version = 100.0.1;
version = 100.0.2;
};
};
AA06B6B52672AF8100F541C5 /* XCRemoteSwiftPackageReference "Sparkle" */ = {
Expand All @@ -13073,8 +13073,8 @@
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/pointfreeco/swift-snapshot-testing";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 1.15.1;
kind = exactVersion;
version = 1.15.1;
};
};
B6DA44152616C13800DD1EC2 /* XCRemoteSwiftPackageReference "OHHTTPStubs" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/duckduckgo/BrowserServicesKit",
"state" : {
"revision" : "e9c344c15d550112d02853c07efeaa154e911e2b",
"version" : "100.0.1"
"revision" : "39a5daf268f9fcb57d95e6193eca20f7ea222de6",
"version" : "100.0.2"
}
},
{
Expand Down Expand Up @@ -147,7 +147,7 @@
{
"identity" : "trackerradarkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/duckduckgo/TrackerRadarKit",
"location" : "https://github.com/duckduckgo/TrackerRadarKit.git",
"state" : {
"revision" : "a6b7ba151d9dc6684484f3785293875ec01cc1ff",
"version" : "1.2.2"
Expand Down
2 changes: 1 addition & 1 deletion LocalPackages/DataBrokerProtection/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ let package = Package(
targets: ["DataBrokerProtection"])
],
dependencies: [
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "100.0.1"),
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "100.0.2"),
.package(path: "../PixelKit"),
.package(path: "../SwiftUIExtensions"),
.package(path: "../XPCHelper")
Expand Down
2 changes: 1 addition & 1 deletion LocalPackages/LoginItems/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let package = Package(
),
],
dependencies: [
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "100.0.1"),
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "100.0.2"),
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion LocalPackages/NetworkProtectionMac/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ let package = Package(
.library(name: "NetworkProtectionUI", targets: ["NetworkProtectionUI"])
],
dependencies: [
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "100.0.1"),
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "100.0.2"),
.package(path: "../XPCHelper"),
.package(path: "../SwiftUIExtensions")
],
Expand Down
2 changes: 1 addition & 1 deletion LocalPackages/PixelKit/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ let package = Package(
)
],
dependencies: [
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "100.0.1"),
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "100.0.2"),
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion LocalPackages/Subscription/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let package = Package(
targets: ["Subscription"]),
],
dependencies: [
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "100.0.1"),
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "100.0.2"),
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion LocalPackages/SwiftUIExtensions/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let package = Package(
),
],
dependencies: [
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "100.0.1"),
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "100.0.2"),
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion LocalPackages/SyncUI/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let package = Package(
],
dependencies: [
.package(path: "../SwiftUIExtensions"),
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "100.0.1"),
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "100.0.2"),
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion LocalPackages/SystemExtensionManager/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let package = Package(
),
],
dependencies: [
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "100.0.1"),
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "100.0.2"),
],
targets: [
// Targets are the basic building blocks of a package, defining a module or a test suite.
Expand Down
2 changes: 1 addition & 1 deletion LocalPackages/XPCHelper/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ let package = Package(
.library(name: "XPCHelper", targets: ["XPCHelper"]),
],
dependencies: [
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "100.0.1"),
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "100.0.2"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand Down
3 changes: 2 additions & 1 deletion UnitTests/Common/Extensions/URLExtensionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ final class URLExtensionTests: XCTestCase {
("test string with spaces", "https://duckduckgo.com/?q=test%20string%20with%20spaces"),
("http://💩.la:8080 ", "http://xn--ls8h.la:8080"),
("http:// 💩.la:8080 ", "https://duckduckgo.com/?q=http%3A%2F%2F%20%F0%9F%92%A9.la%3A8080"),
("https://xn--ls8h.la/path/to/resource", "https://xn--ls8h.la/path/to/resource")
("https://xn--ls8h.la/path/to/resource", "https://xn--ls8h.la/path/to/resource"),
("1.4/3.4", "https://duckduckgo.com/?q=1.4%2F3.4")
]

for (string, expected) in data {
Expand Down

0 comments on commit f6f7ac4

Please sign in to comment.