@ankhorage/devtools 1.19.1 → 1.19.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/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# @ankhorage/devtools
|
|
5
5
|
|
|
6
|
-
         
|
|
7
7
|
|
|
8
8
|
Shared tooling, repository automation, runtime policies, and agent standards for Ankhorage TypeScript projects
|
|
9
9
|
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
2
|
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
3
3
|
import { dirname, resolve } from 'node:path';
|
|
4
|
+
import { resolveApmReleaseCommandAsync } from '../features/apm-release-validation/adapters/outbound/resolveApmReleaseCommandAsync.js';
|
|
5
|
+
import { resolveStructureReleaseCommandAsync } from '../features/structure-descriptor-generation/adapters/outbound/resolveStructureReleaseCommandAsync.js';
|
|
4
6
|
import { applyBunRuntimePolicy } from '../policy/applyBunRuntimePolicy.js';
|
|
5
7
|
import { nodeRuntimePolicy } from '../policy/bunRuntimePolicy.js';
|
|
6
8
|
import { renderBunPolicyDocumentation } from '../policy/renderBunPolicyDocumentation.js';
|
|
7
9
|
import { readCurrentDoctorVersion } from '../tools/workflows/readCurrentDoctorVersion.js';
|
|
8
10
|
import { renderRenovateWorkflowAsync } from '../tools/workflows/renderRenovateWorkflowAsync.js';
|
|
9
|
-
import { renderWorkflowAsync } from '../tools/workflows/renderWorkflowAsync.js';
|
|
11
|
+
import { renderWorkflowAsync, } from '../tools/workflows/renderWorkflowAsync.js';
|
|
10
12
|
/*** Synchronize or validate Renovate-owned Devtools policy artifacts. */
|
|
11
13
|
export async function synchronizeRenovateOwnerAsync(operation, targetDirectory, options = {}) {
|
|
12
14
|
const target = resolve(targetDirectory);
|
|
@@ -39,11 +41,7 @@ async function createManagedDefinitionsAsync(targetDirectory, policy) {
|
|
|
39
41
|
throw new Error('Devtools package.json must contain a JSON object.');
|
|
40
42
|
}
|
|
41
43
|
const readme = await readFile(resolve(targetDirectory, 'README.md'), 'utf8');
|
|
42
|
-
const workflowPolicy =
|
|
43
|
-
bunVersion: policy.version,
|
|
44
|
-
doctorVersion: readCurrentDoctorVersion(),
|
|
45
|
-
nodeVersion: nodeRuntimePolicy.setupVersion,
|
|
46
|
-
};
|
|
44
|
+
const workflowPolicy = await createWorkflowPolicyAsync(targetDirectory, policy);
|
|
47
45
|
return [
|
|
48
46
|
{
|
|
49
47
|
relativePath: 'package.json',
|
|
@@ -67,6 +65,16 @@ async function createManagedDefinitionsAsync(targetDirectory, policy) {
|
|
|
67
65
|
},
|
|
68
66
|
];
|
|
69
67
|
}
|
|
68
|
+
/*** Build the self-hosted workflow policy used by Devtools owner synchronization. */
|
|
69
|
+
async function createWorkflowPolicyAsync(targetDirectory, policy) {
|
|
70
|
+
return {
|
|
71
|
+
apmReleaseCommand: await resolveApmReleaseCommandAsync(targetDirectory),
|
|
72
|
+
structureReleaseCommand: await resolveStructureReleaseCommandAsync(targetDirectory),
|
|
73
|
+
bunVersion: policy.version,
|
|
74
|
+
doctorVersion: readCurrentDoctorVersion(),
|
|
75
|
+
nodeVersion: nodeRuntimePolicy.setupVersion,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
70
78
|
/*** Return owner-managed artifact paths whose current bytes differ from policy output. */
|
|
71
79
|
async function getOutdatedPathsAsync(targetDirectory, definitions) {
|
|
72
80
|
const results = await Promise.all(definitions.map(async ({ contents, relativePath }) => {
|
|
@@ -3,7 +3,7 @@ import { changesetsPolicy } from '../../policy/changesetsPolicy.js';
|
|
|
3
3
|
/*** Renders one workflow template with the canonical runtime, Doctor, and Changesets policy. */
|
|
4
4
|
export async function renderWorkflowAsync(sourceUrl, policy) {
|
|
5
5
|
const template = await readFile(sourceUrl, 'utf8');
|
|
6
|
-
|
|
6
|
+
const rendered = template
|
|
7
7
|
.replaceAll(BUN_VERSION_TOKEN, policy.bunVersion)
|
|
8
8
|
.replaceAll(PKGVIZ_AUDIT_STEPS_TOKEN, renderPkgvizAuditSteps(policy))
|
|
9
9
|
.replaceAll(CHANGESETS_PUBLISH_COMMAND_TOKEN, changesetsPolicy.workflowCommands.publish)
|
|
@@ -13,6 +13,7 @@ export async function renderWorkflowAsync(sourceUrl, policy) {
|
|
|
13
13
|
.replaceAll('__ANKH_APM_RELEASE_COMMAND__', policy.apmReleaseCommand ?? './node_modules/.bin/ankhorage-apm-release')
|
|
14
14
|
.replaceAll('__ANKH_STRUCTURE_RELEASE_COMMAND__', policy.structureReleaseCommand ?? './node_modules/.bin/ankhorage-structure')
|
|
15
15
|
.replaceAll(NODE_VERSION_TOKEN, policy.nodeVersion);
|
|
16
|
+
return `${rendered.trimEnd()}\n`;
|
|
16
17
|
}
|
|
17
18
|
const BUN_VERSION_TOKEN = '__ANKH_BUN_VERSION__';
|
|
18
19
|
const CHANGESETS_PUBLISH_COMMAND_TOKEN = '__ANKH_CHANGESETS_PUBLISH_COMMAND__';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/devtools",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.3",
|
|
4
4
|
"description": "Shared tooling, repository automation, runtime policies, and agent standards for Ankhorage TypeScript projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/devtools#readme",
|
|
@@ -124,36 +124,36 @@
|
|
|
124
124
|
"check-types": "bun x tsc --noEmit -p tsconfig.test.json"
|
|
125
125
|
},
|
|
126
126
|
"dependencies": {
|
|
127
|
-
"@ankhorage/apm": "^0.
|
|
128
|
-
"@ankhorage/project-detector": "^0.
|
|
127
|
+
"@ankhorage/apm": "^0.8.10",
|
|
128
|
+
"@ankhorage/project-detector": "^0.3.0",
|
|
129
129
|
"@ankhorage/utility": "^0.5.1",
|
|
130
|
-
"@changesets/cli": "^3.0.
|
|
130
|
+
"@changesets/cli": "^3.0.3",
|
|
131
131
|
"@eslint/compat": "^2.1.1",
|
|
132
132
|
"@eslint/js": "^10.0.1",
|
|
133
133
|
"@next/eslint-plugin-next": "^16.3.5",
|
|
134
|
-
"eslint": "^10.
|
|
134
|
+
"eslint": "^10.11.0",
|
|
135
135
|
"eslint-config-prettier": "^10.1.8",
|
|
136
136
|
"eslint-plugin-import": "^2.32.0",
|
|
137
137
|
"eslint-plugin-prettier": "^5.5.6",
|
|
138
138
|
"eslint-plugin-react": "^7.37.5",
|
|
139
|
-
"eslint-plugin-react-hooks": "^7.
|
|
139
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
140
140
|
"eslint-plugin-react-native": "^5.0.0",
|
|
141
141
|
"eslint-plugin-security": "^4.0.1",
|
|
142
142
|
"eslint-plugin-simple-import-sort": "^14.0.0",
|
|
143
143
|
"eslint-plugin-unused-imports": "^4.4.1",
|
|
144
|
-
"knip": "^6.
|
|
145
|
-
"prettier": "^3.9.
|
|
146
|
-
"typescript-eslint": "^8.
|
|
147
|
-
"@ankhorage/contracts": "^22.
|
|
144
|
+
"knip": "^6.37.0",
|
|
145
|
+
"prettier": "^3.9.8",
|
|
146
|
+
"typescript-eslint": "^8.70.1",
|
|
147
|
+
"@ankhorage/contracts": "^22.2.0",
|
|
148
148
|
"typescript": "~6.0.3"
|
|
149
149
|
},
|
|
150
150
|
"devDependencies": {
|
|
151
151
|
"@ankhorage/paradox": "^0.1.26",
|
|
152
|
-
"@ankhorage/ankh": "^0.
|
|
153
|
-
"@ankhorage/doctor": "0.10.
|
|
152
|
+
"@ankhorage/ankh": "^0.10.4",
|
|
153
|
+
"@ankhorage/doctor": "0.10.30",
|
|
154
154
|
"@techstark/opencv-js": "^5.0.0-release.1",
|
|
155
155
|
"@types/bun": "^1.4.1",
|
|
156
|
-
"@types/node": "^26.
|
|
156
|
+
"@types/node": "^26.6.2",
|
|
157
157
|
"sharp": "^0.35.4"
|
|
158
158
|
},
|
|
159
159
|
"packageManager": "bun@1.4.2"
|