@astryxdesign/cli 0.7.3-canary.2468b8a → 0.7.3-canary.3133fb0
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 +63 -63
- package/api/integration/validate-integration.mjs +33 -7
- package/api/integration/validate-integration.type.d.mts +3 -1
- package/api/integration/validate-integration.type.mjs +3 -1
- package/api/integration/validateIntegration.doc.mjs +1 -1
- package/api/search/_entries.d.mts +11 -0
- package/api/search/_entries.mjs +35 -17
- package/api/search/_entries.test.mjs +48 -0
- package/assets/docs/tree/versioning.doc.mjs +4 -0
- package/foundation/integrations/cli-peer-version.d.mts +36 -0
- package/foundation/integrations/cli-peer-version.mjs +132 -0
- package/foundation/integrations/cli-peer-version.test.mjs +354 -0
- package/foundation/response/response-types.doc.mjs +1 -1
- package/package.json +9 -9
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file Tests for the CLI peer version warning.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import {describe, it, expect, beforeAll, afterAll} from 'vitest';
|
|
8
|
+
import * as fs from 'node:fs';
|
|
9
|
+
import * as os from 'node:os';
|
|
10
|
+
import * as path from 'node:path';
|
|
11
|
+
import {cliPeerVersionProblem, cliVersion} from './cli-peer-version.mjs';
|
|
12
|
+
import {runCli} from '../../test-utils/run-cli.mjs';
|
|
13
|
+
|
|
14
|
+
/** @type {string} */
|
|
15
|
+
let tmpDir;
|
|
16
|
+
|
|
17
|
+
beforeAll(() => {
|
|
18
|
+
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'astryx-cli-peer-'));
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
afterAll(() => {
|
|
22
|
+
fs.rmSync(tmpDir, {recursive: true, force: true});
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @param {string} name
|
|
27
|
+
* @param {Record<string, unknown>} pkgJson
|
|
28
|
+
*/
|
|
29
|
+
function makeIntegration(name, pkgJson) {
|
|
30
|
+
const dir = path.join(tmpDir, name.replace(/[/@]/g, '_'));
|
|
31
|
+
fs.mkdirSync(dir, {recursive: true});
|
|
32
|
+
fs.writeFileSync(path.join(dir, 'package.json'), JSON.stringify(pkgJson));
|
|
33
|
+
return {name, version: String(pkgJson.version ?? '1.0.0'), __packageDir: dir};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
describe('cliPeerVersionProblem', () => {
|
|
37
|
+
it('returns null when no @astryxdesign/cli peer is declared', () => {
|
|
38
|
+
const integration = makeIntegration('@test/no-peer', {
|
|
39
|
+
name: '@test/no-peer',
|
|
40
|
+
version: '1.0.0',
|
|
41
|
+
});
|
|
42
|
+
expect(cliPeerVersionProblem(integration, '0.6.5', tmpDir)).toBeNull();
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it('returns null when the CLI satisfies the peer range', () => {
|
|
46
|
+
const integration = makeIntegration('@test/satisfied', {
|
|
47
|
+
name: '@test/satisfied',
|
|
48
|
+
version: '1.0.0',
|
|
49
|
+
peerDependencies: {'@astryxdesign/cli': '>=0.6.0'},
|
|
50
|
+
});
|
|
51
|
+
expect(cliPeerVersionProblem(integration, '0.6.5', tmpDir)).toBeNull();
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it('warns when the CLI is below the peer range', () => {
|
|
55
|
+
const integration = makeIntegration('@test/needs-newer', {
|
|
56
|
+
name: '@test/needs-newer',
|
|
57
|
+
version: '2.0.0',
|
|
58
|
+
peerDependencies: {'@astryxdesign/cli': '>=0.8.0'},
|
|
59
|
+
});
|
|
60
|
+
const project = path.join(tmpDir, 'npm-project');
|
|
61
|
+
fs.mkdirSync(project, {recursive: true});
|
|
62
|
+
fs.writeFileSync(path.join(project, 'package-lock.json'), '{}\n');
|
|
63
|
+
expect(cliPeerVersionProblem(integration, '0.6.5', project)).toBe(
|
|
64
|
+
'@test/needs-newer needs @astryxdesign/cli >=0.8.0, but this CLI is 0.6.5, so some of what it ships may not load. Upgrade Core and the CLI together: `npm install @astryxdesign/core@latest @astryxdesign/cli@latest`, then `npx astryx upgrade --from 0.6.5 --apply`.',
|
|
65
|
+
);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it("names the project's own package manager in the upgrade command", () => {
|
|
69
|
+
const project = path.join(tmpDir, 'pnpm-project');
|
|
70
|
+
fs.mkdirSync(project, {recursive: true});
|
|
71
|
+
fs.writeFileSync(path.join(project, 'pnpm-lock.yaml'), "lockfileVersion: '9.0'\n");
|
|
72
|
+
const integration = makeIntegration('@test/pnpm', {
|
|
73
|
+
name: '@test/pnpm',
|
|
74
|
+
version: '1.0.0',
|
|
75
|
+
peerDependencies: {'@astryxdesign/cli': '>=0.8.0'},
|
|
76
|
+
});
|
|
77
|
+
expect(cliPeerVersionProblem(integration, '0.6.5', project)).toContain(
|
|
78
|
+
'`pnpm add @astryxdesign/core@latest @astryxdesign/cli@latest`, then `pnpm exec astryx upgrade --from 0.6.5 --apply`',
|
|
79
|
+
);
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it('starts the upgrade from the version it is given, such as a Core-only project\'s Core', () => {
|
|
83
|
+
const project = path.join(tmpDir, 'from-npm-project');
|
|
84
|
+
fs.mkdirSync(project, {recursive: true});
|
|
85
|
+
fs.writeFileSync(path.join(project, 'package-lock.json'), '{}\n');
|
|
86
|
+
const integration = makeIntegration('@test/from', {
|
|
87
|
+
name: '@test/from',
|
|
88
|
+
version: '1.0.0',
|
|
89
|
+
peerDependencies: {'@astryxdesign/cli': '>=0.8.0'},
|
|
90
|
+
});
|
|
91
|
+
expect(
|
|
92
|
+
cliPeerVersionProblem(integration, '0.7.3', project, {from: '0.6.0'}),
|
|
93
|
+
).toContain('upgrade --from 0.6.0 --apply');
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
it('installs them as dev dependencies in the package being authored', () => {
|
|
97
|
+
const project = path.join(tmpDir, 'own-npm-project');
|
|
98
|
+
fs.mkdirSync(project, {recursive: true});
|
|
99
|
+
fs.writeFileSync(path.join(project, 'package-lock.json'), '{}\n');
|
|
100
|
+
const integration = makeIntegration('@test/own-below', {
|
|
101
|
+
name: '@test/own-below',
|
|
102
|
+
version: '1.0.0',
|
|
103
|
+
peerDependencies: {'@astryxdesign/cli': '>=0.8.0'},
|
|
104
|
+
});
|
|
105
|
+
expect(
|
|
106
|
+
cliPeerVersionProblem(integration, '0.6.5', project, {own: true}),
|
|
107
|
+
).toContain(
|
|
108
|
+
'`npm install -D @astryxdesign/core@latest @astryxdesign/cli@latest`, then `npx astryx upgrade --from 0.6.5 --apply`',
|
|
109
|
+
);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
it('does not ask for an upgrade when the CLI is newer than the range', () => {
|
|
113
|
+
const integration = makeIntegration('@test/older', {
|
|
114
|
+
name: '@test/older',
|
|
115
|
+
version: '1.0.0',
|
|
116
|
+
peerDependencies: {'@astryxdesign/cli': '^0.6.0'},
|
|
117
|
+
});
|
|
118
|
+
expect(cliPeerVersionProblem(integration, '0.7.3', tmpDir)).toBe(
|
|
119
|
+
'@test/older supports @astryxdesign/cli ^0.6.0, but this CLI is 0.7.3, outside that range, so some of what it ships may not work as its author tested. Look for a release of @test/older that supports 0.7.3.',
|
|
120
|
+
);
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
it('handles a caret range that excludes the running CLI', () => {
|
|
124
|
+
const integration = makeIntegration('@test/caret', {
|
|
125
|
+
name: '@test/caret',
|
|
126
|
+
version: '1.0.0',
|
|
127
|
+
peerDependencies: {'@astryxdesign/cli': '^1.0.0'},
|
|
128
|
+
});
|
|
129
|
+
expect(cliPeerVersionProblem(integration, '0.6.5', tmpDir)).toContain(
|
|
130
|
+
'^1.0.0',
|
|
131
|
+
);
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
it('returns null for a caret range the CLI satisfies', () => {
|
|
135
|
+
const integration = makeIntegration('@test/caret-ok', {
|
|
136
|
+
name: '@test/caret-ok',
|
|
137
|
+
version: '1.0.0',
|
|
138
|
+
peerDependencies: {'@astryxdesign/cli': '^0.6.0'},
|
|
139
|
+
});
|
|
140
|
+
expect(cliPeerVersionProblem(integration, '0.6.5', tmpDir)).toBeNull();
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
it('tells the author to test and widen the range when the package is their own', () => {
|
|
144
|
+
const integration = makeIntegration('@test/own', {
|
|
145
|
+
name: '@test/own',
|
|
146
|
+
version: '1.0.0',
|
|
147
|
+
peerDependencies: {'@astryxdesign/cli': '^0.6.0'},
|
|
148
|
+
});
|
|
149
|
+
expect(cliPeerVersionProblem(integration, '0.7.3', tmpDir, {own: true})).toBe(
|
|
150
|
+
'@test/own declares @astryxdesign/cli ^0.6.0, but this CLI is 0.7.3, outside that range. Test the package with this CLI, and if it works, widen the @astryxdesign/cli range in its peerDependencies.',
|
|
151
|
+
);
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
it('warns for an optional peer the CLI does not satisfy', () => {
|
|
155
|
+
// Optional peers are still peers: the integration needs a newer CLI to
|
|
156
|
+
// work fully. The warning is about the CLI version, not about whether
|
|
157
|
+
// the peer is required for install.
|
|
158
|
+
const integration = makeIntegration('@test/optional', {
|
|
159
|
+
name: '@test/optional',
|
|
160
|
+
version: '1.0.0',
|
|
161
|
+
peerDependencies: {'@astryxdesign/cli': '>=0.9.0'},
|
|
162
|
+
peerDependenciesMeta: {'@astryxdesign/cli': {optional: true}},
|
|
163
|
+
});
|
|
164
|
+
expect(cliPeerVersionProblem(integration, '0.6.5', tmpDir)).not.toBeNull();
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
it('handles a prerelease CLI version gracefully', () => {
|
|
168
|
+
const integration = makeIntegration('@test/prerelease', {
|
|
169
|
+
name: '@test/prerelease',
|
|
170
|
+
version: '1.0.0',
|
|
171
|
+
peerDependencies: {'@astryxdesign/cli': '>=0.7.0'},
|
|
172
|
+
});
|
|
173
|
+
// A canary like 0.7.0-canary.abc123 should satisfy >=0.7.0
|
|
174
|
+
expect(cliPeerVersionProblem(integration, '0.7.0-canary.abc123', tmpDir)).toBeNull();
|
|
175
|
+
// A canary below the floor should warn
|
|
176
|
+
expect(
|
|
177
|
+
cliPeerVersionProblem(integration, '0.6.5-canary.xyz', tmpDir),
|
|
178
|
+
).not.toBeNull();
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
it('returns null when __packageDir is missing', () => {
|
|
182
|
+
const integration = {name: '@test/no-dir', version: '1.0.0'};
|
|
183
|
+
expect(cliPeerVersionProblem(integration, '0.6.5', tmpDir)).toBeNull();
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
it('returns null when package.json cannot be read', () => {
|
|
187
|
+
const integration = {
|
|
188
|
+
name: '@test/bad-dir',
|
|
189
|
+
version: '1.0.0',
|
|
190
|
+
__packageDir: path.join(tmpDir, 'nonexistent'),
|
|
191
|
+
};
|
|
192
|
+
expect(cliPeerVersionProblem(integration, '0.6.5', tmpDir)).toBeNull();
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
describe('cliVersion', () => {
|
|
197
|
+
it('returns a valid semver string', () => {
|
|
198
|
+
const ver = cliVersion();
|
|
199
|
+
expect(ver).toMatch(/^\d+\.\d+\.\d+/);
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
describe('as a note that fails nothing', () => {
|
|
204
|
+
/**
|
|
205
|
+
* An integration package at `dir` whose CLI peer range is `range`.
|
|
206
|
+
* @param {string} dir
|
|
207
|
+
* @param {string} range
|
|
208
|
+
*/
|
|
209
|
+
function writeIntegration(dir, range) {
|
|
210
|
+
fs.mkdirSync(dir, {recursive: true});
|
|
211
|
+
fs.writeFileSync(
|
|
212
|
+
path.join(dir, 'package.json'),
|
|
213
|
+
JSON.stringify({
|
|
214
|
+
name: '@acme/widgets',
|
|
215
|
+
version: '1.0.0',
|
|
216
|
+
peerDependencies: {'@astryxdesign/cli': range},
|
|
217
|
+
}),
|
|
218
|
+
);
|
|
219
|
+
fs.writeFileSync(path.join(dir, 'astryx.integration.mjs'), 'export default {};\n');
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* A project with a lockfile that installs @acme/widgets.
|
|
224
|
+
* @param {string} range
|
|
225
|
+
*/
|
|
226
|
+
function project(range) {
|
|
227
|
+
const root = fs.mkdtempSync(path.join(tmpDir, 'project-'));
|
|
228
|
+
fs.writeFileSync(
|
|
229
|
+
path.join(root, 'package.json'),
|
|
230
|
+
JSON.stringify({
|
|
231
|
+
name: 'app',
|
|
232
|
+
version: '1.0.0',
|
|
233
|
+
dependencies: {'@acme/widgets': '^1.0.0'},
|
|
234
|
+
}),
|
|
235
|
+
);
|
|
236
|
+
fs.writeFileSync(path.join(root, 'package-lock.json'), '{}\n');
|
|
237
|
+
writeIntegration(path.join(root, 'node_modules', '@acme', 'widgets'), range);
|
|
238
|
+
return root;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/** @param {string} [dev] */
|
|
242
|
+
const below = (dev = '') =>
|
|
243
|
+
`@acme/widgets needs @astryxdesign/cli >=99.0.0, but this CLI is ${cliVersion()}, so some of what it ships may not load. Upgrade Core and the CLI together: \`npm install${dev} @astryxdesign/core@latest @astryxdesign/cli@latest\`, then \`npx astryx upgrade --from ${cliVersion()} --apply\`.`;
|
|
244
|
+
|
|
245
|
+
it('doctor integration validate lists it in data.notes, never in data.issues, and exits 0', async () => {
|
|
246
|
+
const cwd = project('>=99.0.0');
|
|
247
|
+
const {status, stdout} = await runCli(
|
|
248
|
+
['doctor', 'integration', 'validate', '@acme/widgets', '--json'],
|
|
249
|
+
{cwd},
|
|
250
|
+
);
|
|
251
|
+
const {data} = JSON.parse(stdout);
|
|
252
|
+
expect(status).toBe(0);
|
|
253
|
+
expect(data.notes).toContainEqual({code: 'cli_peer_version', message: below()});
|
|
254
|
+
expect(data.issues.map((/** @type {{code: string}} */ i) => i.code)).not.toContain(
|
|
255
|
+
'cli_peer_version',
|
|
256
|
+
);
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
it('integration check --strict carries the note and still exits 0', async () => {
|
|
260
|
+
const pkg = fs.mkdtempSync(path.join(tmpDir, 'package-'));
|
|
261
|
+
writeIntegration(pkg, '>=99.0.0');
|
|
262
|
+
fs.writeFileSync(path.join(pkg, 'package-lock.json'), '{}\n');
|
|
263
|
+
const {status, stdout} = await runCli(
|
|
264
|
+
['--json', 'integration', 'check', '--strict'],
|
|
265
|
+
{cwd: pkg},
|
|
266
|
+
);
|
|
267
|
+
const envelope = JSON.parse(stdout);
|
|
268
|
+
const validate = envelope.data.checks[0].response.data;
|
|
269
|
+
expect(validate.notes).toContainEqual({
|
|
270
|
+
code: 'cli_peer_version',
|
|
271
|
+
message: below(' -D'),
|
|
272
|
+
});
|
|
273
|
+
expect(validate.issues.map((/** @type {{code: string}} */ i) => i.code)).not.toContain(
|
|
274
|
+
'cli_peer_version',
|
|
275
|
+
);
|
|
276
|
+
expect(envelope.data.failed).toBe(false);
|
|
277
|
+
expect(status).toBe(0);
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
it('starts the upgrade from the Core of a project with no CLI of its own', async () => {
|
|
281
|
+
const cwd = project('>=99.0.0');
|
|
282
|
+
const pkgJson = path.join(cwd, 'package.json');
|
|
283
|
+
const pkg = JSON.parse(fs.readFileSync(pkgJson, 'utf8'));
|
|
284
|
+
pkg.dependencies['@astryxdesign/core'] = '0.6.0';
|
|
285
|
+
fs.writeFileSync(pkgJson, JSON.stringify(pkg));
|
|
286
|
+
const core = path.join(cwd, 'node_modules', '@astryxdesign', 'core');
|
|
287
|
+
fs.mkdirSync(core, {recursive: true});
|
|
288
|
+
fs.writeFileSync(
|
|
289
|
+
path.join(core, 'package.json'),
|
|
290
|
+
JSON.stringify({name: '@astryxdesign/core', version: '0.6.0'}),
|
|
291
|
+
);
|
|
292
|
+
const {status, stdout} = await runCli(
|
|
293
|
+
['doctor', 'integration', 'validate', '@acme/widgets', '--json'],
|
|
294
|
+
{cwd},
|
|
295
|
+
);
|
|
296
|
+
expect(status).toBe(0);
|
|
297
|
+
const note = JSON.parse(stdout).data.notes.find(
|
|
298
|
+
(/** @type {{code: string}} */ n) => n.code === 'cli_peer_version',
|
|
299
|
+
);
|
|
300
|
+
expect(note.message).toContain('upgrade --from 0.6.0 --apply');
|
|
301
|
+
expect(note.message).not.toContain(`--from ${cliVersion()}`);
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
it('asks for a release of an installed package that supports a CLI above its range', async () => {
|
|
305
|
+
const cwd = project('^0.6.0');
|
|
306
|
+
const {stdout} = await runCli(
|
|
307
|
+
['doctor', 'integration', 'validate', '@acme/widgets', '--json'],
|
|
308
|
+
{cwd},
|
|
309
|
+
);
|
|
310
|
+
expect(JSON.parse(stdout).data.notes).toContainEqual({
|
|
311
|
+
code: 'cli_peer_version',
|
|
312
|
+
message: `@acme/widgets supports @astryxdesign/cli ^0.6.0, but this CLI is ${cliVersion()}, outside that range, so some of what it ships may not work as its author tested. Look for a release of @acme/widgets that supports ${cliVersion()}.`,
|
|
313
|
+
});
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
it('tells the author of the package in the current folder to test and widen a range below this CLI', async () => {
|
|
317
|
+
const pkg = fs.mkdtempSync(path.join(tmpDir, 'package-'));
|
|
318
|
+
writeIntegration(pkg, '^0.6.0');
|
|
319
|
+
const {status, stdout} = await runCli(
|
|
320
|
+
['--json', 'integration', 'check', '--strict'],
|
|
321
|
+
{cwd: pkg},
|
|
322
|
+
);
|
|
323
|
+
const envelope = JSON.parse(stdout);
|
|
324
|
+
expect(envelope.data.checks[0].response.data.notes).toContainEqual({
|
|
325
|
+
code: 'cli_peer_version',
|
|
326
|
+
message: `@acme/widgets declares @astryxdesign/cli ^0.6.0, but this CLI is ${cliVersion()}, outside that range. Test the package with this CLI, and if it works, widen the @astryxdesign/cli range in its peerDependencies.`,
|
|
327
|
+
});
|
|
328
|
+
expect(envelope.data.failed).toBe(false);
|
|
329
|
+
expect(status).toBe(0);
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
it('leaves integration verify as it was: no warning, no issue', async () => {
|
|
333
|
+
const pkg = fs.mkdtempSync(path.join(tmpDir, 'package-'));
|
|
334
|
+
writeIntegration(pkg, '>=99.0.0');
|
|
335
|
+
const {stdout} = await runCli(['--json', 'integration', 'verify'], {
|
|
336
|
+
cwd: pkg,
|
|
337
|
+
});
|
|
338
|
+
expect(stdout).not.toContain('cli_peer_version');
|
|
339
|
+
const text = await runCli(['integration', 'verify'], {cwd: pkg});
|
|
340
|
+
expect(text.stdout + text.stderr).not.toContain('needs @astryxdesign/cli');
|
|
341
|
+
}, 120_000);
|
|
342
|
+
|
|
343
|
+
it('says nothing when the CLI is in the range', async () => {
|
|
344
|
+
const cwd = project(`>=${cliVersion()}`);
|
|
345
|
+
const {stdout} = await runCli(
|
|
346
|
+
['doctor', 'integration', 'validate', '@acme/widgets', '--json'],
|
|
347
|
+
{cwd},
|
|
348
|
+
);
|
|
349
|
+
const {data} = JSON.parse(stdout);
|
|
350
|
+
expect(
|
|
351
|
+
(data.notes ?? []).map((/** @type {{code: string}} */ n) => n.code),
|
|
352
|
+
).not.toContain('cli_peer_version');
|
|
353
|
+
});
|
|
354
|
+
});
|
|
@@ -338,7 +338,7 @@ export const doc = {
|
|
|
338
338
|
{
|
|
339
339
|
value: 'integration.validate',
|
|
340
340
|
description:
|
|
341
|
-
'The validation result: validated (false when nothing was validated: with no package.json the issues list carries one no_package error so the command exits 1, and with a package.json but no integration manifest the issues list is empty and proves nothing), the package name and version (both null when validated is false) plus issues, an AstryxIntegrationIssue[] of {code, severity: warning | error, message, fix?, file?, line?} (fix: the change that resolves it; file and line: where, relative to the package), and notes when there are any: {code, message} information that fails nothing, such as invalid_cli_command for a malformed cliCommand, and the package layout findings added after the last minor release, each with its fix in the message (duplicate_component_doc, symlinked_root, unreadable_file, invalid_package_json, no_provider_id, source_without_component_doc where a doc and its source still pair), and doc_name_mismatch and unknown_block_component, until they become warnings in the next minor release. A runner_command note lists each Astryx command a topic writes with a package runner (its file, line and the bare command to write). When the manifest loads, docTypes checks each doc against its published authoring type: status (checked | skipped), reason, typescript, docs, findings (all warnings, each naming the field and a fix), unchecked, and fixtures (test fixture docs not checked). When the manifest loads, docNames lists the component doc names it could not judge: status (checked), findings (always empty; a doc name the module its import names provably does not export is a doc_name_mismatch note, with its fix in the message) and unchecked ({file, name, reason}: a doc whose name differs from the name it is listed under and whose source exports cannot all be read, such as a re-export from another package). When the manifest loads, blockComponents lists the component names templates give in exampleFor or componentsUsed that could not be judged: status (checked), findings (always empty; a name neither the package nor Core has, and the template does not import, is an unknown_block_component note, with its fix in the message) and unchecked ({file, name, reason}: a name the template may reach through anything other than named imports and re-exports from Core, React, StyleX, local helpers or the entry of the package itself, such as an import from another package, a default or namespace import, an alias of or member read off an imported binding, require() or a dynamic import(), or a local module that cannot be read, or any name Core would have to resolve when Core is not installed). Since 0.7.3 each import apps cannot use is also a note (its fix in the message), listed only and failing --strict from the next minor. publicImports ({status: checked, findings: [], unchecked}) lists each import the check could not judge as {file, specifier, reason}; never counted or failed on.',
|
|
341
|
+
'The validation result: validated (false when nothing was validated: with no package.json the issues list carries one no_package error so the command exits 1, and with a package.json but no integration manifest the issues list is empty and proves nothing), the package name and version (both null when validated is false) plus issues, an AstryxIntegrationIssue[] of {code, severity: warning | error, message, fix?, file?, line?} (fix: the change that resolves it; file and line: where, relative to the package), and notes when there are any: {code, message} information that fails nothing, such as invalid_cli_command for a malformed cliCommand and cli_peer_version when the running CLI is outside the @astryxdesign/cli peer range of the package, and the package layout findings added after the last minor release, each with its fix in the message (duplicate_component_doc, symlinked_root, unreadable_file, invalid_package_json, no_provider_id, source_without_component_doc where a doc and its source still pair), and doc_name_mismatch and unknown_block_component, until they become warnings in the next minor release. A runner_command note lists each Astryx command a topic writes with a package runner (its file, line and the bare command to write). When the manifest loads, docTypes checks each doc against its published authoring type: status (checked | skipped), reason, typescript, docs, findings (all warnings, each naming the field and a fix), unchecked, and fixtures (test fixture docs not checked). When the manifest loads, docNames lists the component doc names it could not judge: status (checked), findings (always empty; a doc name the module its import names provably does not export is a doc_name_mismatch note, with its fix in the message) and unchecked ({file, name, reason}: a doc whose name differs from the name it is listed under and whose source exports cannot all be read, such as a re-export from another package). When the manifest loads, blockComponents lists the component names templates give in exampleFor or componentsUsed that could not be judged: status (checked), findings (always empty; a name neither the package nor Core has, and the template does not import, is an unknown_block_component note, with its fix in the message) and unchecked ({file, name, reason}: a name the template may reach through anything other than named imports and re-exports from Core, React, StyleX, local helpers or the entry of the package itself, such as an import from another package, a default or namespace import, an alias of or member read off an imported binding, require() or a dynamic import(), or a local module that cannot be read, or any name Core would have to resolve when Core is not installed). Since 0.7.3 each import apps cannot use is also a note (its fix in the message), listed only and failing --strict from the next minor. publicImports ({status: checked, findings: [], unchecked}) lists each import the check could not judge as {file, specifier, reason}; never counted or failed on.',
|
|
342
342
|
},
|
|
343
343
|
{
|
|
344
344
|
value: 'integration.template-conflicts',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/cli",
|
|
3
|
-
"version": "0.7.3-canary.
|
|
3
|
+
"version": "0.7.3-canary.3133fb0",
|
|
4
4
|
"displayName": "CLI",
|
|
5
5
|
"description": "Scaffold projects, browse templates, generate themes, and get agent-ready docs from the command line.",
|
|
6
6
|
"author": "Meta Open Source",
|
|
@@ -106,10 +106,10 @@
|
|
|
106
106
|
"zod": "^4.4.3"
|
|
107
107
|
},
|
|
108
108
|
"peerDependencies": {
|
|
109
|
-
"@astryxdesign/charts": "0.7.3-canary.
|
|
110
|
-
"@astryxdesign/core": "0.7.3-canary.
|
|
111
|
-
"@astryxdesign/lab": "0.7.3-canary.
|
|
112
|
-
"@astryxdesign/theme-neutral": "0.7.3-canary.
|
|
109
|
+
"@astryxdesign/charts": "0.7.3-canary.3133fb0",
|
|
110
|
+
"@astryxdesign/core": "0.7.3-canary.3133fb0",
|
|
111
|
+
"@astryxdesign/lab": "0.7.3-canary.3133fb0",
|
|
112
|
+
"@astryxdesign/theme-neutral": "0.7.3-canary.3133fb0"
|
|
113
113
|
},
|
|
114
114
|
"peerDependenciesMeta": {
|
|
115
115
|
"@astryxdesign/charts": {
|
|
@@ -126,10 +126,10 @@
|
|
|
126
126
|
}
|
|
127
127
|
},
|
|
128
128
|
"devDependencies": {
|
|
129
|
-
"@astryxdesign/charts": "0.7.3-canary.
|
|
130
|
-
"@astryxdesign/core": "0.7.3-canary.
|
|
131
|
-
"@astryxdesign/lab": "0.7.3-canary.
|
|
132
|
-
"@astryxdesign/theme-neutral": "0.7.3-canary.
|
|
129
|
+
"@astryxdesign/charts": "0.7.3-canary.3133fb0",
|
|
130
|
+
"@astryxdesign/core": "0.7.3-canary.3133fb0",
|
|
131
|
+
"@astryxdesign/lab": "0.7.3-canary.3133fb0",
|
|
132
|
+
"@astryxdesign/theme-neutral": "0.7.3-canary.3133fb0",
|
|
133
133
|
"@heroicons/react": "^2.2.0",
|
|
134
134
|
"@stylexjs/stylex": "^0.19.0",
|
|
135
135
|
"@types/babel__core": "^7.20.5",
|