@ark/attest 0.14.0 → 0.16.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/out/cache/utils.js +7 -0
- package/out/fixtures.js +10 -2
- package/out/tsVersioning.js +2 -0
- package/package.json +4 -4
package/out/cache/utils.js
CHANGED
|
@@ -86,7 +86,14 @@ const getInstantiationsWithFile = (fileText, fileName) => {
|
|
|
86
86
|
const env = getIsolatedEnv();
|
|
87
87
|
const file = createOrUpdateFile(env, fileName, fileText);
|
|
88
88
|
const program = getProgram(env);
|
|
89
|
+
// trigger type checking to generate instantiations
|
|
90
|
+
// (was previously program.emit(file), but that as of TS 5.6 that doesn't
|
|
91
|
+
// work, so this may need to change if instantiations is reported as 0 after
|
|
92
|
+
// a future TypeScript update)
|
|
89
93
|
program.getSemanticDiagnostics(file);
|
|
94
|
+
// this may lead to additional type checking per Jake Bailey from the TS
|
|
95
|
+
// team, although it doesn't currently affect any of our internal benchmarks
|
|
96
|
+
program.getDeclarationDiagnostics(file);
|
|
90
97
|
const count = program.getInstantiationCount();
|
|
91
98
|
return count;
|
|
92
99
|
};
|
package/out/fixtures.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { shell, writeJson } from "@ark/fs";
|
|
1
|
+
import { fileName, shell, writeJson } from "@ark/fs";
|
|
2
2
|
import { rmSync } from "node:fs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { writeSnapshotUpdatesOnExit } from "./cache/snapshots.js";
|
|
@@ -19,7 +19,15 @@ export const setup = (options) => {
|
|
|
19
19
|
config.tsVersions[0].alias === "typescript")
|
|
20
20
|
writeAssertionData(config.defaultAssertionCachePath);
|
|
21
21
|
else {
|
|
22
|
-
forTypeScriptVersions(config.tsVersions, version =>
|
|
22
|
+
forTypeScriptVersions(config.tsVersions, version => {
|
|
23
|
+
const precachePath = join(config.assertionCacheDir, version.alias + ".json");
|
|
24
|
+
// if we're in our own repo, we need to pnpm to use the root script to execute ts directly
|
|
25
|
+
if (fileName().endsWith("ts"))
|
|
26
|
+
shell(`pnpm attest precache ${precachePath}`);
|
|
27
|
+
// otherwise, just use npm to run the CLI command from build output
|
|
28
|
+
else
|
|
29
|
+
shell(`npm exec -c "attest precache ${precachePath}"`);
|
|
30
|
+
});
|
|
23
31
|
}
|
|
24
32
|
return teardown;
|
|
25
33
|
};
|
package/out/tsVersioning.js
CHANGED
|
@@ -98,6 +98,8 @@ export const findAttestTypeScriptVersions = () => {
|
|
|
98
98
|
for (const alias in dependencies) {
|
|
99
99
|
if (!alias.startsWith("typescript"))
|
|
100
100
|
continue;
|
|
101
|
+
if (alias.includes("eslint", 10))
|
|
102
|
+
continue;
|
|
101
103
|
const path = join(nodeModulesPath, alias);
|
|
102
104
|
if (!existsSync(path)) {
|
|
103
105
|
throw Error(`TypeScript version ${alias} specified in ${packageJsonPath} must be installed at ${path} `);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ark/attest",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "David Blass",
|
|
6
6
|
"email": "david@arktype.io",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"@typescript/analyze-trace": "0.10.1",
|
|
36
36
|
"prettier": "3.3.3",
|
|
37
37
|
"@prettier/sync": "0.5.2",
|
|
38
|
-
"arktype": "2.0.0-rc.
|
|
39
|
-
"@ark/util": "0.
|
|
40
|
-
"@ark/fs": "0.
|
|
38
|
+
"arktype": "2.0.0-rc.5",
|
|
39
|
+
"@ark/util": "0.7.0",
|
|
40
|
+
"@ark/fs": "0.7.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"typescript": "5.6.1-rc"
|