@schematics/angular 14.2.0 → 15.0.0-next.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/app-shell/schema.d.ts +0 -4
- package/app-shell/schema.json +0 -5
- package/class/schema.d.ts +1 -1
- package/class/schema.json +1 -1
- package/component/index.js +8 -69
- package/component/schema.d.ts +1 -1
- package/component/schema.json +1 -1
- package/directive/index.js +8 -65
- package/directive/schema.d.ts +1 -1
- package/directive/schema.json +1 -1
- package/enum/schema.d.ts +1 -1
- package/enum/schema.json +1 -1
- package/guard/schema.d.ts +1 -1
- package/guard/schema.json +1 -1
- package/interceptor/schema.d.ts +1 -1
- package/interceptor/schema.json +1 -1
- package/interface/schema.d.ts +1 -1
- package/interface/schema.json +1 -1
- package/module/index.js +2 -2
- package/module/schema.d.ts +1 -1
- package/module/schema.json +1 -1
- package/package.json +4 -4
- package/pipe/index.js +8 -63
- package/pipe/schema.d.ts +1 -1
- package/pipe/schema.json +1 -1
- package/resolver/schema.d.ts +1 -1
- package/resolver/schema.json +1 -1
- package/service/schema.d.ts +1 -1
- package/service/schema.json +1 -1
- package/third_party/github.com/Microsoft/TypeScript/BUILD.bazel +4 -4
- package/third_party/github.com/Microsoft/TypeScript/lib/typescript.d.ts +61 -117
- package/third_party/github.com/Microsoft/TypeScript/lib/typescript.js +133 -151
- package/universal/schema.d.ts +0 -5
- package/universal/schema.json +0 -7
- package/utility/add-declaration-to-ng-module.d.ts +19 -0
- package/utility/add-declaration-to-ng-module.js +68 -0
- package/utility/generate-from-files.d.ts +1 -1
- package/utility/latest-versions/package.json +3 -3
- package/utility/latest-versions.js +1 -1
package/universal/schema.d.ts
CHANGED
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
* Pass this schematic to the "run" command to set up server-side rendering for an app.
|
|
3
3
|
*/
|
|
4
4
|
export interface Schema {
|
|
5
|
-
/**
|
|
6
|
-
* The name of the application folder.
|
|
7
|
-
* @deprecated This option has no effect.
|
|
8
|
-
*/
|
|
9
|
-
appDir?: string;
|
|
10
5
|
/**
|
|
11
6
|
* The application identifier to use for transition.
|
|
12
7
|
*/
|
package/universal/schema.json
CHANGED
|
@@ -25,13 +25,6 @@
|
|
|
25
25
|
"description": "The name of the main entry-point file.",
|
|
26
26
|
"default": "main.server.ts"
|
|
27
27
|
},
|
|
28
|
-
"appDir": {
|
|
29
|
-
"type": "string",
|
|
30
|
-
"format": "path",
|
|
31
|
-
"description": "The name of the application folder.",
|
|
32
|
-
"default": "app",
|
|
33
|
-
"x-deprecated": "This option has no effect."
|
|
34
|
-
},
|
|
35
28
|
"rootModuleFileName": {
|
|
36
29
|
"type": "string",
|
|
37
30
|
"format": "path",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { Rule } from '@angular-devkit/schematics';
|
|
9
|
+
export interface DeclarationToNgModuleOptions {
|
|
10
|
+
module?: string;
|
|
11
|
+
path?: string;
|
|
12
|
+
name: string;
|
|
13
|
+
flat?: boolean;
|
|
14
|
+
export?: boolean;
|
|
15
|
+
type: string;
|
|
16
|
+
skipImport?: boolean;
|
|
17
|
+
standalone?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function addDeclarationToNgModule(options: DeclarationToNgModuleOptions): Rule;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.io/license
|
|
8
|
+
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
+
if (mod && mod.__esModule) return mod;
|
|
27
|
+
var result = {};
|
|
28
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
+
__setModuleDefault(result, mod);
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
exports.addDeclarationToNgModule = void 0;
|
|
34
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
35
|
+
const ts = __importStar(require("../third_party/github.com/Microsoft/TypeScript/lib/typescript"));
|
|
36
|
+
const ast_utils_1 = require("./ast-utils");
|
|
37
|
+
const change_1 = require("./change");
|
|
38
|
+
const find_module_1 = require("./find-module");
|
|
39
|
+
function addDeclarationToNgModule(options) {
|
|
40
|
+
return (host) => {
|
|
41
|
+
const modulePath = options.module;
|
|
42
|
+
if (options.skipImport || options.standalone || !modulePath) {
|
|
43
|
+
return host;
|
|
44
|
+
}
|
|
45
|
+
const sourceText = host.readText(modulePath);
|
|
46
|
+
const source = ts.createSourceFile(modulePath, sourceText, ts.ScriptTarget.Latest, true);
|
|
47
|
+
const filePath = `/${options.path}/` +
|
|
48
|
+
(options.flat ? '' : schematics_1.strings.dasherize(options.name) + '/') +
|
|
49
|
+
schematics_1.strings.dasherize(options.name) +
|
|
50
|
+
(options.type ? '.' : '') +
|
|
51
|
+
schematics_1.strings.dasherize(options.type);
|
|
52
|
+
const importPath = (0, find_module_1.buildRelativePath)(modulePath, filePath);
|
|
53
|
+
const classifiedName = schematics_1.strings.classify(options.name) + schematics_1.strings.classify(options.type);
|
|
54
|
+
const changes = (0, ast_utils_1.addDeclarationToModule)(source, modulePath, classifiedName, importPath);
|
|
55
|
+
if (options.export) {
|
|
56
|
+
changes.push(...(0, ast_utils_1.addSymbolToNgModuleMetadata)(source, modulePath, 'exports', classifiedName));
|
|
57
|
+
}
|
|
58
|
+
const recorder = host.beginUpdate(modulePath);
|
|
59
|
+
for (const change of changes) {
|
|
60
|
+
if (change instanceof change_1.InsertChange) {
|
|
61
|
+
recorder.insertLeft(change.pos, change.toAdd);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
host.commitUpdate(recorder);
|
|
65
|
+
return host;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
exports.addDeclarationToNgModule = addDeclarationToNgModule;
|
|
@@ -11,7 +11,7 @@ export interface GenerateFromFilesOptions {
|
|
|
11
11
|
name: string;
|
|
12
12
|
path?: string;
|
|
13
13
|
prefix?: string;
|
|
14
|
-
project
|
|
14
|
+
project: string;
|
|
15
15
|
skipTests?: boolean;
|
|
16
16
|
}
|
|
17
17
|
export declare function generateFromFiles(options: GenerateFromFilesOptions, extraTemplateValues?: Record<string, string | ((v: string) => string)>): Rule;
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
"comment": "This file is needed so that dependencies are synced by Renovate.",
|
|
4
4
|
"private": true,
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@types/jasmine": "~4.
|
|
6
|
+
"@types/jasmine": "~4.3.0",
|
|
7
7
|
"@types/node": "^14.15.0",
|
|
8
|
-
"jasmine-core": "~4.
|
|
8
|
+
"jasmine-core": "~4.4.0",
|
|
9
9
|
"jasmine-spec-reporter": "~7.0.0",
|
|
10
10
|
"karma-chrome-launcher": "~3.1.0",
|
|
11
11
|
"karma-coverage": "~2.2.0",
|
|
12
12
|
"karma-jasmine-html-reporter": "~2.0.0",
|
|
13
13
|
"karma-jasmine": "~5.1.0",
|
|
14
14
|
"karma": "~6.4.0",
|
|
15
|
-
"ng-packagr": "^
|
|
15
|
+
"ng-packagr": "^15.0.0-next.0",
|
|
16
16
|
"protractor": "~7.0.0",
|
|
17
17
|
"rxjs": "~7.5.0",
|
|
18
18
|
"tslib": "^2.3.0",
|
|
@@ -13,7 +13,7 @@ exports.latestVersions = {
|
|
|
13
13
|
// but ts_library doesn't support JSON inputs.
|
|
14
14
|
...require('./latest-versions/package.json')['dependencies'],
|
|
15
15
|
// As Angular CLI works with same minor versions of Angular Framework, a tilde match for the current
|
|
16
|
-
Angular: '^
|
|
16
|
+
Angular: '^15.0.0-next.0',
|
|
17
17
|
// Since @angular-devkit/build-angular and @schematics/angular are always
|
|
18
18
|
// published together from the same monorepo, and they are both
|
|
19
19
|
// non-experimental, they will always have the same version.
|