simple-zstd 2.0.0-0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/.github/workflows/ci.yml +48 -0
  2. package/.github/workflows/release.yml +51 -0
  3. package/.prettierignore +5 -0
  4. package/.prettierrc +8 -0
  5. package/.release-it.json +28 -0
  6. package/CHANGELOG.md +32 -0
  7. package/README.md +694 -110
  8. package/dist/src/buffer-writable.d.ts +12 -0
  9. package/dist/src/buffer-writable.js +28 -0
  10. package/dist/src/buffer-writable.js.map +1 -0
  11. package/dist/src/index.d.ts +50 -0
  12. package/dist/src/index.js +520 -0
  13. package/dist/src/index.js.map +1 -0
  14. package/dist/src/peek-transform.d.ts +16 -0
  15. package/dist/src/peek-transform.js +132 -0
  16. package/dist/src/peek-transform.js.map +1 -0
  17. package/dist/src/process-duplex.d.ts +22 -0
  18. package/dist/src/process-duplex.js +177 -0
  19. package/dist/src/process-duplex.js.map +1 -0
  20. package/dist/src/process-queue.d.ts +8 -0
  21. package/dist/src/process-queue.js +81 -0
  22. package/dist/src/process-queue.js.map +1 -0
  23. package/dist/src/types.d.ts +40 -0
  24. package/dist/src/types.js +3 -0
  25. package/dist/src/types.js.map +1 -0
  26. package/eslint.config.js +49 -0
  27. package/package.json +30 -22
  28. package/src/buffer-writable.ts +30 -0
  29. package/src/index.ts +617 -0
  30. package/src/is-zst.d.ts +5 -0
  31. package/src/peek-transform.ts +153 -0
  32. package/src/process-duplex.ts +213 -0
  33. package/src/process-queue.ts +97 -0
  34. package/src/types.ts +42 -0
  35. package/tsconfig.json +43 -0
  36. package/.eslintrc.js +0 -19
  37. package/.nyc_output/88144029-aa5a-40fb-a072-f586e59e4a38.json +0 -1
  38. package/.nyc_output/cb2a47ed-9ada-42b3-863b-b8437ca49715.json +0 -1
  39. package/.nyc_output/processinfo/88144029-aa5a-40fb-a072-f586e59e4a38.json +0 -1
  40. package/.nyc_output/processinfo/cb2a47ed-9ada-42b3-863b-b8437ca49715.json +0 -1
  41. package/.nyc_output/processinfo/index.json +0 -1
  42. package/.travis.yml +0 -9
  43. package/buffer-writable.js +0 -23
  44. package/coverage/base.css +0 -224
  45. package/coverage/block-navigation.js +0 -87
  46. package/coverage/buffer-writable.js.html +0 -154
  47. package/coverage/favicon.png +0 -0
  48. package/coverage/index.html +0 -146
  49. package/coverage/index.js.html +0 -910
  50. package/coverage/oven.js.html +0 -244
  51. package/coverage/prettify.css +0 -1
  52. package/coverage/prettify.js +0 -2
  53. package/coverage/sort-arrow-sprite.png +0 -0
  54. package/coverage/sorter.js +0 -196
  55. package/index.js +0 -295
  56. package/process-queue.js +0 -74
