Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit d591dc4
Author: Syrus <me@syrusakbary.com>
Date:   Wed Oct 30 10:47:35 2019 -0700

    Trying to fix memfs

commit 4153b52
Author: Syrus <me@syrusakbary.com>
Date:   Wed Oct 30 10:36:53 2019 -0700

    Trying to fix memfs

commit aca79c8
Author: Syrus <me@syrusakbary.com>
Date:   Tue Oct 29 18:12:40 2019 -0700

    Updated package locks

commit d11569c
Author: Syrus <me@syrusakbary.com>
Date:   Tue Oct 29 18:09:25 2019 -0700

    Roll back to previous deps

commit f5a537e
Author: Syrus <me@syrusakbary.com>
Date:   Tue Oct 29 18:09:18 2019 -0700

    Add npm-run-all to dev dependencies

commit 30a8082
Author: Syrus <me@syrusakbary.com>
Date:   Tue Oct 29 18:06:43 2019 -0700

    Use npx run-s to run the script

commit 41bd694
Author: Syrus <me@syrusakbary.com>
Date:   Tue Oct 29 17:57:22 2019 -0700

    Use prev memfs version

commit 34c5f83
Author: Syrus <me@syrusakbary.com>
Date:   Tue Oct 29 17:40:06 2019 -0700

    Make tests pass again

commit f9321a9
Merge: c43394c 55c1ad9
Author: Syrus <me@syrusakbary.com>
Date:   Tue Oct 29 17:29:16 2019 -0700

    Merge branch 'master' into cli

commit c43394c
Author: Syrus <me@syrusakbary.com>
Date:   Tue Oct 29 17:28:59 2019 -0700

    Updated main lock file

commit 1565c92
Author: Syrus <me@syrusakbary.com>
Date:   Tue Oct 29 17:28:39 2019 -0700

    Fixed tests

commit 3262509
Author: Syrus <me@syrusakbary.com>
Date:   Tue Oct 29 17:28:05 2019 -0700

    Improved bundled dirs

commit 76a11bd
Merge: 4099eb3 1813d2e
Author: Syrus <me@syrusakbary.com>
Date:   Tue Oct 29 17:13:47 2019 -0700

    Merge branch 'master' into cli

commit 4099eb3
Author: Syrus <me@syrusakbary.com>
Date:   Tue Oct 29 17:12:39 2019 -0700

    Make WASI export the ts files. Changed build lib
  • Loading branch information
syrusakbary committed Oct 30, 2019
1 parent 55c1ad9 commit f886209
Show file tree
Hide file tree
Showing 61 changed files with 876 additions and 127 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
report.*
**/test_result.wat
**/test_result.wasm
**/dist
**/lib

