@glint/ember-tsc 1.0.3-unstable.cca1f7b → 1.0.3

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 The Ember TypeScript team and contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glint/ember-tsc",
3
- "version": "1.0.3-unstable.cca1f7b",
3
+ "version": "1.0.3",
4
4
  "repository": "typed-ember/glint",
5
5
  "description": "A CLI for performing typechecking on Glimmer templates",
6
6
  "license": "MIT",
@@ -16,56 +16,26 @@
16
16
  "default": "./lib/config/types.cjs"
17
17
  },
18
18
  "./bin/*": "./bin/*.js",
19
- "./globals": {
20
- "types": "./types/globals/index.d.ts"
21
- },
19
+ "./globals": "./types/globals/index.d.ts",
22
20
  "./-private/dsl": {
23
21
  "types": "./types/-private/dsl/index.d.ts",
24
22
  "default": "./types/-private/dsl/index.d.ts"
25
23
  },
26
24
  "./types": "./types/-private/dsl/integration-declarations.d.ts",
27
- "./-private/dsl/globals": {
28
- "types": "./types/-private/dsl/globals.d.ts"
29
- },
30
- "./-private/intrinsics/action": {
31
- "types": "./types/-private/intrinsics/action.d.ts"
32
- },
33
- "./-private/intrinsics/concat": {
34
- "types": "./types/-private/intrinsics/concat.d.ts"
35
- },
36
- "./-private/intrinsics/each": {
37
- "types": "./types/-private/intrinsics/each.d.ts"
38
- },
39
- "./-private/intrinsics/each-in": {
40
- "types": "./types/-private/intrinsics/each-in.d.ts"
41
- },
42
- "./-private/intrinsics/fn": {
43
- "types": "./types/-private/intrinsics/fn.d.ts"
44
- },
45
- "./-private/intrinsics/get": {
46
- "types": "./types/-private/intrinsics/get.d.ts"
47
- },
48
- "./-private/intrinsics/log": {
49
- "types": "./types/-private/intrinsics/log.d.ts"
50
- },
51
- "./-private/intrinsics/mount": {
52
- "types": "./types/-private/intrinsics/mount.d.ts"
53
- },
54
- "./-private/intrinsics/mut": {
55
- "types": "./types/-private/intrinsics/mut.d.ts"
56
- },
57
- "./-private/intrinsics/on": {
58
- "types": "./types/-private/intrinsics/on.d.ts"
59
- },
60
- "./-private/intrinsics/outlet": {
61
- "types": "./types/-private/intrinsics/outlet.d.ts"
62
- },
63
- "./-private/intrinsics/unbound": {
64
- "types": "./types/-private/intrinsics/unbound.d.ts"
65
- },
66
- "./-private/intrinsics/unique-id": {
67
- "types": "./types/-private/intrinsics/unique-id.d.ts"
68
- },
25
+ "./-private/dsl/globals": "./types/-private/dsl/globals.d.ts",
26
+ "./-private/intrinsics/action": "./types/-private/intrinsics/action.d.ts",
27
+ "./-private/intrinsics/concat": "./types/-private/intrinsics/concat.d.ts",
28
+ "./-private/intrinsics/each": "./types/-private/intrinsics/each.d.ts",
29
+ "./-private/intrinsics/each-in": "./types/-private/intrinsics/each-in.d.ts",
30
+ "./-private/intrinsics/fn": "./types/-private/intrinsics/fn.d.ts",
31
+ "./-private/intrinsics/get": "./types/-private/intrinsics/get.d.ts",
32
+ "./-private/intrinsics/log": "./types/-private/intrinsics/log.d.ts",
33
+ "./-private/intrinsics/mount": "./types/-private/intrinsics/mount.d.ts",
34
+ "./-private/intrinsics/mut": "./types/-private/intrinsics/mut.d.ts",
35
+ "./-private/intrinsics/on": "./types/-private/intrinsics/on.d.ts",
36
+ "./-private/intrinsics/outlet": "./types/-private/intrinsics/outlet.d.ts",
37
+ "./-private/intrinsics/unbound": "./types/-private/intrinsics/unbound.d.ts",
38
+ "./-private/intrinsics/unique-id": "./types/-private/intrinsics/unique-id.d.ts",
69
39
  "./*": {
70
40
  "types": "./lib/*.d.ts",
71
41
  "default": "./lib/*.js"
@@ -82,17 +52,11 @@
82
52
  "ember-tsc": "bin/ember-tsc.js",
83
53
  "glint-language-server": "bin/glint-language-server.js"
84
54
  },
85
- "scripts": {
86
- "build": "tsc --build",
87
- "dev": "tsc --watch",
88
- "prepack": "pnpm build"
89
- },
90
55
  "peerDependencies": {
91
56
  "typescript": ">=5.6.0"
92
57
  },
93
58
  "dependencies": {
94
59
  "@glimmer/syntax": ">= 0.95.0",
95
- "@glint/template": "1.6.2-unstable.cca1f7b",
96
60
  "@volar/kit": "2.4.23",
97
61
  "@volar/language-core": "2.4.23",
98
62
  "@volar/language-server": "2.4.23",
@@ -111,11 +75,11 @@
111
75
  "vscode-languageserver-protocol": "^3.17.5",
112
76
  "vscode-languageserver-textdocument": "^1.0.5",
113
77
  "vscode-uri": "^3.0.8",
114
- "yargs": "^17.5.1"
78
+ "yargs": "^17.5.1",
79
+ "@glint/template": "1.6.1"
115
80
  },
