@theholocron/astromech 5.0.0-alpha.7 → 5.0.0-alpha.9
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/dist/index.d.mts +70 -1
- package/dist/index.mjs +28 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -613,4 +613,73 @@ declare const WORKFLOW_TEMPLATE_PROPERTIES: Record<string, string>;
|
|
|
613
613
|
*/
|
|
614
614
|
declare function reusableTemplates(): Map<string, string>;
|
|
615
615
|
//#endregion
|
|
616
|
-
|
|
616
|
+
//#region src/tsconfig.d.ts
|
|
617
|
+
/**
|
|
618
|
+
* `tsconfig.json` generation — Bucket B (config-resolution workstream, #676):
|
|
619
|
+
* the file must stay committed (the TypeScript language server discovers it
|
|
620
|
+
* directly from disk, no `--config` override mechanism to hand it a path
|
|
621
|
+
* instead), but its content is fully derivable, so it's generated rather
|
|
622
|
+
* than hand-authored — the same category as `.editorconfig`
|
|
623
|
+
* ({@link "./templates/configs/editorconfig/create-config.js" createConfig})
|
|
624
|
+
* and {@link codecovConfig}.
|
|
625
|
+
*
|
|
626
|
+
* Surveyed every package-level `tsconfig.json` across the org (`holocron`,
|
|
627
|
+
* `clients`, `utils` — 20+ packages). `extends: "@theholocron/tsconfig/
|
|
628
|
+
* node-lts"`, `compilerOptions.baseUrl: "./"`, `compilerOptions.outDir:
|
|
629
|
+
* "./dist"`, `include: ["src/**\/*.ts"]`, and `exclude: ["node_modules",
|
|
630
|
+
* "dist"]` are uniform in every one — safe defaults here. `paths` (a `@/*`
|
|
631
|
+
* → `./src/*` import alias) is a real per-package choice, present in
|
|
632
|
+
* roughly 40% of packages checked — an opt-in parameter, not a default.
|
|
633
|
+
*
|
|
634
|
+
* Two fields checked and deliberately *not* absorbed as defaults, unlike
|
|
635
|
+
* `eslint-config`'s `tsconfigRootDir`/`settings.node` (which turned out
|
|
636
|
+
* redundant with the shared package's own behavior, `configs`#461):
|
|
637
|
+
* `compilerOptions.module`/`moduleResolution` (only `@theholocron/cli`
|
|
638
|
+
* overrides these, to `esnext`/`bundler` — a genuine deviation from the
|
|
639
|
+
* shared `node-lts` preset's `nodenext`/`nodenext`, needed for its bundler
|
|
640
|
+
* tooling, not something every package should inherit) and
|
|
641
|
+
* `compilerOptions.rootDir` (present in exactly two packages, always the
|
|
642
|
+
* same value `./src` that `include` already implies — an unnecessary
|
|
643
|
+
* override wherever it appears, not a pattern worth generalizing).
|
|
644
|
+
*
|
|
645
|
+
* Monorepo *root* `tsconfig.json` (a TS project-references "solution
|
|
646
|
+
* file" — `holocron`'s own root is `{ files: [], references: [...] }`,
|
|
647
|
+
* listing which packages to build) is a structurally different, genuinely
|
|
648
|
+
* per-repo document — out of scope here, same as Bucket C content.
|
|
649
|
+
*
|
|
650
|
+
* Not yet wired into `holocron setup`'s per-package write loop (every
|
|
651
|
+
* other Bucket B file there is a single repo-root file, safely
|
|
652
|
+
* overwritten every run — `tsconfig.json` is per-package, and most
|
|
653
|
+
* packages' files still carry real hand-authored content today, not yet
|
|
654
|
+
* migrated to a fully-generated state). That per-package iteration +
|
|
655
|
+
* safe-migration design is `#680`'s job, not duplicated here — this is
|
|
656
|
+
* the generator itself, ready for it to call.
|
|
657
|
+
*/
|
|
658
|
+
interface TsconfigOptions {
|
|
659
|
+
/** Human-readable name for the `display` field — the package's own name is the usual choice. */
|
|
660
|
+
display: string;
|
|
661
|
+
/**
|
|
662
|
+
* `@theholocron/tsconfig` variant. Defaults to `"node-lts"` — every
|
|
663
|
+
* checked package uses it; the other three (`astro`, `nextjs`, `react`)
|
|
664
|
+
* exist for a template repo's app-shaped packages, not the plain
|
|
665
|
+
* Node.js library packages this org's currently-migrated repos ship.
|
|
666
|
+
*/
|
|
667
|
+
variant?: "astro" | "nextjs" | "node-lts" | "react";
|
|
668
|
+
/**
|
|
669
|
+
* Add a `@/*` → `./src/*` path alias. A real per-package choice, not a
|
|
670
|
+
* default — roughly 40% of packages checked use one, the rest don't.
|
|
671
|
+
*/
|
|
672
|
+
paths?: boolean;
|
|
673
|
+
}
|
|
674
|
+
/**
|
|
675
|
+
* A package-level `tsconfig.json` — the uniform shape confirmed across
|
|
676
|
+
* every package checked, parameterized only by the two fields that
|
|
677
|
+
* genuinely vary (`display`, `paths`). No scaffold/workflow header (matches
|
|
678
|
+
* `.alexrc.json`'s existing precedent for a strict-JSON Bucket B file —
|
|
679
|
+
* JSON has no comment syntax to carry one, and TypeScript's own tolerance
|
|
680
|
+
* for JSONC comments in `tsconfig.json` isn't worth relying on for a file
|
|
681
|
+
* this thin).
|
|
682
|
+
*/
|
|
683
|
+
declare function createTsconfig(options: TsconfigOptions): string;
|
|
684
|
+
//#endregion
|
|
685
|
+
export { type Astromech, type AstromechOptions, CI_ORDER, type CiJobReport, type CiOptions, type CiReport, type ExecFn, type JobDef, KNOWN_TASKS, KNOWN_WORKFLOWS, LINTERS, LINTER_NAMES, type LinterDef, type LocalRunner, type OrgContext, type PreviewConfig, RESOLVABLE_TOOLS, REUSABLE_ACTIONS, REUSABLE_WORKFLOWS, type ResolverDeps, type RunLogger, type RunOptions, type RunTaskInput, type RunTaskReport, TASKS, type TaskDef, type TsconfigOptions, WORKFLOW_CHECK_CONTEXTS, WORKFLOW_TEMPLATES, WORKFLOW_TEMPLATE_PROPERTIES, type WorkspacePackage, codecovComponentBlock, codecovConfig, createAstromech, createCodecovConfig, createTsconfig, deriveDeployPaths, ensureIfNotFound, extractPreviewConfig, generateCombinedDeployContent, generateThinCallerContent, mergeCodecovComponents, normalizeWorkflowWith, readWorkspacePackages, requiredChecks, resolveLinters, resolveToolConfig, reusableTemplates, runCi, runTask };
|
package/dist/index.mjs
CHANGED
|
@@ -1550,4 +1550,31 @@ function createAstromech(options) {
|
|
|
1550
1550
|
};
|
|
1551
1551
|
}
|
|
1552
1552
|
//#endregion
|
|
1553
|
-
|
|
1553
|
+
//#region src/tsconfig.ts
|
|
1554
|
+
/**
|
|
1555
|
+
* A package-level `tsconfig.json` — the uniform shape confirmed across
|
|
1556
|
+
* every package checked, parameterized only by the two fields that
|
|
1557
|
+
* genuinely vary (`display`, `paths`). No scaffold/workflow header (matches
|
|
1558
|
+
* `.alexrc.json`'s existing precedent for a strict-JSON Bucket B file —
|
|
1559
|
+
* JSON has no comment syntax to carry one, and TypeScript's own tolerance
|
|
1560
|
+
* for JSONC comments in `tsconfig.json` isn't worth relying on for a file
|
|
1561
|
+
* this thin).
|
|
1562
|
+
*/
|
|
1563
|
+
function createTsconfig(options) {
|
|
1564
|
+
const variant = options.variant ?? "node-lts";
|
|
1565
|
+
const compilerOptions = {
|
|
1566
|
+
baseUrl: "./",
|
|
1567
|
+
outDir: "./dist"
|
|
1568
|
+
};
|
|
1569
|
+
if (options.paths) compilerOptions.paths = { "@/*": ["./src/*"] };
|
|
1570
|
+
const config = {
|
|
1571
|
+
display: options.display,
|
|
1572
|
+
extends: `@theholocron/tsconfig/${variant}`,
|
|
1573
|
+
compilerOptions,
|
|
1574
|
+
include: ["src/**/*.ts"],
|
|
1575
|
+
exclude: ["node_modules", "dist"]
|
|
1576
|
+
};
|
|
1577
|
+
return JSON.stringify(config, null, 2) + "\n";
|
|
1578
|
+
}
|
|
1579
|
+
//#endregion
|
|
1580
|
+
export { CI_ORDER, KNOWN_TASKS, KNOWN_WORKFLOWS, LINTERS, LINTER_NAMES, RESOLVABLE_TOOLS, REUSABLE_ACTIONS, REUSABLE_WORKFLOWS, TASKS, WORKFLOW_CHECK_CONTEXTS, WORKFLOW_TEMPLATES, WORKFLOW_TEMPLATE_PROPERTIES, codecovComponentBlock, codecovConfig, createAstromech, createCodecovConfig, createTsconfig, deriveDeployPaths, ensureIfNotFound, extractPreviewConfig, generateCombinedDeployContent, generateThinCallerContent, mergeCodecovComponents, normalizeWorkflowWith, readWorkspacePackages, requiredChecks, resolveLinters, resolveToolConfig, reusableTemplates, runCi, runTask };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/astromech",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.9",
|
|
4
4
|
"description": "The Holocron task runner — one task manifest drives `holocron run`, `holocron ci`, the CI workflows, package.json scripts, linters, and required checks.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ci",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@theholocron/datapad": "5.0.0-alpha.
|
|
40
|
+
"@theholocron/datapad": "5.0.0-alpha.9"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@theholocron/eslint-config": "^8.0.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"tsdown": "^0.22.14",
|
|
54
54
|
"typescript": "^5.9.3",
|
|
55
55
|
"vitest": "^4.1.11",
|
|
56
|
-
"@theholocron/rollup-plugin-transform-template": "5.0.0-alpha.
|
|
56
|
+
"@theholocron/rollup-plugin-transform-template": "5.0.0-alpha.9"
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|
|
59
59
|
"node": ">=22"
|