Skip to content

Commit

Permalink
fix: export wasmify
Browse files Browse the repository at this point in the history
  • Loading branch information
hugomrdias committed Feb 12, 2024
1 parent f9acc14 commit 14d724b
Show file tree
Hide file tree
Showing 17 changed files with 306 additions and 499 deletions.
18 changes: 9 additions & 9 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {
"installDirectlyFromGitHubRelease": true,
"version": "latest",
"version": "latest"
},
"ghcr.io/devcontainers/features/node:1": {
"nodeGypDependencies": true,
"version": "lts",
},
"version": "lts"
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
Expand All @@ -22,13 +22,13 @@

"customizations": {
"codespaces": {
"openFiles": ["readme.md"],
"openFiles": ["readme.md"]
},
"vscode": {
"extensions": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"yoavbls.pretty-ts-errors",
"yoavbls.pretty-ts-errors"
],
"settings": {
"javascript.format.enable": false,
Expand All @@ -39,8 +39,8 @@
"editor.defaultFormatter": "esbenp.prettier-vscode",
"javascript.preferences.importModuleSpecifierEnding": "js",
"typescript.preferences.importModuleSpecifierEnding": "auto",
"typescript.enablePromptUseWorkspaceTsdk": true,
},
},
},
"typescript.enablePromptUseWorkspaceTsdk": true
}
}
}
}
4 changes: 2 additions & 2 deletions examples/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"devDependencies": {
"@babel/core": "^7.23.9",
"@fission-codes/eslint-config": "workspace:^",
"@types/node": "^20.11.15",
"@types/node": "^20.11.17",
"hd-scripts": "^9.0.6",
"prettier": "3.2.4",
"prettier": "3.2.5",
"typescript": "5.3.3",
"vite": "^4.5.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/demo/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"noImplicitReturns": false,
"noUnusedLocals": true,
"noUnusedParameters": false,
"skipLibCheck": true,
"skipLibCheck": true
},
"exclude": ["node_modules", "dist", "out"],
"exclude": ["node_modules", "dist", "out"]
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
"devDependencies": {
"@fission-codes/eslint-config": "workspace:^",
"depcheck": "^1.4.7",
"lint-staged": "^15.2.1",
"prettier": "3.2.4",
"lint-staged": "^15.2.2",
"prettier": "3.2.5",
"simple-git-hooks": "^2.9.0",
"typedoc": "^0.25.7",
"typedoc": "^0.25.8",
"typedoc-plugin-missing-exports": "^2.2.0",
"typedoc-plugin-zod": "^1.1.2",
"typescript": "5.3.3"
Expand Down
4 changes: 2 additions & 2 deletions packages/channel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@
"iso-websocket": "^0.2.0"
},
"devDependencies": {
"@types/node": "^20.11.15",
"@types/node": "^20.11.17",
"p-defer": "^4.0.0",
"playwright-test": "^14.1.0",
"playwright-test": "^14.1.1",
"type-fest": "^4.10.2",
"unws": "^0.2.4",
"ws": "^8.16.0"
Expand Down
6 changes: 3 additions & 3 deletions packages/channel/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"lib": ["ESNext", "DOM"],
"emitDeclarationOnly": true,
"outDir": "dist",
"outDir": "dist"
},
"include": ["src", "test", "package.json"],
"exclude": ["node_modules", "dist", "out"],
Expand All @@ -12,6 +12,6 @@
"entryPoints": ["src/index.js"],
"includeVersion": true,
"excludeExternals": true,
"internalModule": "<internal>",
},
"internalModule": "<internal>"
}
}
8 changes: 4 additions & 4 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,16 @@
"zod": "^3.22.4"
},
"devDependencies": {
"@testcontainers/postgresql": "^10.6.0",
"@types/node": "^20.11.15",
"@testcontainers/postgresql": "^10.7.1",
"@types/node": "^20.11.17",
"execa": "^8.0.1",
"iso-websocket": "^0.2.0",
"msw": "^2.1.5",
"p-defer": "^4.0.0",
"p-wait-for": "^5.0.2",
"playwright-test": "^14.1.0",
"playwright-test": "^14.1.1",
"tempy": "^3.1.0",
"testcontainers": "^10.6.0",
"testcontainers": "^10.7.1",
"type-fest": "^4.10.2"
},
"publishConfig": {
Expand Down
10 changes: 5 additions & 5 deletions packages/client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"compilerOptions": {
"lib": ["ESNext", "DOM"],
"emitDeclarationOnly": true,
"outDir": "dist",
"outDir": "dist"
},
"references": [
{
"path": "../ucan",
},
"path": "../ucan"
}
],
"include": ["src", "test", "package.json"],
"exclude": ["node_modules", "dist", "out", "test/mocks/mockServiceWorker.js"],
Expand All @@ -17,6 +17,6 @@
"entryPoints": ["src/index.js", "src/bearer.js"],
"includeVersion": true,
"excludeExternals": true,
"internalModule": "<internal>",
},
"internalModule": "<internal>"
}
}
4 changes: 2 additions & 2 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
"@types/assert": "^1.5.9",
"@types/eslint": "^8.44.9",
"@types/mocha": "^10.0.4",
"@types/node": "^20.11.15",
"@types/node": "^20.11.17",
"assert": "^2.1.0",
"mocha": "^10.2.0"
"mocha": "^10.3.0"
},
"publishConfig": {
"provenance": true
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"noImplicitReturns": false,
"noUnusedLocals": true,
"noUnusedParameters": false,
"skipLibCheck": true,
"skipLibCheck": true
},
"include": ["src", "test/mocks"],
"include": ["src", "test/mocks"]
}
25 changes: 17 additions & 8 deletions packages/homestar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
"types": "./dist/src/workflow/index.d.ts",
"default": "./src/workflow/index.js"
},
"./wasmify": {
"types": "./dist/src/wasmify/index.d.ts",
"default": "./src/wasmify/index.js"
},
"./types": {
"types": "./dist/src/types.d.ts"
}
Expand All @@ -33,6 +37,9 @@
"workflow": [
"dist/src/workflow/index"
],
"wasmify": [
"dist/src/wasmify/index"
],
"types": [
"dist/src/types"
]
Expand All @@ -42,6 +49,8 @@
"src",
"dist/src/workflow/*.d.ts",
"dist/src/workflow/*.d.ts.map",
"dist/src/wasmify/*.d.ts",
"dist/src/wasmify/*.d.ts.map",
"dist/src/*.d.ts",
"dist/src/*.d.ts.map"
],
Expand All @@ -54,31 +63,31 @@
},
"dependencies": {
"@fission-codes/channel": "workspace:^",
"@ipld/dag-cbor": "^9.0.8",
"@ipld/dag-cbor": "^9.1.0",
"@ipld/dag-json": "^10.1.7",
"@multiformats/sha3": "^3.0.2",
"@ts-ast-parser/core": "^0.6.3",
"@ts-ast-parser/core": "^0.7.0",
"emittery": "^1.0.2",
"esbuild": "^0.19.12",
"esbuild": "^0.20.0",
"get-tsconfig": "^4.7.2",
"multiformats": "^13.0.1",
"object-path": "^0.11.8",
"zod": "^3.22.4"
},
"devDependencies": {
"@bytecodealliance/componentize-js": "^0.4.1",
"@bytecodealliance/componentize-js": "^0.7.0",
"@types/get-value": "^3.0.5",
"@types/json-templates": "^3.0.3",
"@types/node": "^20.11.15",
"@types/node": "^20.11.17",
"@types/object-path": "^0.11.4",
"execa": "^8.0.1",
"homestar-runtime": "rc",
"iso-base": "^2.0.1",
"kubo-rpc-client": "^3.0.2",
"kubo-rpc-client": "^3.0.3",
"p-defer": "^4.0.0",
"playwright-test": "^14.1.0",
"playwright-test": "^14.1.1",
"tempy": "^3.1.0",
"testcontainers": "^10.6.0",
"testcontainers": "^10.7.1",
"type-fest": "^4.10.2",
"unws": "^0.2.4",
"ws": "^8.16.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/homestar/src/wasmify/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ async function wit(filePath) {
const name = d.name
const returnType = primitiveType(d.signatures[0].return.type)

return ` export ${name}: func(${params.join(', ')}) -> ${returnType}`
return ` export ${name}: func(${params.join(', ')}) -> ${returnType};`
}