116
81
  "devDependencies": {
117
82
  "@glimmer/component": "^2.0.0",
118
- "@glint/type-test": "2.0.1-unstable.cca1f7b",
119
83
  "@types/common-tags": "^1.8.0",
120
84
  "@types/node": "^18.11.5",
121
85
  "@types/semver": "^7.3.13",
@@ -125,11 +89,16 @@
125
89
  "@vitest/ui": "~1.0.0",
126
90
  "common-tags": "^1.8.0",
127
91
  "execa": "^4.0.1",
128
- "glint-monorepo-test-utils": "workspace:*",
129
92
  "strip-ansi": "^6.0.0",
130
- "typescript": ">=5.6.0"
93
+ "typescript": ">=5.6.0",
94
+ "@glint/type-test": "2.0.0",
95
+ "glint-monorepo-test-utils": "0.0.0"
131
96
  },
132
97
  "publishConfig": {
133
98
  "access": "public"
99
+ },
100
+ "scripts": {
101
+ "build": "tsc --build",
102
+ "dev": "tsc --watch"
134
103
  }
135
- }
104
+ }
@@ -1,14 +1,14 @@
1
1
  // This module is responsible for augmenting the upstream definitions of entities that interact
2
2
  // with templates to include the information necessary for Glint to typecheck them.
3
3
 
4
- import { ComponentLike, HelperLike, ModifierLike } from '@glint/template';
5
- import {
4
+ import type { ComponentLike, HelperLike, ModifierLike } from '@glint/template';
5
+ import type {
6
6
  Context,
7
7
  FlattenBlockParams,
8
8
  HasContext,
9
9
  TemplateContext,
10
10
  } from '@glint/template/-private/integration';
11
- import {
11
+ import type {
12
12
  ComponentSignatureArgs,
13
13
  ComponentSignatureBlocks,
14
14
  ComponentSignatureElement,
@@ -34,8 +34,8 @@ declare module '@glimmer/component' {
34
34
  }
35
35
  }
36
36
 
37
- import { InputComponent as ImportedInputComponent } from '../intrinsics/input';
38
- import { TextareaComponent as ImportedTextareaComponent } from '../intrinsics/textarea';
37
+ import type { InputComponent as ImportedInputComponent } from '../intrinsics/input';
38
+ import type { TextareaComponent as ImportedTextareaComponent } from '../intrinsics/textarea';
39
39
  declare module '@ember/component' {
40
40
  export default interface Component<S> extends InstanceType<ComponentLike<S>> {
41
41
  [Context]: ComponentContext<this, S>;
@@ -78,8 +78,8 @@ declare module 'ember-modifier' {
78
78
  //////////////////////////////////////////////////////////////////////
79
79
  // Routes and Controllers
80
80
 
81
- import Controller from '@ember/controller';
82
- import Route from '@ember/routing/route';
81
+ import type Controller from '@ember/controller';
82
+ import type Route from '@ember/routing/route';
83
83
 
84
84
  type ModelForRoute<T extends Route> = Awaited<ReturnType<T['model']>>;
85
85
  type ModelField<T> = { model: T };
@@ -101,7 +101,7 @@ declare module '@ember/controller' {
101
101
  }
102
102
  }
103
103
 
104
- import { LinkToComponent } from '../intrinsics/link-to';
104
+ import type { LinkToComponent } from '../intrinsics/link-to';
105
105
  declare module '@ember/routing' {
106
106
  export interface LinkTo extends LinkToComponent {}
107
107
  }
@@ -110,7 +110,6 @@ declare module '@ember/routing' {
110
110
  // Rendering Tests
111
111
 
112
112
  import '@ember/test-helpers';
113
- import 'ember-cli-htmlbars';
114
113
 
115
114
  type TestTemplate<T> = abstract new () => HasContext<TemplateContext<T, {}, {}, void>>;
116
115
 
@@ -118,23 +117,16 @@ declare module '@ember/test-helpers' {
118
117
  export function render<T>(template: TestTemplate<T>): Promise<void>;
119
118
  }
120
119
 
121
- // Declaring that `TemplateFactory` is a valid `TestTemplate` prevents vanilla `tsc` from freaking out
122
- // about `hbs` not returning a valid type for `render`. Glint itself will never see `hbs` get used, as
123
- // it's transformed to the template DSL before typechecking.
124
- declare module 'ember-cli-htmlbars' {
125
- interface TemplateFactory extends TestTemplate<any> {}
126
- }
127
-
128
120
  import '@ember/modifier';
129
- import { OnModifier as ImportedOnModifier } from '../intrinsics/on';
121
+ import type { OnModifier as ImportedOnModifier } from '../intrinsics/on';
130
122
  declare module '@ember/modifier' {
131
123
  export interface OnModifier extends ImportedOnModifier {}
132
124
  }
133
125
 
134
126
  import '@ember/helper';
135
- import { ConcatHelper as ImportedConcatHelper } from '../intrinsics/concat';
136
- import { FnHelper as ImportedFnHelper } from '../intrinsics/fn';
137
- import { GetHelper as ImportedGetHelper } from '../intrinsics/get';
127
+ import type { ConcatHelper as ImportedConcatHelper } from '../intrinsics/concat';
128
+ import type { FnHelper as ImportedFnHelper } from '../intrinsics/fn';
129
+ import type { GetHelper as ImportedGetHelper } from '../intrinsics/get';
138
130
 
139
131
  declare module '@ember/helper' {
140
132
  export interface ConcatHelper extends ImportedConcatHelper {}