Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: streamich/memfs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.9.0
Choose a base ref
...
head repository: streamich/memfs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.9.1
Choose a head ref
  • 10 commits
  • 48 files changed
  • 2 contributors

Commits on Apr 27, 2024

  1. ci: change GitHub token env var

    streamich authored Apr 27, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    53cbadc View commit details
  2. chore: 🤖 publish static site

    streamich committed Apr 27, 2024
    Copy the full SHA
    7461f36 View commit details
  3. chore: 🤖 update README and run Prettier

    streamich committed Apr 27, 2024
    Copy the full SHA
    adc6570 View commit details
  4. fix: 🐛 use latest json-pack implementation

    streamich committed Apr 27, 2024
    Copy the full SHA
    de54ab5 View commit details
  5. chore: 🤖 use util package, remove more duplicate code

    streamich committed Apr 27, 2024
    Copy the full SHA
    c223b74 View commit details
  6. Copy the full SHA
    c6e18b7 View commit details
  7. chore: 🤖 remove /src/json-joy/ folder

    streamich committed Apr 27, 2024
    Copy the full SHA
    0509f15 View commit details
  8. docs: ✏️ describe memfs() helper in docs

    [skip ci]
    streamich committed Apr 27, 2024
    Copy the full SHA
    0dfd7bb View commit details
  9. Merge pull request #1028 from streamich/dependencies

    Use package dependencies
    streamich authored Apr 27, 2024
    Copy the full SHA
    e5461ae View commit details
  10. chore(release): 4.9.1 [skip ci]

    ## [4.9.1](v4.9.0...v4.9.1) (2024-04-27)
    
    ### Bug Fixes
    
    * 🐛 use latest json-pack implementation ([de54ab5](de54ab5))
    semantic-release-bot committed Apr 27, 2024
    Copy the full SHA
    4619f16 View commit details
Showing with 132 additions and 3,214 deletions.
  1. +1 −1 .github/workflows/checks.yml
  2. +28 −0 .github/workflows/gh-pages.yml
  3. +3 −2 .gitignore
  4. +7 −0 CHANGELOG.md
  5. +12 −9 README.md
  6. +10 −0 docs/node/usage.md
  7. +10 −4 package.json
  8. +2 −2 src/fsa-to-node/json.ts
  9. +0 −11 src/json-joy/json-pack/JsonPackExtension.ts
  10. +0 −13 src/json-joy/json-pack/JsonPackValue.ts
  11. +0 −408 src/json-joy/json-pack/cbor/CborDecoder.ts
  12. +0 −349 src/json-joy/json-pack/cbor/CborDecoderBase.ts
  13. +0 −67 src/json-joy/json-pack/cbor/CborEncoder.ts
  14. +0 −333 src/json-joy/json-pack/cbor/CborEncoderFast.ts
  15. +0 −42 src/json-joy/json-pack/cbor/constants.ts
  16. +0 −1 src/json-joy/json-pack/cbor/types.ts
  17. +0 −644 src/json-joy/json-pack/json/JsonDecoder.ts
  18. +0 −238 src/json-joy/json-pack/json/JsonEncoder.ts
  19. +0 −57 src/json-joy/json-pack/types.ts
  20. +0 −1 src/json-joy/json-pointer/index.ts
  21. +0 −2 src/json-joy/json-pointer/types.ts
  22. +0 −2 src/json-joy/util/base64/constants.ts
  23. +0 −68 src/json-joy/util/base64/createFromBase64Bin.ts
  24. +0 −44 src/json-joy/util/base64/createToBase64Bin.ts
  25. +0 −3 src/json-joy/util/base64/fromBase64Bin.ts
  26. +0 −3 src/json-joy/util/base64/toBase64Bin.ts
  27. +0 −105 src/json-joy/util/buffers/Reader.ts
  28. +0 −12 src/json-joy/util/buffers/Slice.ts
  29. +0 −276 src/json-joy/util/buffers/Writer.ts
  30. +0 −16 src/json-joy/util/buffers/f16.ts
  31. +0 −1 src/json-joy/util/buffers/index.ts
  32. +0 −6 src/json-joy/util/buffers/isFloat32.ts
  33. +0 −126 src/json-joy/util/buffers/types.ts
  34. +0 −51 src/json-joy/util/buffers/utf8/CachedUtf8Decoder.ts
  35. +0 −167 src/json-joy/util/buffers/utf8/decodeAscii.ts
  36. +0 −3 src/json-joy/util/buffers/utf8/decodeUtf8/index.ts
  37. +0 −39 src/json-joy/util/buffers/utf8/decodeUtf8/v10.ts
  38. +0 −39 src/json-joy/util/buffers/utf8/decodeUtf8/v16.ts
  39. +0 −36 src/json-joy/util/buffers/utf8/decodeUtf8/v18.ts
  40. +0 −7 src/json-joy/util/buffers/utf8/randomU32.ts
  41. +0 −3 src/json-joy/util/buffers/utf8/sharedCachedUtf8Decoder.ts
  42. +0 −15 src/json-joy/util/print/printTree.ts
  43. +1 −1 src/print/index.ts
  44. +3 −3 src/snapshot/binary.ts
  45. +2 −2 src/snapshot/json.ts
  46. +1 −1 src/snapshot/shared.ts
  47. +15 −1 tsconfig.json
  48. +37 −0 yarn.lock
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -110,5 +110,5 @@ jobs:
- name: Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: GitHub Pages

on:
push:
branches: [master]

