Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork57
Add--default-platform option topackage 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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
11 commits Select commitHold shift + click to select a range
f60bfd6 adds a --platform flag to js to control the target platform of the ge…
t089fa6e321 Improve template code to better support node
t089c3c3424 Add devDependency @types/node so TypeScript can understand Node.js APIs
t089eed636d run tscCheck on preprocessed templates
t089a1b912b update snapshot salts
t089e56a81e Merge branch 'main' into platform-arg
t08983b31fa add Plugin/PackageToJS/Templates to bootstrap
t0894e8bc2f formatting
t08976ee898 model `platform` as enum
t08927dadd9 use browser as default value for platform
t089617110e PackageToJS: Rename `--platform` to `--default-platform` and fix tests
kateinoigakukunFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
9 changes: 9 additions & 0 deletionsPlugins/PackageToJS/Sources/PackageToJS.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
32 changes: 25 additions & 7 deletionsPlugins/PackageToJS/Sources/PackageToJSPlugin.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletionsPlugins/PackageToJS/Templates/index.d.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
37 changes: 34 additions & 3 deletionsPlugins/PackageToJS/Templates/index.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
8 changes: 5 additions & 3 deletionsPlugins/PackageToJS/Templates/platforms/node.d.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,16 @@ | ||
| import type { InstantiateOptions } from "../instantiate.js" | ||
| import type { Worker } from "node:worker_threads" | ||
| exporttype DefaultNodeSetupOptions = { | ||
| /* #if IS_WASI */ | ||
| args?: string[], | ||
| /* #endif */ | ||
| onExit?: (code: number) => void, | ||
| /* #if USE_SHARED_MEMORY */ | ||
| spawnWorker: (module: WebAssembly.Module, memory: WebAssembly.Memory, startArg: any) => Worker, | ||
| /* #endif */ | ||
| } | ||
| export function defaultNodeSetup(options: DefaultNodeSetupOptions): Promise<InstantiateOptions> | ||
| export function createDefaultWorkerFactory(preludeScript?: string): (module: WebAssembly.Module, memory: WebAssembly.Memory, startArg: any) => Worker |
4 changes: 3 additions & 1 deletionPlugins/PackageToJS/Templates/platforms/node.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletionsPlugins/PackageToJS/Templates/tsconfig.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
64 changes: 56 additions & 8 deletionsPlugins/PackageToJS/Tests/TemplatesTests.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletionsPlugins/PackageToJS/Tests/TemporaryDirectory.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.