@bensandee/tooling 0.52.2 → 0.52.3
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 -10
- package/package.json +1 -1
package/dist/bin.mjs
CHANGED
|
@@ -1596,7 +1596,7 @@ async function generatePackageJson(ctx) {
|
|
|
1596
1596
|
const devDeps = { ...ROOT_DEV_DEPS };
|
|
1597
1597
|
if (!isMonorepo) Object.assign(devDeps, PER_PACKAGE_DEV_DEPS);
|
|
1598
1598
|
devDeps["@bensandee/config"] = isWorkspacePackage(ctx, "@bensandee/config") ? "workspace:*" : "0.10.2";
|
|
1599
|
-
devDeps["@bensandee/tooling"] = isWorkspacePackage(ctx, "@bensandee/tooling") ? "workspace:*" : "0.52.
|
|
1599
|
+
devDeps["@bensandee/tooling"] = isWorkspacePackage(ctx, "@bensandee/tooling") ? "workspace:*" : "0.52.3";
|
|
1600
1600
|
if (ctx.config.useEslintPlugin) devDeps["@bensandee/eslint-plugin"] = isWorkspacePackage(ctx, "@bensandee/eslint-plugin") ? "workspace:*" : "0.12.0";
|
|
1601
1601
|
if (ctx.config.formatter === "oxfmt") devDeps["oxfmt"] = {
|
|
1602
1602
|
"@changesets/cli": "2.30.0",
|
|
@@ -2218,13 +2218,13 @@ const DEFAULT_POST_RELEASE_COMMAND = ["pnpm exec bst webhook:send", " \"$POST_RE
|
|
|
2218
2218
|
/** Build env vars for hook secrets to inject into a workflow step. */
|
|
2219
2219
|
function hookSecretEnv(secrets) {
|
|
2220
2220
|
const env = {
|
|
2221
|
-
POST_RELEASE_HOOK_URL: actionsExpr("secrets.POST_RELEASE_HOOK_URL"),
|
|
2221
|
+
POST_RELEASE_HOOK_URL: actionsExpr("vars.POST_RELEASE_HOOK_URL || secrets.POST_RELEASE_HOOK_URL"),
|
|
2222
2222
|
WEBHOOK_SECRET: actionsExpr("secrets.POST_RELEASE_HOOK_SECRET")
|
|
2223
2223
|
};
|
|
2224
2224
|
for (const name of secrets ?? []) env[name] = actionsExpr(`secrets.${name}`);
|
|
2225
2225
|
return env;
|
|
2226
2226
|
}
|
|
2227
|
-
/** Step that runs after release
|
|
2227
|
+
/** Step that runs after release with post-release webhook env wired up. */
|
|
2228
2228
|
function postReleaseHookStep(opts) {
|
|
2229
2229
|
const ifCondition = opts?.condition ?? (opts?.guardMain ? "github.ref == 'refs/heads/main'" : void 0);
|
|
2230
2230
|
return { step: {
|
|
@@ -3012,11 +3012,15 @@ async function generateChangesets(ctx) {
|
|
|
3012
3012
|
}
|
|
3013
3013
|
//#endregion
|
|
3014
3014
|
//#region src/generators/lefthook.ts
|
|
3015
|
+
const LINT_COMMAND = "pnpm exec oxlint --no-error-on-unmatched-pattern {staged_files}";
|
|
3016
|
+
function formatCommandFor(formatter) {
|
|
3017
|
+
return formatter === "prettier" ? "pnpm exec prettier --ignore-unknown --no-error-on-unmatched-pattern --write {staged_files}" : "pnpm exec oxfmt --no-error-on-unmatched-pattern {staged_files}";
|
|
3018
|
+
}
|
|
3015
3019
|
function requiredCommands(formatter) {
|
|
3016
3020
|
return {
|
|
3017
|
-
lint: { run:
|
|
3021
|
+
lint: { run: LINT_COMMAND },
|
|
3018
3022
|
format: {
|
|
3019
|
-
run: formatter
|
|
3023
|
+
run: formatCommandFor(formatter),
|
|
3020
3024
|
stage_fixed: true
|
|
3021
3025
|
}
|
|
3022
3026
|
};
|
|
@@ -3026,9 +3030,9 @@ function buildConfig$1(formatter) {
|
|
|
3026
3030
|
"pre-commit:",
|
|
3027
3031
|
" commands:",
|
|
3028
3032
|
" lint:",
|
|
3029
|
-
|
|
3033
|
+
` run: ${LINT_COMMAND}`,
|
|
3030
3034
|
" format:",
|
|
3031
|
-
` run: ${formatter
|
|
3035
|
+
` run: ${formatCommandFor(formatter)}`,
|
|
3032
3036
|
" stage_fixed: true",
|
|
3033
3037
|
""
|
|
3034
3038
|
].join("\n");
|
|
@@ -3368,7 +3372,7 @@ async function runGenerators(ctx) {
|
|
|
3368
3372
|
function generateMigratePrompt(results, config, detected) {
|
|
3369
3373
|
const sections = [];
|
|
3370
3374
|
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
3371
|
-
sections.push(`# Migration Prompt\n\n_Generated by \`@bensandee/tooling@0.52.
|
|
3375
|
+
sections.push(`# Migration Prompt\n\n_Generated by \`@bensandee/tooling@0.52.3 repo:sync\` on ${timestamp}_\n`);
|
|
3372
3376
|
const changed = results.filter((r) => r.action === "created" || r.action === "updated" || r.action === "archived");
|
|
3373
3377
|
if (changed.length > 0) {
|
|
3374
3378
|
const items = changed.map((r) => {
|
|
@@ -6671,7 +6675,7 @@ async function sendWebhookWithLogging(url, secret, payload) {
|
|
|
6671
6675
|
const main = defineCommand({
|
|
6672
6676
|
meta: {
|
|
6673
6677
|
name: "bst",
|
|
6674
|
-
version: "0.52.
|
|
6678
|
+
version: "0.52.3",
|
|
6675
6679
|
description: "Bootstrap and maintain standardized TypeScript project tooling"
|
|
6676
6680
|
},
|
|
6677
6681
|
subCommands: {
|
|
@@ -6739,7 +6743,7 @@ const main = defineCommand({
|
|
|
6739
6743
|
})
|
|
6740
6744
|
}
|
|
6741
6745
|
});
|
|
6742
|
-
console.log(`@bensandee/tooling v0.52.
|
|
6746
|
+
console.log(`@bensandee/tooling v0.52.3`);
|
|
6743
6747
|
async function run() {
|
|
6744
6748
|
await runMain(main);
|
|
6745
6749
|
process.exit(process.exitCode ?? 0);
|