@doikayt/typescript-build-config 0.1.11 → 0.1.13
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/README.md
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doikayt/typescript-build-config",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"description": "Shared build configuration for TypeScript projects — ESLint, Prettier, tsconfig, and Playwright presets",
|
|
5
5
|
"_comments": {
|
|
6
6
|
"exports": "This block lists the config files that will be extended by files in in src/toplevel - which are copied to consuming project root folder. An example: eslint.config.js imports from '@doikayt/typescript-build-config/eslint'.",
|
package/src/postinstall.js
CHANGED
|
@@ -138,8 +138,21 @@ for (const { src, dest } of assetFiles) {
|
|
|
138
138
|
);
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
// --- update-all-format
|
|
141
|
+
// --- Convention checks: ci + update-all-format ---
|
|
142
|
+
|
|
143
|
+
const missingTargets = [];
|
|
144
|
+
|
|
145
|
+
// ci: package.json scripts only — NX projects must expose it as a thin shim
|
|
146
|
+
// there, since the release workflow calls `npm run ci`, never NX directly.
|
|
147
|
+
if (!projectPkg.scripts?.["ci"]) {
|
|
148
|
+
missingTargets.push({
|
|
149
|
+
name: "ci",
|
|
150
|
+
hint: ' "ci": "npm run check-all-format && npm run test"',
|
|
151
|
+
nxNote: false,
|
|
152
|
+
});
|
|
153
|
+
}
|
|
142
154
|
|
|
155
|
+
// update-all-format: package.json script OR NX project.json target.
|
|
143
156
|
let hasUpdateAllFormat = !!projectPkg.scripts?.["update-all-format"];
|
|
144
157
|
|
|
145
158
|
if (!hasUpdateAllFormat) {
|
|
@@ -155,12 +168,18 @@ if (!hasUpdateAllFormat) {
|
|
|
155
168
|
}
|
|
156
169
|
|
|
157
170
|
if (!hasUpdateAllFormat) {
|
|
158
|
-
|
|
171
|
+
missingTargets.push({
|
|
172
|
+
name: "update-all-format",
|
|
173
|
+
hint: ' "update-all-format": "npm run update-code-formatting && npm run update-markdown-docs"',
|
|
174
|
+
nxNote: true,
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
for (const { name, hint, nxNote } of missingTargets) {
|
|
179
|
+
console.warn(`${PREFIX} Missing target: ${name}`);
|
|
159
180
|
console.warn(`Add to package.json scripts:`);
|
|
160
|
-
console.warn(
|
|
161
|
-
|
|
162
|
-
);
|
|
163
|
-
console.warn(`Or add an NX target with the same name.`);
|
|
181
|
+
console.warn(hint);
|
|
182
|
+
if (nxNote) console.warn(`Or add an NX target with the same name.`);
|
|
164
183
|
}
|
|
165
184
|
|
|
166
185
|
console.log(`${PREFIX} Postinstall complete.`);
|