Skip to content

Commit

Permalink
Merge pull request wasmerio#344 from wasmerio/refactor-package-api
Browse files Browse the repository at this point in the history
Rewrote the top-level `Wasmer` type to be a fancy `Arc<BinaryPackage>`
  • Loading branch information
Michael Bryan authored Nov 27, 2023
2 parents e55dfe7 + 4606724 commit 0bc97b6
Show file tree
Hide file tree
Showing 26 changed files with 3,183 additions and 3,181 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
branches:
- main
tags:
- 'wasmer-sdk-*'
- "wasmer-sdk-*"

permissions:
contents: write
Expand Down
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.json
*.md
node_modules/
dist/
14 changes: 14 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"semi": true,
"singleQuote": false,
"tabWidth": 4,
"arrowParens": "avoid",
"overrides": [
{
"files": "**/*.yml",
"options": {
"tabWidth": 2
}
}
]
}
5 changes: 0 additions & 5 deletions examples/wasmer.sh/.prettierrc

This file was deleted.

6 changes: 3 additions & 3 deletions examples/wasmer.sh/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async function main() {
const stdin: WritableStreamDefaultWriter<Uint8Array> =
instance.stdin!.getWriter();
subscriptions.push(
term.onData((line) => stdin.write(encoder.encode(line))),
term.onData(line => stdin.write(encoder.encode(line))),
);
copyStream(instance.stdout, term);
copyStream(instance.stderr, term);
Expand All @@ -50,14 +50,14 @@ async function main() {
term.writeln("Rebooting...");
}
} finally {
subscriptions.forEach((d) => d.dispose());
subscriptions.forEach(d => d.dispose());
}
}
}

function copyStream(reader: ReadableStream<Uint8Array>, term: Terminal) {
const writer = new WritableStream<Uint8Array>({
write: (chunk) => {
write: chunk => {
term.write(chunk);
},
});
Expand Down
Loading

0 comments on commit 0bc97b6

Please sign in to comment.