return ''
})

const wit = `
package local:${world}
package local:${world};
world ${world} {
${exports.join('\n')}
Expand Down
10 changes: 5 additions & 5 deletions packages/homestar/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"compilerOptions": {
"lib": ["ESNext", "DOM"],
"emitDeclarationOnly": true,
"outDir": "dist",
"outDir": "dist"
},
"references": [
{
"path": "../channel",
},
"path": "../channel"
}
],
"include": ["src", "test", "package.json"],
"exclude": ["node_modules", "dist", "out"],
Expand All @@ -17,6 +17,6 @@
"entryPoints": ["src/index.js", "src/workflow/index.js"],
"includeVersion": true,
"excludeExternals": true,
"internalModule": "<internal>",
},
"internalModule": "<internal>"
}
}
4 changes: 2 additions & 2 deletions packages/ucan/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
"multiformats": "^13.0.1"
},
"devDependencies": {
"@types/node": "^20.11.15",
"playwright-test": "^14.1.0",
"@types/node": "^20.11.17",
"playwright-test": "^14.1.1",
"type-fest": "^4.10.2"
},
"publishConfig": {
Expand Down
6 changes: 3 additions & 3 deletions packages/ucan/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"lib": ["ESNext", "DOM"],
"emitDeclarationOnly": true,
"outDir": "dist",
"outDir": "dist"
},
"include": ["src", "test", "package.json"],
"exclude": ["node_modules", "dist", "out"],
Expand All @@ -12,6 +12,6 @@
"entryPoints": ["src/index.js", "src/bearer.js"],
"includeVersion": true,
"excludeExternals": true,
"internalModule": "<internal>",
},
"internalModule": "<internal>"
}
}
Loading

0 comments on commit 14d724b

Please sign in to comment.