shipready 1.0.2 → 1.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 (3) hide show
  1. package/README.md +29 -3
  2. package/dist/cli.js +2 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -159,7 +159,9 @@ Optional `shipready.config.json` in your project root:
159
159
 
160
160
  ## Using in CI
161
161
 
162
- `shipready check` exits with code `1` when errors are found:
162
+ ### GitHub Action (recommended)
163
+
164
+ Add the quality gate to any workflow with a single step:
163
165
 
164
166
  ```yaml
165
167
  # .github/workflows/quality.yml
@@ -170,9 +172,33 @@ jobs:
170
172
  runs-on: ubuntu-latest
171
173
  steps:
172
174
  - uses: actions/checkout@v4
173
- - uses: actions/setup-node@v4
175
+ - uses: formalness/shipready@v1
176
+ ```
177
+
178
+ The job fails when errors (secrets, unignored `.env`, ...) are found.
179
+
180
+ | Input | Default | Purpose |
181
+ | --- | --- | --- |
182
+ | `path` | `.` | Project directory to scan |
183
+ | `verbose` | `true` | Show file/line locations for every finding |
184
+ | `version` | `latest` | shipready version to run (npm tag or exact version) |
185
+ | `args` | `""` | Extra arguments for `shipready check` (e.g. `--json`) |
186
+
187
+ Example with options:
188
+
189
+ ```yaml
190
+ - uses: formalness/shipready@v1
174
191
  with:
175
- node-version: 20
192
+ path: apps/web
193
+ verbose: "false"
194
+ version: "1.0.3"
195
+ ```
196
+
197
+ ### Manual setup
198
+
199
+ `shipready check` exits with code `1` when errors are found, so it works in any CI:
200
+
201
+ ```yaml
176
202
  - run: npx shipready check --verbose
177
203
  ```
178
204
 
package/dist/cli.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import fs from "node:fs";
2
2
  import path from "node:path";
3
+ import { fileURLToPath } from "node:url";
3
4
  import { Command } from "commander";
4
5
  import pc from "picocolors";
5
6
  import { detectProject, runScan, scanFiles } from "./scanner.js";
@@ -46,7 +47,7 @@ async function applyFixes(root, force) {
46
47
  /** Reads the CLI's own version from its package.json (works from dist/ at runtime). */
47
48
  function ownVersion() {
48
49
  try {
49
- const pkgPath = path.resolve(path.dirname(new URL(import.meta.url).pathname), "..", "package.json");
50
+ const pkgPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..", "package.json");
50
51
  const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
51
52
  return pkg.version ?? "0.0.0";
52
53
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shipready",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "description": "Pre-flight check for your repo before shipping. Scans AI-coded projects for secrets, env issues, debug leftovers, and generates AI-agent instruction files.",
5
5
  "type": "module",
6
6
  "license": "MIT",