@lacymorrow/shipx 0.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 (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +112 -0
  3. package/dist/cli.js +2077 -0
  4. package/package.json +58 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Lacy Morrow
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,112 @@
1
+ # shipx
2
+
3
+ Interactive release CLI — bump, tag, publish, and ship your packages with a beautiful terminal UI.
4
+
5
+ Like [np](https://github.com/sindresorhus/np), but built with [@clack/prompts](https://github.com/bombshell-dev/clack) for a modern, delightful experience.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -g @lacymorrow/shipx
11
+ # or run directly
12
+ npx @lacymorrow/shipx
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ```bash
18
+ # Interactive — prompts for version bump type
19
+ shipx
20
+
21
+ # Specify bump type directly
22
+ shipx patch
23
+ shipx minor
24
+ shipx major
25
+
26
+ # Explicit version
27
+ shipx 2.0.0
28
+
29
+ # Beta release
30
+ shipx --beta
31
+ ```
32
+
33
+ ## Configuration
34
+
35
+ shipx looks for config in this order:
36
+
37
+ 1. `shipx.config.ts` or `shipx.config.js`
38
+ 2. `.shipxrc.json` or `.shipxrc`
39
+ 3. `"shipx"` key in `package.json`
40
+
41
+ If no config is found, shipx auto-detects your `package.json` and runs all steps.
42
+
43
+ ### Example `shipx.config.ts`
44
+
45
+ ```ts
46
+ import type { ShipConfig } from "@lacymorrow/shipx";
47
+
48
+ export default {
49
+ packageJsonPaths: ["package.json", "packages/core/package.json"],
50
+ bumpFiles: [
51
+ {
52
+ path: "bin/cli",
53
+ pattern: /^VERSION="[^"]*"/m,
54
+ replacement: (v) => `VERSION="${v}"`,
55
+ },
56
+ ],
57
+ steps: {
58
+ npm: true,
59
+ homebrew: true,
60
+ githubRelease: true,
61
+ },
62
+ git: {
63
+ releaseBranch: "main",
64
+ tagPrefix: "v",
65
+ commitMessage: "release: {tag}",
66
+ },
67
+ npm: {
68
+ access: "public",
69
+ },
70
+ homebrew: {
71
+ tapPath: "../homebrew-tap",
72
+ formulaFile: "Formula/mytool.rb",
73
+ repoSlug: "user/repo",
74
+ },
75
+ } satisfies ShipConfig;
76
+ ```
77
+
78
+ ### Config Options
79
+
80
+ | Option | Type | Default | Description |
81
+ |--------|------|---------|-------------|
82
+ | `packageJsonPaths` | `string[]` | Auto-detected | Paths to package.json files to bump |
83
+ | `bumpFiles` | `BumpFileConfig[]` | `[]` | Additional files with regex-based version bumping |
84
+ | `steps.*` | `boolean` | All `true` | Toggle individual steps |
85
+ | `git.releaseBranch` | `string` | `"main"` | Branch required for stable releases |
86
+ | `git.tagPrefix` | `string` | `"v"` | Tag prefix (e.g. `v1.0.0`) |
87
+ | `git.commitMessage` | `string` | `"release: {tag}"` | Commit message template (`{tag}` is replaced) |
88
+ | `npm.access` | `"public" \| "restricted"` | `"public"` | npm publish access level |
89
+ | `npm.cwd` | `string` | Project root | Working directory for npm publish |
90
+ | `homebrew.tapPath` | `string` | Auto-detected | Path to Homebrew tap repo |
91
+ | `homebrew.formulaFile` | `string` | Auto-detected | Formula file relative to tap |
92
+ | `homebrew.repoSlug` | `string` | Auto-detected | GitHub `owner/repo` for tarball URL |
93
+
94
+ ### Steps
95
+
96
+ All steps are enabled by default. Disable any via `steps`:
97
+
98
+ | Step | What it does |
99
+ |------|-------------|
100
+ | `preflight` | Checks clean git tree, correct branch |
101
+ | `bumpVersion` | Updates package.json + custom bump files |
102
+ | `changelog` | Generates changelog from git log |
103
+ | `commit` | Creates release commit |
104
+ | `tag` | Creates git tag |
105
+ | `push` | Pushes commit + tag to origin |
106
+ | `githubRelease` | Creates GitHub release via `gh` CLI |
107
+ | `npm` | Publishes to npm (with OTP retry) |
108
+ | `homebrew` | Updates Homebrew formula SHA + URL |
109
+
110
+ ## License
111
+
112
+ MIT