@glint/ember-tsc 1.8.2 → 1.8.4
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/lib/config/environment.d.ts +7 -6
- package/lib/config/environment.d.ts.map +1 -1
- package/lib/config/environment.js +8 -23
- package/lib/config/environment.js.map +1 -1
- package/lib/config/types.d.cts +8 -7
- package/lib/config/types.d.cts.map +1 -1
- package/lib/environment-ember-template-imports/-private/environment/index.d.ts.map +1 -1
- package/lib/environment-ember-template-imports/-private/environment/index.js +33 -28
- package/lib/environment-ember-template-imports/-private/environment/index.js.map +1 -1
- package/lib/environment-ember-template-imports/-private/environment/preprocess.d.ts.map +1 -1
- package/lib/environment-ember-template-imports/-private/environment/preprocess.js +18 -4
- package/lib/environment-ember-template-imports/-private/environment/preprocess.js.map +1 -1
- package/lib/environment-ember-template-imports/-private/environment/transform.d.ts.map +1 -1
- package/lib/environment-ember-template-imports/-private/environment/transform.js +39 -34
- package/lib/environment-ember-template-imports/-private/environment/transform.js.map +1 -1
- package/lib/transform/template/glimmer-ast-mapping-tree.d.ts +17 -1
- package/lib/transform/template/glimmer-ast-mapping-tree.d.ts.map +1 -1
- package/lib/transform/template/glimmer-ast-mapping-tree.js +10 -1
- package/lib/transform/template/glimmer-ast-mapping-tree.js.map +1 -1
- package/lib/transform/template/inlining/tagged-strings.js +16 -10
- package/lib/transform/template/inlining/tagged-strings.js.map +1 -1
- package/lib/transform/template/map-template-contents.d.ts +6 -1
- package/lib/transform/template/map-template-contents.d.ts.map +1 -1
- package/lib/transform/template/map-template-contents.js +4 -4
- package/lib/transform/template/map-template-contents.js.map +1 -1
- package/lib/transform/template/rewrite-module.js +6 -6
- package/lib/transform/template/rewrite-module.js.map +1 -1
- package/lib/transform/template/template-to-typescript.d.ts.map +1 -1
- package/lib/transform/template/template-to-typescript.js +39 -9
- package/lib/transform/template/template-to-typescript.js.map +1 -1
- package/lib/transform/template/transformed-module.d.ts.map +1 -1
- package/lib/transform/template/transformed-module.js +34 -0
- package/lib/transform/template/transformed-module.js.map +1 -1
- package/package.json +7 -3
- package/src/config/environment.ts +10 -29
- package/src/config/types.cts +8 -8
- package/src/environment-ember-template-imports/-private/environment/index.ts +33 -28
- package/src/environment-ember-template-imports/-private/environment/preprocess.ts +19 -4
- package/src/environment-ember-template-imports/-private/environment/transform.ts +39 -43
- package/src/transform/template/glimmer-ast-mapping-tree.ts +8 -0
- package/src/transform/template/inlining/tagged-strings.ts +21 -15
- package/src/transform/template/map-template-contents.ts +27 -3
- package/src/transform/template/rewrite-module.ts +6 -6
- package/src/transform/template/template-to-typescript.ts +49 -9
- package/src/transform/template/transformed-module.ts +42 -0
- package/types/-private/dsl/globals.d.ts +5 -10
- package/types/-private/intrinsics/comparison.d.ts +7 -14
- package/types/-private/intrinsics/element.d.ts +22 -2
- package/types/-private/intrinsics/get.d.ts +8 -4
- package/types/-private/intrinsics/truth-helpers.d.ts +26 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GlintEnvironmentConfig, GlintExtensionConfig, GlintExtensionsConfig,
|
|
1
|
+
import { GlintEnvironmentConfig, GlintExtensionConfig, GlintExtensionsConfig, GlintTemplateConfig, SourceKind } from '@glint/ember-tsc/config-types';
|
|
2
2
|
export declare const DEFAULT_EXTENSIONS: GlintExtensionsConfig;
|
|
3
3
|
/**
|
|
4
4
|
* A GlintEnvironment represents the _merged_ configurations of one or more
|
|
@@ -6,7 +6,7 @@ export declare const DEFAULT_EXTENSIONS: GlintExtensionsConfig;
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class GlintEnvironment {
|
|
8
8
|
readonly names: Array<string>;
|
|
9
|
-
private
|
|
9
|
+
private templateConfig;
|
|
10
10
|
private extensionsConfig;
|
|
11
11
|
constructor(names: Array<string>, config: GlintEnvironmentConfig);
|
|
12
12
|
static load(topLevelGlintConfigObject: any): GlintEnvironment;
|
|
@@ -17,10 +17,11 @@ export declare class GlintEnvironment {
|
|
|
17
17
|
*/
|
|
18
18
|
getConfigForExtension(extension: string): GlintExtensionConfig | undefined;
|
|
19
19
|
/**
|
|
20
|
-
* Returns
|
|
21
|
-
*
|
|
22
|
-
*
|
|
20
|
+
* Returns the configuration for the built-in `<template>` form — the types
|
|
21
|
+
* module its transformed output references, plus the keyword globals and
|
|
22
|
+
* special forms available inside it. Returns `undefined` if the active
|
|
23
|
+
* environment defines no template form.
|
|
23
24
|
*/
|
|
24
|
-
|
|
25
|
+
getTemplateConfig(): GlintTemplateConfig | undefined;
|
|
25
26
|
}
|
|
26
27
|
//# sourceMappingURL=environment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/config/environment.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,
|
|
1
|
+
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/config/environment.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,UAAU,EACX,MAAM,+BAA+B,CAAC;AAMvC,eAAO,MAAM,kBAAkB,EAAE,qBAGhC,CAAC;AAEF;;;GAGG;AACH,qBAAa,gBAAgB;aAKT,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC;IAJtC,OAAO,CAAC,cAAc,CAAkC;IACxD,OAAO,CAAC,gBAAgB,CAAwB;gBAG9B,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EACpC,MAAM,EAAE,sBAAsB;WAOlB,IAAI,CAAC,yBAAyB,EAAE,GAAG,GAAG,gBAAgB;IAiD7D,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS;IAKvD,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI7C;;OAEG;IACI,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,oBAAoB,GAAG,SAAS;IAIjF;;;;;OAKG;IACI,iBAAiB,IAAI,mBAAmB,GAAG,SAAS;CAG5D"}
|
|
@@ -12,7 +12,7 @@ export const DEFAULT_EXTENSIONS = {
|
|
|
12
12
|
export class GlintEnvironment {
|
|
13
13
|
constructor(names, config) {
|
|
14
14
|
this.names = names;
|
|
15
|
-
this.
|
|
15
|
+
this.templateConfig = config.template;
|
|
16
16
|
// when is this populated? what is config?
|
|
17
17
|
this.extensionsConfig = config.extensions ?? {};
|
|
18
18
|
}
|
|
@@ -40,25 +40,9 @@ export class GlintEnvironment {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
let tags = {};
|
|
44
43
|
let extensions = { ...DEFAULT_EXTENSIONS };
|
|
45
44
|
const envUserConfig = { additionalGlobals, additionalSpecialForms };
|
|
46
45
|
let config = emberTemplateImportsEnvironment(envUserConfig);
|
|
47
|
-
if (config.tags) {
|
|
48
|
-
for (let [importSource, specifiers] of Object.entries(config.tags)) {
|
|
49
|
-
tags[importSource] ?? (tags[importSource] = {});
|
|
50
|
-
for (let [importSpecifier, tagConfig] of Object.entries(specifiers)) {
|
|
51
|
-
if (importSpecifier in tags[importSource]) {
|
|
52
|
-
throw new SilentError('Multiple configured Glint environments attempted to define behavior for the tag `' +
|
|
53
|
-
importSpecifier +
|
|
54
|
-
"` in module '" +
|
|
55
|
-
importSource +
|
|
56
|
-
"'.");
|
|
57
|
-
}
|
|
58
|
-
tags[importSource][importSpecifier] = tagConfig;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
46
|
if (config.extensions) {
|
|
63
47
|
for (let [extension, extensionConfig] of Object.entries(config.extensions)) {
|
|
64
48
|
if (extension in extensions) {
|
|
@@ -69,7 +53,7 @@ export class GlintEnvironment {
|
|
|
69
53
|
extensions[extension] = extensionConfig;
|
|
70
54
|
}
|
|
71
55
|
}
|
|
72
|
-
return new GlintEnvironment(Object.keys(config), {
|
|
56
|
+
return new GlintEnvironment(Object.keys(config), { template: config.template, extensions });
|
|
73
57
|
}
|
|
74
58
|
getSourceKind(fileName) {
|
|
75
59
|
let extension = path.extname(fileName);
|
|
@@ -85,12 +69,13 @@ export class GlintEnvironment {
|
|
|
85
69
|
return this.extensionsConfig[extension];
|
|
86
70
|
}
|
|
87
71
|
/**
|
|
88
|
-
* Returns
|
|
89
|
-
*
|
|
90
|
-
*
|
|
72
|
+
* Returns the configuration for the built-in `<template>` form — the types
|
|
73
|
+
* module its transformed output references, plus the keyword globals and
|
|
74
|
+
* special forms available inside it. Returns `undefined` if the active
|
|
75
|
+
* environment defines no template form.
|
|
91
76
|
*/
|
|
92
|
-
|
|
93
|
-
return this.
|
|
77
|
+
getTemplateConfig() {
|
|
78
|
+
return this.templateConfig;
|
|
94
79
|
}
|
|
95
80
|
}
|
|
96
81
|
//# sourceMappingURL=environment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../src/config/environment.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,WAAW,MAAM,cAAc,CAAC;AAEvC,OAAO,+BAA+B,MAAM,qEAAqE,CAAC;AAElH,MAAM,CAAC,MAAM,kBAAkB,GAA0B;IACvD,KAAK,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;IACjC,KAAK,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE;CAChC,CAAC;AAEF;;;GAGG;AACH,MAAM,OAAO,gBAAgB;IAI3B,YACkB,KAAoB,EACpC,MAA8B;QADd,UAAK,GAAL,KAAK,CAAe;QAGpC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../src/config/environment.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,WAAW,MAAM,cAAc,CAAC;AAEvC,OAAO,+BAA+B,MAAM,qEAAqE,CAAC;AAElH,MAAM,CAAC,MAAM,kBA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GlintConfigInput = {
|
|
|
4
4
|
environment: string | Array<string> | Record<string, unknown>;
|
|
5
5
|
};
|
|
6
6
|
export type GlintEnvironmentConfig = {
|
|
7
|
-
|
|
7
|
+
template?: GlintTemplateConfig;
|
|
8
8
|
extensions?: GlintExtensionsConfig;
|
|
9
9
|
};
|
|
10
10
|
export type GlintExtensionPreprocess<T> = (source: string, filePath: string) => {
|
|
@@ -46,15 +46,16 @@ export type GlintExtensionConfig<PreprocessData = any> = {
|
|
|
46
46
|
export type GlintExtensionsConfig = {
|
|
47
47
|
[extension: string]: GlintExtensionConfig;
|
|
48
48
|
};
|
|
49
|
-
|
|
49
|
+
/**
|
|
50
|
+
* Configuration for the single, built-in template form (the `<template>` tag in
|
|
51
|
+
* `.gts`/`.gjs` files). Glint no longer supports user-authored or
|
|
52
|
+
* environment-registered template tags, so this is internal compiler
|
|
53
|
+
* configuration rather than a user-facing extension point.
|
|
54
|
+
*/
|
|
55
|
+
export type GlintTemplateConfig = {
|
|
50
56
|
typesModule: string;
|
|
51
57
|
globals?: Array<string>;
|
|
52
58
|
specialForms?: GlintSpecialFormConfig;
|
|
53
59
|
};
|
|
54
|
-
export type GlintTagsConfig = {
|
|
55
|
-
[importSource: string]: {
|
|
56
|
-
[importSpecifier: string]: GlintTagConfig;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
60
|
export {};
|
|
60
61
|
//# sourceMappingURL=types.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../../src/config/types.cts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAKjC,KAAK,KAAK,GAAG,OAAO,EAAE,CAAC;AAEvB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,WAAW,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/D,CAAC;AAEF,MAAM,MAAM,sB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AE7B,MAAM,MAAM,gBAAgB,GACxB,IAAI,GACJ,QAAQ,GACR,OAAO,GACP,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,KAAK,GACL,KAAK,GACL,IAAI,GACJ,IAAI,GACJ,GAAG,CAAC;AAER,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,CAAC,EAAE;QAAE,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAAA;KAAE,CAAC;IACjD,OAAO,CAAC,EAAE;QACR,CAAC,IAAI,EAAE,MAAM,GAAG;YACd,CAAC,UAAU,EAAE,MAAM,GAAG,gBAAgB,CAAC;SACxC,CAAC;KACH,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,gBAAgB,CAAC;AAC3D,MAAM,MAAM,oBAAoB,CAAC,cAAc,GAAG,GAAG,IAAI;IACvD,IAAI,EAAE,UAAU,CAAC;IACjB,UAAU,CAAC,EAAE,wBAAwB,CAAC,cAAc,CAAC,CAAC;IACtD,SAAS,CAAC,EAAE,uBAAuB,CAAC,cAAc,CAAC,CAAC;CACrD,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,CAAC,SAAS,EAAE,MAAM,GAAG,oBAAoB,CAAC;CAC3C,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB,YAAY,CAAC,EAAE,sBAAsB,CAAC;CACvC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/environment-ember-template-imports/-private/environment/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAA0B,MAAM,+BAA+B,CAAC;AAqC/F,MAAM,CAAC,OAAO,UAAU,+BAA+B,CACrD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,sBAAsB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/environment-ember-template-imports/-private/environment/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAA0B,MAAM,+BAA+B,CAAC;AAqC/F,MAAM,CAAC,OAAO,UAAU,+BAA+B,CACrD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,sBAAsB,CA6GxB"}
|
|
@@ -89,37 +89,42 @@ export default function emberTemplateImportsEnvironment(options) {
|
|
|
89
89
|
'or',
|
|
90
90
|
];
|
|
91
91
|
return {
|
|
92
|
-
|
|
93
|
-
'@glint/ember-tsc
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
92
|
+
template: {
|
|
93
|
+
typesModule: '@glint/ember-tsc/-private/dsl',
|
|
94
|
+
specialForms: {
|
|
95
|
+
globals: {
|
|
96
|
+
if: 'if',
|
|
97
|
+
unless: 'if-not',
|
|
98
|
+
yield: 'yield',
|
|
99
|
+
component: 'bind-invokable',
|
|
100
|
+
modifier: 'bind-invokable',
|
|
101
|
+
helper: 'bind-invokable',
|
|
102
|
+
// The RFC 561 `eq`/`neq` keywords are exactly `===`/`!==` at runtime,
|
|
103
|
+
// so we emit them as the native operators. Beyond matching runtime
|
|
104
|
+
// semantics, this lets TypeScript's control-flow analysis narrow
|
|
105
|
+
// discriminated unions — e.g. `{{#if (eq foo.kind "a")}}` narrows
|
|
106
|
+
// `foo` to the matching variant inside the block, which a
|
|
107
|
+
// boolean-returning helper type cannot do.
|
|
108
|
+
...(hasEmber71BuiltIns()
|
|
109
|
+
? { eq: '===', neq: '!==' }
|
|
110
|
+
: {}),
|
|
111
|
+
...additionalGlobalSpecialForms,
|
|
112
|
+
},
|
|
113
|
+
imports: {
|
|
114
|
+
'@ember/helper': {
|
|
115
|
+
array: 'array-literal',
|
|
116
|
+
hash: 'object-literal',
|
|
117
|
+
...additionalSpecialForms.imports?.['@ember/helper'],
|
|
114
118
|
},
|
|
115
|
-
|
|
116
|
-
...globalsForEmber,
|
|
117
|
-
...(hasEmber71BuiltIns() ? globalsForEmber71 : []),
|
|
118
|
-
...Object.keys(additionalGlobalSpecialForms),
|
|
119
|
-
...additionalGlobals,
|
|
120
|
-
],
|
|
119
|
+
...additionalSpecialForms.imports,
|
|
121
120
|
},
|
|
122
121
|
},
|
|
122
|
+
globals: [
|
|
123
|
+
...globalsForEmber,
|
|
124
|
+
...(hasEmber71BuiltIns() ? globalsForEmber71 : []),
|
|
125
|
+
...Object.keys(additionalGlobalSpecialForms),
|
|
126
|
+
...additionalGlobals,
|
|
127
|
+
],
|
|
123
128
|
},
|
|
124
129
|
extensions: {
|
|
125
130
|
'.gts': {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/environment-ember-template-imports/-private/environment/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAS,kBAAkB;IACzB,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChD,MAAM,GAAG,GAAG,QAAQ,CAAC,2BAA2B,CAA0B,CAAC;QAC3E,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAC;QAClD,MAAM,CAA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AAiB,GAAG;QACxB,KAAK;QACL,OAAO;QACP,SAAS;QACT,IAAI;QACJ,IAAI;QACJ,IAAI;QACJ,KAAK;QACL,MAAM;QACN,IAAI;QACJ,KAAK;QACL,KAAK;QACL,KAAK;QACL,IAAI;QACJ,IAAI;KACL,CAAC;IAEF,OAAO;QACL,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/environment-ember-template-imports/-private/environment/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAS,kBAAkB;IACzB,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChD,MAAM,GAAG,GAAG,QAAQ,CAAC,2BAA2B,CAA0B,CAAC;QAC3E,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAC;QAClD,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACvD,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC/B,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC/B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC;QACrE,OAAO,KAAK,GAAG,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC;IAClD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAA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kEAAkE;oBAClE,0DAA0D;oBAC1D,2CAA2C;oBAC3C,GAAG,CAAC,kBAAkB,EAAE;wBACtB,CAAC,CAAE,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAA+C;wBACzE,CAAC,CAAC,EAAE,CAAC;oBACP,GAAG,4BAA4B;iBAChC;gBACD,OAAO,EAAE;oBACP,eAAe,EAAE;wBACf,KAAK,EAAE,eAAe;wBACtB,IAAI,EAAE,gBAAgB;wBACtB,GAAG,sBAAsB,CAAC,OAAO,EAAE,CAAC,eAAe,CAAC;qBACrD;oBACD,GAAG,sBAAsB,CAAC,OAAO;iBAClC;aACF;YACD,OAAO,EAAE;gBACP,GAAG,eAAe;gBAClB,GAAG,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC;gBAClD,GAAG,MAAM,CAAC,IAAI,CAAC,4BAA4B,CAAC;gBAC5C,GAAG,iBAAiB;aACrB;SACF;QACD,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,cAAc;gBACpB,UAAU;gBACV,SAAS;aACV;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,gBAAgB;gBACtB,UAAU;gBACV,SAAS;aACV;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preprocess.d.ts","sourceRoot":"","sources":["../../../../src/environment-ember-template-imports/-private/environment/preprocess.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAc,cAAc,EAAoB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"preprocess.d.ts","sourceRoot":"","sources":["../../../../src/environment-ember-template-imports/-private/environment/preprocess.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAc,cAAc,EAAoB,MAAM,aAAa,CAAC;AAc3E,eAAO,MAAM,UAAU,EAAE,wBAAwB,CAAC,cAAc,CAmD/D,CAAC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { GLOBAL_TAG } from './common.js';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
// A `<template>` becomes a tagged-template expression `___T`...``. In a class
|
|
3
|
+
// body a bare expression is not a valid member, so there it is wrapped in a
|
|
4
|
+
// computed-property name `[___T`...`]` (rewritten to a static block during
|
|
5
|
+
// transform). In every other position it is emitted bare: that keeps a
|
|
6
|
+
// user-authored array such as `[<template/>]` a single array literal, so it
|
|
7
|
+
// can never be confused with — and collapsed into — the wrapper.
|
|
8
|
+
const TAG_OPEN = `${GLOBAL_TAG}\``;
|
|
9
|
+
const TAG_CLOSE = '`';
|
|
4
10
|
import { Preprocessor } from 'content-tag';
|
|
5
11
|
const p = new Preprocessor();
|
|
6
12
|
export const preprocess = (source, path) => {
|
|
@@ -14,13 +20,21 @@ export const preprocess = (source, path) => {
|
|
|
14
20
|
let endTagOffset = template.endRange.startUtf16Codepoint;
|
|
15
21
|
let endTagEnd = template.endRange.endUtf16Codepoint;
|
|
16
22
|
contents += source.slice(sourceOffset, startTagOffset);
|
|
23
|
+
let isClassMember = template.type === 'class-member';
|
|
24
|
+
if (isClassMember)
|
|
25
|
+
contents += '[';
|
|
26
|
+
// `transformedStart`/`transformedEnd` bracket the tag literal itself
|
|
27
|
+
// (`___T`...``), excluding any class-member `[ ]`, so they line up exactly
|
|
28
|
+
// with the tagged-template node's `getStart()`/`getEnd()` during transform.
|
|
17
29
|
let transformedStart = contents.length;
|
|
18
|
-
contents +=
|
|
30
|
+
contents += TAG_OPEN;
|
|
19
31
|
let templateContent = source.slice(startTagEnd, endTagOffset);
|
|
20
32
|
let escapedContent = templateContent.replaceAll('${{', '\\${{').replaceAll('`', '\\`');
|
|
21
33
|
contents += escapedContent;
|
|
22
|
-
contents +=
|
|
34
|
+
contents += TAG_CLOSE;
|
|
23
35
|
let transformedEnd = contents.length;
|
|
36
|
+
if (isClassMember)
|
|
37
|
+
contents += ']';
|
|
24
38
|
sourceOffset = endTagEnd;
|
|
25
39
|
templateLocations.push({
|
|
26
40
|
startTagOffset,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preprocess.js","sourceRoot":"","sources":["../../../../src/environment-ember-template-imports/-private/environment/preprocess.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAoC,MAAM,aAAa,CAAC;AAE3E,MAAM,
|
|
1
|
+
{"version":3,"file":"preprocess.js","sourceRoot":"","sources":["../../../../src/environment-ember-template-imports/-private/environment/preprocess.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAoC,MAAM,aAAa,CAAC;AAE3E,8EAA8E;AAC9E,4EAA4E;AAC5E,2EAA2E;AAC3E,uEAAuE;AACvE,4EAA4E;AAC5E,iEAAiE;AACjE,MAAM,QAAQ,GAAG,GAAG,UAAU,IAAI,CAAC;AACnC,MAAM,SAAS,GAAG,GAAG,CAAC;AAEtB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,MAAM,CAAC,GAAG,IAAI,YAAY,EAAE,CAAC;AAE7B,MAAM,CAAC,MAAM,UAAU,GAA6C,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;IACnF,IAAI,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IAEpD,IAAI,iBAAiB,GAA4B,EAAE,CAAC;IACpD,IAAI,QAAQ,GAAG,EAAE,CAAC;IAClB,IAAI,YAAY,GAAG,CAAC,CAAC;IAErB,KAAK,IAAI,QAAQ,IAAI,SAAS,EAAE,CAAC;QAC/B,IAAI,cAAc,GAAG,QAAQ,CAAC,UAAU,CAAC,mBAAmB,CAAC;QAC7D,IAAI,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC;QACxD,IAAI,YAA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../../../../src/environment-ember-template-imports/-private/environment/transform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,EAAc,cAAc,EAAoB,MAAM,aAAa,CAAC;AAI3E,eAAO,MAAM,SAAS,EAAE,uBAAuB,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../../src/environment-ember-template-imports/-private/environment/transform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,EAAc,cAAc,EAAoB,MAAM,aAAa,CAAC;AAI3E,eAAO,MAAM,SAAS,EAAE,uBAAuB,CAAC,cAAc,CAkE7D,CAAC"}
|
|
@@ -4,16 +4,46 @@ export const transform = (data, { ts, context, setEmitMetadata }) => {
|
|
|
4
4
|
let { templateLocations } = data;
|
|
5
5
|
if (!templateLocations.length)
|
|
6
6
|
return (sf) => sf;
|
|
7
|
+
// TypeScript 6 changed `getStart()` to require the source file when the node's
|
|
8
|
+
// parent chain is not yet intact. During transformation, `repairAncestry` runs
|
|
9
|
+
// *after* `transformNode`, so parent pointers are not set up at the point where
|
|
10
|
+
// `findTemplateLocation` calls `node.getStart()`. We capture the source file as
|
|
11
|
+
// we enter it so we can pass it explicitly.
|
|
12
|
+
let currentSourceFile;
|
|
7
13
|
return function visit(node) {
|
|
14
|
+
if (ts.isSourceFile(node))
|
|
15
|
+
currentSourceFile = node;
|
|
8
16
|
let visitedNode = ts.visitEachChild(node, visit, context);
|
|
9
17
|
let transformedNode = transformNode(visitedNode);
|
|
10
18
|
return repairAncestry(transformedNode);
|
|
11
19
|
};
|
|
12
20
|
function transformNode(node) {
|
|
13
21
|
if (ts.isSourceFile(node)) {
|
|
14
|
-
//
|
|
22
|
+
// Prepend a synthetic `import { hbs as ___T } from '...'` so the emitted
|
|
23
|
+
// `___T`...`` literals have a tag binding. Downstream `resolveTagInfo`
|
|
24
|
+
// recognizes them as the built-in `<template>` form precisely because
|
|
25
|
+
// this import is compiler-synthesized (it has no source position); their
|
|
26
|
+
// types come from the environment's `getTemplateConfig()`. This is not —
|
|
27
|
+
// and must not be confused with — the unsupported
|
|
28
|
+
// `ember-template-imports` `hbs`.
|
|
15
29
|
return addTagImport(f, node);
|
|
16
30
|
}
|
|
31
|
+
else if (isETITemplateLiteral(ts, node)) {
|
|
32
|
+
// Correlate every glint tag literal (`___T`...``) back to its original
|
|
33
|
+
// `<template>` source span. This is the only consumer of the location
|
|
34
|
+
// table; it is keyed on the literal's exact start offset, so it matches
|
|
35
|
+
// each real template once and never a surrounding array or expression.
|
|
36
|
+
let location = findTemplateLocation(templateLocations, node, currentSourceFile);
|
|
37
|
+
setEmitMetadata(node, {
|
|
38
|
+
templateLocation: {
|
|
39
|
+
start: location.startTagOffset,
|
|
40
|
+
end: location.endTagOffset + location.endTagLength,
|
|
41
|
+
contentStart: location.startTagOffset + location.startTagLength,
|
|
42
|
+
contentEnd: location.endTagOffset,
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
return node;
|
|
46
|
+
}
|
|
17
47
|
else if (isETIDefaultTemplate(ts, node)) {
|
|
18
48
|
// Annotate that this template is a default export
|
|
19
49
|
setEmitMetadata(node.expression, { prepend: 'export default ' });
|
|
@@ -24,34 +54,12 @@ export const transform = (data, { ts, context, setEmitMetadata }) => {
|
|
|
24
54
|
setEmitMetadata(node.expression.expression, { prepend: 'export default ' });
|
|
25
55
|
return node;
|
|
26
56
|
}
|
|
27
|
-
else if (isETITemplateExpression(ts, node)) {
|
|
28
|
-
// Convert '[__T`foo`]' as an expression to just '__T`foo`'
|
|
29
|
-
let location = findTemplateLocation(templateLocations, node);
|
|
30
|
-
let template = node.elements[0];
|
|
31
|
-
setEmitMetadata(template, {
|
|
32
|
-
templateLocation: {
|
|
33
|
-
start: location.startTagOffset,
|
|
34
|
-
end: location.endTagOffset + location.endTagLength,
|
|
35
|
-
contentStart: location.startTagOffset + location.startTagLength,
|
|
36
|
-
contentEnd: location.endTagOffset,
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
return template;
|
|
40
|
-
}
|
|
41
57
|
else if (isETITemplateProperty(ts, node)) {
|
|
42
|
-
// Convert '[
|
|
43
|
-
|
|
58
|
+
// Convert '[___T`foo`]' in a class body to 'static { ___T`foo` }'. The
|
|
59
|
+
// tag literal already carries its `templateLocation` from the branch
|
|
60
|
+
// above; here we only add the static-block framing.
|
|
44
61
|
let template = node.name.expression;
|
|
45
|
-
setEmitMetadata(template, {
|
|
46
|
-
prepend: 'static { ',
|
|
47
|
-
append: ' }',
|
|
48
|
-
templateLocation: {
|
|
49
|
-
start: location.startTagOffset,
|
|
50
|
-
end: location.endTagOffset + location.endTagLength,
|
|
51
|
-
contentStart: location.startTagOffset + location.startTagLength,
|
|
52
|
-
contentEnd: location.endTagOffset,
|
|
53
|
-
},
|
|
54
|
-
});
|
|
62
|
+
setEmitMetadata(template, { prepend: 'static { ', append: ' }' });
|
|
55
63
|
return buildStaticBlockForTemplate(f, template);
|
|
56
64
|
}
|
|
57
65
|
return node;
|
|
@@ -110,19 +118,16 @@ function isETITemplateProperty(ts, node) {
|
|
|
110
118
|
ts.isComputedPropertyName(node.name) &&
|
|
111
119
|
isETITemplateLiteral(ts, node.name.expression));
|
|
112
120
|
}
|
|
113
|
-
function isETITemplateExpression(ts, node) {
|
|
114
|
-
return (ts.isArrayLiteralExpression(node) &&
|
|
115
|
-
node.elements.length === 1 &&
|
|
116
|
-
isETITemplateLiteral(ts, node.elements[0]));
|
|
117
|
-
}
|
|
118
121
|
function isETITemplateLiteral(ts, node) {
|
|
119
122
|
return (ts.isTaggedTemplateExpression(node) &&
|
|
120
123
|
ts.isNoSubstitutionTemplateLiteral(node.template) &&
|
|
121
124
|
ts.isIdentifier(node.tag) &&
|
|
122
125
|
node.tag.text === GLOBAL_TAG);
|
|
123
126
|
}
|
|
124
|
-
function findTemplateLocation(locations, node) {
|
|
125
|
-
|
|
127
|
+
function findTemplateLocation(locations, node, sourceFile) {
|
|
128
|
+
// Every emitted tag literal corresponds to exactly one recorded location, so
|
|
129
|
+
// a miss here is a genuine construction bug, not an expected "skip this node".
|
|
130
|
+
let location = locations.find((loc) => loc.transformedStart === node.getStart(sourceFile));
|
|
126
131
|
if (!location) {
|
|
127
132
|
throw new Error('Internal error: missing location info for template');
|
|
128
133
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../../src/environment-ember-template-imports/-private/environment/transform.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAoC,MAAM,aAAa,CAAC;AAI3E,MAAM,CAAC,MAAM,SAAS,GAA4C,CAChE,IAAI,EACJ,EAAE,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,EAChC,EAAE;IACF,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC;IACnB,IAAI,EAAE,iBAAiB,EAAE,GAAG,IAAI,CAAC;IACjC,IAAI,CAAC,iBAAiB,CAAC,MAAM;QAAE,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC;IAEjD,OAAO,SAAS,KAAK,CAAC,IAAa;QACjC,IAAI,WAAW,GAAG,EAAE,CAAC,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QAC1D,IAAI,eAAe,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;QACjD,OAAO,cAAc,CAAC,eAAe,CAAC,CAAC;IACzC,CAAC,CAAC;IAEF,SAAS,aAAa,CAAC,IAAa;QAClC,IAAI,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1B,
|
|
1
|
+
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../../src/environment-ember-template-imports/-private/environment/transform.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAoC,MAAM,aAAa,CAAC;AAI3E,MAAM,CAAC,MAAM,SAAS,GAA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EAAE,IAAa;IACrD,OAAO,CACL,EAAE,CAAC,qBAAqB,CAAC,IAAI,CAAC;QAC9B,EAAE,CAAC,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC;QACpC,oBAAoB,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAC/C,CAAC;AACJ,CAAC;AAED,SAAS,oBAAoB,CAAC,EAAS,EAAE,IAAa;IACpD,OAAO,CACL,EAAE,CAAC,0BAA0B,CAAC,IAAI,CAAC;QACnC,EAAE,CAAC,+BAA+B,CAAC,IAAI,CAAC,QAAQ,CAAC;QACjD,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC;QACzB,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,UAAU,CAC7B,CAAC;AACJ,CAAC;AAED,SAAS,oBAAoB,CAC3B,SAAkC,EAClC,IAAwB,EACxB,UAA0B;IAE1B,6EAA6E;IAC7E,+EAA+E;IAC/E,IAAI,QAAQ,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,gBAAgB,KAAK,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;IAE3F,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACxE,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,2BAA2B,CAClC,CAAiB,EACjB,QAAqC;IAErC,OAAO,CAAC,CAAC,iCAAiC,CACxC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAC,CAAC,CACvD,CAAC;AACJ,CAAC"}
|
|
@@ -50,8 +50,24 @@ export default class GlimmerASTMappingTree {
|
|
|
50
50
|
children: Array<GlimmerASTMappingTree>;
|
|
51
51
|
sourceNode: MappingSource;
|
|
52
52
|
codeInformation?: CodeInformation | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* When set, `toVolarMappings` emits an additional verification-only mapping
|
|
55
|
+
* covering this node's entire generated span (even when it differs in length
|
|
56
|
+
* from the source span). This lets diagnostics that TS anchors on synthetic
|
|
57
|
+
* generated boilerplate — e.g. the `__glintDSL__.resolve(foo)` callee, where
|
|
58
|
+
* a missing-positional-arg error lands — map back to the template (#1168).
|
|
59
|
+
*/
|
|
60
|
+
wideVerification: boolean;
|
|
53
61
|
parent: GlimmerASTMappingTree | null;
|
|
54
|
-
constructor(transformedRange: Range, originalRange: Range, children: Array<GlimmerASTMappingTree> | undefined, sourceNode: MappingSource, codeInformation?: CodeInformation | undefined
|
|
62
|
+
constructor(transformedRange: Range, originalRange: Range, children: Array<GlimmerASTMappingTree> | undefined, sourceNode: MappingSource, codeInformation?: CodeInformation | undefined,
|
|
63
|
+
/**
|
|
64
|
+
* When set, `toVolarMappings` emits an additional verification-only mapping
|
|
65
|
+
* covering this node's entire generated span (even when it differs in length
|
|
66
|
+
* from the source span). This lets diagnostics that TS anchors on synthetic
|
|
67
|
+
* generated boilerplate — e.g. the `__glintDSL__.resolve(foo)` callee, where
|
|
68
|
+
* a missing-positional-arg error lands — map back to the template (#1168).
|
|
69
|
+
*/
|
|
70
|
+
wideVerification?: boolean);
|
|
55
71
|
/**
|
|
56
72
|
* Returns the mapping corresponding to the smallest span in the transformed source
|
|
57
73
|
* that contains the given range, or `null` if that range doesn't fall within
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glimmer-ast-mapping-tree.d.ts","sourceRoot":"","sources":["../../../src/transform/template/glimmer-ast-mapping-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC,IAAI,GAAG,iBAAiB,GAAG,WAAW,GAAG,UAAU,GAAG,UAAU,CAAC;AAEjG;;;;;GAKG;AACH,qBAAa,UAAU;IACrB,SAAgB,IAAI,gBAAgB;CACrC;AAED;;;;;;GAMG;AACH,qBAAa,WAAW;IACtB,SAAgB,IAAI,iBAAiB;CACtC;AAED;;;;GAIG;AACH,qBAAa,iBAAiB;IAC5B,SAAgB,IAAI,uBAAuB;CAC5C;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,OAAO,qBAAqB;IAI/B,gBAAgB,EAAE,KAAK;IACvB,aAAa,EAAE,KAAK;IACpB,QAAQ,EAAE,KAAK,CAAC,qBAAqB,CAAC;IACtC,UAAU,EAAE,aAAa;IACzB,eAAe,CAAC,EAAE,eAAe;
|
|
1
|
+
{"version":3,"file":"glimmer-ast-mapping-tree.d.ts","sourceRoot":"","sources":["../../../src/transform/template/glimmer-ast-mapping-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC,IAAI,GAAG,iBAAiB,GAAG,WAAW,GAAG,UAAU,GAAG,UAAU,CAAC;AAEjG;;;;;GAKG;AACH,qBAAa,UAAU;IACrB,SAAgB,IAAI,gBAAgB;CACrC;AAED;;;;;;GAMG;AACH,qBAAa,WAAW;IACtB,SAAgB,IAAI,iBAAiB;CACtC;AAED;;;;GAIG;AACH,qBAAa,iBAAiB;IAC5B,SAAgB,IAAI,uBAAuB;CAC5C;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,OAAO,qBAAqB;IAI/B,gBAAgB,EAAE,KAAK;IACvB,aAAa,EAAE,KAAK;IACpB,QAAQ,EAAE,KAAK,CAAC,qBAAqB,CAAC;IACtC,UAAU,EAAE,aAAa;IACzB,eAAe,CAAC,EAAE,eAAe;IACxC;;;;;;OAMG;IACI,gBAAgB,EAAE,OAAO;IAf3B,MAAM,EAAE,qBAAqB,GAAG,IAAI,CAAQ;gBAG1C,gBAAgB,EAAE,KAAK,EACvB,aAAa,EAAE,KAAK,EACpB,QAAQ,EAAE,KAAK,CAAC,qBAAqB,CAAC,YAAK,EAC3C,UAAU,EAAE,aAAa,EACzB,eAAe,CAAC,EAAE,eAAe,YAAA;IACxC;;;;;;OAMG;IACI,gBAAgB,GAAE,OAAe;IAK1C;;;;OAIG;IACI,mCAAmC,CAAC,KAAK,EAAE,KAAK,GAAG,qBAAqB,GAAG,IAAI;IAetF;;;;OAIG;IACI,gCAAgC,CAAC,KAAK,EAAE,KAAK,GAAG,qBAAqB,GAAG,IAAI;IAenF;;OAEG;IACI,6BAA6B,CAAC,KAAK,EAAE,KAAK,GAAG,qBAAqB,EAAE;IAkBpE,aAAa,CAAC,OAAO,EAAE;QAC5B,aAAa,EAAE,MAAM,CAAC;QACtB,cAAc,EAAE,MAAM,CAAC;QACvB,gBAAgB,EAAE,MAAM,CAAC;QACzB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,GAAG,MAAM;IAsCV,OAAO,CAAC,cAAc;CAGvB"}
|
|
@@ -46,12 +46,21 @@ export class TemplateEmbedding {
|
|
|
46
46
|
* output.
|
|
47
47
|
*/
|
|
48
48
|
export default class GlimmerASTMappingTree {
|
|
49
|
-
constructor(transformedRange, originalRange, children = [], sourceNode, codeInformation
|
|
49
|
+
constructor(transformedRange, originalRange, children = [], sourceNode, codeInformation,
|
|
50
|
+
/**
|
|
51
|
+
* When set, `toVolarMappings` emits an additional verification-only mapping
|
|
52
|
+
* covering this node's entire generated span (even when it differs in length
|
|
53
|
+
* from the source span). This lets diagnostics that TS anchors on synthetic
|
|
54
|
+
* generated boilerplate — e.g. the `__glintDSL__.resolve(foo)` callee, where
|
|
55
|
+
* a missing-positional-arg error lands — map back to the template (#1168).
|
|
56
|
+
*/
|
|
57
|
+
wideVerification = false) {
|
|
50
58
|
this.transformedRange = transformedRange;
|
|
51
59
|
this.originalRange = originalRange;
|
|
52
60
|
this.children = children;
|
|
53
61
|
this.sourceNode = sourceNode;
|
|
54
62
|
this.codeInformation = codeInformation;
|
|
63
|
+
this.wideVerification = wideVerification;
|
|
55
64
|
this.parent = null;
|
|
56
65
|
children.forEach((child) => (child.parent = this));
|
|
57
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glimmer-ast-mapping-tree.js","sourceRoot":"","sources":["../../../src/transform/template/glimmer-ast-mapping-tree.ts"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,MAAM,OAAO,UAAU;IAAvB;QACkB,SAAI,GAAG,YAAY,CAAC;IACtC,CAAC;CAAA;AAED;;;;;;GAMG;AACH,MAAM,OAAO,WAAW;IAAxB;QACkB,SAAI,GAAG,aAAa,CAAC;IACvC,CAAC;CAAA;AAED;;;;GAIG;AACH,MAAM,OAAO,iBAAiB;IAA9B;QACkB,SAAI,GAAG,mBAAmB,CAAC;IAC7C,CAAC;CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,OAAO,qBAAqB;IAGxC,YACS,gBAAuB,EACvB,aAAoB,EACpB,WAAyC,EAAE,EAC3C,UAAyB,EACzB,eAAiC;
|
|
1
|
+
{"version":3,"file":"glimmer-ast-mapping-tree.js","sourceRoot":"","sources":["../../../src/transform/template/glimmer-ast-mapping-tree.ts"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,MAAM,OAAO,UAAU;IAAvB;QACkB,SAAI,GAAG,YAAY,CAAC;IACtC,CAAC;CAAA;AAED;;;;;;GAMG;AACH,MAAM,OAAO,WAAW;IAAxB;QACkB,SAAI,GAAG,aAA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xD,CAAC;IAEO,cAAc,CAAC,MAAc,EAAE,KAAY;QACjD,OAAO,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACjG,CAAC;CACF"}
|
|
@@ -41,10 +41,10 @@ export function calculateTaggedTemplateSpans(ts, node, meta, script, environment
|
|
|
41
41
|
prefix: script.contents.slice(templateLocation.start, templateLocation.contentStart),
|
|
42
42
|
suffix: script.contents.slice(templateLocation.contentEnd, templateLocation.end),
|
|
43
43
|
};
|
|
44
|
+
// The `<template>` form's backing import is always compiler-synthesized
|
|
45
|
+
// (see `resolveTagInfo`), so there is never a user-written tag binding to
|
|
46
|
+
// reference in a preamble.
|
|
44
47
|
let preamble = [];
|
|
45
|
-
if (!info.importedBinding.synthetic) {
|
|
46
|
-
preamble.push(`${tag.text};`);
|
|
47
|
-
}
|
|
48
48
|
let specialForms = collectSpecialForms(importedBindings, info.tagConfig.specialForms ?? {});
|
|
49
49
|
// A lexical import should win over the environment's global keyword list,
|
|
50
50
|
// because the import is the canonical reference to the value (and is
|
|
@@ -127,14 +127,20 @@ function resolveTagInfo(importedBindings, tag, environment) {
|
|
|
127
127
|
if (!importedBinding) {
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
130
|
+
// Only the compiler-generated `<template>` form is processed. Its backing
|
|
131
|
+
// import is synthesized by the gts/gjs transform (see `addTagImport` in
|
|
132
|
+
// `environment-ember-template-imports/-private/environment/transform.ts`) and
|
|
133
|
+
// therefore has no position in the original source. User-authored tagged
|
|
134
|
+
// templates (`hbs`...``) have a real import and are deliberately ignored —
|
|
135
|
+
// Glint no longer supports tagged-string templates.
|
|
136
|
+
if (!importedBinding.synthetic) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
let tagConfig = environment.getTemplateConfig();
|
|
140
|
+
if (!tagConfig) {
|
|
141
|
+
return;
|
|
137
142
|
}
|
|
143
|
+
return { importedBinding, tagConfig };
|
|
138
144
|
}
|
|
139
145
|
function collectImportedBindings(ts, sourceFile) {
|
|
140
146
|
let result = {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tagged-strings.js","sourceRoot":"","sources":["../../../../src/transform/template/inlining/tagged-strings.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,MAAM,EAAS,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,OAAO,EAAyB,iBAAiB,EAAyB,MAAM,YAAY,CAAC;AAE7F,MAAM,UAAU,4BAA4B,CAC1C,EAAS,EACT,IAAiC,EACjC,IAAmC,EACnC,MAAkB,EAClB,WAA6B;IAE7B,IAAI,UAAU,GAAqB,EAAE,CAAC;IACtC,IAAI,MAAM,GAA0B,EAAE,CAAC;IACvC,IAAI,YAAY,GAAiC,EAAE,CAAC;IACpD,IAAI,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;IAEnB,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;QAC1B,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;IAC9C,CAAC;IAED,IAAI,gBAAgB,GAAG,uBAAuB,CAAC,EAAE,EAAE,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC;IACxE,IAAI,IAAI,GAAG,cAAc,CAAC,gBAAgB,EAAE,GAAG,EAAE,WAAW,CAAC,CAAC;IAC9D,IAAI,IAAI,EAAE,CAAC;QACT,MAAM,CACJ,EAAE,CAAC,+BAA+B,CAAC,IAAI,CAAC,QAAQ,CAAC,EACjD,4CAA4C,CAC7C,CAAC;QAEF,IAAI,EAAE,WAAW,EA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