Skip to content

Commit 828f970

Browse files
Merge pull request #413 from swiftwasm/fix-package-swift-warning
Fix Package.swift warning by excluding JavaScript files
2 parents 72f26a6 + 218d2df commit 828f970

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

Plugins/BridgeJS/Package.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ let package = Package(
2222
dependencies: [
2323
"BridgeJSCore",
2424
"BridgeJSSkeleton",
25-
]
25+
],
26+
exclude: ["JavaScript"]
2627
),
2728
.target(
2829
name: "BridgeJSCore",

Plugins/PackageToJS/Tests/ExampleTests.swift

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,10 @@ extension Trait where Self == ConditionTrait {
255255
try scriptContent.write(to: tempDir.appending(path: "script.js"), atomically: true, encoding: .utf8)
256256
let scriptPath = tempDir.appending(path: "script.js")
257257
try runSwift(
258-
["package", "--disable-sandbox", "--swift-sdk", swiftSDKID, "js", "test", "-Xnode=--require=\(scriptPath.path)"],
258+
[
259+
"package", "--disable-sandbox", "--swift-sdk", swiftSDKID, "js", "test",
260+
"-Xnode=--require=\(scriptPath.path)",
261+
],
259262
[:]
260263
)
261264
let testPath = tempDir.appending(path: "test.txt")
@@ -265,7 +268,10 @@ extension Trait where Self == ConditionTrait {
265268
"test.txt should be created by the script"
266269
)
267270
})
268-
try runSwift(["package", "--disable-sandbox", "--swift-sdk", swiftSDKID, "js", "test", "--environment", "browser"], [:])
271+
try runSwift(
272+
["package", "--disable-sandbox", "--swift-sdk", swiftSDKID, "js", "test", "--environment", "browser"],
273+
[:]
274+
)
269275
}
270276
}
271277

0 commit comments

Comments
 (0)