@schematics/angular 19.2.0-next.1 → 19.2.0-rc.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/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.ts.template +1 -2
- package/config/index.js +2 -2
- package/e2e/index.js +4 -4
- package/environments/index.js +4 -4
- package/migrations/update-ssr-imports/migration.js +4 -0
- package/package.json +3 -3
- package/ssr/files/application-builder/server.ts.template +1 -1
- package/ssr/files/application-builder-common-engine/server.ts.template +2 -0
- package/third_party/github.com/Microsoft/TypeScript/lib/typescript.d.ts +23 -3
- package/third_party/github.com/Microsoft/TypeScript/lib/typescript.js +1548 -636
- package/utility/dependency.js +1 -1
- package/utility/latest-versions/package.json +1 -1
- package/utility/latest-versions.js +3 -3
- package/utility/standalone/app_config.js +2 -2
- package/workspace/files/package.json.template +0 -1
package/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.ts.template
CHANGED
|
@@ -3,8 +3,7 @@ import { <% if(changeDetection !== 'Default') { %>ChangeDetectionStrategy, <% }%
|
|
|
3
3
|
@Component({<% if(!skipSelector) {%>
|
|
4
4
|
selector: '<%= selector %>',<%}%><% if(standalone) {%>
|
|
5
5
|
imports: [],<%} else { %>
|
|
6
|
-
standalone: false
|
|
7
|
-
<% }%><% if(inlineTemplate) { %>
|
|
6
|
+
standalone: false,<% }%><% if(inlineTemplate) { %>
|
|
8
7
|
template: `
|
|
9
8
|
<p>
|
|
10
9
|
<%= dasherize(name) %> works!
|
package/config/index.js
CHANGED
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.default = default_1;
|
|
11
11
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
12
12
|
const utility_1 = require("@schematics/angular/utility");
|
|
13
|
-
const
|
|
13
|
+
const node_path_1 = require("node:path");
|
|
14
14
|
const paths_1 = require("../utility/paths");
|
|
15
15
|
const schema_1 = require("./schema");
|
|
16
16
|
function default_1(options) {
|
|
@@ -52,7 +52,7 @@ function addKarmaConfig(options) {
|
|
|
52
52
|
throw new schematics_1.SchematicsException(`Cannot add a karma configuration as builder for "test" target in project does not use "${utility_1.AngularBuilder.Karma}".`);
|
|
53
53
|
}
|
|
54
54
|
testTarget.options ??= {};
|
|
55
|
-
testTarget.options.karmaConfig =
|
|
55
|
+
testTarget.options.karmaConfig = node_path_1.posix.join(project.root, 'karma.conf.js');
|
|
56
56
|
// If scoped project (i.e. "@foo/bar"), convert dir to "foo/bar".
|
|
57
57
|
let folderName = options.project.startsWith('@') ? options.project.slice(1) : options.project;
|
|
58
58
|
if (/[A-Z]/.test(folderName)) {
|
package/e2e/index.js
CHANGED
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.default = default_1;
|
|
11
11
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
12
12
|
const utility_1 = require("@schematics/angular/utility");
|
|
13
|
-
const
|
|
13
|
+
const node_path_1 = require("node:path");
|
|
14
14
|
const json_file_1 = require("../utility/json-file");
|
|
15
15
|
const latest_versions_1 = require("../utility/latest-versions");
|
|
16
16
|
/**
|
|
@@ -40,13 +40,13 @@ function default_1(options) {
|
|
|
40
40
|
if (!project) {
|
|
41
41
|
throw new schematics_1.SchematicsException(`Project name "${relatedAppName}" doesn't not exist.`);
|
|
42
42
|
}
|
|
43
|
-
const e2eRootPath =
|
|
43
|
+
const e2eRootPath = node_path_1.posix.join(project.root, 'e2e');
|
|
44
44
|
project.targets.add({
|
|
45
45
|
name: 'e2e',
|
|
46
46
|
builder: utility_1.AngularBuilder.Protractor,
|
|
47
47
|
defaultConfiguration: 'development',
|
|
48
48
|
options: {
|
|
49
|
-
protractorConfig:
|
|
49
|
+
protractorConfig: node_path_1.posix.join(e2eRootPath, 'protractor.conf.js'),
|
|
50
50
|
},
|
|
51
51
|
configurations: {
|
|
52
52
|
production: {
|
|
@@ -62,7 +62,7 @@ function default_1(options) {
|
|
|
62
62
|
(0, schematics_1.applyTemplates)({
|
|
63
63
|
utils: schematics_1.strings,
|
|
64
64
|
...options,
|
|
65
|
-
relativePathToWorkspaceRoot:
|
|
65
|
+
relativePathToWorkspaceRoot: node_path_1.posix.relative(node_path_1.posix.join('/', e2eRootPath), '/'),
|
|
66
66
|
}),
|
|
67
67
|
(0, schematics_1.move)(e2eRootPath),
|
|
68
68
|
])),
|
package/environments/index.js
CHANGED
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.default = default_1;
|
|
11
11
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
12
12
|
const utility_1 = require("@schematics/angular/utility");
|
|
13
|
-
const
|
|
13
|
+
const node_path_1 = require("node:path");
|
|
14
14
|
const ENVIRONMENTS_DIRECTORY = 'environments';
|
|
15
15
|
const ENVIRONMENT_FILE_CONTENT = 'export const environment = {};\n';
|
|
16
16
|
function default_1(options) {
|
|
@@ -31,7 +31,7 @@ function default_1(options) {
|
|
|
31
31
|
' A "build" target is required to generate environment files.');
|
|
32
32
|
}
|
|
33
33
|
const serverTarget = project.targets.get('server');
|
|
34
|
-
const sourceRoot = project.sourceRoot ??
|
|
34
|
+
const sourceRoot = project.sourceRoot ?? node_path_1.posix.join(project.root, 'src');
|
|
35
35
|
// The generator needs to be iterated prior to returning to ensure all workspace changes that occur
|
|
36
36
|
// within the generator are present for `updateWorkspace` when it writes the workspace file.
|
|
37
37
|
return (0, schematics_1.chain)([
|
|
@@ -64,7 +64,7 @@ function* generateConfigurationEnvironments(buildTarget, serverTarget, sourceRoo
|
|
|
64
64
|
' The generated project options may not be compatible with this builder.');
|
|
65
65
|
}
|
|
66
66
|
// Create default environment file
|
|
67
|
-
const defaultFilePath =
|
|
67
|
+
const defaultFilePath = node_path_1.posix.join(sourceRoot, ENVIRONMENTS_DIRECTORY, 'environment.ts');
|
|
68
68
|
yield createIfMissing(defaultFilePath);
|
|
69
69
|
const configurationEntries = [
|
|
70
70
|
...Object.entries(buildTarget.configurations ?? {}),
|
|
@@ -80,7 +80,7 @@ function* generateConfigurationEnvironments(buildTarget, serverTarget, sourceRoo
|
|
|
80
80
|
if (name === buildTarget.defaultConfiguration) {
|
|
81
81
|
continue;
|
|
82
82
|
}
|
|
83
|
-
const configurationFilePath =
|
|
83
|
+
const configurationFilePath = node_path_1.posix.join(sourceRoot, ENVIRONMENTS_DIRECTORY, `environment.${name}.ts`);
|
|
84
84
|
// Add file replacement option entry for the configuration environment file
|
|
85
85
|
const replacements = (configurationOptions['fileReplacements'] ??= []);
|
|
86
86
|
const existing = replacements.find((value) => value.replace === defaultFilePath);
|
|
@@ -42,6 +42,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
42
42
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
43
|
exports.default = default_1;
|
|
44
44
|
const ts = __importStar(require("../../third_party/github.com/Microsoft/TypeScript/lib/typescript"));
|
|
45
|
+
const dependencies_1 = require("../../utility/dependencies");
|
|
45
46
|
function* visit(directory) {
|
|
46
47
|
for (const path of directory.subfiles) {
|
|
47
48
|
if (path.endsWith('.ts') && !path.endsWith('.d.ts')) {
|
|
@@ -70,6 +71,9 @@ function* visit(directory) {
|
|
|
70
71
|
*/
|
|
71
72
|
function default_1() {
|
|
72
73
|
return (tree) => {
|
|
74
|
+
if (!(0, dependencies_1.getPackageJsonDependency)(tree, '@angular/ssr')) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
73
77
|
for (const sourceFile of visit(tree.root)) {
|
|
74
78
|
let recorder;
|
|
75
79
|
const allImportDeclarations = sourceFile.statements.filter((n) => ts.isImportDeclaration(n));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schematics/angular",
|
|
3
|
-
"version": "19.2.0-
|
|
3
|
+
"version": "19.2.0-rc.0",
|
|
4
4
|
"description": "Schematics specific to Angular",
|
|
5
5
|
"homepage": "https://github.com/angular/angular-cli",
|
|
6
6
|
"keywords": [
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"schematics": "./collection.json",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@angular-devkit/core": "19.2.0-
|
|
26
|
-
"@angular-devkit/schematics": "19.2.0-
|
|
25
|
+
"@angular-devkit/core": "19.2.0-rc.0",
|
|
26
|
+
"@angular-devkit/schematics": "19.2.0-rc.0",
|
|
27
27
|
"jsonc-parser": "3.3.1"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
|
@@ -61,6 +61,6 @@ if (isMainModule(import.meta.url)) {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
64
|
+
* Request handler used by the Angular CLI (for dev-server and during build) or Firebase Cloud Functions.
|
|
65
65
|
*/
|
|
66
66
|
export const reqHandler = createNodeRequestHandler(app);
|
|
@@ -1486,6 +1486,10 @@ declare namespace ts {
|
|
|
1486
1486
|
command: CommandTypes.Quickinfo;
|
|
1487
1487
|
arguments: FileLocationRequestArgs;
|
|
1488
1488
|
}
|
|
1489
|
+
export interface QuickInfoRequestArgs extends FileLocationRequestArgs {
|
|
1490
|
+
/** TODO */
|
|
1491
|
+
verbosityLevel?: number;
|
|
1492
|
+
}
|
|
1489
1493
|
/**
|
|
1490
1494
|
* Body of QuickInfoResponse.
|
|
1491
1495
|
*/
|
|
@@ -1519,6 +1523,10 @@ declare namespace ts {
|
|
|
1519
1523
|
* JSDoc tags associated with symbol.
|
|
1520
1524
|
*/
|
|
1521
1525
|
tags: JSDocTagInfo[];
|
|
1526
|
+
/**
|
|
1527
|
+
* TODO
|
|
1528
|
+
*/
|
|
1529
|
+
canIncreaseVerbosityLevel?: boolean;
|
|
1522
1530
|
}
|
|
1523
1531
|
/**
|
|
1524
1532
|
* Quickinfo response message.
|
|
@@ -2508,6 +2516,7 @@ declare namespace ts {
|
|
|
2508
2516
|
ES2022 = "es2022",
|
|
2509
2517
|
ESNext = "esnext",
|
|
2510
2518
|
Node16 = "node16",
|
|
2519
|
+
Node18 = "node18",
|
|
2511
2520
|
NodeNext = "nodenext",
|
|
2512
2521
|
Preserve = "preserve",
|
|
2513
2522
|
}
|
|
@@ -3633,7 +3642,7 @@ declare namespace ts {
|
|
|
3633
3642
|
readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[] | undefined, depth?: number): string[];
|
|
3634
3643
|
}
|
|
3635
3644
|
}
|
|
3636
|
-
const versionMajorMinor = "5.
|
|
3645
|
+
const versionMajorMinor = "5.8";
|
|
3637
3646
|
/** The version of the TypeScript compiler release */
|
|
3638
3647
|
const version: string;
|
|
3639
3648
|
/**
|
|
@@ -6279,6 +6288,7 @@ declare namespace ts {
|
|
|
6279
6288
|
getBigIntType(): Type;
|
|
6280
6289
|
getBigIntLiteralType(value: PseudoBigInt): BigIntLiteralType;
|
|
6281
6290
|
getBooleanType(): Type;
|
|
6291
|
+
getUnknownType(): Type;
|
|
6282
6292
|
getFalseType(): Type;
|
|
6283
6293
|
getTrueType(): Type;
|
|
6284
6294
|
getVoidType(): Type;
|
|
@@ -6338,6 +6348,7 @@ declare namespace ts {
|
|
|
6338
6348
|
* and the operation is cancelled, then it should be discarded, otherwise it is safe to keep.
|
|
6339
6349
|
*/
|
|
6340
6350
|
runWithCancellationToken<T>(token: CancellationToken, cb: (checker: TypeChecker) => T): T;
|
|
6351
|
+
getTypeArgumentsForResolvedSignature(signature: Signature): readonly Type[] | undefined;
|
|
6341
6352
|
}
|
|
6342
6353
|
enum NodeBuilderFlags {
|
|
6343
6354
|
None = 0,
|
|
@@ -6841,11 +6852,15 @@ declare namespace ts {
|
|
|
6841
6852
|
String = 0,
|
|
6842
6853
|
Number = 1,
|
|
6843
6854
|
}
|
|
6855
|
+
type ElementWithComputedPropertyName = (ClassElement | ObjectLiteralElement) & {
|
|
6856
|
+
name: ComputedPropertyName;
|
|
6857
|
+
};
|
|
6844
6858
|
interface IndexInfo {
|
|
6845
6859
|
keyType: Type;
|
|
6846
6860
|
type: Type;
|
|
6847
6861
|
isReadonly: boolean;
|
|
6848
6862
|
declaration?: IndexSignatureDeclaration;
|
|
6863
|
+
components?: ElementWithComputedPropertyName[];
|
|
6849
6864
|
}
|
|
6850
6865
|
enum InferencePriority {
|
|
6851
6866
|
None = 0,
|
|
@@ -7016,6 +7031,7 @@ declare namespace ts {
|
|
|
7016
7031
|
/** @deprecated */
|
|
7017
7032
|
keyofStringsOnly?: boolean;
|
|
7018
7033
|
lib?: string[];
|
|
7034
|
+
libReplacement?: boolean;
|
|
7019
7035
|
locale?: string;
|
|
7020
7036
|
mapRoot?: string;
|
|
7021
7037
|
maxNodeModuleJsDepth?: number;
|
|
@@ -7092,6 +7108,7 @@ declare namespace ts {
|
|
|
7092
7108
|
/** Paths used to compute primary types search locations */
|
|
7093
7109
|
typeRoots?: string[];
|
|
7094
7110
|
verbatimModuleSyntax?: boolean;
|
|
7111
|
+
erasableSyntaxOnly?: boolean;
|
|
7095
7112
|
esModuleInterop?: boolean;
|
|
7096
7113
|
useDefineForClassFields?: boolean;
|
|
7097
7114
|
[option: string]: CompilerOptionsValue | TsConfigSourceFile | undefined;
|
|
@@ -7123,6 +7140,7 @@ declare namespace ts {
|
|
|
7123
7140
|
ES2022 = 7,
|
|
7124
7141
|
ESNext = 99,
|
|
7125
7142
|
Node16 = 100,
|
|
7143
|
+
Node18 = 101,
|
|
7126
7144
|
NodeNext = 199,
|
|
7127
7145
|
Preserve = 200,
|
|
7128
7146
|
}
|
|
@@ -7415,8 +7433,9 @@ declare namespace ts {
|
|
|
7415
7433
|
NonNullAssertions = 4,
|
|
7416
7434
|
PartiallyEmittedExpressions = 8,
|
|
7417
7435
|
ExpressionsWithTypeArguments = 16,
|
|
7418
|
-
|
|
7419
|
-
|
|
7436
|
+
Satisfies = 32,
|
|
7437
|
+
Assertions = 38,
|
|
7438
|
+
All = 63,
|
|
7420
7439
|
ExcludeJSDocTypeAssertion = -2147483648,
|
|
7421
7440
|
}
|
|
7422
7441
|
type ImmediatelyInvokedFunctionExpression = CallExpression & {
|
|
@@ -10746,6 +10765,7 @@ declare namespace ts {
|
|
|
10746
10765
|
displayParts?: SymbolDisplayPart[];
|
|
10747
10766
|
documentation?: SymbolDisplayPart[];
|
|
10748
10767
|
tags?: JSDocTagInfo[];
|
|
10768
|
+
canIncreaseVerbosityLevel?: boolean;
|
|
10749
10769
|
}
|
|
10750
10770
|
type RenameInfo = RenameInfoSuccess | RenameInfoFailure;
|
|
10751
10771
|
interface RenameInfoSuccess {
|