jobs:
gh-pages:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn install --frozen-lockfile
- run: yarn typedoc
- run: yarn coverage
- run: yarn build:pages
- name: Publish to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./gh-pages
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -2,9 +2,10 @@
node_modules
/.idea
.nyc_output
coverage
/coverage/
package-lock.json
/lib/
/gh-pages
/gh-pages/
/dist
/fs-test/
/typedocs/
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [4.9.1](https://github.com/streamich/memfs/compare/v4.9.0...v4.9.1) (2024-04-27)


### Bug Fixes

* 🐛 use latest json-pack implementation ([de54ab5](https://github.com/streamich/memfs/commit/de54ab53a5df3b857975094ce4c59d760240a6d6))

# [4.9.0](https://github.com/streamich/memfs/compare/v4.8.2...v4.9.0) (2024-04-27)


21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -15,15 +15,18 @@ JavaScript file system utilities for Node.js and browser.
npm i memfs
```

## Docs

- [In-memory Node.js `fs` API](./docs/node/index.md)
- `experimental` [`fs` to File System Access API adapter](./docs/fsa/fs-to-fsa.md)
- `experimental` [File System Access API to `fs` adapter](./docs/fsa/fsa-to-fs.md)
- `experimental` [`crudfs` a CRUD-like file system abstraction](./docs/crudfs/index.md)
- `experimental` [`casfs` Content Addressable Storage file system abstraction](./docs/casfs/index.md)
- [Directory `snapshot` utility](./docs/snapshot/index.md)
- [`print` directory tree to terminal](./docs/print/index.md)
## Resources

- Documentation
- [In-memory Node.js `fs` API](./docs/node/index.md)
- `experimental` [`fs` to File System Access API adapter](./docs/fsa/fs-to-fsa.md)
- `experimental` [File System Access API to `fs` adapter](./docs/fsa/fsa-to-fs.md)
- `experimental` [`crudfs` a CRUD-like file system abstraction](./docs/crudfs/index.md)
- `experimental` [`casfs` Content Addressable Storage file system abstraction](./docs/casfs/index.md)
- [Directory `snapshot` utility](./docs/snapshot/index.md)
- [`print` directory tree to terminal](./docs/print/index.md)
- [Code reference](https://streamich.github.io/memfs/)
- [Test coverage](https://streamich.github.io/memfs/coverage/lcov-report/)

## Demos

10 changes: 10 additions & 0 deletions docs/node/usage.md
Original file line number Diff line number Diff line change
@@ -39,6 +39,16 @@ vol.writeFileSync('/foo', 'bar');
expect(vol.toJSON()).toEqual({ '/foo': 'bar' });
```

Construct new `memfs` volumes:

```js
import { memfs } from 'memfs';

const { fs, vol } = memfs({ '/foo': 'bar' });

fs.readFileSync('/foo', 'utf8'); // bar
```

Create as many filesystem volumes as you need:

```js
14 changes: 10 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "memfs",
"version": "4.9.0",
"version": "4.9.1",
"description": "In-memory file-system with Node's fs API.",
"keywords": [
"fs",
@@ -52,7 +52,7 @@
"scripts": {
"build": "tsc -p . && rimraf --glob lib/__tests__ 'lib/**/__tests__'",
"build:webfs": "NODE_ENV=production webpack --config ./src/webfs/webpack.config.js",
"clean": "rimraf lib types",
"clean": "rimraf lib types typedocs gh-pages coverage",
"demo:crud-and-cas": "webpack serve --config ./demo/crud-and-cas/webpack.config.js",
"demo:fsa-to-node-sync-tests": "webpack serve --config ./demo/fsa-to-node-sync-tests/webpack.config.js",
"demo:fsa-to-node-zipfile": "webpack serve --config ./demo/fsa-to-node-zipfile/webpack.config.js",
@@ -66,7 +66,10 @@
"test:watch": "jest --watch",
"tslint": "tslint \"src/**/*.ts\" -t verbose",
"typecheck": "tsc -p .",
"watch": "watch \"npm run build\" ./src"
"watch": "watch \"npm run build\" ./src",
"coverage": "yarn test --collectCoverage",
"typedoc": "npx typedoc@0.25.13 --tsconfig tsconfig.json",
"build:pages": "npx rimraf@5.0.5 gh-pages && mkdir -p gh-pages && cp -r typedocs/* gh-pages && cp -r coverage gh-pages/coverage"
},
"commitlint": {
"extends": [
@@ -121,15 +124,18 @@
}
},
"dependencies": {
"@jsonjoy.com/json-pack": "^1.0.2",
"@jsonjoy.com/util": "^1.1.0",
"sonic-forest": "^1.0.0",
"tslib": "^2.0.0"
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/git": "^10.0.1",
"@semantic-release/npm": "^9.0.1",
"@types/jest": "^29.0.0",
"@types/node": "^10.17.60",
"@types/mime": "^3.0.0",
"@types/node": "^10.17.60",
"app-root-path": "^3.1.0",
"assert": "^2.0.0",
"buffer": "^6.0.3",
4 changes: 2 additions & 2 deletions src/fsa-to-node/json.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CborEncoder } from '../json-joy/json-pack/cbor/CborEncoder';
import { CborDecoder } from '../json-joy/json-pack/cbor/CborDecoder';
import { CborEncoder } from '@jsonjoy.com/json-pack/lib/cbor/CborEncoder';
import { CborDecoder } from '@jsonjoy.com/json-pack/lib/cbor/CborDecoder';

export const encoder = new CborEncoder();
export const decoder = new CborDecoder();
11 changes: 0 additions & 11 deletions src/json-joy/json-pack/JsonPackExtension.ts

This file was deleted.

13 changes: 0 additions & 13 deletions src/json-joy/json-pack/JsonPackValue.ts

This file was deleted.

Loading