@theholocron/astromech 5.0.0-alpha.146 → 5.0.0-alpha.147
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.mjs +46 -4
- package/package.json +4 -3
package/dist/index.mjs
CHANGED
|
@@ -2,6 +2,7 @@ import { r as normalizeTaskEntry, t as loadTasksConfig } from "./load-ytspboBj.m
|
|
|
2
2
|
import { spawnSync } from "node:child_process";
|
|
3
3
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
4
4
|
import { join, relative } from "node:path";
|
|
5
|
+
import { stringifyJson } from "@theholocron/json-utils";
|
|
5
6
|
//#region src/templates/codecov/codecov.yml
|
|
6
7
|
var codecov_default = "codecov:\n require_ci_to_pass: true\n\ncoverage:\n precision: 2\n round: down\n status:\n project:\n default:\n target: auto\n threshold: 2%\n # Infra-only PRs (dep bumps, config, lockfile) touch no coverable code,\n # so codecov produces no report to compare. Pass instead of blocking\n # forever on a required check that will never post.\n if_not_found: success\n patch:\n default:\n target: 80%\n if_not_found: success\n\ncomment:\n layout: \"reach,diff,flags,components\"\n behavior: default\n require_changes: true\n\ncomponent_management:\n default_rules:\n statuses:\n - type: patch\n target: 80%\n if_not_found: success\n individual_components:\n";
|
|
7
8
|
//#endregion
|
|
@@ -869,11 +870,11 @@ function turboConfig(config) {
|
|
|
869
870
|
} : turbo;
|
|
870
871
|
}
|
|
871
872
|
if (Object.keys(tasks).length === 0) return null;
|
|
872
|
-
return
|
|
873
|
+
return stringifyJson({
|
|
873
874
|
$schema: "https://turborepo.org/schema.json",
|
|
874
875
|
globalDependencies: GLOBAL_DEPENDENCIES,
|
|
875
876
|
tasks
|
|
876
|
-
}
|
|
877
|
+
});
|
|
877
878
|
}
|
|
878
879
|
/**
|
|
879
880
|
* Fixes #692: `turboConfig()` writes a `turbo.json` the moment *any* task in
|
|
@@ -1014,7 +1015,7 @@ function ensureTurboDependency(packageJson, workspaceYaml) {
|
|
|
1014
1015
|
devDependencies
|
|
1015
1016
|
};
|
|
1016
1017
|
return {
|
|
1017
|
-
content:
|
|
1018
|
+
content: stringifyJson(updated, { like: packageJson }),
|
|
1018
1019
|
changed: true
|
|
1019
1020
|
};
|
|
1020
1021
|
}
|
|
@@ -1980,6 +1981,47 @@ function createAstromech(options) {
|
|
|
1980
1981
|
//#endregion
|
|
1981
1982
|
//#region src/generators/tsconfig.ts
|
|
1982
1983
|
/**
|
|
1984
|
+
* `tsconfig.json` generation — Bucket B (config-resolution workstream, #676):
|
|
1985
|
+
* the file must stay committed (the TypeScript language server discovers it
|
|
1986
|
+
* directly from disk, no `--config` override mechanism to hand it a path
|
|
1987
|
+
* instead), but its content is fully derivable, so it's generated rather
|
|
1988
|
+
* than hand-authored — the same category as `.editorconfig`
|
|
1989
|
+
* ({@link "./templates/configs/editorconfig/create-config.js" createConfig})
|
|
1990
|
+
* and {@link codecovConfig}.
|
|
1991
|
+
*
|
|
1992
|
+
* Surveyed every package-level `tsconfig.json` across the org (`holocron`,
|
|
1993
|
+
* `clients`, `utils` — 20+ packages). `extends: "@theholocron/tsconfig/
|
|
1994
|
+
* node-lts"`, `compilerOptions.baseUrl: "./"`, `compilerOptions.outDir:
|
|
1995
|
+
* "./dist"`, `include: ["src/**\/*.ts"]`, and `exclude: ["node_modules",
|
|
1996
|
+
* "dist"]` are uniform in every one — safe defaults here. `paths` (a `@/*`
|
|
1997
|
+
* → `./src/*` import alias) is a real per-package choice, present in
|
|
1998
|
+
* roughly 40% of packages checked — an opt-in parameter, not a default.
|
|
1999
|
+
*
|
|
2000
|
+
* Two fields checked and deliberately *not* absorbed as defaults, unlike
|
|
2001
|
+
* `eslint-config`'s `tsconfigRootDir`/`settings.node` (which turned out
|
|
2002
|
+
* redundant with the shared package's own behavior, `configs`#461):
|
|
2003
|
+
* `compilerOptions.module`/`moduleResolution` (only `@theholocron/cli`
|
|
2004
|
+
* overrides these, to `esnext`/`bundler` — a genuine deviation from the
|
|
2005
|
+
* shared `node-lts` preset's `nodenext`/`nodenext`, needed for its bundler
|
|
2006
|
+
* tooling, not something every package should inherit) and
|
|
2007
|
+
* `compilerOptions.rootDir` (present in exactly two packages, always the
|
|
2008
|
+
* same value `./src` that `include` already implies — an unnecessary
|
|
2009
|
+
* override wherever it appears, not a pattern worth generalizing).
|
|
2010
|
+
*
|
|
2011
|
+
* Monorepo *root* `tsconfig.json` (a TS project-references "solution
|
|
2012
|
+
* file" — `holocron`'s own root is `{ files: [], references: [...] }`,
|
|
2013
|
+
* listing which packages to build) is a structurally different, genuinely
|
|
2014
|
+
* per-repo document — out of scope here, same as Bucket C content.
|
|
2015
|
+
*
|
|
2016
|
+
* Not yet wired into `holocron repo setup`'s per-package write loop (every
|
|
2017
|
+
* other Bucket B file there is a single repo-root file, safely
|
|
2018
|
+
* overwritten every run — `tsconfig.json` is per-package, and most
|
|
2019
|
+
* packages' files still carry real hand-authored content today, not yet
|
|
2020
|
+
* migrated to a fully-generated state). That per-package iteration +
|
|
2021
|
+
* safe-migration design is `#680`'s job, not duplicated here — this is
|
|
2022
|
+
* the generator itself, ready for it to call.
|
|
2023
|
+
*/
|
|
2024
|
+
/**
|
|
1983
2025
|
* A package-level `tsconfig.json` — the uniform shape confirmed across
|
|
1984
2026
|
* every package checked, parameterized only by the two fields that
|
|
1985
2027
|
* genuinely vary (`display`, `paths`). No scaffold/workflow header (matches
|
|
@@ -2002,7 +2044,7 @@ function createTsconfig(options) {
|
|
|
2002
2044
|
include: ["src/**/*.ts"],
|
|
2003
2045
|
exclude: ["node_modules", "dist"]
|
|
2004
2046
|
};
|
|
2005
|
-
return
|
|
2047
|
+
return stringifyJson(config);
|
|
2006
2048
|
}
|
|
2007
2049
|
//#endregion
|
|
2008
2050
|
//#region src/tasks/deploy-on-release.ts
|
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.147",
|
|
4
4
|
"description": "The Holocron task runner — one task manifest drives `holocron run`, `holocron run ci`, the CI workflows, package.json scripts, linters, and required checks.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ci",
|
|
@@ -37,7 +37,8 @@
|
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@theholocron/
|
|
40
|
+
"@theholocron/json-utils": "^1.10.0",
|
|
41
|
+
"@theholocron/datapad": "5.0.0-alpha.147"
|
|
41
42
|
},
|
|
42
43
|
"devDependencies": {
|
|
43
44
|
"@theholocron/eslint-config": "^8.7.1",
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
"tsdown": "^0.22.14",
|
|
54
55
|
"typescript": "^5.9.3",
|
|
55
56
|
"vitest": "^4.1.11",
|
|
56
|
-
"@theholocron/rollup-plugin-transform-template": "5.0.0-alpha.
|
|
57
|
+
"@theholocron/rollup-plugin-transform-template": "5.0.0-alpha.147"
|
|
57
58
|
},
|
|
58
59
|
"engines": {
|
|
59
60
|
"node": ">=22"
|