@angular/core 20.1.0-rc.0 → 20.1.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.
Files changed (58) hide show
  1. package/api.d.d.ts +1 -1
  2. package/chrome_dev_tools_performance.d.d.ts +1 -1
  3. package/discovery.d.d.ts +1 -1
  4. package/event_dispatcher.d.d.ts +1 -1
  5. package/fesm2022/attribute.mjs +1 -1
  6. package/fesm2022/core.mjs +48 -28
  7. package/fesm2022/core.mjs.map +1 -1
  8. package/fesm2022/debug_node.mjs +56 -14
  9. package/fesm2022/debug_node.mjs.map +1 -1
  10. package/fesm2022/not_found.mjs +1 -1
  11. package/fesm2022/primitives/di.mjs +1 -1
  12. package/fesm2022/primitives/event-dispatch.mjs +1 -1
  13. package/fesm2022/primitives/signals.mjs +1 -1
  14. package/fesm2022/resource.mjs +1 -1
  15. package/fesm2022/root_effect_scheduler.mjs +112 -53
  16. package/fesm2022/root_effect_scheduler.mjs.map +1 -1
  17. package/fesm2022/rxjs-interop.mjs +2 -2
  18. package/fesm2022/signal.mjs +1 -1
  19. package/fesm2022/testing.mjs +1 -1
  20. package/fesm2022/untracked.mjs +1 -1
  21. package/fesm2022/weak_ref.mjs +1 -1
  22. package/graph.d.d.ts +1 -1
  23. package/index.d.ts +16 -3
  24. package/package.json +2 -2
  25. package/primitives/di/index.d.ts +1 -1
  26. package/primitives/event-dispatch/index.d.ts +1 -1
  27. package/primitives/signals/index.d.ts +1 -1
  28. package/rxjs-interop/index.d.ts +1 -1
  29. package/schematics/bundles/{apply_import_manager-DEMoyu96.cjs → apply_import_manager-DnZuC0qd.cjs} +3 -3
  30. package/schematics/bundles/{checker-CwuJOWZI.cjs → checker-CwUJ2eKt.cjs} +470 -1127
  31. package/schematics/bundles/cleanup-unused-imports.cjs +6 -5
  32. package/schematics/bundles/{compiler_host-B1N_OYoF.cjs → compiler_host-CH53_d32.cjs} +2 -2
  33. package/schematics/bundles/control-flow-migration.cjs +3 -3
  34. package/schematics/bundles/document-core.cjs +6 -5
  35. package/schematics/bundles/imports-CIX-JgAN.cjs +1 -1
  36. package/schematics/bundles/{index-DPxKO2pR.cjs → index-BEVODdVo.cjs} +5 -4
  37. package/schematics/bundles/{index-CmuNlSML.cjs → index-C5Zc9zTo.cjs} +930 -54
  38. package/schematics/bundles/inject-flags.cjs +6 -5
  39. package/schematics/bundles/inject-migration.cjs +3 -3
  40. package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
  41. package/schematics/bundles/{migrate_ts_type_references-Da3yLjVM.cjs → migrate_ts_type_references-i9f_TsT7.cjs} +6 -441
  42. package/schematics/bundles/ng_decorators-B5HCqr20.cjs +1 -1
  43. package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
  44. package/schematics/bundles/output-migration.cjs +7 -6
  45. package/schematics/bundles/{project_paths-86Qe1BQQ.cjs → project_paths-BrdiLiLU.cjs} +39 -3
  46. package/schematics/bundles/project_tsconfig_paths-CDVxT6Ov.cjs +1 -1
  47. package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
  48. package/schematics/bundles/route-lazy-loading.cjs +3 -3
  49. package/schematics/bundles/self-closing-tags-migration.cjs +5 -4
  50. package/schematics/bundles/signal-input-migration.cjs +9 -8
  51. package/schematics/bundles/signal-queries-migration.cjs +8 -7
  52. package/schematics/bundles/signals.cjs +8 -7
  53. package/schematics/bundles/standalone-migration.cjs +4 -4
  54. package/schematics/bundles/symbol-VPWguRxr.cjs +1 -1
  55. package/schematics/bundles/test-bed-get.cjs +5 -4
  56. package/signal.d.d.ts +1 -1
  57. package/testing/index.d.ts +1 -1
  58. package/weak_ref.d.d.ts +1 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.1.0-rc.0
