@aidc-toolkit/dev 0.9.13-beta → 0.9.14-beta
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/config/release.json +9 -7
- package/package.json +6 -5
- package/src/release.ts +22 -10
- package/tsconfig-declaration-local.json +14 -0
- package/tsconfig-declaration.json +14 -0
- package/tsconfig.json +2 -2
- package/tsup.config.ts +8 -0
package/config/release.json
CHANGED
|
@@ -2,24 +2,26 @@
|
|
|
2
2
|
"organization": "aidc-toolkit",
|
|
3
3
|
"repositories": {
|
|
4
4
|
"dev": {
|
|
5
|
-
"version": "0.9.
|
|
5
|
+
"version": "0.9.14-beta"
|
|
6
6
|
},
|
|
7
7
|
"core": {
|
|
8
|
-
"version": "0.9.
|
|
8
|
+
"version": "0.9.14-beta"
|
|
9
9
|
},
|
|
10
10
|
"utility": {
|
|
11
|
-
"version": "0.9.
|
|
11
|
+
"version": "0.9.14-beta"
|
|
12
12
|
},
|
|
13
13
|
"gs1": {
|
|
14
|
-
"
|
|
15
|
-
"version": "0.9.13-beta"
|
|
14
|
+
"version": "0.9.14-beta"
|
|
16
15
|
},
|
|
17
16
|
"demo": {
|
|
18
|
-
"version": "0.9.
|
|
17
|
+
"version": "0.9.14-beta"
|
|
18
|
+
},
|
|
19
|
+
"app-extension": {
|
|
20
|
+
"version": "0.9.14-beta"
|
|
19
21
|
},
|
|
20
22
|
"aidc-toolkit.github.io": {
|
|
21
23
|
"directory": "doc",
|
|
22
|
-
"version": "0.9.
|
|
24
|
+
"version": "0.9.14-beta"
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
27
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aidc-toolkit/dev",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.14-beta",
|
|
4
4
|
"description": "Shared development artefacts for AIDC Toolkit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -20,10 +20,11 @@
|
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"copy-workflows": "copy-files-from-to --config copy-workflows.json",
|
|
23
|
-
"lint": "eslint
|
|
24
|
-
"build:core": "tsup
|
|
25
|
-
"build:dev": "npm run build:core && tsc
|
|
23
|
+
"lint": "eslint",
|
|
24
|
+
"build:core": "tsup",
|
|
25
|
+
"build:dev": "npm run build:core && tsc --project tsconfig-declaration-local.json",
|
|
26
26
|
"build:release": "npm run build:core -- --minify",
|
|
27
|
+
"build:doc": "npm run build:dev",
|
|
27
28
|
"publish-dev": "bin/publish-dev-local",
|
|
28
29
|
"release": "tsx src/release.ts"
|
|
29
30
|
},
|
|
@@ -46,7 +47,7 @@
|
|
|
46
47
|
"tsup": "^8.3.6",
|
|
47
48
|
"tsx": "^4.19.2",
|
|
48
49
|
"typescript": "^5.7.3",
|
|
49
|
-
"typescript-eslint": "^8.24.
|
|
50
|
+
"typescript-eslint": "^8.24.1",
|
|
50
51
|
"yaml": "^2.7.0"
|
|
51
52
|
}
|
|
52
53
|
}
|
package/src/release.ts
CHANGED
|
@@ -174,10 +174,16 @@ async function release(): Promise<void> {
|
|
|
174
174
|
*
|
|
175
175
|
* @param dependencies
|
|
176
176
|
* Dependencies.
|
|
177
|
+
*
|
|
177
178
|
* @param restoreAlpha
|
|
178
179
|
* If true, "alpha" is restored as the version for development.
|
|
180
|
+
*
|
|
181
|
+
* @returns
|
|
182
|
+
* True if any dependencies were updated.
|
|
179
183
|
*/
|
|
180
|
-
function updateDependencies(dependencies: Record<string, string> | undefined, restoreAlpha: boolean):
|
|
184
|
+
function updateDependencies(dependencies: Record<string, string> | undefined, restoreAlpha: boolean): boolean {
|
|
185
|
+
let anyUpdated = false;
|
|
186
|
+
|
|
181
187
|
if (dependencies !== undefined) {
|
|
182
188
|
// eslint-disable-next-line guard-for-in -- Dependency record type is shallow.
|
|
183
189
|
for (const dependency in dependencies) {
|
|
@@ -185,9 +191,12 @@ async function release(): Promise<void> {
|
|
|
185
191
|
|
|
186
192
|
if (dependencyAtOrganization === atOrganization) {
|
|
187
193
|
dependencies[dependency] = !restoreAlpha ? `^${configuration.repositories[dependencyRepositoryName].version}` : "alpha";
|
|
194
|
+
anyUpdated = true;
|
|
188
195
|
}
|
|
189
196
|
}
|
|
190
197
|
}
|
|
198
|
+
|
|
199
|
+
return anyUpdated;
|
|
191
200
|
}
|
|
192
201
|
|
|
193
202
|
const octokit = new Octokit({
|
|
@@ -253,6 +262,8 @@ async function release(): Promise<void> {
|
|
|
253
262
|
if (!firstRepository && run(true, "git", "tag", "--points-at", "HEAD", tag).length === 0) {
|
|
254
263
|
throw new Error(`Repository ${name} has at least one commit since version ${repository.version}`);
|
|
255
264
|
}
|
|
265
|
+
|
|
266
|
+
state[name] = "skipped";
|
|
256
267
|
}
|
|
257
268
|
break;
|
|
258
269
|
|
|
@@ -353,13 +364,7 @@ async function release(): Promise<void> {
|
|
|
353
364
|
});
|
|
354
365
|
|
|
355
366
|
await step(name, "commit", () => {
|
|
356
|
-
run(false, "git", "commit", "--all", `--message=Updated to version ${repository.version}
|
|
357
|
-
|
|
358
|
-
// Restore dependencies to "alpha" version for development.
|
|
359
|
-
updateDependencies(packageConfiguration.devDependencies, true);
|
|
360
|
-
updateDependencies(packageConfiguration.dependencies, true);
|
|
361
|
-
|
|
362
|
-
fs.writeFileSync(packageConfigurationPath, `${JSON.stringify(packageConfiguration, null, 2)}\n`);
|
|
367
|
+
run(false, "git", "commit", "--all", `--message=Updated to version ${repository.version}.`);
|
|
363
368
|
});
|
|
364
369
|
|
|
365
370
|
await step(name, "tag", () => {
|
|
@@ -368,6 +373,15 @@ async function release(): Promise<void> {
|
|
|
368
373
|
|
|
369
374
|
await step(name, "push", () => {
|
|
370
375
|
run(false, "git", "push", "--atomic", "origin", "main", tag);
|
|
376
|
+
|
|
377
|
+
// Restore dependencies to "alpha" version for development.
|
|
378
|
+
const devDependenciesUpdated = updateDependencies(packageConfiguration.devDependencies, true);
|
|
379
|
+
const dependenciesUpdated = updateDependencies(packageConfiguration.dependencies, true);
|
|
380
|
+
|
|
381
|
+
if (devDependenciesUpdated || dependenciesUpdated) {
|
|
382
|
+
fs.writeFileSync(packageConfigurationPath, `${JSON.stringify(packageConfiguration, null, 2)}\n`);
|
|
383
|
+
run(false, "git", "commit", "--all", "--message=Restored alpha version.");
|
|
384
|
+
}
|
|
371
385
|
});
|
|
372
386
|
|
|
373
387
|
if (hasPushWorkflow) {
|
|
@@ -396,8 +410,6 @@ async function release(): Promise<void> {
|
|
|
396
410
|
}
|
|
397
411
|
|
|
398
412
|
state[name] = "complete";
|
|
399
|
-
} else {
|
|
400
|
-
state[name] = "skipped";
|
|
401
413
|
}
|
|
402
414
|
|
|
403
415
|
saveState();
|
package/tsconfig.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"noPropertyAccessFromIndexSignature": true,
|
|
10
10
|
|
|
11
11
|
// Modules.
|
|
12
|
-
"module": "
|
|
12
|
+
"module": "NodeNext",
|
|
13
13
|
"resolveJsonModule": true,
|
|
14
14
|
|
|
15
15
|
// Interop constraints.
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"forceConsistentCasingInFileNames": true,
|
|
18
18
|
|
|
19
19
|
// Language and environment.
|
|
20
|
-
"target": "
|
|
20
|
+
"target": "ESNext",
|
|
21
21
|
"useDefineForClassFields": true,
|
|
22
22
|
|
|
23
23
|
// Completeness.
|