@@ -0,0 +1,48 @@
1
+ name: CI
2
+ permissions:
3
+ contents: read
4
+
5
+ on:
6
+ push:
7
+ branches:
8
+ - '**'
9
+ pull_request:
10
+ branches:
11
+ - main
12
+
13
+ jobs:
14
+ test:
15
+ name: Test on Node.js ${{ matrix.node-version }}
16
+ runs-on: ubuntu-latest
17
+
18
+ strategy:
19
+ matrix:
20
+ node-version: [22.x, 24.x]
21
+
22
+ steps:
23
+ - name: Install zstd
24
+ run: sudo apt-get update && sudo apt-get install -y zstd
25
+
26
+ - name: Checkout code
27
+ uses: actions/checkout@v6
28
+
29
+ - name: Setup Node.js ${{ matrix.node-version }}
30
+ uses: actions/setup-node@v6
31
+ with:
32
+ node-version: ${{ matrix.node-version }}
33
+ cache: 'npm'
34
+
35
+ - name: Install dependencies
36
+ run: npm ci
37
+
38
+ - name: Check formatting
39
+ run: npm run format:check
40
+
41
+ - name: Run linter
42
+ run: npm run lint
43
+
44
+ - name: Build TypeScript
45
+ run: npm run build
46
+
47
+ - name: Run tests
48
+ run: npm run test-ci
@@ -0,0 +1,51 @@
1
+ name: Release
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ version:
7
+ description: 'Version bump type (patch, minor, major) or explicit version (e.g. 2.1.0)'
8
+ required: true
9
+ default: 'patch'
10
+ type: string
11
+
12
+ permissions:
13
+ contents: write
14
+ id-token: write
15
+
16
+ jobs:
17
+ release:
18
+ name: Release new version
19
+ runs-on: ubuntu-latest
20
+
21
+ steps:
22
+ - name: Install zstd
23
+ run: sudo apt-get update && sudo apt-get install -y zstd
24
+
25
+ - name: Checkout code
26
+ uses: actions/checkout@v6
27
+ with:
28
+ fetch-depth: 0
29
+
30
+ - name: Setup Node.js
31
+ uses: actions/setup-node@v6
32
+ with:
33
+ node-version: '24.x'
34
+ cache: 'npm'
35
+ registry-url: 'https://registry.npmjs.org'
36
+
37
+ - name: Verify npm version
38
+ run: npm --version
39
+
40
+ - name: Install dependencies
41
+ run: npm ci
42
+
43
+ - name: Configure git
44
+ run: |
45
+ git config user.name "github-actions[bot]"
46
+ git config user.email "github-actions[bot]@users.noreply.github.com"
47
+
48
+ - name: Run release-it
49
+ run: npx release-it ${{ inputs.version }} --ci
50
+ env:
51
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,5 @@
1
+ node_modules
2
+ dist
3
+ coverage
4
+ *.log
5
+ .git
package/.prettierrc ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "semi": true,
3
+ "trailingComma": "es5",
4
+ "singleQuote": true,
5
+ "printWidth": 100,
6
+ "tabWidth": 2,
7
+ "arrowParens": "always"
8
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "git": {
3
+ "commitMessage": "chore: release v${version}",
4
+ "tagName": "v${version}",
5
+ "requireCleanWorkingDir": true,
6
+ "requireUpstream": true
7
+ },
8
+ "github": {
9
+ "release": true,
10
+ "releaseName": "v${version}"
11
+ },
12
+ "npm": {
13
+ "publish": true,
14
+ "publishArgs": ["--provenance", "--access", "public"],
15
+ "skipChecks": true
16
+ },
17
+ "hooks": {
18
+ "before:init": ["npm run lint", "npm run test-ci"]
19
+ },
20
+ "plugins": {
21
+ "@release-it/conventional-changelog": {
22
+ "preset": {
23
+ "name": "conventionalcommits"
24
+ },
25
+ "infile": "CHANGELOG.md"
26
+ }
27
+ }
28
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,32 @@
1
+ # Changelog
2
+
3
+ ## [2.1.0](https://github.com/Stieneee/simple-zstd/compare/v2.0.0...v2.1.0) (2026-03-14)
4
+
5
+ ### Bug Fixes
6
+
7
+ * handle stdin EPIPE errors in ProcessDuplex ([250d16d](https://github.com/Stieneee/simple-zstd/commit/250d16d3b8a81c9b1b295064cc5dae82423defeb))
8
+
9
+ ## [2.0.0](https://github.com/Stieneee/simple-zstd/compare/1.4.2...v2.0.0) (2025-11-12)
10
+
11
+ ### ⚠ BREAKING CHANGES
12
+
13
+ * modernize dependencies and migrate to native Node.js tooling
14
+
15
+ ### Features
16
+
17
+ * add dictionary caching and improve API design ([9a98a4f](https://github.com/Stieneee/simple-zstd/commit/9a98a4f6cc614006a681a7b3280a4f50af3d6e60)), closes [#26](https://github.com/Stieneee/simple-zstd/issues/26) [#26](https://github.com/Stieneee/simple-zstd/issues/26)
18
+ * modernize dependencies and migrate to native Node.js tooling ([29acc39](https://github.com/Stieneee/simple-zstd/commit/29acc39011578dfd280f2d185630050d8401b77f)), closes [#destroyed](https://github.com/Stieneee/simple-zstd/issues/destroyed)
19
+
20
+ ### Bug Fixes
21
+
22
+ * properly cleanup child processes and prevent test suite hangs ([f4f7736](https://github.com/Stieneee/simple-zstd/commit/f4f7736d52de5b083a167287e52d85cd9cca3660))
23
+ ## [1.4.2](https://github.com/Stieneee/simple-zstd/compare/1.4.1...1.4.2) (2022-10-19)
24
+ ## [1.4.1](https://github.com/Stieneee/simple-zstd/compare/1.4.0...1.4.1) (2022-10-19)
25
+ ## [1.4.0](https://github.com/Stieneee/simple-zstd/compare/1.3.1...1.4.0) (2021-09-03)
26
+ ## [1.3.1](https://github.com/Stieneee/simple-zstd/compare/1.3.0...1.3.1) (2021-07-07)
27
+ ## [1.3.0](https://github.com/Stieneee/simple-zstd/compare/1.1.2...1.3.0) (2021-03-31)
28
+ ## [1.1.2](https://github.com/Stieneee/simple-zstd/compare/1.1.1...1.1.2) (2020-05-08)
29
+ ## [1.1.1](https://github.com/Stieneee/simple-zstd/compare/1.1.0...1.1.1) (2019-09-23)
30
+ ## [1.1.0](https://github.com/Stieneee/simple-zstd/compare/1.0.1...1.1.0) (2019-08-08)
31
+ ## [1.0.1](https://github.com/Stieneee/simple-zstd/compare/1.0.0...1.0.1) (2019-06-27)
32
+ ## 1.0.0 (2019-06-17)