3
+ * @license Angular v20.1.1
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -8,11 +8,12 @@
8
8
 
9
9
  var ts = require('typescript');
10
10
  require('os');
11
- var checker = require('./checker-CwuJOWZI.cjs');
12
- require('./index-CmuNlSML.cjs');
11
+ var checker = require('./checker-CwUJ2eKt.cjs');
12
+ require('./index-C5Zc9zTo.cjs');
13
13
  require('path');
14
- var project_paths = require('./project_paths-86Qe1BQQ.cjs');
15
- var apply_import_manager = require('./apply_import_manager-DEMoyu96.cjs');
14
+ require('node:path');
15
+ var project_paths = require('./project_paths-BrdiLiLU.cjs');
16
+ var apply_import_manager = require('./apply_import_manager-DnZuC0qd.cjs');
16
17
  var imports = require('./imports-CIX-JgAN.cjs');
17
18
  require('@angular-devkit/core');
18
19
  require('node:path/posix');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.1.0-rc.0
3
+ * @license Angular v20.1.1
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -8,13 +8,13 @@
8
8
 
9
9
  var schematics = require('@angular-devkit/schematics');
10
10
  var p = require('path');
11
- var compiler_host = require('./compiler_host-B1N_OYoF.cjs');
11
+ var compiler_host = require('./compiler_host-CH53_d32.cjs');
12
12
  var ts = require('typescript');
13
13
  var ng_decorators = require('./ng_decorators-B5HCqr20.cjs');
14
14
  var imports = require('./imports-CIX-JgAN.cjs');
15
15
  var nodes = require('./nodes-B16H9JUd.cjs');
16
16
  var leading_space = require('./leading_space-D9nQ8UQC.cjs');
17
- require('./checker-CwuJOWZI.cjs');
17
+ require('./checker-CwUJ2eKt.cjs');
18
18
  require('os');
19
19
  require('fs');
20
20
  require('module');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.1.0-rc.0
3
+ * @license Angular v20.1.1
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,20 +1,21 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.1.0-rc.0
3
+ * @license Angular v20.1.1
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
7
7
  'use strict';
8
8
 
9
- var checker = require('./checker-CwuJOWZI.cjs');
9
+ var checker = require('./checker-CwUJ2eKt.cjs');
10
10
  var ts = require('typescript');
11
11
  require('os');
12
12
  var assert = require('assert');
13
- var index = require('./index-DPxKO2pR.cjs');
14
- var project_paths = require('./project_paths-86Qe1BQQ.cjs');
13
+ var index = require('./index-BEVODdVo.cjs');
14
+ var project_paths = require('./project_paths-BrdiLiLU.cjs');
15
15
  var leading_space = require('./leading_space-D9nQ8UQC.cjs');
16
- require('./index-CmuNlSML.cjs');
16
+ require('./index-C5Zc9zTo.cjs');
17
17
  require('path');
18
+ require('node:path');
18
19
 
