node-liblzma 1.1.9 → 2.0.3
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.
- package/.gitattributes +3 -0
- package/.release-it.json +7 -0
- package/.release-it.manual.json +7 -0
- package/.release-it.retry.json +3 -0
- package/CHANGELOG.md +271 -0
- package/History.md +20 -0
- package/README.md +750 -30
- package/RELEASING.md +131 -0
- package/binding.gyp +162 -436
- package/biome.json +81 -0
- package/index.d.ts +254 -0
- package/lib/errors.d.ts +72 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +153 -0
- package/lib/errors.js.map +1 -0
- package/lib/lzma.d.ts +245 -0
- package/lib/lzma.d.ts.map +1 -0
- package/lib/lzma.js +626 -345
- package/lib/lzma.js.map +1 -0
- package/lib/pool.d.ts +123 -0
- package/lib/pool.d.ts.map +1 -0
- package/lib/pool.js +188 -0
- package/lib/pool.js.map +1 -0
- package/lib/types.d.ts +27 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +5 -0
- package/lib/types.js.map +1 -0
- package/package.json +61 -22
- package/pnpm-workspace.yaml +3 -0
- package/prebuilds/darwin-x64/node-liblzma.node +0 -0
- package/prebuilds/linux-x64/node-liblzma.node +0 -0
- package/prebuilds/win32-x64/node-liblzma.node +0 -0
- package/scripts/analyze-coverage.js +132 -0
- package/scripts/build_xz_with_cmake.py +390 -0
- package/scripts/compare-coverage-tools.js +93 -0
- package/scripts/copy_dll.py +51 -0
- package/scripts/download_xz_from_github.py +376 -0
- package/src/bindings/node-liblzma.cpp +411 -229
- package/src/bindings/node-liblzma.hpp +101 -48
- package/src/errors.ts +167 -0
- package/src/lzma.ts +839 -0
- package/src/pool.ts +228 -0
- package/src/types.ts +30 -0
- package/tsconfig.json +50 -0
- package/vitest.config.istanbul.ts +29 -0
- package/vitest.config.monocart.ts +44 -0
- package/vitest.config.ts +52 -0
- package/xz-version.json +8 -0
- package/prebuilds/darwin-x64/node.napi.node +0 -0
- package/prebuilds/linux-x64/node.napi.node +0 -0
- package/prebuilds/win32-x64/node.napi.node +0 -0
- package/scripts/download_extract_deps.py +0 -29
- package/scripts/prebuildify.py +0 -13
- package/src/lzma.coffee +0 -344
package/RELEASING.md
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Release Process
|
|
2
|
+
|
|
3
|
+
## Prerequisites
|
|
4
|
+
|
|
5
|
+
1. Ensure all tests pass: `pnpm test`
|
|
6
|
+
2. Ensure build succeeds: `pnpm build`
|
|
7
|
+
3. Ensure working directory is clean: `git status`
|
|
8
|
+
4. Ensure you're on `master` branch: `git branch`
|
|
9
|
+
5. Ensure you have npm credentials: `npm whoami`
|
|
10
|
+
|
|
11
|
+
## Standard Release
|
|
12
|
+
|
|
13
|
+
### Step 1: Run release-it locally
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# For patch release (1.1.9 → 1.1.10)
|
|
17
|
+
pnpm release patch
|
|
18
|
+
|
|
19
|
+
# For minor release (1.1.9 → 1.2.0)
|
|
20
|
+
pnpm release minor
|
|
21
|
+
|
|
22
|
+
# For major release (1.1.9 → 2.0.0)
|
|
23
|
+
pnpm release major
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
This will:
|
|
27
|
+
1. Update CHANGELOG.md (move [Unreleased] to new version section)
|
|
28
|
+
2. Bump version in package.json
|
|
29
|
+
3. Git commit with message "release: bump vX.Y.Z"
|
|
30
|
+
4. Create git tag vX.Y.Z
|
|
31
|
+
5. Push to GitHub
|
|
32
|
+
|
|
33
|
+
### Step 2: Wait for automated workflow
|
|
34
|
+
|
|
35
|
+
GitHub Actions will automatically:
|
|
36
|
+
1. Run full test suite
|
|
37
|
+
2. Build prebuilds for all platforms (3 OS × 4 Node versions)
|
|
38
|
+
3. Publish to npm with provenance
|
|
39
|
+
4. Create GitHub release
|
|
40
|
+
|
|
41
|
+
Monitor: https://github.com/oorabona/node-liblzma/actions
|
|
42
|
+
|
|
43
|
+
### Step 3: Verify release
|
|
44
|
+
|
|
45
|
+
1. Check npm: https://www.npmjs.com/package/node-liblzma
|
|
46
|
+
2. Check GitHub releases: https://github.com/oorabona/node-liblzma/releases
|
|
47
|
+
3. Test installation: `pnpm add node-liblzma@latest`
|
|
48
|
+
|
|
49
|
+
## Pre-release
|
|
50
|
+
|
|
51
|
+
For alpha/beta/rc releases, use the pre-release workflow:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Trigger manually via GitHub UI
|
|
55
|
+
# https://github.com/oorabona/node-liblzma/actions/workflows/pre-release.yml
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Hotfix Release
|
|
59
|
+
|
|
60
|
+
For emergency patches on older versions:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pnpm release:hotfix
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Dry Run (Test Before Release)
|
|
67
|
+
|
|
68
|
+
Always test the release process without actually publishing:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Dry run mode (no git push, no npm publish)
|
|
72
|
+
pnpm release major --dry-run
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
This will:
|
|
76
|
+
- Show you exactly what will happen
|
|
77
|
+
- Update local files (you can review)
|
|
78
|
+
- NOT push to GitHub
|
|
79
|
+
- NOT publish to npm
|
|
80
|
+
|
|
81
|
+
## Troubleshooting
|
|
82
|
+
|
|
83
|
+
### release-it fails with "Not authenticated"
|
|
84
|
+
|
|
85
|
+
Run: `npm login`
|
|
86
|
+
|
|
87
|
+
### Workflow fails with "NPM_TOKEN not found"
|
|
88
|
+
|
|
89
|
+
Contact repository admin to add NPM_TOKEN secret to GitHub repository settings.
|
|
90
|
+
|
|
91
|
+
### Tag already exists
|
|
92
|
+
|
|
93
|
+
Delete local and remote tag:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
git tag -d v2.0.0
|
|
97
|
+
git push origin :refs/tags/v2.0.0
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Then re-run: `pnpm release`
|
|
101
|
+
|
|
102
|
+
### Wrong branch
|
|
103
|
+
|
|
104
|
+
Ensure you're on `master`:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
git checkout master
|
|
108
|
+
git pull origin master
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Release Architecture
|
|
112
|
+
|
|
113
|
+
The release process uses a **separation of concerns** approach:
|
|
114
|
+
|
|
115
|
+
1. **Local (Developer)**: Version management via `@oorabona/release-it-preset`
|
|
116
|
+
- Updates CHANGELOG.md
|
|
117
|
+
- Bumps package.json version
|
|
118
|
+
- Creates git tag
|
|
119
|
+
- Pushes to GitHub
|
|
120
|
+
|
|
121
|
+
2. **CI/CD (GitHub Actions)**: Build and publishing via `release.yml`
|
|
122
|
+
- Runs tests
|
|
123
|
+
- Builds platform-specific prebuilds
|
|
124
|
+
- Publishes to npm with provenance
|
|
125
|
+
- Creates GitHub release
|
|
126
|
+
|
|
127
|
+
This ensures:
|
|
128
|
+
- Developer controls version and changelog
|
|
129
|
+
- CI handles platform-specific builds (which can't be done locally)
|
|
130
|
+
- Clear audit trail for releases
|
|
131
|
+
- Automated quality gates before publishing
|