no-mistakes 0.38.0 → 0.39.0
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 +7 -2
- package/ci-types.d.ts +2 -0
- package/index.d.ts +5 -0
- package/index.js +2 -0
- package/mermaid-types.d.ts +22 -0
- package/package.json +1 -1
- package/types.d.ts +1 -0
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ npx no-mistakes check --json
|
|
|
14
14
|
|
|
15
15
|
Programmatic Node usage loads the same Rust analysis through N-API:
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
````js
|
|
18
18
|
const {
|
|
19
19
|
dependencies,
|
|
20
20
|
dependents,
|
|
@@ -35,6 +35,7 @@ const {
|
|
|
35
35
|
serverContracts,
|
|
36
36
|
reactAnalyze,
|
|
37
37
|
reactCheck,
|
|
38
|
+
validateMermaidMarkdown,
|
|
38
39
|
} = require("no-mistakes");
|
|
39
40
|
|
|
40
41
|
(async () => {
|
|
@@ -83,6 +84,10 @@ const {
|
|
|
83
84
|
// In monorepos, pass the workspace-scoped tsconfig (e.g. "web/tsconfig.json").
|
|
84
85
|
tsconfig: "tsconfig.json",
|
|
85
86
|
});
|
|
87
|
+
const mermaid = await validateMermaidMarkdown({
|
|
88
|
+
content: "```mermaid\nflowchart LR\n A --> B\n```",
|
|
89
|
+
file: "docs/design.md",
|
|
90
|
+
});
|
|
86
91
|
const localFlow = await flow({
|
|
87
92
|
root: process.cwd(),
|
|
88
93
|
target: "src/utils.mts#parseDate",
|
|
@@ -112,7 +117,7 @@ const {
|
|
|
112
117
|
targets: ["app/**/*.tsx"],
|
|
113
118
|
});
|
|
114
119
|
})();
|
|
115
|
-
|
|
120
|
+
````
|
|
116
121
|
|
|
117
122
|
CLI and Node analyses share a per-user machine-wide lock. CLI flags
|
|
118
123
|
`--timeout`, `--lock-timeout`, and `--fail-on-lock` have Node equivalents
|
package/ci-types.d.ts
CHANGED
|
@@ -32,6 +32,8 @@ export interface ImpactedChecksOptions {
|
|
|
32
32
|
changedFiles?: string[];
|
|
33
33
|
changedFilesFile?: string;
|
|
34
34
|
diff?: string;
|
|
35
|
+
/** Return configured generic commands only; skip test-framework discovery and selection. */
|
|
36
|
+
genericOnly?: boolean;
|
|
35
37
|
/** Include ordered analysis phase timings in the returned report. */
|
|
36
38
|
timings?: boolean;
|
|
37
39
|
}
|
package/index.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ import type {
|
|
|
16
16
|
ImportUsagesResult,
|
|
17
17
|
ImportersOptions,
|
|
18
18
|
ImportersResult,
|
|
19
|
+
MermaidValidationOptions,
|
|
20
|
+
MermaidValidationResult,
|
|
19
21
|
ResolveCheckOptions,
|
|
20
22
|
ResolveCheckResult,
|
|
21
23
|
GraphEdge,
|
|
@@ -87,6 +89,9 @@ export function resolveCheck(
|
|
|
87
89
|
export function fetches(options?: WithInvocationOptions<FetchesOptions>): Promise<unknown>;
|
|
88
90
|
export function flow(options: WithInvocationOptions<FlowOptions>): Promise<FlowReport>;
|
|
89
91
|
export function check(options?: WithInvocationOptions<ProjectOptions>): Promise<CheckReport>;
|
|
92
|
+
export function validateMermaidMarkdown(
|
|
93
|
+
options: WithInvocationOptions<MermaidValidationOptions>,
|
|
94
|
+
): Promise<MermaidValidationResult>;
|
|
90
95
|
export function testsPlan(options: WithInvocationOptions<TestsPlanOptions>): Promise<TestPlan>;
|
|
91
96
|
export function testsImpact(options: WithInvocationOptions<TestsImpactOptions>): Promise<TestPlan>;
|
|
92
97
|
export function testsTargets(
|
package/index.js
CHANGED
|
@@ -38,6 +38,7 @@ const jsonApis = createJsonApis({
|
|
|
38
38
|
infraResourceRefs: "infraResourceRefsJson",
|
|
39
39
|
infraTestFor: "infraTestForJson",
|
|
40
40
|
lockfileDiff: "lockfileDiffJson",
|
|
41
|
+
validateMermaidMarkdown: "validateMermaidMarkdownJson",
|
|
41
42
|
playwrightCheck: "playwrightCheckJson",
|
|
42
43
|
playwrightEdges: "playwrightEdgesJson",
|
|
43
44
|
playwrightRelated: "playwrightRelatedJson",
|
|
@@ -80,6 +81,7 @@ module.exports.infraOutputs = jsonApis.infraOutputs;
|
|
|
80
81
|
module.exports.infraResourceRefs = jsonApis.infraResourceRefs;
|
|
81
82
|
module.exports.infraTestFor = jsonApis.infraTestFor;
|
|
82
83
|
module.exports.lockfileDiff = jsonApis.lockfileDiff;
|
|
84
|
+
module.exports.validateMermaidMarkdown = jsonApis.validateMermaidMarkdown;
|
|
83
85
|
module.exports.playwrightCheck = jsonApis.playwrightCheck;
|
|
84
86
|
module.exports.playwrightEdges = jsonApis.playwrightEdges;
|
|
85
87
|
module.exports.playwrightRelated = jsonApis.playwrightRelated;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface MermaidValidationOptions {
|
|
2
|
+
content: string;
|
|
3
|
+
file?: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export type MermaidValidationDiagnosticCode = "invalid-syntax" | "unclosed-fence";
|
|
7
|
+
|
|
8
|
+
export interface MermaidValidationDiagnostic {
|
|
9
|
+
code: MermaidValidationDiagnosticCode;
|
|
10
|
+
file: string;
|
|
11
|
+
fenceLine: number;
|
|
12
|
+
diagramLine?: number;
|
|
13
|
+
diagramColumn?: number;
|
|
14
|
+
diagramType?: string;
|
|
15
|
+
message: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface MermaidValidationResult {
|
|
19
|
+
valid: boolean;
|
|
20
|
+
diagramCount: number;
|
|
21
|
+
diagnostics: MermaidValidationDiagnostic[];
|
|
22
|
+
}
|
package/package.json
CHANGED
package/types.d.ts
CHANGED