19
20
  /**
20
21
  * Reasons why a field cannot be migrated.
@@ -76,441 +77,6 @@ function pickFieldIncompatibility(a, b) {
76
77
  return a;
77
78
  }
78
79
 
79
- /**
80
- * A lazily created TextEncoder instance for converting strings into UTF-8 bytes
81
- */
82
- // Utils
83
- var Endian;
84
- (function (Endian) {
85
- Endian[Endian["Little"] = 0] = "Little";
86
- Endian[Endian["Big"] = 1] = "Big";
87
- })(Endian || (Endian = {}));
88
-
89
- //// Types
90
- var TypeModifier;
91
- (function (TypeModifier) {
92
- TypeModifier[TypeModifier["None"] = 0] = "None";
93
- TypeModifier[TypeModifier["Const"] = 1] = "Const";
94
- })(TypeModifier || (TypeModifier = {}));
95
- class Type {
96
- modifiers;
97
- constructor(modifiers = TypeModifier.None) {
98
- this.modifiers = modifiers;
99
- }
100
- hasModifier(modifier) {
101
- return (this.modifiers & modifier) !== 0;
102
- }
103
- }
104
- var BuiltinTypeName;
105
- (function (BuiltinTypeName) {
106
- BuiltinTypeName[BuiltinTypeName["Dynamic"] = 0] = "Dynamic";
107
- BuiltinTypeName[BuiltinTypeName["Bool"] = 1] = "Bool";
108
- BuiltinTypeName[BuiltinTypeName["String"] = 2] = "String";
109
- BuiltinTypeName[BuiltinTypeName["Int"] = 3] = "Int";
110
- BuiltinTypeName[BuiltinTypeName["Number"] = 4] = "Number";
111
- BuiltinTypeName[BuiltinTypeName["Function"] = 5] = "Function";
112
- BuiltinTypeName[BuiltinTypeName["Inferred"] = 6] = "Inferred";
113
- BuiltinTypeName[BuiltinTypeName["None"] = 7] = "None";
114
- })(BuiltinTypeName || (BuiltinTypeName = {}));
115
- class BuiltinType extends Type {
116
- name;
117
- constructor(name, modifiers) {
118
- super(modifiers);
119
- this.name = name;
120
- }
121
- visitType(visitor, context) {
122
- return visitor.visitBuiltinType(this, context);
123
- }
124
- }
125
- new BuiltinType(BuiltinTypeName.Dynamic);
126
- const INFERRED_TYPE = new BuiltinType(BuiltinTypeName.Inferred);
127
- new BuiltinType(BuiltinTypeName.Bool);
128
- new BuiltinType(BuiltinTypeName.Int);
129
- new BuiltinType(BuiltinTypeName.Number);
130
- new BuiltinType(BuiltinTypeName.String);
131
- new BuiltinType(BuiltinTypeName.Function);
132
- new BuiltinType(BuiltinTypeName.None);
133
- ///// Expressions
134
- var UnaryOperator;
135
- (function (UnaryOperator) {
136
- UnaryOperator[UnaryOperator["Minus"] = 0] = "Minus";
137
- UnaryOperator[UnaryOperator["Plus"] = 1] = "Plus";
138
- })(UnaryOperator || (UnaryOperator = {}));
139
- var BinaryOperator;
140
- (function (BinaryOperator) {
141
- BinaryOperator[BinaryOperator["Equals"] = 0] = "Equals";
142
- BinaryOperator[BinaryOperator["NotEquals"] = 1] = "NotEquals";
143
- BinaryOperator[BinaryOperator["Assign"] = 2] = "Assign";
144
- BinaryOperator[BinaryOperator["Identical"] = 3] = "Identical";
145
- BinaryOperator[BinaryOperator["NotIdentical"] = 4] = "NotIdentical";
146
- BinaryOperator[BinaryOperator["Minus"] = 5] = "Minus";
147
- BinaryOperator[BinaryOperator["Plus"] = 6] = "Plus";
148
- BinaryOperator[BinaryOperator["Divide"] = 7] = "Divide";
149
- BinaryOperator[BinaryOperator["Multiply"] = 8] = "Multiply";
150
- BinaryOperator[BinaryOperator["Modulo"] = 9] = "Modulo";
151
- BinaryOperator[BinaryOperator["And"] = 10] = "And";
152
- BinaryOperator[BinaryOperator["Or"] = 11] = "Or";
153
- BinaryOperator[BinaryOperator["BitwiseOr"] = 12] = "BitwiseOr";
154
- BinaryOperator[BinaryOperator["BitwiseAnd"] = 13] = "BitwiseAnd";
155
- BinaryOperator[BinaryOperator["Lower"] = 14] = "Lower";
156
- BinaryOperator[BinaryOperator["LowerEquals"] = 15] = "LowerEquals";
157
- BinaryOperator[BinaryOperator["Bigger"] = 16] = "Bigger";
158
- BinaryOperator[BinaryOperator["BiggerEquals"] = 17] = "BiggerEquals";
159
- BinaryOperator[BinaryOperator["NullishCoalesce"] = 18] = "NullishCoalesce";
160
- BinaryOperator[BinaryOperator["Exponentiation"] = 19] = "Exponentiation";
161
- BinaryOperator[BinaryOperator["In"] = 20] = "In";
162
- BinaryOperator[BinaryOperator["AdditionAssignment"] = 21] = "AdditionAssignment";
163
- BinaryOperator[BinaryOperator["SubtractionAssignment"] = 22] = "SubtractionAssignment";
164
- BinaryOperator[BinaryOperator["MultiplicationAssignment"] = 23] = "MultiplicationAssignment";
165
- BinaryOperator[BinaryOperator["DivisionAssignment"] = 24] = "DivisionAssignment";
166
- BinaryOperator[BinaryOperator["RemainderAssignment"] = 25] = "RemainderAssignment";
167
- BinaryOperator[BinaryOperator["ExponentiationAssignment"] = 26] = "ExponentiationAssignment";
168
- BinaryOperator[BinaryOperator["AndAssignment"] = 27] = "AndAssignment";
169
- BinaryOperator[BinaryOperator["OrAssignment"] = 28] = "OrAssignment";
170
- BinaryOperator[BinaryOperator["NullishCoalesceAssignment"] = 29] = "NullishCoalesceAssignment";
171
- })(BinaryOperator || (BinaryOperator = {}));
172
- function nullSafeIsEquivalent(base, other) {
173
- if (base == null || other == null) {
174
- return base == other;
175
- }
176
- return base.isEquivalent(other);
177
- }
178
- function areAllEquivalentPredicate(base, other, equivalentPredicate) {
179
- const len = base.length;
180
- if (len !== other.length) {
181
- return false;
182
- }
183
- for (let i = 0; i < len; i++) {
184
- if (!equivalentPredicate(base[i], other[i])) {
185
- return false;
186
- }
187
- }
188
- return true;
189
- }
190
- function areAllEquivalent(base, other) {
191
- return areAllEquivalentPredicate(base, other, (baseElement, otherElement) => baseElement.isEquivalent(otherElement));
192
- }
193
- class Expression {
194
- type;
195
- sourceSpan;
196
- constructor(type, sourceSpan) {
197
- this.type = type || null;
198
- this.sourceSpan = sourceSpan || null;
199
- }
200
- prop(name, sourceSpan) {
201
- return new ReadPropExpr(this, name, null, sourceSpan);
202
- }
203
- key(index, type, sourceSpan) {
204
- return new ReadKeyExpr(this, index, type, sourceSpan);
205
- }
206
- callFn(params, sourceSpan, pure) {
207
- return new InvokeFunctionExpr(this, params, null, sourceSpan, pure);
208
- }
209
- instantiate(params, type, sourceSpan) {
210
- return new InstantiateExpr(this, params, type, sourceSpan);
211
- }
212
- conditional(trueCase, falseCase = null, sourceSpan) {
213
- return new ConditionalExpr(this, trueCase, falseCase, null, sourceSpan);
214
- }
215
- equals(rhs, sourceSpan) {
216
- return new BinaryOperatorExpr(BinaryOperator.Equals, this, rhs, null, sourceSpan);
217
- }
218
- notEquals(rhs, sourceSpan) {
219
- return new BinaryOperatorExpr(BinaryOperator.NotEquals, this, rhs, null, sourceSpan);
220
- }
221
- identical(rhs, sourceSpan) {
222
- return new BinaryOperatorExpr(BinaryOperator.Identical, this, rhs, null, sourceSpan);
223
- }
224
- notIdentical(rhs, sourceSpan) {
225
- return new BinaryOperatorExpr(BinaryOperator.NotIdentical, this, rhs, null, sourceSpan);
226
- }
227
- minus(rhs, sourceSpan) {
228
- return new BinaryOperatorExpr(BinaryOperator.Minus, this, rhs, null, sourceSpan);
229
- }
230
- plus(rhs, sourceSpan) {
231
- return new BinaryOperatorExpr(BinaryOperator.Plus, this, rhs, null, sourceSpan);
232
- }
233
- divide(rhs, sourceSpan) {
234
- return new BinaryOperatorExpr(BinaryOperator.Divide, this, rhs, null, sourceSpan);
235
- }
236
- multiply(rhs, sourceSpan) {
237
- return new BinaryOperatorExpr(BinaryOperator.Multiply, this, rhs, null, sourceSpan);
238
- }
239
- modulo(rhs, sourceSpan) {
240
- return new BinaryOperatorExpr(BinaryOperator.Modulo, this, rhs, null, sourceSpan);
241
- }
242
- power(rhs, sourceSpan) {
243
- return new BinaryOperatorExpr(BinaryOperator.Exponentiation, this, rhs, null, sourceSpan);
244
- }
245
- and(rhs, sourceSpan) {
246
- return new BinaryOperatorExpr(BinaryOperator.And, this, rhs, null, sourceSpan);
247
- }
248
- bitwiseOr(rhs, sourceSpan) {
249
- return new BinaryOperatorExpr(BinaryOperator.BitwiseOr, this, rhs, null, sourceSpan);
250
- }
251
- bitwiseAnd(rhs, sourceSpan) {
252
- return new BinaryOperatorExpr(BinaryOperator.BitwiseAnd, this, rhs, null, sourceSpan);
253
- }
254
- or(rhs, sourceSpan) {
255
- return new BinaryOperatorExpr(BinaryOperator.Or, this, rhs, null, sourceSpan);
256
- }
257
- lower(rhs, sourceSpan) {
258
- return new BinaryOperatorExpr(BinaryOperator.Lower, this, rhs, null, sourceSpan);
259
- }
260
- lowerEquals(rhs, sourceSpan) {
261
- return new BinaryOperatorExpr(BinaryOperator.LowerEquals, this, rhs, null, sourceSpan);
262
- }
263
- bigger(rhs, sourceSpan) {
264
- return new BinaryOperatorExpr(BinaryOperator.Bigger, this, rhs, null, sourceSpan);
265
- }
266
- biggerEquals(rhs, sourceSpan) {
267
- return new BinaryOperatorExpr(BinaryOperator.BiggerEquals, this, rhs, null, sourceSpan);
268
- }
269
- isBlank(sourceSpan) {
270
- // Note: We use equals by purpose here to compare to null and undefined in JS.
271
- // We use the typed null to allow strictNullChecks to narrow types.
272
- return this.equals(TYPED_NULL_EXPR, sourceSpan);
273
- }
274
- nullishCoalesce(rhs, sourceSpan) {
275
- return new BinaryOperatorExpr(BinaryOperator.NullishCoalesce, this, rhs, null, sourceSpan);
276
- }
277
- toStmt() {
278
- return new ExpressionStatement(this, null);
279
- }
280
- }
281
- class InvokeFunctionExpr extends Expression {
282
- fn;
283
- args;
284
- pure;
285
- constructor(fn, args, type, sourceSpan, pure = false) {
286
- super(type, sourceSpan);
287
- this.fn = fn;
288
- this.args = args;
289
- this.pure = pure;
290
- }
291
- // An alias for fn, which allows other logic to handle calls and property reads together.
292
- get receiver() {
293
- return this.fn;
294
- }
295
- isEquivalent(e) {
296
- return (e instanceof InvokeFunctionExpr &&
297
- this.fn.isEquivalent(e.fn) &&
298
- areAllEquivalent(this.args, e.args) &&
299
- this.pure === e.pure);
300
- }
301
- isConstant() {
302
- return false;
303
- }
304
- visitExpression(visitor, context) {
305
- return visitor.visitInvokeFunctionExpr(this, context);
306
- }
307
- clone() {
308
- return new InvokeFunctionExpr(this.fn.clone(), this.args.map((arg) => arg.clone()), this.type, this.sourceSpan, this.pure);
309
- }
310
- }
311
- class InstantiateExpr extends Expression {
312
- classExpr;
313
- args;
314
- constructor(classExpr, args, type, sourceSpan) {
315
- super(type, sourceSpan);
316
- this.classExpr = classExpr;
317
- this.args = args;
318
- }
319
- isEquivalent(e) {
320
- return (e instanceof InstantiateExpr &&
321
- this.classExpr.isEquivalent(e.classExpr) &&
322
- areAllEquivalent(this.args, e.args));
323
- }
324
- isConstant() {
325
- return false;
326
- }
327
- visitExpression(visitor, context) {
328
- return visitor.visitInstantiateExpr(this, context);
329
- }
330
- clone() {
331
- return new InstantiateExpr(this.classExpr.clone(), this.args.map((arg) => arg.clone()), this.type, this.sourceSpan);
332
- }
333
- }
334
- class LiteralExpr extends Expression {
335
- value;
336
- constructor(value, type, sourceSpan) {
337
- super(type, sourceSpan);
338
- this.value = value;
339
- }
340
- isEquivalent(e) {
341
- return e instanceof LiteralExpr && this.value === e.value;
342
- }
343
- isConstant() {
344
- return true;
345
- }
346
- visitExpression(visitor, context) {
347
- return visitor.visitLiteralExpr(this, context);
348
- }
349
- clone() {
350
- return new LiteralExpr(this.value, this.type, this.sourceSpan);
351
- }
352
- }
353
- class ConditionalExpr extends Expression {
354
- condition;
355
- falseCase;
356
- trueCase;
357
- constructor(condition, trueCase, falseCase = null, type, sourceSpan) {
358
- super(type || trueCase.type, sourceSpan);
359
- this.condition = condition;
360
- this.falseCase = falseCase;
361
- this.trueCase = trueCase;
362
- }
363
- isEquivalent(e) {
364
- return (e instanceof ConditionalExpr &&
365
- this.condition.isEquivalent(e.condition) &&
366
- this.trueCase.isEquivalent(e.trueCase) &&
367
- nullSafeIsEquivalent(this.falseCase, e.falseCase));
368
- }
369
- isConstant() {
370
- return false;
371
- }
372
- visitExpression(visitor, context) {
373
- return visitor.visitConditionalExpr(this, context);
374
- }
375
- clone() {
376
- return new ConditionalExpr(this.condition.clone(), this.trueCase.clone(), this.falseCase?.clone(), this.type, this.sourceSpan);
377
- }
378
- }
379
- class BinaryOperatorExpr extends Expression {
380
- operator;
381
- rhs;
382
- lhs;
383
- constructor(operator, lhs, rhs, type, sourceSpan) {
384
- super(type || lhs.type, sourceSpan);
385
- this.operator = operator;
386
- this.rhs = rhs;
387
- this.lhs = lhs;
388
- }
389
- isEquivalent(e) {
390
- return (e instanceof BinaryOperatorExpr &&
391
- this.operator === e.operator &&
392
- this.lhs.isEquivalent(e.lhs) &&
393
- this.rhs.isEquivalent(e.rhs));
394
- }
395
- isConstant() {
396
- return false;
397
- }
398
- visitExpression(visitor, context) {
399
- return visitor.visitBinaryOperatorExpr(this, context);
400
- }
401
- clone() {
402
- return new BinaryOperatorExpr(this.operator, this.lhs.clone(), this.rhs.clone(), this.type, this.sourceSpan);
403
- }
404
- isAssignment() {
405
- const op = this.operator;
406
- return (op === BinaryOperator.Assign ||
407
- op === BinaryOperator.AdditionAssignment ||
408
- op === BinaryOperator.SubtractionAssignment ||
409
- op === BinaryOperator.MultiplicationAssignment ||
410
- op === BinaryOperator.DivisionAssignment ||
411
- op === BinaryOperator.RemainderAssignment ||
412
- op === BinaryOperator.ExponentiationAssignment ||
413
- op === BinaryOperator.AndAssignment ||
414
- op === BinaryOperator.OrAssignment ||
415
- op === BinaryOperator.NullishCoalesceAssignment);
416
- }
417
- }
418
- class ReadPropExpr extends Expression {
419
- receiver;
420
- name;
421
- constructor(receiver, name, type, sourceSpan) {
422
- super(type, sourceSpan);
423
- this.receiver = receiver;
424
- this.name = name;
425
- }
426
- // An alias for name, which allows other logic to handle property reads and keyed reads together.
427
- get index() {
428
- return this.name;
429
- }
430
- isEquivalent(e) {
431
- return (e instanceof ReadPropExpr && this.receiver.isEquivalent(e.receiver) && this.name === e.name);
432
- }
433
- isConstant() {
434
- return false;
435
- }
436
- visitExpression(visitor, context) {
437
- return visitor.visitReadPropExpr(this, context);
438
- }
439
- set(value) {
440
- return new BinaryOperatorExpr(BinaryOperator.Assign, this.receiver.prop(this.name), value, null, this.sourceSpan);
441
- }
442
- clone() {
443
- return new ReadPropExpr(this.receiver.clone(), this.name, this.type, this.sourceSpan);
444
- }
445
- }
446
- class ReadKeyExpr extends Expression {
447
- receiver;
448
- index;
449
- constructor(receiver, index, type, sourceSpan) {
450
- super(type, sourceSpan);
451
- this.receiver = receiver;
452
- this.index = index;
453
- }
454
- isEquivalent(e) {
455
- return (e instanceof ReadKeyExpr &&
456
- this.receiver.isEquivalent(e.receiver) &&
457
- this.index.isEquivalent(e.index));
458
- }
459
- isConstant() {
460
- return false;
461
- }
462
- visitExpression(visitor, context) {
463
- return visitor.visitReadKeyExpr(this, context);
464
- }
465
- set(value) {
466
- return new BinaryOperatorExpr(BinaryOperator.Assign, this.receiver.key(this.index), value, null, this.sourceSpan);
467
- }
468
- clone() {
469
- return new ReadKeyExpr(this.receiver.clone(), this.index.clone(), this.type, this.sourceSpan);
470
- }
471
- }
472
- const NULL_EXPR = new LiteralExpr(null, null, null);
473
- const TYPED_NULL_EXPR = new LiteralExpr(null, INFERRED_TYPE, null);
474
- //// Statements
475
- var StmtModifier;
476
- (function (StmtModifier) {
477
- StmtModifier[StmtModifier["None"] = 0] = "None";
478
- StmtModifier[StmtModifier["Final"] = 1] = "Final";
479
- StmtModifier[StmtModifier["Private"] = 2] = "Private";
480
- StmtModifier[StmtModifier["Exported"] = 4] = "Exported";
481
- StmtModifier[StmtModifier["Static"] = 8] = "Static";
482
- })(StmtModifier || (StmtModifier = {}));
483
- class Statement {
484
- modifiers;
485
- sourceSpan;
486
- leadingComments;
487
- constructor(modifiers = StmtModifier.None, sourceSpan = null, leadingComments) {
488
- this.modifiers = modifiers;
489
- this.sourceSpan = sourceSpan;
490
- this.leadingComments = leadingComments;
491
- }
492
- hasModifier(modifier) {
493
- return (this.modifiers & modifier) !== 0;
494
- }
495
- addLeadingComment(leadingComment) {
496
- this.leadingComments = this.leadingComments ?? [];
497
- this.leadingComments.push(leadingComment);
498
- }
499
- }
500
- class ExpressionStatement extends Statement {
501
- expr;
502
- constructor(expr, sourceSpan, leadingComments) {
503
- super(StmtModifier.None, sourceSpan, leadingComments);
504
- this.expr = expr;
505
- }
506
- isEquivalent(stmt) {
507
- return stmt instanceof ExpressionStatement && this.expr.isEquivalent(stmt.expr);
508
- }
509
- visitStatement(visitor, context) {
510
- return visitor.visitExpressionStmt(this, context);
511
- }
512
- }
513
-
514
80
  /**
515
81
  * Detects `spyOn(dirInstance, 'myInput')` calls that likely modify
516
82
  * the input signal. There is no way to change the value inside the input signal,
@@ -1913,7 +1479,6 @@ function migrateTypeScriptTypeReferences(host, references, importManager, info)
1913
1479
 
1914
1480
  exports.GroupedTsAstVisitor = GroupedTsAstVisitor;
1915
1481
  exports.InheritanceGraph = InheritanceGraph;
1916
- exports.NULL_EXPR = NULL_EXPR;
1917
1482
  exports.checkIncompatiblePatterns = checkIncompatiblePatterns;
1918
1483
  exports.checkInheritanceOfKnownFields = checkInheritanceOfKnownFields;
1919
1484
  exports.cutStringToLineLimit = cutStringToLineLimit;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.1.0-rc.0
3
+ * @license Angular v20.1.1
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.1.0-rc.0
3
+ * @license Angular v20.1.1
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.1.0-rc.0
3
+ * @license Angular v20.1.1
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -8,12 +8,13 @@
8
8
 
9
9
  var ts = require('typescript');
10
10
  require('os');
11
- var checker = require('./checker-CwuJOWZI.cjs');
12
- var index$1 = require('./index-CmuNlSML.cjs');
11
+ var checker = require('./checker-CwUJ2eKt.cjs');
12
+ var index$1 = require('./index-C5Zc9zTo.cjs');
13
13
  require('path');
14
- var project_paths = require('./project_paths-86Qe1BQQ.cjs');
15
- var apply_import_manager = require('./apply_import_manager-DEMoyu96.cjs');
16
- var index = require('./index-DPxKO2pR.cjs');
14
+ require('node:path');
15
+ var project_paths = require('./project_paths-BrdiLiLU.cjs');
16
+ var apply_import_manager = require('./apply_import_manager-DnZuC0qd.cjs');
17
+ var index = require('./index-BEVODdVo.cjs');
17
18
  require('@angular-devkit/core');
18
19
  require('node:path/posix');
19
20
  require('fs');
@@ -1,19 +1,20 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.1.0-rc.0
3
+ * @license Angular v20.1.1
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
7
7
  'use strict';
8
8
 
9
- var index = require('./index-CmuNlSML.cjs');
9
+ var index = require('./index-C5Zc9zTo.cjs');
10
10
  var schematics = require('@angular-devkit/schematics');
11
11
  var core = require('@angular-devkit/core');
12
12
  var posixPath = require('node:path/posix');
13
13
  var os = require('os');
14
14
  var ts = require('typescript');
15
- var checker = require('./checker-CwuJOWZI.cjs');
15
+ var checker = require('./checker-CwUJ2eKt.cjs');
16
16
  require('path');
17
+ var path = require('node:path');
17
18
  var project_tsconfig_paths = require('./project_tsconfig_paths-CDVxT6Ov.cjs');
18
19
 
19
20
  function _interopNamespaceDefault(e) {
@@ -35,6 +36,7 @@ function _interopNamespaceDefault(e) {
35
36
 
36
37
  var posixPath__namespace = /*#__PURE__*/_interopNamespaceDefault(posixPath);
