@d-dev/bin-upload 0.0.8 → 0.0.9
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/README.md +18 -3
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -6,8 +6,8 @@ Easily distribute binaries via npm, pypi, and GitHub releases.
|
|
|
6
6
|
|
|
7
7
|
`bin-upload` is a CLI tool built with [Bun](https://bun.sh) that packages and publishes pre-built binaries to multiple registries and platforms. It supports:
|
|
8
8
|
|
|
9
|
-
- **npm** — Publishes a main package that depend on platform-specific binary packages using [optionalDependencies](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#optionaldependencies).
|
|
10
|
-
- **PyPI** — Builds wheel (`.whl`) packages for each platform-specific tag.
|
|
9
|
+
- **npm** — Publishes a main package that depend on platform-specific binary packages using [optionalDependencies](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#optionaldependencies).
|
|
10
|
+
- **PyPI** — Builds wheel (`.whl`) packages for each platform-specific tag.
|
|
11
11
|
- **GitHub Releases** — Creates releases and uploads archive assets (`.tar.gz` or `.zip`).
|
|
12
12
|
|
|
13
13
|
## Installation
|
|
@@ -39,6 +39,13 @@ Download the appropriate binary for your platform from the [releases page](https
|
|
|
39
39
|
|
|
40
40
|
## Quick Start
|
|
41
41
|
|
|
42
|
+
**Requirements**
|
|
43
|
+
|
|
44
|
+
The following must be installed and available on your path.
|
|
45
|
+
|
|
46
|
+
- [npm](https://www.npmjs.com/): if publishing to npm
|
|
47
|
+
- [uv](https://docs.astral.sh/uv/): if publishing to pypi
|
|
48
|
+
|
|
42
49
|
1. **Initialize a configuration file:**
|
|
43
50
|
|
|
44
51
|
```sh
|
|
@@ -252,19 +259,27 @@ The `pack` command generates:
|
|
|
252
259
|
- A **main package** that detects the user's platform (`process.platform` + `process.arch`) and delegates to the appropriate binary package.
|
|
253
260
|
- **Platform-specific packages** listed as `optionalDependencies` in the main package, each containing the binary for that platform.
|
|
254
261
|
|
|
262
|
+
Bin upload publishes a main npm package that depend on platform-specific binary packages using [optionalDependencies](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#optionaldependencies). When the main package is installed, the corresponding platform-specific package containing the actual binary is also installed. This allows for downloading and installing only the necessary binary without relying on post-install scripts, which some package managers do not run for dependencies.
|
|
263
|
+
|
|
255
264
|
> **Note:** musl Linux binaries cannot be distinguished from glibc Linux binaries via `process.platform`/`process.arch`, so they cannot be published to npm.
|
|
256
265
|
|
|
257
266
|
### PyPI
|
|
258
267
|
|
|
259
|
-
The `pack` command builds platform-specific `.whl`
|
|
268
|
+
The `pack` command builds platform-specific wheel (`.whl`) files. Each wheel contains:
|
|
260
269
|
|
|
261
270
|
- A Python wrapper module that locates and executes the bundled binary.
|
|
262
271
|
- Console script entry points for CLI usage.
|
|
263
272
|
|
|
273
|
+
Bin upload builds and published wheel (`.whl`) packages for each platform-specific tag. Only one PyPi package is created containing the platform-specific wheel files (unlike npm where each binary is published to its own npm package). Tools such as `pip` and `uv` automatically install the correct wheel for the machine installing the package.
|
|
274
|
+
|
|
264
275
|
### GitHub Releases
|
|
265
276
|
|
|
266
277
|
The `pack` command creates `.tar.gz` or `.zip` archives. The `publish` command creates a GitHub release (if one doesn't exist for the tag) and uploads the archives as release assets.
|
|
267
278
|
|
|
279
|
+
### Publishing
|
|
280
|
+
|
|
281
|
+
The [npm](https://www.npmjs.com/) cli is used to publish to npm while [uv](https://docs.astral.sh/uv/) is used to publish to [PyPi](https://pypi.org/).
|
|
282
|
+
|
|
268
283
|
## Environment Variables
|
|
269
284
|
|
|
270
285
|
| Variable | Used By |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d-dev/bin-upload",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "Publish binaries to npm, pypi, and github releases.",
|
|
5
5
|
"author": "Derek Worthen <worthend.derek@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
],
|
|
29
29
|
"bin": "index.js",
|
|
30
30
|
"optionalDependencies": {
|
|
31
|
-
"@d-dev/bin-upload-linux-x64": "0.0.
|
|
32
|
-
"@d-dev/bin-upload-linux-arm64": "0.0.
|
|
33
|
-
"@d-dev/bin-upload-win-x64": "0.0.
|
|
34
|
-
"@d-dev/bin-upload-darwin-x64": "0.0.
|
|
35
|
-
"@d-dev/bin-upload-darwin-arm64": "0.0.
|
|
31
|
+
"@d-dev/bin-upload-linux-x64": "0.0.9",
|
|
32
|
+
"@d-dev/bin-upload-linux-arm64": "0.0.9",
|
|
33
|
+
"@d-dev/bin-upload-win-x64": "0.0.9",
|
|
34
|
+
"@d-dev/bin-upload-darwin-x64": "0.0.9",
|
|
35
|
+
"@d-dev/bin-upload-darwin-arm64": "0.0.9"
|
|
36
36
|
}
|
|
37
37
|
}
|