@cofferdam/cofferdam 0.2.3 → 0.3.1
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 +19 -19
- package/bin/cofferdam.js +7 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,9 +8,9 @@ Inspired by Elixir's [Credo](https://github.com/rrrene/credo).
|
|
|
8
8
|
## Install
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
pnpm add -D cofferdam # pnpm
|
|
12
|
-
npm install -D cofferdam # npm
|
|
13
|
-
yarn add -D cofferdam # yarn
|
|
11
|
+
pnpm add -D @cofferdam/cofferdam # pnpm
|
|
12
|
+
npm install -D @cofferdam/cofferdam # npm
|
|
13
|
+
yarn add -D @cofferdam/cofferdam # yarn
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
The package downloads a pre-built binary for your platform on install
|
|
@@ -18,17 +18,17 @@ The package downloads a pre-built binary for your platform on install
|
|
|
18
18
|
through a tiny JS shim.
|
|
19
19
|
|
|
20
20
|
> **pnpm users:** pnpm v10's default sandbox blocks postinstall scripts
|
|
21
|
-
> unless the package is on the allowlist. `pnpm add -D cofferdam`
|
|
22
|
-
> "succeed" without ever downloading the binary. Add this to your
|
|
21
|
+
> unless the package is on the allowlist. `pnpm add -D @cofferdam/cofferdam`
|
|
22
|
+
> will "succeed" without ever downloading the binary. Add this to your
|
|
23
23
|
> `package.json` so the binary install actually runs:
|
|
24
24
|
>
|
|
25
25
|
> ```json
|
|
26
|
-
> { "pnpm": { "onlyBuiltDependencies": ["cofferdam"] } }
|
|
26
|
+
> { "pnpm": { "onlyBuiltDependencies": ["@cofferdam/cofferdam"] } }
|
|
27
27
|
> ```
|
|
28
28
|
>
|
|
29
|
-
> Then re-run `pnpm install` (or `pnpm rebuild cofferdam` for
|
|
30
|
-
> install). Verified you're hit by this if
|
|
31
|
-
> errors with "binary not found".
|
|
29
|
+
> Then re-run `pnpm install` (or `pnpm rebuild @cofferdam/cofferdam` for
|
|
30
|
+
> an existing install). Verified you're hit by this if
|
|
31
|
+
> `pnpm exec cofferdam --version` errors with "binary not found".
|
|
32
32
|
|
|
33
33
|
## First run
|
|
34
34
|
|
|
@@ -172,24 +172,24 @@ downloaded. Two recovery paths:
|
|
|
172
172
|
1. **Manual binary** — download the release archive from
|
|
173
173
|
[GitHub Releases](https://github.com/TAJD/cofferdam/releases),
|
|
174
174
|
extract it, set `COFFERDAM_BINARY_PATH` to the binary, then
|
|
175
|
-
`npm rebuild cofferdam`.
|
|
175
|
+
`npm rebuild @cofferdam/cofferdam`.
|
|
176
176
|
2. **Pre-baked image** — set `COFFERDAM_SKIP_DOWNLOAD=1` if the
|
|
177
|
-
binary is already at `node_modules/cofferdam/bin/cofferdam`
|
|
177
|
+
binary is already at `node_modules/@cofferdam/cofferdam/bin/cofferdam`
|
|
178
178
|
(or `cofferdam.exe` on Windows).
|
|
179
179
|
|
|
180
180
|
> **Windows + npm 6:** bare `npx cofferdam` falls back to `npm run` and
|
|
181
|
-
> fails with `Missing script: 'cofferdam'`. Use
|
|
182
|
-
> `
|
|
183
|
-
> upgrade to npm ≥ 7.
|
|
181
|
+
> fails with `Missing script: 'cofferdam'`. Use
|
|
182
|
+
> `npx -p @cofferdam/cofferdam cofferdam`, `pnpm exec cofferdam`, or
|
|
183
|
+
> `.\node_modules\.bin\cofferdam.cmd`, or upgrade to npm ≥ 7.
|
|
184
184
|
|
|
185
185
|
## Versioning
|
|
186
186
|
|
|
187
187
|
The npm package version tracks the cofferdam release version.
|
|
188
|
-
|
|
189
|
-
Release. Lockfile-pinned installs are deterministic. The Rust
|
|
190
|
-
workspace and the
|
|
191
|
-
are released in lockstep —
|
|
192
|
-
with an SDK at the same `X.Y.Z`.
|
|
188
|
+
`@cofferdam/cofferdam@0.2.3` downloads the binary from the `v0.2.3`
|
|
189
|
+
GitHub Release. Lockfile-pinned installs are deterministic. The Rust
|
|
190
|
+
workspace and the `@cofferdam/cofferdam` + `@cofferdam/check-sdk` npm
|
|
191
|
+
packages are released in lockstep — an `@cofferdam/cofferdam@X.Y.Z`
|
|
192
|
+
install always pairs with an SDK at the same `X.Y.Z`.
|
|
193
193
|
|
|
194
194
|
## License
|
|
195
195
|
|
package/bin/cofferdam.js
CHANGED
|
@@ -14,9 +14,9 @@ const binaryPath = path.join(__dirname, binaryName);
|
|
|
14
14
|
if (!fs.existsSync(binaryPath)) {
|
|
15
15
|
// Tailor the recovery hint to the package manager. pnpm v10's default
|
|
16
16
|
// sandbox silently blocks postinstall unless the package is in
|
|
17
|
-
// `pnpm.onlyBuiltDependencies`, so a `pnpm add -D cofferdam`
|
|
18
|
-
// with no binary on disk. Recommending `npm rebuild` to those
|
|
19
|
-
// wrong — they need pnpm syntax + the allowlist edit (cd-iui / gh #9).
|
|
17
|
+
// `pnpm.onlyBuiltDependencies`, so a `pnpm add -D @cofferdam/cofferdam`
|
|
18
|
+
// 'succeeds' with no binary on disk. Recommending `npm rebuild` to those
|
|
19
|
+
// users is wrong — they need pnpm syntax + the allowlist edit (cd-iui / gh #9).
|
|
20
20
|
const pkgManager = detectPackageManager();
|
|
21
21
|
let recovery;
|
|
22
22
|
if (pkgManager === 'pnpm') {
|
|
@@ -24,14 +24,14 @@ if (!fs.existsSync(binaryPath)) {
|
|
|
24
24
|
"Looks like a pnpm install. pnpm v10 blocks postinstall scripts unless\n" +
|
|
25
25
|
"the package is in `pnpm.onlyBuiltDependencies`. To fix:\n\n" +
|
|
26
26
|
' 1. Add to your package.json:\n' +
|
|
27
|
-
' { "pnpm": { "onlyBuiltDependencies": ["cofferdam"] } }\n' +
|
|
28
|
-
' 2. Then run: pnpm rebuild cofferdam\n';
|
|
27
|
+
' { "pnpm": { "onlyBuiltDependencies": ["@cofferdam/cofferdam"] } }\n' +
|
|
28
|
+
' 2. Then run: pnpm rebuild @cofferdam/cofferdam\n';
|
|
29
29
|
} else if (pkgManager === 'yarn') {
|
|
30
30
|
recovery =
|
|
31
31
|
'Looks like a yarn install. Run:\n' +
|
|
32
|
-
' yarn rebuild cofferdam\n';
|
|
32
|
+
' yarn rebuild @cofferdam/cofferdam\n';
|
|
33
33
|
} else {
|
|
34
|
-
recovery = 'Run:\n npm rebuild cofferdam\n';
|
|
34
|
+
recovery = 'Run:\n npm rebuild @cofferdam/cofferdam\n';
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
console.error(
|