37
38
  var os__namespace = /*#__PURE__*/_interopNamespaceDefault(os);
39
+ var path__namespace = /*#__PURE__*/_interopNamespaceDefault(path);
38
40
 
39
41
  /// <reference types="node" />
40
42
  class NgtscCompilerHost {
@@ -441,6 +443,10 @@ async function synchronouslyCombineUnitData(migration, unitDatas) {
441
443
  return combined;
442
444
  }
443
445
 
446
+ /** Whether we are executing inside Google */
447
+ function isGoogle3() {
448
+ return process.env['GOOGLE3_TSURGE'] === '1';
449
+ }
444
450
  /**
445
451
  * By default, Tsurge will always create an Angular compiler program
446
452
  * for projects analyzed and migrated. This works perfectly fine in
@@ -522,6 +528,29 @@ function parseTsconfigOrDie(absoluteTsconfigPath, fs) {
522
528
  return tsconfig;
523
529
  }
524
530
 
531
+ // Note: Try to keep mostly in sync with
532
+ // //depot/google3/javascript/angular2/tools/ngc_wrapped/tsc_plugin.ts
533
+ // TODO: Consider moving this logic into the 1P launcher.
534
+ const EXT = /(\.ts|\.d\.ts|\.js|\.jsx|\.tsx)$/;
535
+ function fileNameToModuleNameFactory(rootDirs, workspaceName) {
536
+ return (importedFilePath) => {
537
+ let relativePath = '';
538
+ for (const rootDir of rootDirs) {
539
+ const rel = path__namespace.posix.relative(rootDir, importedFilePath);
540
+ if (!rel.startsWith('.')) {
541
+ relativePath = rel;
542
+ break;
543
+ }
544
+ }
545
+ if (relativePath) {
546
+ return `${workspaceName}/${relativePath.replace(EXT, '')}`;
547
+ }
548
+ else {
549
+ return importedFilePath.replace(EXT, '');
550
+ }
551
+ };
552
+ }
553
+
525
554
  /** Creates the base program info for the given tsconfig path. */
526
555
  function createBaseProgramInfo(absoluteTsconfigPath, fs, optionOverrides = {}) {
527
556
  // Make sure the FS becomes globally available. Some code paths
@@ -536,6 +565,13 @@ function createBaseProgramInfo(absoluteTsconfigPath, fs, optionOverrides = {}) {
536
565
  tsconfig.options['_useHostForImportGeneration'] === undefined) {
537
566
  return createPlainTsProgram(tsHost, tsconfig, optionOverrides);
538
567
  }
568
+ // The Angular program may try to emit references during analysis or migration.
569
+ // To replicate the Google3 import emission here, ensure the unified module resolution
570
+ // can be enabled by the compiler.
571
+ if (isGoogle3() && tsconfig.options.rootDirs) {
572
+ tsHost.fileNameToModuleName = fileNameToModuleNameFactory(tsconfig.options.rootDirs,
573
+ /* workspaceName*/ 'google3');
574
+ }
539
575
  return createNgtscProgram(tsHost, tsconfig, optionOverrides);
540
576
  }
541
577
  /**
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.1.0-rc.0
3
+ * @license Angular v20.1.1
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.1.0-rc.0
3
+ * @license Angular v20.1.1
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */