Name the script for what it does, now that it serves two providers
`link-polyfill.ts` handled one provider. It now handles two through a registry, one of which is not a polyfill, so both the filename and the `link:` verb said something false — and a name that is short but wrong misleads more than an opaque one would. It becomes `overlay-local-checkout.ts`, which is the operation: it copy-overlays a local package checkout into node_modules for development. "link" also implied a symlink, which is precisely what the script exists NOT to do — its own header spends a paragraph on why. No behaviour changed: same registry, same copy, same `--once`, same watch loop, same assertion. Both providers exercised afterwards, each reporting the singletons it must preserve — one package for the data layer, two for the indexing package, whose own checkout carries `file:` links and would otherwise smuggle in a second verifier. Seven references repaired by rewriting the sentence that carried them rather than swapping a path, across the script, `package.json`, `.env.example` and four doctrine leaves. No compatibility alias left behind: an old name kept "just in case" would restore exactly the ambiguity being removed.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bun
|
||||
/**
|
||||
* link-polyfill.ts — Reactive local overlay of a data-layer PROVIDER's checkout into
|
||||
* node_modules. One script, one provider per run; only the paths differ between them.
|
||||
* overlay-local-checkout.ts — Reactive local overlay of a data-layer PROVIDER's checkout
|
||||
* into node_modules. One script, one provider per run; only the paths differ between them.
|
||||
*
|
||||
* PROVIDERS (first non-flag argument; defaults to `polyfill`):
|
||||
* polyfill → node_modules/@ng-eventually/polyfill override: NG_EVENTUALLY_LOCAL
|
||||
@@ -36,11 +36,11 @@
|
||||
* an hour to learn. Watching copies the files; it does not make anything reload them.
|
||||
*
|
||||
* USAGE (reactive dev):
|
||||
* Terminal 1: pnpm run link:polyfill # or: pnpm run link:indexing
|
||||
* Terminal 1: pnpm run overlay:polyfill # or: pnpm run overlay:indexing
|
||||
* Terminal 2: bun run dev # portless festipod bun --hot src/index.ts
|
||||
* Edit the checkout's src → it lands in node_modules → RESTART dev to pick it up.
|
||||
*
|
||||
* pnpm run link:indexing --once # overlay + verify, no watch (CI / one-shot)
|
||||
* pnpm run overlay:indexing --once # overlay + verify, no watch (CI / one-shot)
|
||||
* Return to the committed git-installed dependencies: pnpm install
|
||||
*/
|
||||
import { existsSync, lstatSync, mkdirSync, rmSync, cpSync, copyFileSync, realpathSync } from "node:fs";
|
||||
@@ -83,7 +83,7 @@ const ONCE = args.includes("--once");
|
||||
const KEY = args.find((a) => !a.startsWith("-")) ?? "polyfill";
|
||||
|
||||
function fail(msg: string): never {
|
||||
console.error(`✖ link:${KEY} — ${msg}`);
|
||||
console.error(`✖ overlay:${KEY} — ${msg}`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user