Skip to content

Commit

Permalink
feat: fs.watch family of apis and fs mirror utility (#1)
Browse files Browse the repository at this point in the history
* feat: support for fs.watch family of apis

* feat: mirror utility api to handle testing and inspection

* improve: tests for the mirror utility

* improve: mirror utility input and output

* chore: version bump

* chore: removed deprecated plugin in favor of browserify-webpack-plugin

* chore: formatting

* feat: split builds for better native support

added a native build to pull Stream and Buffer environments from the environment to better support Node.
  • Loading branch information
3p3r authored May 5, 2024
1 parent da6e4dd commit 7de9ab1
Show file tree
Hide file tree
Showing 13 changed files with 796 additions and 329 deletions.
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "tests",
"request": "launch",
"runtimeArgs": ["run-script", "test"],
"runtimeExecutable": "npm",
"skipFiles": ["<node_internals>/**"],
"outFiles": ["${workspaceFolder}/dist/*.(m|c|)js", "!**/node_modules/**"],
"type": "node"
}
]
}
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ WebAssembly and SharedArrayBuffer IO. Pronounced "wassabee-yo".
- [Initialization](#initialization)
- [From New Memory](#from-new-memory)
- [From Existing Memory](#from-existing-memory)
- [Webpack Plugin](#webpack-plugin)

## Purpose

Expand Down Expand Up @@ -114,12 +113,3 @@ addEventListener("message", async ({ data }) => {

In this case, `reboot` signifies that the library is being initialized from cold
storage and thread-local state should be reset.

### Webpack Plugin

A Webpack plugin is provided to allow for seamless integration of `wasabio` into
any project. The plugin currently supports generating a WASM memory that can be
used to boot the library on the main thread with.

If you are not interested in using the Webpack plugin, you may opt out of its
dependencies being installed by using `npm install wasabio --omit=optional`.
1 change: 1 addition & 0 deletions karma.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ module.exports = function (config: karma.Config) {
timeout: mochaConfig.timeout,
},
},
concurrency: 1,
autoWatch: false,
singleRun: true,
logLevel: config.LOG_WARN,
Expand Down
22 changes: 10 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wasabio",
"version": "1.2.0",
"version": "1.3.0",
"description": "WebAssembly and SharedArrayBuffer IO. Pronounced 'wassabee-yo'.",
"repository": {
"type": "git",
Expand All @@ -9,7 +9,7 @@
"main": "index.js",
"scripts": {
"postinstall": "patch-package",
"test": "ts-mocha && karma start --single-run",
"test": "ts-mocha && karma start --single-run && NODE_OPTIONS='--import tsx' node test/test.mirror.ts",
"lint": "prettier --check .",
"cosmo": "prettier --write .",
"build": "NODE_OPTIONS='--import tsx' webpack --mode=production",
Expand All @@ -36,6 +36,7 @@
"@types/atob-lite": "^2.0.2",
"@types/chai": "^4.3.14",
"@types/karma": "^6.3.8",
"@types/lodash": "^4.17.0",
"@types/mocha": "^10.0.6",
"@types/node": "^20.11.30",
"@types/typedarray-to-buffer": "^4.0.4",
Expand All @@ -55,6 +56,7 @@
"karma-jasmine": "^5.1.0",
"karma-mocha": "^2.0.1",
"karma-webpack": "^5.0.1",
"lodash": "^4.17.21",
"memfs": "^4.8.1",
"mocha": "^10.3.0",
"patch-package": "^8.0.0",
Expand All @@ -76,7 +78,6 @@
"web-worker": "^1.3.0",
"webpack": "^5.91.0",
"webpack-cli": "^5.1.4",
"webpack-node-externals": "^3.0.0",
"webpack-shell-plugin-next": "^2.3.1",
"worker-loader": "^3.0.8"
},
Expand Down
Loading

0 comments on commit 7de9ab1

Please sign in to comment.