# Node
node_modules
Expand All @@ -13,8 +13,9 @@ coverage
*.log
.vscode
.idea
dist
lib
compiled
.awcache
.rpt2_cache
docs
/examples/wasm-shell/dist
6 changes: 3 additions & 3 deletions e2e-tests/test/wasi.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const testBrowserBundle = async bundleString => {

describe("@wasmer/wasi", function() {
it("should handle cjs bundle", async () => {
const bundlePath = "../packages/wasi/dist/index.cjs.js";
const bundlePath = "../packages/wasi/lib/index.cjs.js";
const bundle = fs.readFileSync(bundlePath, "utf8");

const newBundle = await rebundleOutput(bundle, "cjs", "WASI");
Expand All @@ -53,7 +53,7 @@ describe("@wasmer/wasi", function() {
});

it("should handle esm bundle", async () => {
const bundlePath = "../packages/wasi/dist/index.esm.js";
const bundlePath = "../packages/wasi/lib/index.esm.js";
const bundle = fs.readFileSync(bundlePath, "utf8");

const newBundle = await rebundleOutput(bundle, "iife", "WASI");
Expand All @@ -62,7 +62,7 @@ describe("@wasmer/wasi", function() {
});

it("should handle iife bundle", async () => {
const bundlePath = "../packages/wasi/dist/index.iife.js";
const bundlePath = "../packages/wasi/lib/index.iife.js";
const bundle = fs.readFileSync(bundlePath, "utf8");

await testBrowserBundle(bundle);
Expand Down
4 changes: 2 additions & 2 deletions e2e-tests/test/wasm-terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const testBrowserBundle = async bundleString => {
describe("@wasmer/wasm-transformer", function() {
it("should handle esm bundle", async () => {
const bundlePath =
"../packages/wasm-terminal/dist/unoptimized/wasm-terminal.esm.js";
"../packages/wasm-terminal/lib/unoptimized/wasm-terminal.esm.js";
const bundle = fs.readFileSync(bundlePath, "utf8");

const newBundle = await rebundleOutput(bundle, "iife", "WasmTerminal");
Expand All @@ -44,7 +44,7 @@ describe("@wasmer/wasm-transformer", function() {

it("should handle iife bundle", async () => {
const bundlePath =
"../packages/wasm-terminal/dist/unoptimized/wasm-terminal.iife.js";
"../packages/wasm-terminal/lib/unoptimized/wasm-terminal.iife.js";
const bundle = fs.readFileSync(bundlePath, "utf8");

await testBrowserBundle(bundle);
Expand Down
4 changes: 2 additions & 2 deletions e2e-tests/test/wasm-transformer.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const testBrowserBundle = async bundleString => {
describe("@wasmer/wasm-transformer", function() {
it("should handle esm bundle", async () => {
const bundlePath =
"../packages/wasm-transformer/dist/unoptimized/wasm-transformer.esm.js";
"../packages/wasm-transformer/lib/unoptimized/wasm-transformer.esm.js";
const bundle = fs.readFileSync(bundlePath, "utf8");

const newBundle = await rebundleOutput(
Expand All @@ -42,7 +42,7 @@ describe("@wasmer/wasm-transformer", function() {

it("should handle iife bundle", async () => {
const bundlePath =
"../packages/wasm-transformer/dist/unoptimized/wasm-transformer.iife.js";
"../packages/wasm-transformer/lib/unoptimized/wasm-transformer.iife.js";
const bundle = fs.readFileSync(bundlePath, "utf8");

await testBrowserBundle(bundle);
Expand Down
6 changes: 3 additions & 3 deletions e2e-tests/test/wasmfs.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const testBrowserBundle = async bundleString => {

describe("@wasmer/wasmfs", function() {
it("should handle cjs bundle", async () => {
const bundlePath = "../packages/wasmfs/dist/index.cjs.js";
const bundlePath = "../packages/wasmfs/lib/index.cjs.js";
const bundle = fs.readFileSync(bundlePath, "utf8");

const newBundle = await rebundleOutput(bundle, "cjs", "WasmFs");
Expand All @@ -54,7 +54,7 @@ describe("@wasmer/wasmfs", function() {
});

it("should handle esm bundle", async () => {
const bundlePath = "../packages/wasmfs/dist/index.esm.js";
const bundlePath = "../packages/wasmfs/lib/index.esm.js";
const bundle = fs.readFileSync(bundlePath, "utf8");

const newBundle = await rebundleOutput(bundle, "iife", "WasmFs");
Expand All @@ -63,7 +63,7 @@ describe("@wasmer/wasmfs", function() {
});

it("should handle iife bundle", async () => {
const bundlePath = "../packages/wasmfs/dist/index.iife.js";
const bundlePath = "../packages/wasmfs/lib/index.iife.js";
const bundle = fs.readFileSync(bundlePath, "utf8");

await testBrowserBundle(bundle);
Expand Down
4 changes: 2 additions & 2 deletions examples/node-stubbed/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const fs = require("fs");
const { spy } = require("spyfs");
const sinon = require("sinon");
const WASI = require("../../packages/wasi/dist/index.cjs.js");
const WASI = require("../../packages/wasi/lib/index.cjs.js");
const wasmTransformer = require("../../packages/wasm-transformer");
const { WasmFs } = require("../../packages/wasmfs/dist/index.cjs.js");
const { WasmFs } = require("../../packages/wasmfs/lib/index.cjs.js");
const argv = require("minimist")(process.argv.slice(2));
const chalk = require("chalk");
var readline = require("readline");
Expand Down
3 changes: 2 additions & 1 deletion examples/wasm-shell/components/wasm-terminal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ const fetchCommandHandler = async (
/**
* A simple preact wrapper around the Wasm Terminal
*/
const processWorkerUrl = document.getElementById("worker").src;
const processWorkerUrl = (document.getElementById("worker") as HTMLImageElement)
.src;

export default class WasmTerminalComponent extends Component {
container: HTMLElement | null;
Expand Down
16 changes: 8 additions & 8 deletions examples/wasm-shell/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@
"type": "git",
"url": "git+https://github.com/wasmerio/wasmer-js.git"
},
"author": "Aaron Turner",
"author": "Wasmer Engineering Team <engineering@wasmer.io>",
"license": "MIT",
"bugs": {
"url": "https://github.com/wasmerio/wasmer-js/issues"
},
"homepage": "https://github.com/wasmerio/wasmer-js/tree/master/examples/wasm-shell",
"alias": {
"@wasmer/wasm-terminal": "../../packages/wasm-terminal/lib",
"@wasmer/wasm-transformer": "../../packages/wasm-transformer/dist/unoptimized/wasm-transformer.esm.js",
"@wasmer/wasi": "../../packages/wasi/lib",
"@wasmer/wasmfs": "../../packages/wasmfs/lib"
},
"devDependencies": {
"parcel-bundler": "^1.12.4",
"typescript": "^3.6.4"
},
"alias": {
"@wasmer/wasm-terminal": "../../packages/wasm-terminal/src",
"@wasmer/wasi": "../../packages/wasi/src",
"@wasmer/wasm-transformer": "../../packages/wasm-transformer/lib/unoptimized/wasm-transformer.esm.js",
"@wasmer/wasmfs": "../../packages/wasmfs/src"
},
"dependencies": {
"preact": "^10.0.1",
"xterm": "^3.14.5"
"xterm": "^4.1.0"
}
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
"scripts": {
"postinstall": "npx run-s lerna:bootstrap lerna:install lerna:install:wasmfs lerna:link",
"build": "npm run lerna:build",
"dev": "npm run lerna:build:wasm-transformer && npx parcel examples/wasm-shell/index.html",
"cli": "./packages/cli/bin/run",
"dev": "npx run-s lerna:build:wasm-transformer dev:serve",
"dev:serve": "parcel examples/wasm-shell/index.html",
"deploy": "npx run-s wasm-transformer:build lerna:build lerna:publish",
"serve": "npx serve dist/ -p 8000",
"test": "npx lerna run test --stream",
"lint": "npx run-s lint:js lint:ts:tslint lint:ts:preetier",
"lint:js": "npx prettier --write packages/**/rollup.*.js",
Expand Down
Loading

0 comments on commit f886209

Please sign in to comment.