@icebreakers/monorepo 5.5.10 → 5.7.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.
- package/README.md +2 -0
- package/dist/baseline-DPfotf4y.mjs +146 -0
- package/dist/bundle-B9vRch4R.mjs +49 -0
- package/dist/catalog-CDEyc1uA.mjs +299 -0
- package/dist/cli.mjs +1487 -156
- package/dist/commands-TS8ABFdP.mjs +13820 -0
- package/dist/config-C38c_Q8L.mjs +66 -0
- package/dist/{create-flow-C811m80z.mjs → create-flow-CCr2hfSY.mjs} +103 -40
- package/dist/deps-CUdI2DaB.mjs +47 -0
- package/dist/execute-PX1hT0qv.mjs +68 -0
- package/dist/execute-Vi4qHe-D.mjs +663 -0
- package/dist/format-DZ7L34rf.mjs +28 -0
- package/dist/index-CoCTFWZJ.d.mts +2150 -0
- package/dist/index.d.mts +1741 -111
- package/dist/index.mjs +60 -6
- package/dist/inputs-_xIVONmB.mjs +50 -0
- package/dist/npm-B25nrSyz.mjs +82 -0
- package/dist/plan-B5aE_WNF.mjs +75 -0
- package/dist/run-Lu7y1bNf.mjs +165 -0
- package/dist/save-CdCf630Z.mjs +79 -0
- package/dist/scan-4nboHNXP.mjs +293 -0
- package/dist/template-drift-BBhnrHY1.mjs +2740 -0
- package/dist/tooling-entry.d.mts +1 -1
- package/dist/tooling-entry.mjs +2 -1
- package/dist/transaction-DAhY8EpG.mjs +168 -0
- package/dist/tsconfig-CGntrzBM.mjs +1483 -0
- package/dist/{tooling-BfXlmCi-.mjs → vitest-DkGh4Ygo.mjs} +108 -167
- package/dist/workspace-tasks-CnB8kkS0.mjs +4435 -0
- package/package.json +25 -7
- package/resources/api-report/runner.cjs +76 -0
- package/resources/devcontainer/setup.mjs +36 -0
- package/resources/knip/reporter.mjs +46 -0
- package/resources/maintenance/migration-lanes.mjs +141 -0
- package/resources/maintenance/migration-lock.mjs +119 -0
- package/resources/maintenance/migrations.mjs +215 -0
- package/resources/maintenance/presets.mjs +130 -0
- package/resources/maintenance/validate.mjs +233 -0
- package/resources/maintenance/workflow.yml +151 -0
- package/resources/skills/repoctl/SKILL.md +4 -2
- package/resources/skills/repoctl/references/commands.md +224 -13
- package/resources/skills/repoctl/references/config.md +70 -6
- package/resources/skills/repoctl/references/dependencies.md +37 -0
- package/resources/skills/repoctl/references/knip.md +34 -0
- package/resources/skills/repoctl/references/templates.md +26 -2
- package/dist/commands-CIzCAxyY.mjs +0 -5672
- package/dist/config-p842Knhq.mjs +0 -114
- package/dist/index-DDQKKYet.d.mts +0 -1025
- package/dist/types-m8JLwKzl.mjs +0 -499
- package/dist/workspace-MCKewElu.mjs +0 -123
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Dependency consistency
|
|
2
|
+
|
|
3
|
+
Use `repo deps check --json` to inventory root/private/workspace dependency declarations by name, dependency section and configured cohort. Reports distinguish identical, equivalent, compatible, conflicting, uncomparable, managed and exception groups with exact file locations. Catalog references are resolved for comparison; workspace references and unknown protocols remain report-only. npm aliases retain their actual source package. Peer and development declarations are independent.
|
|
4
|
+
|
|
5
|
+
Create a read-only preview with `repo deps plan <dependency> --section <section> --to <specifier> --json`. `deps fix` aliases `deps plan`; neither writes manifests. The target is explicit and must overlap the entire compatible cohort. No registry queries or automatic major upgrades occur. Save and review JSON, then use `repo deps apply <plan.json>`. pnpm lockfile updates and installation are explicit user steps: `pnpm install --lockfile-only`, then `pnpm install --frozen-lockfile`.
|
|
6
|
+
|
|
7
|
+
Configure `commands.deps.groups` at the workspace root. Each group has a unique `name`, exact workspace-relative `workspaces`, exact `dependencies`, a nonempty `reason`, optional `sections`, and optional `ignore: true` for report-only exceptions. Unmatched declarations use `default`; ambiguous overlapping selectors fail. Choose a cohort with `--group`.
|
|
8
|
+
|
|
9
|
+
Plans carry before/after specifiers and input/file hashes. Applying re-discovers the workspace, verifies every input, reconstructs the planned changes and rejects stale or modified plans before replacement. Repeated applications are no-ops. Multi-file replacements retain backups until completion and roll back failures. On interrupted or failed recovery, inspect the reported `.repoctl-deps-*.bak` backups before generating another plan. Do not overwrite unrelated concurrent edits.
|
|
10
|
+
|
|
11
|
+
Public APIs: `checkDependencies`, `planDependencyFix`, `applyDependencyFixPlan` from `repoctl`. JSON schema/status keys remain independent of locale.
|
|
12
|
+
|
|
13
|
+
## pnpm catalog inspection and migration
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pnpm exec repo deps catalog check --json
|
|
17
|
+
pnpm exec repo deps catalog check --catalog legacy --json
|
|
18
|
+
pnpm exec repo deps catalog plan typescript --section devDependencies --json > catalog-plan.json
|
|
19
|
+
pnpm exec repo deps catalog plan react --section dependencies --group react18 --catalog react18 --to '^18.3.0' --json
|
|
20
|
+
pnpm exec repo deps catalog apply catalog-plan.json --json
|
|
21
|
+
pnpm install --lockfile-only
|
|
22
|
+
pnpm install --frozen-lockfile
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
`catalog check` inspects every default and named catalog, root/private workspace consumer, missing catalog or entry, and unused entry. `catalog:` and `catalog:default` are equivalent. The default catalog may live at `catalog` or `catalogs.default`; declaring both is a pnpm configuration error. `--catalog` chooses the policy used to report direct-version bypasses and migration candidates; reference integrity is always checked across all catalogs. Direct peer ranges and explicit ignored version groups are exempt from bypass findings.
|
|
26
|
+
|
|
27
|
+
The versioned JSON includes exact manifest paths, dependency sections, package names, original specifiers, catalog entries, consumers and stable finding codes. `missing_catalog`, `missing_entry` and `direct_declaration` make check exit with code 1. `unused_entry` and `uncomparable_entry` are informational; an unused entry is never automatically deleted. Simple `overrides` consumers, including version-qualified package selectors, are counted. Nested override selectors are reported as `unresolved_selector`, with possibly referenced entries marked `usage_unknown` instead of claiming they are unused.
|
|
28
|
+
|
|
29
|
+
Migration reuses dependency consistency cohorts from `commands.deps.groups`; sections remain separate. Identical or semver-equivalent declarations can propose one entry automatically. Compatible but different ranges return `needs_target`: provide `--to` with a range that is a **subset of every selected declaration**, so migration cannot widen allowed versions or introduce a major upgrade. Mutually incompatible versions require explicit cohorts and separate named catalogs, or no migration. No registry is queried and no newest version is chosen.
|
|
30
|
+
|
|
31
|
+
Only plain semver ranges and same-source npm aliases can migrate. An alias keeps its complete `npm:source@range` in the catalog. Workspace/file/link/Git/URL/tag and unknown declarations stay unchanged. Direct `peerDependencies` are report-only and cannot be migrated by this command. Existing catalog references are preserved; a cohort mixing references to other catalogs requires explicit grouping. Existing entries are never overwritten, including when `--to` differs: choose a new named catalog or separately review an entry change affecting all its consumers.
|
|
32
|
+
|
|
33
|
+
`catalog plan` is always read-only, with or without `--dry-run`. Its JSON contains complete before/after YAML and consumer-manifest contents, file hashes, every discovered input hash and the normalized selection. Review the linked changes before `catalog apply`. YAML AST editing preserves unrelated configuration and comments; an edited catalog mapping shared through YAML anchors/aliases is rejected rather than changing unrelated alias consumers. Existing default/named catalog locations are retained. Lockfile generation remains a separate explicit pnpm action.
|
|
34
|
+
|
|
35
|
+
Apply is bound to the same workspace and full input set. Stale YAML, changed manifests/policies, new packages, linked files, partial application and modified plan contents are rejected before writes. It uses the same staged replacements, backups and rollback as dependency fixes, across both YAML and JSON. A fully applied plan and a repeated migration are no-ops. If recovery cannot safely replace a concurrent edit, inspect the listed `.repoctl-deps-*.bak` originals, restore reviewed files, remove stale temporary files and generate a fresh plan; the concurrent edit is preserved.
|
|
36
|
+
|
|
37
|
+
Public APIs are `checkCatalogs(cwd, options?)`, `planCatalogMigration(cwd, options)` and `applyCatalogMigrationPlan(cwd, plan)`. See [pnpm catalogs](https://pnpm.io/catalogs) for protocol semantics and [Syncpack](https://syncpack.dev/) for intentional version-group policy patterns.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Optional Knip checks
|
|
2
|
+
|
|
3
|
+
Use `pnpm exec repo check knip` only when unused code/dependency analysis is requested.
|
|
4
|
+
Ordinary check modes do not enable it. A workspace-root installation of Knip
|
|
5
|
+
`>=6.39.0 <7` is required; missing-tool guidance is `pnpm add -Dw knip@^6.39.0`.
|
|
6
|
+
repoctl does not download it, fall back to global/parent tools or run native fixes.
|
|
7
|
+
|
|
8
|
+
1. Inspect `repo check knip --recommend-config` and merge useful native settings manually.
|
|
9
|
+
Preserve existing JSON/JS/TS configuration, plugins and intentional dynamic entries.
|
|
10
|
+
Generated outputs have suggested exclusions; review example/fixture exclusions explicitly.
|
|
11
|
+
2. Preview with `repo check knip --dry-run --json`, then run `repo check knip --json`.
|
|
12
|
+
JSON means an actual report on this subcommand. Put all options after `knip`.
|
|
13
|
+
3. Use `--production` or `--strict` only after reviewing native production entries.
|
|
14
|
+
Strict mode implies production and checks direct dependency declarations per workspace.
|
|
15
|
+
4. Review findings before explicitly saving with `--save-baseline knip-baseline.json`.
|
|
16
|
+
Saving preserves the current exit code and cannot overwrite arbitrary files.
|
|
17
|
+
5. Compare with `--baseline knip-baseline.json --new-only` for incremental adoption.
|
|
18
|
+
Do not refresh a baseline silently to hide failures. Baseline errors fail closed.
|
|
19
|
+
|
|
20
|
+
Reports preserve workspace, source location, native category/reason and warn/error severity.
|
|
21
|
+
Exit 0 means the policy passes, 1 means blocking findings, and 2 means incomplete analysis
|
|
22
|
+
or invalid baseline. Baseline comparison reports existing, added and fixed findings.
|
|
23
|
+
Source line shifts do not create new findings; severity escalation does.
|
|
24
|
+
|
|
25
|
+
Baseline scope binds the exact tool version, modes, root name, native workspace set,
|
|
26
|
+
primary config hashes, categories and enabled plugins. Source/dependency fixes are allowed.
|
|
27
|
+
Imported config helpers, environment changes and every plugin auxiliary config are not fully
|
|
28
|
+
fingerprinted: review and explicitly rebaseline after changing those policies.
|
|
29
|
+
Config paths are relative to invocation cwd; baseline paths are relative to the workspace root.
|
|
30
|
+
Review retained temporary paths after interrupted saves or cleanup failures.
|
|
31
|
+
|
|
32
|
+
Public APIs: `planKnipCheck`, `runKnipCheck`, `getKnipConfigurationSuggestions`,
|
|
33
|
+
`saveKnipBaseline`, with exported plan/report/baseline types. Timeout and cancellation fail
|
|
34
|
+
closed. Neither repoctl configuration recommendations nor its analyzer runs edit user config.
|
|
@@ -8,7 +8,7 @@ Intent defaults:
|
|
|
8
8
|
- library -> `tsdown` -> `packages/<name>`
|
|
9
9
|
- web-app -> `vue-hono` -> `apps/<name>`
|
|
10
10
|
- api-service -> `hono-server` -> `apps/<name>`
|
|
11
|
-
- docs-site -> `
|
|
11
|
+
- docs-site -> `nimbus` -> `apps/<name>`
|
|
12
12
|
- cli-tool -> `cli` -> `apps/<name>`
|
|
13
13
|
|
|
14
14
|
Run `repo templates` to discover template keys, categories, default targets, and
|
|
@@ -36,7 +36,9 @@ Built-in template map:
|
|
|
36
36
|
- vue-lib -> templates/vue-lib => packages/vue-lib
|
|
37
37
|
- hono-server -> templates/server => apps/server
|
|
38
38
|
- vue-hono -> templates/client => apps/client
|
|
39
|
-
-
|
|
39
|
+
- next -> templates/next => apps/next (Next.js App Router, server page, client state and health route)
|
|
40
|
+
- nimbus -> templates/nimbus => apps/docs (default documentation template)
|
|
41
|
+
- vitepress -> templates/vitepress => apps/website (explicit alternative)
|
|
40
42
|
- cli -> templates/cli => apps/cli
|
|
41
43
|
|
|
42
44
|
Notes:
|
|
@@ -44,3 +46,25 @@ Notes:
|
|
|
44
46
|
- The command prompts for template selection unless defaults are set in
|
|
45
47
|
repoctl.config.ts or monorepo.config.ts.
|
|
46
48
|
- Override mappings with `commands.create.templateMap` and `commands.create.templatesDir`.
|
|
49
|
+
|
|
50
|
+
For `next`, run `typecheck` to generate Next route types before `tsc`. Its local Turbo config caches production output and excludes `.next/cache`. Compiled workspace libraries use public package exports and `^build`; source-exporting libraries must be named in `transpilePackages`. Never copy `.next`, `next-env.d.ts` or an independent pnpm lockfile into the template.
|
|
51
|
+
|
|
52
|
+
## Custom catalog
|
|
53
|
+
|
|
54
|
+
Creation, list/detail, interactive choices and `repo templates --check` share `resolveTemplateCatalog({ cwd })`. Object entries in `commands.create.templateMap` accept `source`, `target`, optional `label`, `description`, and `category` (`app`, `docs`, `library`, `service`, `tool`); string entries still map the same source and target. Absolute sources coexist with installed templates. `templatesDir` replaces the root for all relative sources, including built-ins, and is relative to the configuration file, including when invoked in a nested workspace package. A non-empty `choices` array preserves explicit ordering/inclusion and supplies the same labels/descriptions shown by discovery.
|
|
55
|
+
|
|
56
|
+
Detail/JSON include `origin`, `overridesBuiltin`, `sourceDir`, `configFile` and `configPath`; create JSON includes `templateInfo`. Health checks report invalid declarations, duplicate choices, sources and targets, missing directories/manifests and metadata. Checks are read-only and do not execute template code. Prefer `--check --json` for diagnostic locations; listing JSON keeps the array shape.
|
|
57
|
+
|
|
58
|
+
## Author validation
|
|
59
|
+
|
|
60
|
+
Use `repo templates validate <key> --fixture <workspace-skeleton> --json` for explicit generated-project validation. `--dry-run` inspects required scripts without executing them; repeated `--name` validates renamed samples. `--parameter-matrix matrix.json` reads a JSON array of typed parameter objects and crosses it with names (at most 20 samples). The public helper uses `parameterSets`. Each combination inspects its rendered files and conditional scripts before execution. Sensitive values are redacted, and sensitive combinations hide child output and diagnostic messages while retaining stages, exit codes and diagnostic codes; retained generated files can still contain those inputs. Execution order is install → build → lint/Stylelint → typecheck → tsd for typed libraries → built-artifact tests and declared E2E. Library samples additionally pack, analyze and consume actual tarballs. Default cleanup removes samples; `--keep-failed` retains failure diagnostics and `--keep-temp` retains every sample. `--timeout` bounds each child command, and interruption stops only the validation process tree. Ordinary template discovery/check never executes scripts.
|
|
61
|
+
|
|
62
|
+
## Remote assets
|
|
63
|
+
|
|
64
|
+
A custom entry can add `remote: { kind: 'npm', packageName, version, registry? }` or `remote: { kind: 'git', repository, ref }`; `source` is a relative archive directory, including `.` for its root. npm requires an exact version; prefer a full Git commit for reproducibility across fresh caches. `repo templates fetch <key> --json` prepares verified assets. Actual creation/validation may fetch, while listing, health and previews remain read-only and need a previously fetched cache. `--offline` refuses a miss; `--cache-dir` or `commands.create.cacheDir` overrides the cache relative to invocation cwd.
|
|
65
|
+
|
|
66
|
+
npm configuration supplies scoped registry/authentication. Never put credentials in the remote declaration. Fetching runs no lifecycle scripts, hooks, submodules or dependency installs. Cache hits recheck original archives against extracted asset contents; corruption is an error, not an automatic refresh. A Git ref stays pinned to its first cached commit. Instances record resolved provenance and retained baselines; remote upgrades are explicitly unsupported by the built-in-version `templates upgrade` command. The exported `resolveRemoteTemplateSource` helper is the same acquisition boundary used by the CLI.
|
|
67
|
+
|
|
68
|
+
## Existing-package generators
|
|
69
|
+
|
|
70
|
+
Use `repo generate <vue-component|react-component|hono-route> <kebab-name> --package <exact-name-or-relative-dir> --json` to inspect source and behavior-test files before writing. Run without `--json` to apply; `--export` explicitly adds a named export to `src/index.ts` (or `--barrel`). `--directory` stays inside the selected package. Strict parameters, framework requirements, stale plans, symlinks and conflicting files fail before writes. Repeated identical generation is unchanged. Hono route registration remains an explicit printed next step. Validate generated output with build, ESLint/Stylelint, tsc/vue-tsc and tests. Keep `repo new` for whole new packages; it never overwrites existing directories.
|