@telorun/assert 0.6.0 → 0.7.1
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/manifest.js +7 -1
- package/package.json +5 -4
- package/src/manifest.ts +7 -1
package/dist/manifest.js
CHANGED
|
@@ -57,7 +57,13 @@ export async function create(manifest, ctx) {
|
|
|
57
57
|
const resolvedUrl = new URL(manifest.source, ctx.moduleContext.source).toString();
|
|
58
58
|
let manifests;
|
|
59
59
|
try {
|
|
60
|
-
|
|
60
|
+
// `desugarImports` mirrors how the kernel loads: inline `imports:` maps
|
|
61
|
+
// are expanded into synthetic Telo.Import manifests before analysis, so
|
|
62
|
+
// a manifest using inline imports analyzes (alias resolution, !ref) the
|
|
63
|
+
// same way it runs. Without it, `!ref Alias.x` against an inline import
|
|
64
|
+
// would surface a false UNRESOLVED_REFERENCE here, and a duplicate alias
|
|
65
|
+
// across the two forms would go undetected.
|
|
66
|
+
const graph = await loader.loadGraph(resolvedUrl, { desugarImports: true });
|
|
61
67
|
if (graph.errors.length > 0)
|
|
62
68
|
throw graph.errors[0].error;
|
|
63
69
|
manifests = flattenForAnalyzer(graph);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telorun/assert",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Telo Assert module - Assertion resource kinds for Telo manifests.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"telo",
|
|
@@ -62,14 +62,15 @@
|
|
|
62
62
|
],
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@sinclair/typebox": "^0.34.48",
|
|
65
|
-
"@telorun/analyzer": "0.
|
|
65
|
+
"@telorun/analyzer": "0.16.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@types/node": "^20.0.0",
|
|
69
|
-
"typescript": "^5.0.0"
|
|
69
|
+
"typescript": "^5.0.0",
|
|
70
|
+
"@telorun/sdk": "0.17.0"
|
|
70
71
|
},
|
|
71
72
|
"peerDependencies": {
|
|
72
|
-
"@telorun/sdk": "
|
|
73
|
+
"@telorun/sdk": "*"
|
|
73
74
|
},
|
|
74
75
|
"scripts": {
|
|
75
76
|
"build": "tsc -p tsconfig.lib.json"
|
package/src/manifest.ts
CHANGED
|
@@ -84,7 +84,13 @@ export async function create(
|
|
|
84
84
|
const resolvedUrl = new URL(manifest.source, ctx.moduleContext.source).toString();
|
|
85
85
|
let manifests;
|
|
86
86
|
try {
|
|
87
|
-
|
|
87
|
+
// `desugarImports` mirrors how the kernel loads: inline `imports:` maps
|
|
88
|
+
// are expanded into synthetic Telo.Import manifests before analysis, so
|
|
89
|
+
// a manifest using inline imports analyzes (alias resolution, !ref) the
|
|
90
|
+
// same way it runs. Without it, `!ref Alias.x` against an inline import
|
|
91
|
+
// would surface a false UNRESOLVED_REFERENCE here, and a duplicate alias
|
|
92
|
+
// across the two forms would go undetected.
|
|
93
|
+
const graph = await loader.loadGraph(resolvedUrl, { desugarImports: true });
|
|
88
94
|
if (graph.errors.length > 0) throw graph.errors[0].error;
|
|
89
95
|
manifests = flattenForAnalyzer(graph);
|
|
90
96
|
} catch (err) {
|