@intentius/chant-lexicon-docker 0.124.87 → 0.124.88
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/dist/integrity.json +2 -2
- package/dist/manifest.json +1 -1
- package/package.json +3 -3
- package/src/typecheck.e2e.test.ts +20 -2
package/dist/integrity.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
4
|
+
"manifest.json": "5471735ab3433ddfc321d44d67fc0437d5fef0a93921990f53b464efc410287d",
|
|
5
5
|
"meta.json": "b566d5cb84a87836a861dc5840c229577e860c5427123192810b7839f764a9ee",
|
|
6
6
|
"types/index.d.ts": "256644d2bffa2845900cf86984cc7dde3d9e79da5994ab13a22b0b83edf7f62a",
|
|
7
7
|
"rules/no-latest-tag.ts": "2281be0457c02e782fbafe015f65ff5fd2b008ef0f879226e9b548a3ea65399b",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"skills/chant-docker.md": "d499e18525f2cfd7ecc5b5be4a4c52c6931ebdef8d70f872d53279e53bed6f7e",
|
|
25
25
|
"skills/chant-docker-patterns.md": "655f437c833796e0d520bbe08740a4226d48fcec4912b0438672ed5a299897e7"
|
|
26
26
|
},
|
|
27
|
-
"composite": "
|
|
27
|
+
"composite": "e8c14036d80dd30084cbc3502fb2b5959a1c12604f351f6613f8656ef31d28eb"
|
|
28
28
|
}
|
package/dist/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant-lexicon-docker",
|
|
3
|
-
"version": "0.124.
|
|
3
|
+
"version": "0.124.88",
|
|
4
4
|
"description": "Docker lexicon for chant — declarative IaC in TypeScript",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://intentius.io/chant",
|
|
@@ -63,13 +63,13 @@
|
|
|
63
63
|
"build": "../../scripts/tsc7.sh -p tsconfig.build.json --sourceMap false && tsc-alias -p tsconfig.build.json"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@intentius/chant-lexicon-otel": "^0.124.
|
|
66
|
+
"@intentius/chant-lexicon-otel": "^0.124.88"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@intentius/chant": "*",
|
|
70
70
|
"typescript": "^5.9.3"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
|
-
"@intentius/chant": "^0.124.
|
|
73
|
+
"@intentius/chant": "^0.124.88"
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -38,10 +38,10 @@ function blocks(file: string): Block[] {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
/** Type errors in in-memory files, compiled against the lexicon's source with the repo typecheck's options. */
|
|
41
|
-
function typeErrors(files: Map<string, string
|
|
41
|
+
function typeErrors(files: Map<string, string>, extra: ts.CompilerOptions = {}): string[] {
|
|
42
42
|
const config = ts.readConfigFile(join(repoRoot, "tsconfig.typecheck.json"), ts.sys.readFile);
|
|
43
43
|
const { options } = ts.parseJsonConfigFileContent(config.config, ts.sys, repoRoot);
|
|
44
|
-
const checkOptions = { ...options, noEmit: true, types: [], skipLibCheck: true, declaration: false, declarationMap: false, sourceMap: false };
|
|
44
|
+
const checkOptions = { ...options, noEmit: true, types: [], skipLibCheck: true, declaration: false, declarationMap: false, sourceMap: false, ...extra };
|
|
45
45
|
const host = ts.createCompilerHost(checkOptions);
|
|
46
46
|
const getSourceFile = host.getSourceFile.bind(host);
|
|
47
47
|
host.getSourceFile = (name, lang, ...rest) =>
|
|
@@ -104,4 +104,22 @@ describe("docker TypeScript outside the repo typecheck type-checks", () => {
|
|
|
104
104
|
expect(files.size).toBeGreaterThanOrEqual(4);
|
|
105
105
|
expect(typeErrors(files)).toEqual([]);
|
|
106
106
|
}, 120_000);
|
|
107
|
+
|
|
108
|
+
test("a product's image as ci-image's stages, under exactOptionalPropertyTypes (#4932)", () => {
|
|
109
|
+
// As sql-yodeler writes it: its tsconfig sets exactOptionalPropertyTypes, which CiImageStep's Partial record did not satisfy.
|
|
110
|
+
const code = [
|
|
111
|
+
`import { Dockerfile, type DockerfileStage } from "@intentius/chant-lexicon-docker";`,
|
|
112
|
+
`import { productImageStages } from "@intentius/chant/ci-image";`,
|
|
113
|
+
`const stages = productImageStages({`,
|
|
114
|
+
` name: "sql-yodeler", product: "yodel", description: "yodel on Node 22", source: "https://github.com/INTENTIUS/sql-yodeler",`,
|
|
115
|
+
` tools: [{ tool: "pulumi", version: "3.272.0" }],`,
|
|
116
|
+
` steps: [{ run: "true" }, { env: "A=1" }],`,
|
|
117
|
+
` bundle: { npm: '"$PKG"', prefix: "/opt/yodel", mountContext: true, require: ["PKG"] },`,
|
|
118
|
+
`});`,
|
|
119
|
+
`export const typed: DockerfileStage[] = stages;`,
|
|
120
|
+
`export const image = new Dockerfile({ stages: productImageStages({ name: "x", product: "x", description: "d", source: "s", bundle: { file: "a", bin: "a" } }) });`,
|
|
121
|
+
].join("\n");
|
|
122
|
+
const files = new Map([[join(virtualRoot, "ci-image", "image.ts"), code]]);
|
|
123
|
+
expect(typeErrors(files, { exactOptionalPropertyTypes: true })).toEqual([]);
|
|
124
|
+
}, 120_000);
|
|
107
125
|
});
|