@schematics/angular 14.0.0-next.7 → 14.0.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/app-shell/index.js +4 -8
- package/application/files/src/test.ts.template +1 -1
- package/application/index.js +3 -3
- package/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.spec.ts.template +1 -1
- package/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.ts.template +5 -2
- package/component/index.js +9 -14
- package/component/schema.d.ts +4 -0
- package/component/schema.json +6 -0
- package/directive/files/__name@dasherize@if-flat__/__name@dasherize__.directive.ts.template +2 -1
- package/directive/index.js +9 -18
- package/directive/schema.d.ts +4 -0
- package/directive/schema.json +6 -0
- package/e2e/index.js +5 -5
- package/library/files/src/test.ts.template +1 -1
- package/library/index.js +3 -4
- package/migrations/migration-collection.json +5 -0
- package/migrations/update-14/update-libraries-secondary-entrypoints.d.ts +10 -0
- package/migrations/update-14/update-libraries-secondary-entrypoints.js +51 -0
- package/module/index.js +8 -16
- package/package.json +10 -3
- package/pipe/files/__name@dasherize@if-flat__/__name@dasherize__.pipe.ts.template +2 -1
- package/pipe/index.js +8 -17
- package/pipe/schema.d.ts +4 -0
- package/pipe/schema.json +6 -0
- package/service-worker/index.js +4 -8
- package/third_party/github.com/Microsoft/TypeScript/BUILD.bazel +4 -4
- package/third_party/github.com/Microsoft/TypeScript/lib/typescript.d.ts +385 -290
- package/third_party/github.com/Microsoft/TypeScript/lib/typescript.js +11509 -9414
- package/universal/index.js +3 -7
- package/utility/ast-utils.js +26 -26
- package/utility/dependency.d.ts +45 -0
- package/utility/dependency.js +97 -0
- package/utility/find-module.d.ts +1 -0
- package/utility/find-module.js +5 -10
- package/utility/generate-from-files.js +2 -3
- package/utility/index.d.ts +10 -0
- package/utility/index.js +21 -0
- package/utility/json-file.js +1 -7
- package/utility/latest-versions/package.json +4 -3
- package/utility/latest-versions.js +1 -1
- package/utility/ng-ast-utils.js +2 -10
- package/utility/parse-name.js +0 -1
- package/utility/validation.js +1 -3
- package/utility/workspace-models.d.ts +6 -0
- package/utility/workspace-models.js +6 -0
- package/utility/workspace.d.ts +36 -3
- package/utility/workspace.js +70 -34
- package/web-worker/index.js +2 -2
- package/workspace/index.js +1 -2
package/service-worker/index.js
CHANGED
|
@@ -34,13 +34,13 @@ const core_1 = require("@angular-devkit/core");
|
|
|
34
34
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
35
35
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
36
36
|
const ts = __importStar(require("../third_party/github.com/Microsoft/TypeScript/lib/typescript"));
|
|
37
|
+
const utility_1 = require("../utility");
|
|
37
38
|
const ast_utils_1 = require("../utility/ast-utils");
|
|
38
39
|
const change_1 = require("../utility/change");
|
|
39
40
|
const dependencies_1 = require("../utility/dependencies");
|
|
40
41
|
const ng_ast_utils_1 = require("../utility/ng-ast-utils");
|
|
41
42
|
const paths_1 = require("../utility/paths");
|
|
42
43
|
const project_targets_1 = require("../utility/project-targets");
|
|
43
|
-
const workspace_1 = require("../utility/workspace");
|
|
44
44
|
function addDependencies() {
|
|
45
45
|
return (host, context) => {
|
|
46
46
|
const packageName = '@angular/service-worker';
|
|
@@ -113,17 +113,13 @@ function updateAppModule(mainPath) {
|
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
115
|
function getTsSourceFile(host, path) {
|
|
116
|
-
const
|
|
117
|
-
if (!buffer) {
|
|
118
|
-
throw new schematics_1.SchematicsException(`Could not read file (${path}).`);
|
|
119
|
-
}
|
|
120
|
-
const content = buffer.toString();
|
|
116
|
+
const content = host.readText(path);
|
|
121
117
|
const source = ts.createSourceFile(path, content, ts.ScriptTarget.Latest, true);
|
|
122
118
|
return source;
|
|
123
119
|
}
|
|
124
120
|
function default_1(options) {
|
|
125
121
|
return async (host, context) => {
|
|
126
|
-
const workspace = await (0,
|
|
122
|
+
const workspace = await (0, utility_1.readWorkspace)(host);
|
|
127
123
|
const project = workspace.projects.get(options.project);
|
|
128
124
|
if (!project) {
|
|
129
125
|
throw new schematics_1.SchematicsException(`Invalid project name (${options.project})`);
|
|
@@ -152,9 +148,9 @@ function default_1(options) {
|
|
|
152
148
|
(0, schematics_1.move)(project.root),
|
|
153
149
|
]);
|
|
154
150
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
151
|
+
await (0, utility_1.writeWorkspace)(host, workspace);
|
|
155
152
|
return (0, schematics_1.chain)([
|
|
156
153
|
(0, schematics_1.mergeWith)(templateSource),
|
|
157
|
-
(0, workspace_1.updateWorkspace)(workspace),
|
|
158
154
|
addDependencies(),
|
|
159
155
|
updateAppModule(buildOptions.main),
|
|
160
156
|
]);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
load("//tools:defaults.bzl", "ts_library")
|
|
2
2
|
|
|
3
|
-
# files fetched on 2022-
|
|
4
|
-
# https://github.com/microsoft/TypeScript/releases/tag/v4.
|
|
3
|
+
# files fetched on 2022-05-06 from
|
|
4
|
+
# https://github.com/microsoft/TypeScript/releases/tag/v4.7-beta
|
|
5
5
|
|
|
6
6
|
# Commands to download:
|
|
7
|
-
# curl https://raw.githubusercontent.com/microsoft/TypeScript/v4.
|
|
8
|
-
# curl https://raw.githubusercontent.com/microsoft/TypeScript/v4.
|
|
7
|
+
# curl https://raw.githubusercontent.com/microsoft/TypeScript/v4.7-beta/lib/typescript.d.ts -o packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript.d.ts
|
|
8
|
+
# curl https://raw.githubusercontent.com/microsoft/TypeScript/v4.7-beta/lib/typescript.js -o packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript.js
|
|
9
9
|
|
|
10
10
|
licenses(["notice"]) # Apache 2.0
|
|
11
11
|
|