@konvert7/klint 0.32.0 → 0.33.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/klint.schema.json +1 -1
- package/klint.schema.yaml +1 -1
- package/package.json +8 -5
- package/tools/prepare-nuget-release.ts +62 -0
package/klint.schema.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://raw.githubusercontent.com/konvert7/klint/refs/tags/v0.
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/konvert7/klint/refs/tags/v0.33.0/klint.schema.json",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"properties": {
|
|
6
6
|
"$schema": {
|
package/klint.schema.yaml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
$schema: http://json-schema.org/draft-07/schema#
|
|
2
|
-
$id: https://raw.githubusercontent.com/konvert7/klint/refs/tags/v0.
|
|
2
|
+
$id: https://raw.githubusercontent.com/konvert7/klint/refs/tags/v0.33.0/klint.schema.json
|
|
3
3
|
type: object
|
|
4
4
|
properties:
|
|
5
5
|
$schema:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@konvert7/klint",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"description": "Architecture-as-Code linter for TypeScript. Enforce layer boundaries, import rules, and singleton patterns in YAML.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -45,7 +45,10 @@
|
|
|
45
45
|
"native:smoke": "bun tests/smoke-native-binary.ts",
|
|
46
46
|
"python:stage": "bun tests/stage-python-wheel.ts",
|
|
47
47
|
"python:smoke": "bun tests/smoke-python-wheel.ts",
|
|
48
|
+
"nuget:stage": "bun tests/stage-nuget-binary.ts",
|
|
49
|
+
"nuget:smoke": "bun tests/smoke-nuget-tool.ts",
|
|
48
50
|
"native:release:dry-run": "bun tools/prepare-native-release.ts --version 0.0.0-dry-run",
|
|
51
|
+
"nuget:release:dry-run": "bun tools/prepare-nuget-release.ts --version 0.0.0-dry-run",
|
|
49
52
|
"check": "biome check",
|
|
50
53
|
"check-write": "biome check --write",
|
|
51
54
|
"knip": "knip-bun",
|
|
@@ -67,10 +70,10 @@
|
|
|
67
70
|
"zod": "^4.4.3"
|
|
68
71
|
},
|
|
69
72
|
"optionalDependencies": {
|
|
70
|
-
"@konvert7/klint-darwin-arm64": "0.
|
|
71
|
-
"@konvert7/klint-darwin-x64": "0.
|
|
72
|
-
"@konvert7/klint-linux-x64": "0.
|
|
73
|
-
"@konvert7/klint-win32-x64": "0.
|
|
73
|
+
"@konvert7/klint-darwin-arm64": "0.33.0",
|
|
74
|
+
"@konvert7/klint-darwin-x64": "0.33.0",
|
|
75
|
+
"@konvert7/klint-linux-x64": "0.33.0",
|
|
76
|
+
"@konvert7/klint-win32-x64": "0.33.0"
|
|
74
77
|
},
|
|
75
78
|
"devDependencies": {
|
|
76
79
|
"@biomejs/biome": "2.4.7",
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { readFileSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { join, resolve } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
|
|
5
|
+
interface Options {
|
|
6
|
+
version: string;
|
|
7
|
+
root: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const repoRoot = fileURLToPath(new URL("..", import.meta.url));
|
|
11
|
+
const options = parseArgs();
|
|
12
|
+
const csprojPath = join(options.root, "nuget", "Klint.Tool.csproj");
|
|
13
|
+
|
|
14
|
+
const csproj = readFileSync(csprojPath, "utf-8");
|
|
15
|
+
const nextCsproj = replaceRequired(
|
|
16
|
+
csproj,
|
|
17
|
+
/<Version>.+<\/Version>/,
|
|
18
|
+
`<Version>${options.version}</Version>`,
|
|
19
|
+
csprojPath
|
|
20
|
+
);
|
|
21
|
+
writeFileSync(csprojPath, nextCsproj);
|
|
22
|
+
|
|
23
|
+
process.stdout.write(
|
|
24
|
+
`prepared NuGet release metadata: Konvert7.Klint@${options.version}\n`
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
function parseArgs(): Options {
|
|
28
|
+
const args = process.argv.slice(2);
|
|
29
|
+
const version = valueAfter(args, "--version");
|
|
30
|
+
if (!version) {
|
|
31
|
+
fail(
|
|
32
|
+
"Usage: bun tools/prepare-nuget-release.ts --version <version> [--root <repo-root>]"
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return {
|
|
37
|
+
version,
|
|
38
|
+
root: resolve(valueAfter(args, "--root") ?? repoRoot),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function replaceRequired(
|
|
43
|
+
input: string,
|
|
44
|
+
pattern: RegExp,
|
|
45
|
+
replacement: string,
|
|
46
|
+
path: string
|
|
47
|
+
): string {
|
|
48
|
+
if (!pattern.test(input)) {
|
|
49
|
+
fail(`Expected release metadata pattern ${pattern} in ${path}`);
|
|
50
|
+
}
|
|
51
|
+
return input.replace(pattern, replacement);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function valueAfter(args: string[], name: string): string | undefined {
|
|
55
|
+
const index = args.indexOf(name);
|
|
56
|
+
return index >= 0 ? args[index + 1] : undefined;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function fail(message: string): never {
|
|
60
|
+
process.stderr.write(`${message}\n`);
|
|
61
|
+
process.exit(1);
|
|
62
|
+
}
|