@bensandee/tooling 0.50.1 → 0.50.2
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/bin.mjs +14 -5
- package/package.json +4 -4
package/dist/bin.mjs
CHANGED
|
@@ -663,13 +663,22 @@ const MONOREPO_IGNORED_KEYS = new Set(["setupVitest", "projectType"]);
|
|
|
663
663
|
function saveToolingConfig(ctx, config) {
|
|
664
664
|
const defaults = computeDefaults(config.targetDir);
|
|
665
665
|
const isMonorepo = config.structure === "monorepo";
|
|
666
|
+
const existing = ctx.exists(CONFIG_FILE) ? ctx.read(CONFIG_FILE) : void 0;
|
|
667
|
+
const overrideKeySet = new Set(OVERRIDE_KEYS);
|
|
668
|
+
const preserved = {};
|
|
669
|
+
if (existing) {
|
|
670
|
+
const result = ToolingConfigSchema.safeParse(JSON.parse(existing));
|
|
671
|
+
if (result.success) {
|
|
672
|
+
for (const [key, value] of Object.entries(result.data)) if (key !== "$schema" && !overrideKeySet.has(key)) preserved[key] = value;
|
|
673
|
+
}
|
|
674
|
+
}
|
|
666
675
|
const overrides = { $schema: "node_modules/@bensandee/tooling/tooling.schema.json" };
|
|
667
676
|
for (const key of OVERRIDE_KEYS) {
|
|
668
677
|
if (isMonorepo && MONOREPO_IGNORED_KEYS.has(key)) continue;
|
|
669
678
|
if (config[key] !== defaults[key]) overrides[key] = config[key];
|
|
670
679
|
}
|
|
680
|
+
Object.assign(overrides, preserved);
|
|
671
681
|
const content = JSON.stringify(overrides, null, 2) + "\n";
|
|
672
|
-
const existing = ctx.exists(CONFIG_FILE) ? ctx.read(CONFIG_FILE) : void 0;
|
|
673
682
|
if (existing !== void 0 && contentEqual(CONFIG_FILE, existing, content)) return {
|
|
674
683
|
filePath: CONFIG_FILE,
|
|
675
684
|
action: "skipped",
|
|
@@ -1585,7 +1594,7 @@ async function generatePackageJson(ctx) {
|
|
|
1585
1594
|
const devDeps = { ...ROOT_DEV_DEPS };
|
|
1586
1595
|
if (!isMonorepo) Object.assign(devDeps, PER_PACKAGE_DEV_DEPS);
|
|
1587
1596
|
devDeps["@bensandee/config"] = isWorkspacePackage(ctx, "@bensandee/config") ? "workspace:*" : "0.10.2";
|
|
1588
|
-
devDeps["@bensandee/tooling"] = isWorkspacePackage(ctx, "@bensandee/tooling") ? "workspace:*" : "0.50.
|
|
1597
|
+
devDeps["@bensandee/tooling"] = isWorkspacePackage(ctx, "@bensandee/tooling") ? "workspace:*" : "0.50.2";
|
|
1589
1598
|
if (ctx.config.useEslintPlugin) devDeps["@bensandee/eslint-plugin"] = isWorkspacePackage(ctx, "@bensandee/eslint-plugin") ? "workspace:*" : "0.12.0";
|
|
1590
1599
|
if (ctx.config.formatter === "oxfmt") devDeps["oxfmt"] = {
|
|
1591
1600
|
"@changesets/cli": "2.30.0",
|
|
@@ -3359,7 +3368,7 @@ async function runGenerators(ctx) {
|
|
|
3359
3368
|
function generateMigratePrompt(results, config, detected) {
|
|
3360
3369
|
const sections = [];
|
|
3361
3370
|
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
3362
|
-
sections.push(`# Migration Prompt\n\n_Generated by \`@bensandee/tooling@0.50.
|
|
3371
|
+
sections.push(`# Migration Prompt\n\n_Generated by \`@bensandee/tooling@0.50.2 repo:sync\` on ${timestamp}_\n`);
|
|
3363
3372
|
const changed = results.filter((r) => r.action === "created" || r.action === "updated" || r.action === "archived");
|
|
3364
3373
|
if (changed.length > 0) {
|
|
3365
3374
|
const items = changed.map((r) => {
|
|
@@ -6450,7 +6459,7 @@ const webhookSendCommand = defineCommand({
|
|
|
6450
6459
|
const main = defineCommand({
|
|
6451
6460
|
meta: {
|
|
6452
6461
|
name: "bst",
|
|
6453
|
-
version: "0.50.
|
|
6462
|
+
version: "0.50.2",
|
|
6454
6463
|
description: "Bootstrap and maintain standardized TypeScript project tooling"
|
|
6455
6464
|
},
|
|
6456
6465
|
subCommands: {
|
|
@@ -6471,7 +6480,7 @@ const main = defineCommand({
|
|
|
6471
6480
|
"webhook:send": webhookSendCommand
|
|
6472
6481
|
}
|
|
6473
6482
|
});
|
|
6474
|
-
console.log(`@bensandee/tooling v0.50.
|
|
6483
|
+
console.log(`@bensandee/tooling v0.50.2`);
|
|
6475
6484
|
async function run() {
|
|
6476
6485
|
await runMain(main);
|
|
6477
6486
|
process.exit(process.exitCode ?? 0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bensandee/tooling",
|
|
3
|
-
"version": "0.50.
|
|
3
|
+
"version": "0.50.2",
|
|
4
4
|
"description": "CLI tool to bootstrap and maintain standardized TypeScript project tooling",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@clack/prompts": "^1.2.0",
|
|
40
|
-
"citty": "^0.2.
|
|
40
|
+
"citty": "^0.2.2",
|
|
41
41
|
"json5": "^2.2.3",
|
|
42
42
|
"jsonc-parser": "^3.3.1",
|
|
43
43
|
"picomatch": "^4.0.4",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"prettier": "3.8.1",
|
|
55
55
|
"release-it": "19.2.4",
|
|
56
56
|
"tsdown": "0.21.7",
|
|
57
|
-
"@bensandee/
|
|
58
|
-
"@bensandee/
|
|
57
|
+
"@bensandee/config": "0.10.2",
|
|
58
|
+
"@bensandee/claude-hooks": "0.7.0"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"build": "tsdown",
|