@bensandee/tooling 0.62.2 → 0.62.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 +227 -156
- package/dist/index.d.mts +1 -1
- package/dist/{types-DRZHn9xf.d.mts → types-CMKT2loB.d.mts} +11 -0
- package/package.json +6 -6
package/dist/bin.mjs
CHANGED
|
@@ -26,6 +26,11 @@ const LEGACY_TOOLS = [
|
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region src/utils/json.ts
|
|
28
28
|
const StringRecord = z.record(z.string(), z.string());
|
|
29
|
+
const DevEngineRuntimeSchema = z.looseObject({
|
|
30
|
+
name: z.string(),
|
|
31
|
+
version: z.string().optional(),
|
|
32
|
+
onFail: z.string().optional()
|
|
33
|
+
});
|
|
29
34
|
const PackageJsonSchema = z.looseObject({
|
|
30
35
|
name: z.string().optional(),
|
|
31
36
|
version: z.string().optional(),
|
|
@@ -40,6 +45,7 @@ const PackageJsonSchema = z.looseObject({
|
|
|
40
45
|
types: z.string().optional(),
|
|
41
46
|
typings: z.string().optional(),
|
|
42
47
|
engines: StringRecord.optional(),
|
|
48
|
+
devEngines: z.looseObject({ runtime: z.union([DevEngineRuntimeSchema, z.array(DevEngineRuntimeSchema)]).optional() }).optional(),
|
|
43
49
|
repository: z.union([z.string(), z.looseObject({ url: z.string() })]).optional(),
|
|
44
50
|
packageManager: z.string().optional()
|
|
45
51
|
});
|
|
@@ -1529,8 +1535,8 @@ function normalizeWorkflow(content) {
|
|
|
1529
1535
|
});
|
|
1530
1536
|
}
|
|
1531
1537
|
const DEV_BINARY_PATTERN = /node\s+packages\/tooling-cli\/dist\/bin\.mjs/;
|
|
1532
|
-
const DEV_BUILD_SUFFIX = " && pnpm --filter @bensandee/tooling build";
|
|
1533
|
-
const INSTALL_WITHOUT_BUILD_SUFFIX = /pnpm install --frozen-lockfile(?! && pnpm --filter @bensandee\/tooling build)/g;
|
|
1538
|
+
const DEV_BUILD_SUFFIX = " && pnpm --filter @bensandee/tooling... build";
|
|
1539
|
+
const INSTALL_WITHOUT_BUILD_SUFFIX = /pnpm install --frozen-lockfile(?! && pnpm --filter @bensandee\/tooling\.\.\. build)/g;
|
|
1534
1540
|
/**
|
|
1535
1541
|
* If the existing file uses the dev binary path (`node packages/tooling-cli/dist/bin.mjs`),
|
|
1536
1542
|
* substitute it back into the generated content so we don't overwrite it with `pnpm exec bst`
|
|
@@ -1952,6 +1958,24 @@ function diagnoseCheckScriptForwardingAt(targetDir) {
|
|
|
1952
1958
|
}
|
|
1953
1959
|
//#endregion
|
|
1954
1960
|
//#region src/generators/package-json.ts
|
|
1961
|
+
/**
|
|
1962
|
+
* Node major pinned for the dev/CI runtime via `devEngines.runtime`.
|
|
1963
|
+
*
|
|
1964
|
+
* `actions/setup-node` reads `devEngines.runtime` (for `name: "node"`) before
|
|
1965
|
+
* `engines.node`, and a bounded `<major>.x` resolves to the latest patch of that
|
|
1966
|
+
* one major. Without it, a `>=`-range `engines.node` makes setup-node install the
|
|
1967
|
+
* newest available major (e.g. Node 26), silently drifting CI off the LTS line.
|
|
1968
|
+
* `engines.node` stays the honest minimum-supported floor; this is the version CI
|
|
1969
|
+
* actually runs. `onFail: "warn"` keeps a local Node mismatch non-fatal.
|
|
1970
|
+
*/
|
|
1971
|
+
const DEV_NODE_VERSION = "24.x";
|
|
1972
|
+
function devEnginesRuntime() {
|
|
1973
|
+
return { runtime: {
|
|
1974
|
+
name: "node",
|
|
1975
|
+
version: DEV_NODE_VERSION,
|
|
1976
|
+
onFail: "warn"
|
|
1977
|
+
} };
|
|
1978
|
+
}
|
|
1955
1979
|
const STANDARD_SCRIPTS_SINGLE = {
|
|
1956
1980
|
build: "tsdown",
|
|
1957
1981
|
dev: "tsdown --watch",
|
|
@@ -2000,118 +2024,118 @@ const DEPRECATED_SCRIPTS = ["tooling:init", "tooling:update"];
|
|
|
2000
2024
|
const PER_PACKAGE_DEV_DEPS = {
|
|
2001
2025
|
"@types/node": {
|
|
2002
2026
|
"@changesets/cli": "2.31.0",
|
|
2003
|
-
"@release-it/bumper": "7.0.
|
|
2004
|
-
"@types/node": "24.
|
|
2027
|
+
"@release-it/bumper": "7.0.6",
|
|
2028
|
+
"@types/node": "24.13.0",
|
|
2005
2029
|
"commit-and-tag-version": "12.7.3",
|
|
2006
|
-
"knip": "6.
|
|
2007
|
-
"lefthook": "2.1.
|
|
2008
|
-
"oxfmt": "0.
|
|
2009
|
-
"oxlint": "1.
|
|
2030
|
+
"knip": "6.15.0",
|
|
2031
|
+
"lefthook": "2.1.9",
|
|
2032
|
+
"oxfmt": "0.53.0",
|
|
2033
|
+
"oxlint": "1.68.0",
|
|
2010
2034
|
"prettier": "3.8.3",
|
|
2011
|
-
"release-it": "20.0
|
|
2012
|
-
"tsdown": "0.22.
|
|
2035
|
+
"release-it": "20.2.0",
|
|
2036
|
+
"tsdown": "0.22.2",
|
|
2013
2037
|
"typescript": "6.0.3",
|
|
2014
|
-
"vitest": "4.1.
|
|
2015
|
-
"pnpm": "11.
|
|
2038
|
+
"vitest": "4.1.8",
|
|
2039
|
+
"pnpm": "11.5.2"
|
|
2016
2040
|
}["@types/node"],
|
|
2017
2041
|
tsdown: {
|
|
2018
2042
|
"@changesets/cli": "2.31.0",
|
|
2019
|
-
"@release-it/bumper": "7.0.
|
|
2020
|
-
"@types/node": "24.
|
|
2043
|
+
"@release-it/bumper": "7.0.6",
|
|
2044
|
+
"@types/node": "24.13.0",
|
|
2021
2045
|
"commit-and-tag-version": "12.7.3",
|
|
2022
|
-
"knip": "6.
|
|
2023
|
-
"lefthook": "2.1.
|
|
2024
|
-
"oxfmt": "0.
|
|
2025
|
-
"oxlint": "1.
|
|
2046
|
+
"knip": "6.15.0",
|
|
2047
|
+
"lefthook": "2.1.9",
|
|
2048
|
+
"oxfmt": "0.53.0",
|
|
2049
|
+
"oxlint": "1.68.0",
|
|
2026
2050
|
"prettier": "3.8.3",
|
|
2027
|
-
"release-it": "20.0
|
|
2028
|
-
"tsdown": "0.22.
|
|
2051
|
+
"release-it": "20.2.0",
|
|
2052
|
+
"tsdown": "0.22.2",
|
|
2029
2053
|
"typescript": "6.0.3",
|
|
2030
|
-
"vitest": "4.1.
|
|
2031
|
-
"pnpm": "11.
|
|
2054
|
+
"vitest": "4.1.8",
|
|
2055
|
+
"pnpm": "11.5.2"
|
|
2032
2056
|
}["tsdown"],
|
|
2033
2057
|
typescript: {
|
|
2034
2058
|
"@changesets/cli": "2.31.0",
|
|
2035
|
-
"@release-it/bumper": "7.0.
|
|
2036
|
-
"@types/node": "24.
|
|
2059
|
+
"@release-it/bumper": "7.0.6",
|
|
2060
|
+
"@types/node": "24.13.0",
|
|
2037
2061
|
"commit-and-tag-version": "12.7.3",
|
|
2038
|
-
"knip": "6.
|
|
2039
|
-
"lefthook": "2.1.
|
|
2040
|
-
"oxfmt": "0.
|
|
2041
|
-
"oxlint": "1.
|
|
2062
|
+
"knip": "6.15.0",
|
|
2063
|
+
"lefthook": "2.1.9",
|
|
2064
|
+
"oxfmt": "0.53.0",
|
|
2065
|
+
"oxlint": "1.68.0",
|
|
2042
2066
|
"prettier": "3.8.3",
|
|
2043
|
-
"release-it": "20.0
|
|
2044
|
-
"tsdown": "0.22.
|
|
2067
|
+
"release-it": "20.2.0",
|
|
2068
|
+
"tsdown": "0.22.2",
|
|
2045
2069
|
"typescript": "6.0.3",
|
|
2046
|
-
"vitest": "4.1.
|
|
2047
|
-
"pnpm": "11.
|
|
2070
|
+
"vitest": "4.1.8",
|
|
2071
|
+
"pnpm": "11.5.2"
|
|
2048
2072
|
}["typescript"],
|
|
2049
2073
|
vitest: {
|
|
2050
2074
|
"@changesets/cli": "2.31.0",
|
|
2051
|
-
"@release-it/bumper": "7.0.
|
|
2052
|
-
"@types/node": "24.
|
|
2075
|
+
"@release-it/bumper": "7.0.6",
|
|
2076
|
+
"@types/node": "24.13.0",
|
|
2053
2077
|
"commit-and-tag-version": "12.7.3",
|
|
2054
|
-
"knip": "6.
|
|
2055
|
-
"lefthook": "2.1.
|
|
2056
|
-
"oxfmt": "0.
|
|
2057
|
-
"oxlint": "1.
|
|
2078
|
+
"knip": "6.15.0",
|
|
2079
|
+
"lefthook": "2.1.9",
|
|
2080
|
+
"oxfmt": "0.53.0",
|
|
2081
|
+
"oxlint": "1.68.0",
|
|
2058
2082
|
"prettier": "3.8.3",
|
|
2059
|
-
"release-it": "20.0
|
|
2060
|
-
"tsdown": "0.22.
|
|
2083
|
+
"release-it": "20.2.0",
|
|
2084
|
+
"tsdown": "0.22.2",
|
|
2061
2085
|
"typescript": "6.0.3",
|
|
2062
|
-
"vitest": "4.1.
|
|
2063
|
-
"pnpm": "11.
|
|
2086
|
+
"vitest": "4.1.8",
|
|
2087
|
+
"pnpm": "11.5.2"
|
|
2064
2088
|
}["vitest"]
|
|
2065
2089
|
};
|
|
2066
2090
|
/** DevDeps that belong at the root regardless of structure. */
|
|
2067
2091
|
const ROOT_DEV_DEPS = {
|
|
2068
2092
|
knip: {
|
|
2069
2093
|
"@changesets/cli": "2.31.0",
|
|
2070
|
-
"@release-it/bumper": "7.0.
|
|
2071
|
-
"@types/node": "24.
|
|
2094
|
+
"@release-it/bumper": "7.0.6",
|
|
2095
|
+
"@types/node": "24.13.0",
|
|
2072
2096
|
"commit-and-tag-version": "12.7.3",
|
|
2073
|
-
"knip": "6.
|
|
2074
|
-
"lefthook": "2.1.
|
|
2075
|
-
"oxfmt": "0.
|
|
2076
|
-
"oxlint": "1.
|
|
2097
|
+
"knip": "6.15.0",
|
|
2098
|
+
"lefthook": "2.1.9",
|
|
2099
|
+
"oxfmt": "0.53.0",
|
|
2100
|
+
"oxlint": "1.68.0",
|
|
2077
2101
|
"prettier": "3.8.3",
|
|
2078
|
-
"release-it": "20.0
|
|
2079
|
-
"tsdown": "0.22.
|
|
2102
|
+
"release-it": "20.2.0",
|
|
2103
|
+
"tsdown": "0.22.2",
|
|
2080
2104
|
"typescript": "6.0.3",
|
|
2081
|
-
"vitest": "4.1.
|
|
2082
|
-
"pnpm": "11.
|
|
2105
|
+
"vitest": "4.1.8",
|
|
2106
|
+
"pnpm": "11.5.2"
|
|
2083
2107
|
}["knip"],
|
|
2084
2108
|
lefthook: {
|
|
2085
2109
|
"@changesets/cli": "2.31.0",
|
|
2086
|
-
"@release-it/bumper": "7.0.
|
|
2087
|
-
"@types/node": "24.
|
|
2110
|
+
"@release-it/bumper": "7.0.6",
|
|
2111
|
+
"@types/node": "24.13.0",
|
|
2088
2112
|
"commit-and-tag-version": "12.7.3",
|
|
2089
|
-
"knip": "6.
|
|
2090
|
-
"lefthook": "2.1.
|
|
2091
|
-
"oxfmt": "0.
|
|
2092
|
-
"oxlint": "1.
|
|
2113
|
+
"knip": "6.15.0",
|
|
2114
|
+
"lefthook": "2.1.9",
|
|
2115
|
+
"oxfmt": "0.53.0",
|
|
2116
|
+
"oxlint": "1.68.0",
|
|
2093
2117
|
"prettier": "3.8.3",
|
|
2094
|
-
"release-it": "20.0
|
|
2095
|
-
"tsdown": "0.22.
|
|
2118
|
+
"release-it": "20.2.0",
|
|
2119
|
+
"tsdown": "0.22.2",
|
|
2096
2120
|
"typescript": "6.0.3",
|
|
2097
|
-
"vitest": "4.1.
|
|
2098
|
-
"pnpm": "11.
|
|
2121
|
+
"vitest": "4.1.8",
|
|
2122
|
+
"pnpm": "11.5.2"
|
|
2099
2123
|
}["lefthook"],
|
|
2100
2124
|
oxlint: {
|
|
2101
2125
|
"@changesets/cli": "2.31.0",
|
|
2102
|
-
"@release-it/bumper": "7.0.
|
|
2103
|
-
"@types/node": "24.
|
|
2126
|
+
"@release-it/bumper": "7.0.6",
|
|
2127
|
+
"@types/node": "24.13.0",
|
|
2104
2128
|
"commit-and-tag-version": "12.7.3",
|
|
2105
|
-
"knip": "6.
|
|
2106
|
-
"lefthook": "2.1.
|
|
2107
|
-
"oxfmt": "0.
|
|
2108
|
-
"oxlint": "1.
|
|
2129
|
+
"knip": "6.15.0",
|
|
2130
|
+
"lefthook": "2.1.9",
|
|
2131
|
+
"oxfmt": "0.53.0",
|
|
2132
|
+
"oxlint": "1.68.0",
|
|
2109
2133
|
"prettier": "3.8.3",
|
|
2110
|
-
"release-it": "20.0
|
|
2111
|
-
"tsdown": "0.22.
|
|
2134
|
+
"release-it": "20.2.0",
|
|
2135
|
+
"tsdown": "0.22.2",
|
|
2112
2136
|
"typescript": "6.0.3",
|
|
2113
|
-
"vitest": "4.1.
|
|
2114
|
-
"pnpm": "11.
|
|
2137
|
+
"vitest": "4.1.8",
|
|
2138
|
+
"pnpm": "11.5.2"
|
|
2115
2139
|
}["oxlint"]
|
|
2116
2140
|
};
|
|
2117
2141
|
/**
|
|
@@ -2140,71 +2164,71 @@ function addReleaseDeps(deps, config) {
|
|
|
2140
2164
|
case "release-it":
|
|
2141
2165
|
deps["release-it"] = {
|
|
2142
2166
|
"@changesets/cli": "2.31.0",
|
|
2143
|
-
"@release-it/bumper": "7.0.
|
|
2144
|
-
"@types/node": "24.
|
|
2167
|
+
"@release-it/bumper": "7.0.6",
|
|
2168
|
+
"@types/node": "24.13.0",
|
|
2145
2169
|
"commit-and-tag-version": "12.7.3",
|
|
2146
|
-
"knip": "6.
|
|
2147
|
-
"lefthook": "2.1.
|
|
2148
|
-
"oxfmt": "0.
|
|
2149
|
-
"oxlint": "1.
|
|
2170
|
+
"knip": "6.15.0",
|
|
2171
|
+
"lefthook": "2.1.9",
|
|
2172
|
+
"oxfmt": "0.53.0",
|
|
2173
|
+
"oxlint": "1.68.0",
|
|
2150
2174
|
"prettier": "3.8.3",
|
|
2151
|
-
"release-it": "20.0
|
|
2152
|
-
"tsdown": "0.22.
|
|
2175
|
+
"release-it": "20.2.0",
|
|
2176
|
+
"tsdown": "0.22.2",
|
|
2153
2177
|
"typescript": "6.0.3",
|
|
2154
|
-
"vitest": "4.1.
|
|
2155
|
-
"pnpm": "11.
|
|
2178
|
+
"vitest": "4.1.8",
|
|
2179
|
+
"pnpm": "11.5.2"
|
|
2156
2180
|
}["release-it"];
|
|
2157
2181
|
if (config.structure === "monorepo") deps["@release-it/bumper"] = {
|
|
2158
2182
|
"@changesets/cli": "2.31.0",
|
|
2159
|
-
"@release-it/bumper": "7.0.
|
|
2160
|
-
"@types/node": "24.
|
|
2183
|
+
"@release-it/bumper": "7.0.6",
|
|
2184
|
+
"@types/node": "24.13.0",
|
|
2161
2185
|
"commit-and-tag-version": "12.7.3",
|
|
2162
|
-
"knip": "6.
|
|
2163
|
-
"lefthook": "2.1.
|
|
2164
|
-
"oxfmt": "0.
|
|
2165
|
-
"oxlint": "1.
|
|
2186
|
+
"knip": "6.15.0",
|
|
2187
|
+
"lefthook": "2.1.9",
|
|
2188
|
+
"oxfmt": "0.53.0",
|
|
2189
|
+
"oxlint": "1.68.0",
|
|
2166
2190
|
"prettier": "3.8.3",
|
|
2167
|
-
"release-it": "20.0
|
|
2168
|
-
"tsdown": "0.22.
|
|
2191
|
+
"release-it": "20.2.0",
|
|
2192
|
+
"tsdown": "0.22.2",
|
|
2169
2193
|
"typescript": "6.0.3",
|
|
2170
|
-
"vitest": "4.1.
|
|
2171
|
-
"pnpm": "11.
|
|
2194
|
+
"vitest": "4.1.8",
|
|
2195
|
+
"pnpm": "11.5.2"
|
|
2172
2196
|
}["@release-it/bumper"];
|
|
2173
2197
|
break;
|
|
2174
2198
|
case "simple":
|
|
2175
2199
|
deps["commit-and-tag-version"] = {
|
|
2176
2200
|
"@changesets/cli": "2.31.0",
|
|
2177
|
-
"@release-it/bumper": "7.0.
|
|
2178
|
-
"@types/node": "24.
|
|
2201
|
+
"@release-it/bumper": "7.0.6",
|
|
2202
|
+
"@types/node": "24.13.0",
|
|
2179
2203
|
"commit-and-tag-version": "12.7.3",
|
|
2180
|
-
"knip": "6.
|
|
2181
|
-
"lefthook": "2.1.
|
|
2182
|
-
"oxfmt": "0.
|
|
2183
|
-
"oxlint": "1.
|
|
2204
|
+
"knip": "6.15.0",
|
|
2205
|
+
"lefthook": "2.1.9",
|
|
2206
|
+
"oxfmt": "0.53.0",
|
|
2207
|
+
"oxlint": "1.68.0",
|
|
2184
2208
|
"prettier": "3.8.3",
|
|
2185
|
-
"release-it": "20.0
|
|
2186
|
-
"tsdown": "0.22.
|
|
2209
|
+
"release-it": "20.2.0",
|
|
2210
|
+
"tsdown": "0.22.2",
|
|
2187
2211
|
"typescript": "6.0.3",
|
|
2188
|
-
"vitest": "4.1.
|
|
2189
|
-
"pnpm": "11.
|
|
2212
|
+
"vitest": "4.1.8",
|
|
2213
|
+
"pnpm": "11.5.2"
|
|
2190
2214
|
}["commit-and-tag-version"];
|
|
2191
2215
|
break;
|
|
2192
2216
|
case "changesets":
|
|
2193
2217
|
deps["@changesets/cli"] = {
|
|
2194
2218
|
"@changesets/cli": "2.31.0",
|
|
2195
|
-
"@release-it/bumper": "7.0.
|
|
2196
|
-
"@types/node": "24.
|
|
2219
|
+
"@release-it/bumper": "7.0.6",
|
|
2220
|
+
"@types/node": "24.13.0",
|
|
2197
2221
|
"commit-and-tag-version": "12.7.3",
|
|
2198
|
-
"knip": "6.
|
|
2199
|
-
"lefthook": "2.1.
|
|
2200
|
-
"oxfmt": "0.
|
|
2201
|
-
"oxlint": "1.
|
|
2222
|
+
"knip": "6.15.0",
|
|
2223
|
+
"lefthook": "2.1.9",
|
|
2224
|
+
"oxfmt": "0.53.0",
|
|
2225
|
+
"oxlint": "1.68.0",
|
|
2202
2226
|
"prettier": "3.8.3",
|
|
2203
|
-
"release-it": "20.0
|
|
2204
|
-
"tsdown": "0.22.
|
|
2227
|
+
"release-it": "20.2.0",
|
|
2228
|
+
"tsdown": "0.22.2",
|
|
2205
2229
|
"typescript": "6.0.3",
|
|
2206
|
-
"vitest": "4.1.
|
|
2207
|
-
"pnpm": "11.
|
|
2230
|
+
"vitest": "4.1.8",
|
|
2231
|
+
"pnpm": "11.5.2"
|
|
2208
2232
|
}["@changesets/cli"];
|
|
2209
2233
|
break;
|
|
2210
2234
|
}
|
|
@@ -2228,39 +2252,39 @@ async function generatePackageJson(ctx) {
|
|
|
2228
2252
|
const devDeps = { ...ROOT_DEV_DEPS };
|
|
2229
2253
|
if (!isMonorepo) Object.assign(devDeps, PER_PACKAGE_DEV_DEPS);
|
|
2230
2254
|
devDeps["@bensandee/config"] = isWorkspacePackage(ctx, "@bensandee/config") ? "workspace:*" : "0.11.3";
|
|
2231
|
-
|
|
2255
|
+
if (!isWorkspacePackage(ctx, "@bensandee/tooling")) devDeps["@bensandee/tooling"] = "0.62.3";
|
|
2232
2256
|
if (ctx.config.useEslintPlugin) devDeps["@bensandee/eslint-plugin"] = isWorkspacePackage(ctx, "@bensandee/eslint-plugin") ? "workspace:*" : "0.13.0";
|
|
2233
2257
|
if (ctx.config.formatter === "oxfmt") devDeps["oxfmt"] = {
|
|
2234
2258
|
"@changesets/cli": "2.31.0",
|
|
2235
|
-
"@release-it/bumper": "7.0.
|
|
2236
|
-
"@types/node": "24.
|
|
2259
|
+
"@release-it/bumper": "7.0.6",
|
|
2260
|
+
"@types/node": "24.13.0",
|
|
2237
2261
|
"commit-and-tag-version": "12.7.3",
|
|
2238
|
-
"knip": "6.
|
|
2239
|
-
"lefthook": "2.1.
|
|
2240
|
-
"oxfmt": "0.
|
|
2241
|
-
"oxlint": "1.
|
|
2262
|
+
"knip": "6.15.0",
|
|
2263
|
+
"lefthook": "2.1.9",
|
|
2264
|
+
"oxfmt": "0.53.0",
|
|
2265
|
+
"oxlint": "1.68.0",
|
|
2242
2266
|
"prettier": "3.8.3",
|
|
2243
|
-
"release-it": "20.0
|
|
2244
|
-
"tsdown": "0.22.
|
|
2267
|
+
"release-it": "20.2.0",
|
|
2268
|
+
"tsdown": "0.22.2",
|
|
2245
2269
|
"typescript": "6.0.3",
|
|
2246
|
-
"vitest": "4.1.
|
|
2247
|
-
"pnpm": "11.
|
|
2270
|
+
"vitest": "4.1.8",
|
|
2271
|
+
"pnpm": "11.5.2"
|
|
2248
2272
|
}["oxfmt"];
|
|
2249
2273
|
if (ctx.config.formatter === "prettier") devDeps["prettier"] = {
|
|
2250
2274
|
"@changesets/cli": "2.31.0",
|
|
2251
|
-
"@release-it/bumper": "7.0.
|
|
2252
|
-
"@types/node": "24.
|
|
2275
|
+
"@release-it/bumper": "7.0.6",
|
|
2276
|
+
"@types/node": "24.13.0",
|
|
2253
2277
|
"commit-and-tag-version": "12.7.3",
|
|
2254
|
-
"knip": "6.
|
|
2255
|
-
"lefthook": "2.1.
|
|
2256
|
-
"oxfmt": "0.
|
|
2257
|
-
"oxlint": "1.
|
|
2278
|
+
"knip": "6.15.0",
|
|
2279
|
+
"lefthook": "2.1.9",
|
|
2280
|
+
"oxfmt": "0.53.0",
|
|
2281
|
+
"oxlint": "1.68.0",
|
|
2258
2282
|
"prettier": "3.8.3",
|
|
2259
|
-
"release-it": "20.0
|
|
2260
|
-
"tsdown": "0.22.
|
|
2283
|
+
"release-it": "20.2.0",
|
|
2284
|
+
"tsdown": "0.22.2",
|
|
2261
2285
|
"typescript": "6.0.3",
|
|
2262
|
-
"vitest": "4.1.
|
|
2263
|
-
"pnpm": "11.
|
|
2286
|
+
"vitest": "4.1.8",
|
|
2287
|
+
"pnpm": "11.5.2"
|
|
2264
2288
|
}["prettier"];
|
|
2265
2289
|
addReleaseDeps(devDeps, ctx.config);
|
|
2266
2290
|
if (existing) {
|
|
@@ -2320,21 +2344,25 @@ async function generatePackageJson(ctx) {
|
|
|
2320
2344
|
pkg["engines"] = { node: ">=24.13.0" };
|
|
2321
2345
|
changes.push("set engines.node >= 24.13.0");
|
|
2322
2346
|
}
|
|
2347
|
+
if (!pkg["devEngines"]) {
|
|
2348
|
+
pkg["devEngines"] = devEnginesRuntime();
|
|
2349
|
+
changes.push(`set devEngines.runtime node ${DEV_NODE_VERSION}`);
|
|
2350
|
+
}
|
|
2323
2351
|
const pinnedPnpm = {
|
|
2324
2352
|
"@changesets/cli": "2.31.0",
|
|
2325
|
-
"@release-it/bumper": "7.0.
|
|
2326
|
-
"@types/node": "24.
|
|
2353
|
+
"@release-it/bumper": "7.0.6",
|
|
2354
|
+
"@types/node": "24.13.0",
|
|
2327
2355
|
"commit-and-tag-version": "12.7.3",
|
|
2328
|
-
"knip": "6.
|
|
2329
|
-
"lefthook": "2.1.
|
|
2330
|
-
"oxfmt": "0.
|
|
2331
|
-
"oxlint": "1.
|
|
2356
|
+
"knip": "6.15.0",
|
|
2357
|
+
"lefthook": "2.1.9",
|
|
2358
|
+
"oxfmt": "0.53.0",
|
|
2359
|
+
"oxlint": "1.68.0",
|
|
2332
2360
|
"prettier": "3.8.3",
|
|
2333
|
-
"release-it": "20.0
|
|
2334
|
-
"tsdown": "0.22.
|
|
2361
|
+
"release-it": "20.2.0",
|
|
2362
|
+
"tsdown": "0.22.2",
|
|
2335
2363
|
"typescript": "6.0.3",
|
|
2336
|
-
"vitest": "4.1.
|
|
2337
|
-
"pnpm": "11.
|
|
2364
|
+
"vitest": "4.1.8",
|
|
2365
|
+
"pnpm": "11.5.2"
|
|
2338
2366
|
}["pnpm"];
|
|
2339
2367
|
const desiredPm = pinnedPnpm ? `pnpm@${pinnedPnpm}` : void 0;
|
|
2340
2368
|
if (desiredPm) {
|
|
@@ -2372,21 +2400,22 @@ async function generatePackageJson(ctx) {
|
|
|
2372
2400
|
scripts: allScripts,
|
|
2373
2401
|
devDependencies: devDeps,
|
|
2374
2402
|
engines: { node: ">=24.13.0" },
|
|
2403
|
+
devEngines: devEnginesRuntime(),
|
|
2375
2404
|
packageManager: `pnpm@${{
|
|
2376
2405
|
"@changesets/cli": "2.31.0",
|
|
2377
|
-
"@release-it/bumper": "7.0.
|
|
2378
|
-
"@types/node": "24.
|
|
2406
|
+
"@release-it/bumper": "7.0.6",
|
|
2407
|
+
"@types/node": "24.13.0",
|
|
2379
2408
|
"commit-and-tag-version": "12.7.3",
|
|
2380
|
-
"knip": "6.
|
|
2381
|
-
"lefthook": "2.1.
|
|
2382
|
-
"oxfmt": "0.
|
|
2383
|
-
"oxlint": "1.
|
|
2409
|
+
"knip": "6.15.0",
|
|
2410
|
+
"lefthook": "2.1.9",
|
|
2411
|
+
"oxfmt": "0.53.0",
|
|
2412
|
+
"oxlint": "1.68.0",
|
|
2384
2413
|
"prettier": "3.8.3",
|
|
2385
|
-
"release-it": "20.0
|
|
2386
|
-
"tsdown": "0.22.
|
|
2414
|
+
"release-it": "20.2.0",
|
|
2415
|
+
"tsdown": "0.22.2",
|
|
2387
2416
|
"typescript": "6.0.3",
|
|
2388
|
-
"vitest": "4.1.
|
|
2389
|
-
"pnpm": "11.
|
|
2417
|
+
"vitest": "4.1.8",
|
|
2418
|
+
"pnpm": "11.5.2"
|
|
2390
2419
|
}["pnpm"]}`
|
|
2391
2420
|
};
|
|
2392
2421
|
ctx.write(filePath, JSON.stringify(pkg, null, 2) + "\n");
|
|
@@ -5527,7 +5556,7 @@ async function runGenerators(ctx) {
|
|
|
5527
5556
|
function generateMigratePrompt(results, config, detected) {
|
|
5528
5557
|
const sections = [];
|
|
5529
5558
|
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
5530
|
-
sections.push(`# Migration Prompt\n\n_Generated by \`@bensandee/tooling@0.62.
|
|
5559
|
+
sections.push(`# Migration Prompt\n\n_Generated by \`@bensandee/tooling@0.62.3 repo:sync\` on ${timestamp}_\n`);
|
|
5531
5560
|
const changed = results.filter((r) => r.action === "created" || r.action === "updated" || r.action === "archived");
|
|
5532
5561
|
if (changed.length > 0) {
|
|
5533
5562
|
const items = changed.map((r) => {
|
|
@@ -6429,9 +6458,51 @@ async function runRelease(config, executor) {
|
|
|
6429
6458
|
debug(config, "Entering version mode");
|
|
6430
6459
|
return runVersionMode(executor, config);
|
|
6431
6460
|
}
|
|
6461
|
+
if (!headBumpedVersion(executor, config)) {
|
|
6462
|
+
log.info("No changesets, and HEAD bumped no package version — nothing to release. (Publishing runs on the commit that merges a 'version packages' PR.)");
|
|
6463
|
+
debug(config, "Publish guard: HEAD is not a version-bump commit — skipping publish");
|
|
6464
|
+
return { mode: "none" };
|
|
6465
|
+
}
|
|
6432
6466
|
debug(config, "Entering publish mode");
|
|
6433
6467
|
return runPublishMode(executor, config);
|
|
6434
6468
|
}
|
|
6469
|
+
/**
|
|
6470
|
+
* Whether the HEAD commit bumped an existing package's version relative to its
|
|
6471
|
+
* first parent — the signal that a "version packages" PR just merged. Returns
|
|
6472
|
+
* false for a root commit (no parent) and for ordinary commits that don't
|
|
6473
|
+
* modify a `package.json` version, which is what stops a fresh repo's first
|
|
6474
|
+
* push from publishing packages that never went through the changesets flow.
|
|
6475
|
+
*
|
|
6476
|
+
* Diffing against the first parent is merge-method-agnostic: it works whether
|
|
6477
|
+
* the version PR lands as a merge commit, a squash, or a rebase. We require a
|
|
6478
|
+
* version line to be both removed and added (a modification), so adding a new
|
|
6479
|
+
* package's `package.json` alone is not mistaken for a release.
|
|
6480
|
+
*/
|
|
6481
|
+
function headBumpedVersion(executor, config) {
|
|
6482
|
+
const parent = executor.exec("git", [
|
|
6483
|
+
"rev-parse",
|
|
6484
|
+
"--verify",
|
|
6485
|
+
"--quiet",
|
|
6486
|
+
"HEAD~1"
|
|
6487
|
+
], { cwd: config.cwd });
|
|
6488
|
+
if (parent.exitCode !== 0 || parent.stdout.trim() === "") {
|
|
6489
|
+
debug(config, "Publish guard: HEAD has no parent (root commit)");
|
|
6490
|
+
return false;
|
|
6491
|
+
}
|
|
6492
|
+
const diff = executor.exec("git", [
|
|
6493
|
+
"diff",
|
|
6494
|
+
"HEAD~1",
|
|
6495
|
+
"HEAD",
|
|
6496
|
+
"--",
|
|
6497
|
+
"package.json",
|
|
6498
|
+
"packages/*/package.json"
|
|
6499
|
+
], { cwd: config.cwd });
|
|
6500
|
+
const removedVersion = /^-\s+"version":\s*"/m.test(diff.stdout);
|
|
6501
|
+
const addedVersion = /^\+\s+"version":\s*"/m.test(diff.stdout);
|
|
6502
|
+
const bumped = removedVersion && addedVersion;
|
|
6503
|
+
debug(config, `Publish guard: HEAD bumped an existing version = ${String(bumped)}`);
|
|
6504
|
+
return bumped;
|
|
6505
|
+
}
|
|
6435
6506
|
//#endregion
|
|
6436
6507
|
//#region src/release/dispatch.ts
|
|
6437
6508
|
const INPUT_FLAG = "--input";
|
|
@@ -9252,7 +9323,7 @@ const out = (msg) => console.log(msg);
|
|
|
9252
9323
|
const main = defineCommand({
|
|
9253
9324
|
meta: {
|
|
9254
9325
|
name: "bst",
|
|
9255
|
-
version: "0.62.
|
|
9326
|
+
version: "0.62.3",
|
|
9256
9327
|
description: "Bootstrap and maintain standardized TypeScript project tooling"
|
|
9257
9328
|
},
|
|
9258
9329
|
subCommands: {
|
|
@@ -9325,7 +9396,7 @@ const main = defineCommand({
|
|
|
9325
9396
|
})
|
|
9326
9397
|
}
|
|
9327
9398
|
});
|
|
9328
|
-
console.log(`@bensandee/tooling v0.62.
|
|
9399
|
+
console.log(`@bensandee/tooling v0.62.3`);
|
|
9329
9400
|
async function run() {
|
|
9330
9401
|
await runMain(main);
|
|
9331
9402
|
process.exit(process.exitCode ?? 0);
|
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as LegacyConfig, i as GeneratorResult, n as Generator, o as ProjectConfig, r as GeneratorContext, t as DetectedProjectState } from "./types-
|
|
1
|
+
import { a as LegacyConfig, i as GeneratorResult, n as Generator, o as ProjectConfig, r as GeneratorContext, t as DetectedProjectState } from "./types-CMKT2loB.mjs";
|
|
2
2
|
export type { DetectedProjectState, Generator, GeneratorContext, GeneratorResult, LegacyConfig, ProjectConfig };
|
|
@@ -15,6 +15,17 @@ declare const PackageJsonSchema: z.ZodObject<{
|
|
|
15
15
|
types: z.ZodOptional<z.ZodString>;
|
|
16
16
|
typings: z.ZodOptional<z.ZodString>;
|
|
17
17
|
engines: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
18
|
+
devEngines: z.ZodOptional<z.ZodObject<{
|
|
19
|
+
runtime: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
20
|
+
name: z.ZodString;
|
|
21
|
+
version: z.ZodOptional<z.ZodString>;
|
|
22
|
+
onFail: z.ZodOptional<z.ZodString>;
|
|
23
|
+
}, z.core.$loose>, z.ZodArray<z.ZodObject<{
|
|
24
|
+
name: z.ZodString;
|
|
25
|
+
version: z.ZodOptional<z.ZodString>;
|
|
26
|
+
onFail: z.ZodOptional<z.ZodString>;
|
|
27
|
+
}, z.core.$loose>>]>>;
|
|
28
|
+
}, z.core.$loose>>;
|
|
18
29
|
repository: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
19
30
|
url: z.ZodString;
|
|
20
31
|
}, z.core.$loose>]>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bensandee/tooling",
|
|
3
|
-
"version": "0.62.
|
|
3
|
+
"version": "0.62.3",
|
|
4
4
|
"description": "CLI tool to bootstrap and maintain standardized TypeScript project tooling",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@clack/prompts": "^1.
|
|
39
|
+
"@clack/prompts": "^1.5.1",
|
|
40
40
|
"citty": "^0.2.2",
|
|
41
41
|
"json5": "^2.2.3",
|
|
42
42
|
"jsonc-parser": "^3.3.1",
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@changesets/cli": "2.31.0",
|
|
50
|
-
"@release-it/bumper": "7.0.
|
|
51
|
-
"@types/node": "24.
|
|
50
|
+
"@release-it/bumper": "7.0.6",
|
|
51
|
+
"@types/node": "24.13.0",
|
|
52
52
|
"@types/picomatch": "4.0.3",
|
|
53
53
|
"commit-and-tag-version": "12.7.3",
|
|
54
54
|
"prettier": "3.8.3",
|
|
55
|
-
"release-it": "20.0
|
|
56
|
-
"tsdown": "0.22.
|
|
55
|
+
"release-it": "20.2.0",
|
|
56
|
+
"tsdown": "0.22.2",
|
|
57
57
|
"@bensandee/claude-hooks": "0.8.1",
|
|
58
58
|
"@bensandee/config": "0.11.3"
|
|
59
59
|
},
|