Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add --default-platform option to package js #457

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

Merged
kateinoigakukun merged 11 commits into swiftwasm:main from t089:platform-arg
Oct 24, 2025
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
use browser as default value for platform
  • Loading branch information
t089 committed Oct 20, 2025
commit 27dadd9c6c280e4549d84ce26800d3dc94d3f18f
6 changes: 3 additions & 3 deletions Plugins/PackageToJS/Sources/PackageToJSPlugin.swift
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,10 @@ private func printStderr(_ message: String) {

extension ArgumentExtractor {
mutating func extractPlatformOption(named name: String) throws -> PackageToJS.PackageOptions.Platform {
let stringValue : String? = self.extractOption(named: name).last
guard let stringValue else {
throw PackageToJSError("Missing value for option --\(name)")
guard let stringValue = self.extractOption(named: name).last else {
return .browser
}

guard let platform = PackageToJS.PackageOptions.Platform(rawValue: stringValue) else {
throw PackageToJSError(
"Invalid platform: \(stringValue), expected one of \(PackageToJS.PackageOptions.Platform.allCases.map(\.rawValue).joined(separator: ", "))"
Expand Down

AltStyle によって変換されたページ (->オリジナル) /