@schematics/angular 14.0.0-next.9 → 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.
Files changed (48) hide show
  1. package/app-shell/index.js +4 -8
  2. package/application/files/src/test.ts.template +1 -1
  3. package/application/index.js +3 -3
  4. package/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.spec.ts.template +1 -1
  5. package/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.ts.template +5 -2
  6. package/component/index.js +9 -14
  7. package/component/schema.d.ts +4 -0
  8. package/component/schema.json +6 -0
  9. package/directive/files/__name@dasherize@if-flat__/__name@dasherize__.directive.ts.template +2 -1
  10. package/directive/index.js +9 -18
  11. package/directive/schema.d.ts +4 -0
  12. package/directive/schema.json +6 -0
  13. package/e2e/index.js +5 -5
  14. package/library/files/src/test.ts.template +1 -1
  15. package/library/index.js +3 -4
  16. package/migrations/migration-collection.json +5 -0
  17. package/migrations/update-14/update-libraries-secondary-entrypoints.d.ts +10 -0
  18. package/migrations/update-14/update-libraries-secondary-entrypoints.js +51 -0
  19. package/module/index.js +8 -16
  20. package/package.json +10 -3
  21. package/pipe/files/__name@dasherize@if-flat__/__name@dasherize__.pipe.ts.template +2 -1
  22. package/pipe/index.js +8 -17
  23. package/pipe/schema.d.ts +4 -0
  24. package/pipe/schema.json +6 -0
  25. package/service-worker/index.js +4 -8
  26. package/third_party/github.com/Microsoft/TypeScript/BUILD.bazel +4 -4
  27. package/third_party/github.com/Microsoft/TypeScript/lib/typescript.d.ts +385 -290
  28. package/third_party/github.com/Microsoft/TypeScript/lib/typescript.js +11509 -9414
  29. package/universal/index.js +3 -7
  30. package/utility/dependency.d.ts +45 -0
  31. package/utility/dependency.js +97 -0
  32. package/utility/find-module.d.ts +1 -0
  33. package/utility/find-module.js +1 -2
  34. package/utility/generate-from-files.js +2 -3
  35. package/utility/index.d.ts +10 -0
  36. package/utility/index.js +21 -0
  37. package/utility/json-file.js +1 -7
  38. package/utility/latest-versions/package.json +3 -2
  39. package/utility/latest-versions.js +1 -1
  40. package/utility/ng-ast-utils.js +2 -10
  41. package/utility/parse-name.js +0 -1
  42. package/utility/validation.js +1 -3
  43. package/utility/workspace-models.d.ts +6 -0
  44. package/utility/workspace-models.js +6 -0
  45. package/utility/workspace.d.ts +36 -3
  46. package/utility/workspace.js +70 -34
  47. package/web-worker/index.js +2 -2
  48. package/workspace/index.js +1 -2
@@ -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 buffer = host.read(path);
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, workspace_1.getWorkspace)(host);
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-03-10 from
4
- # https://github.com/microsoft/TypeScript/releases/tag/v4.6.2
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.6.2/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.6.2/lib/typescript.js -o packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript.js
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