@schematics/angular 12.1.0-next.5 → 12.1.2
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 +20 -1
- package/application/other-files/app.component.html.template +21 -29
- package/application/other-files/app.component.spec.ts.template +2 -2
- package/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.ts.template +1 -1
- package/component/index.js +23 -2
- package/component/schema.d.ts +5 -2
- package/component/schema.js +3 -1
- package/component/schema.json +2 -2
- package/directive/index.js +20 -1
- package/migrations/migration-collection.json +5 -0
- package/migrations/update-10/remove-es5-browser-support.js +21 -2
- package/migrations/update-12/replace-prod-flag.d.ts +9 -0
- package/migrations/update-12/replace-prod-flag.js +28 -0
- package/migrations/update-12/update-angular-config.js +10 -3
- package/migrations/update-12/update-lazy-module-paths.js +20 -1
- package/migrations/update-12/update-web-workers.js +20 -1
- package/migrations/update-9/update-server-main-file.js +20 -1
- package/module/index.js +20 -1
- package/package.json +3 -3
- package/pipe/index.js +20 -1
- package/service-worker/index.js +20 -1
- package/universal/index.js +20 -1
- package/utility/ast-utils.js +20 -1
- package/utility/latest-versions.js +2 -2
- package/utility/ng-ast-utils.js +20 -1
- package/workspace/files/package.json.template +3 -3
package/app-shell/index.js
CHANGED
|
@@ -6,10 +6,29 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
const core_1 = require("@angular-devkit/core");
|
|
11
30
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
12
|
-
const ts = require("../third_party/github.com/Microsoft/TypeScript/lib/typescript");
|
|
31
|
+
const ts = __importStar(require("../third_party/github.com/Microsoft/TypeScript/lib/typescript"));
|
|
13
32
|
const ast_utils_1 = require("../utility/ast-utils");
|
|
14
33
|
const change_1 = require("../utility/change");
|
|
15
34
|
const ng_ast_utils_1 = require("../utility/ng-ast-utils");
|
|
@@ -96,6 +96,7 @@
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
.card {
|
|
99
|
+
all: unset;
|
|
99
100
|
border-radius: 4px;
|
|
100
101
|
border: 1px solid #eee;
|
|
101
102
|
background-color: #fafafa;
|
|
@@ -249,7 +250,6 @@
|
|
|
249
250
|
background-image: linear-gradient(-180deg,#fafbfc,#eff3f6 90%);
|
|
250
251
|
margin-left: 4px;
|
|
251
252
|
font-weight: 600;
|
|
252
|
-
font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;
|
|
253
253
|
}
|
|
254
254
|
|
|
255
255
|
.github-star-badge:hover {
|
|
@@ -272,10 +272,8 @@
|
|
|
272
272
|
width: 1920px;
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
|
|
276
275
|
/* Responsive Styles */
|
|
277
276
|
@media screen and (max-width: 767px) {
|
|
278
|
-
|
|
279
277
|
.card-container > *:not(.circle-link) ,
|
|
280
278
|
.terminal {
|
|
281
279
|
width: 100%;
|
|
@@ -359,24 +357,24 @@
|
|
|
359
357
|
<div class="card-container">
|
|
360
358
|
<a class="card" target="_blank" rel="noopener" href="https://angular.io/tutorial">
|
|
361
359
|
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M5 13.18v4L12 21l7-3.82v-4L12 17l-7-3.82zM12 3L1 9l11 6 9-4.91V17h2V9L12 3z"/></svg>
|
|
362
|
-
|
|
363
360
|
<span>Learn Angular</span>
|
|
364
|
-
|
|
365
361
|
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg> </a>
|
|
366
362
|
|
|
367
363
|
<a class="card" target="_blank" rel="noopener" href="https://angular.io/cli">
|
|
368
364
|
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"/></svg>
|
|
369
|
-
|
|
370
365
|
<span>CLI Documentation</span>
|
|
371
|
-
|
|
372
366
|
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>
|
|
373
367
|
</a>
|
|
374
368
|
|
|
375
369
|
<a class="card" target="_blank" rel="noopener" href="https://blog.angular.io/">
|
|
376
370
|
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M13.5.67s.74 2.65.74 4.8c0 2.06-1.35 3.73-3.41 3.73-2.07 0-3.63-1.67-3.63-3.73l.03-.36C5.21 7.51 4 10.62 4 14c0 4.42 3.58 8 8 8s8-3.58 8-8C20 8.61 17.41 3.8 13.5.67zM11.71 19c-1.78 0-3.22-1.4-3.22-3.14 0-1.62 1.05-2.76 2.81-3.12 1.77-.36 3.6-1.21 4.62-2.58.39 1.29.59 2.65.59 4.04 0 2.65-2.15 4.8-4.8 4.8z"/></svg>
|
|
377
|
-
|
|
378
371
|
<span>Angular Blog</span>
|
|
372
|
+
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>
|
|
373
|
+
</a>
|
|
379
374
|
|
|
375
|
+
<a class="card" target="_blank" rel="noopener" href="https://angular.io/devtools/">
|
|
376
|
+
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/></g><g><g><path d="M14.73,13.31C15.52,12.24,16,10.93,16,9.5C16,5.91,13.09,3,9.5,3S3,5.91,3,9.5C3,13.09,5.91,16,9.5,16 c1.43,0,2.74-0.48,3.81-1.27L19.59,21L21,19.59L14.73,13.31z M9.5,14C7.01,14,5,11.99,5,9.5S7.01,5,9.5,5S14,7.01,14,9.5 S11.99,14,9.5,14z"/><polygon points="10.29,8.44 9.5,6 8.71,8.44 6.25,8.44 8.26,10.03 7.49,12.5 9.5,10.97 11.51,12.5 10.74,10.03 12.75,8.44"/></g></g></svg>
|
|
377
|
+
<span>Angular DevTools</span>
|
|
380
378
|
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>
|
|
381
379
|
</a>
|
|
382
380
|
|
|
@@ -389,41 +387,35 @@
|
|
|
389
387
|
<input type="hidden" #selection>
|
|
390
388
|
|
|
391
389
|
<div class="card-container">
|
|
392
|
-
<
|
|
393
|
-
|
|
394
|
-
|
|
390
|
+
<button class="card card-small" (click)="selection.value = 'component'" tabindex="0">
|
|
391
|
+
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>
|
|
395
392
|
<span>New Component</span>
|
|
396
|
-
</
|
|
397
|
-
|
|
398
|
-
<div class="card card-small" (click)="selection.value = 'material'" tabindex="0">
|
|
399
|
-
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>
|
|
393
|
+
</button>
|
|
400
394
|
|
|
395
|
+
<button class="card card-small" (click)="selection.value = 'material'" tabindex="0">
|
|
396
|
+
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>
|
|
401
397
|
<span>Angular Material</span>
|
|
402
|
-
</
|
|
403
|
-
|
|
404
|
-
<div class="card card-small" (click)="selection.value = 'pwa'" tabindex="0">
|
|
405
|
-
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>
|
|
398
|
+
</button>
|
|
406
399
|
|
|
400
|
+
<button class="card card-small" (click)="selection.value = 'pwa'" tabindex="0">
|
|
401
|
+
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>
|
|
407
402
|
<span>Add PWA Support</span>
|
|
408
|
-
</
|
|
403
|
+
</button>
|
|
409
404
|
|
|
410
|
-
<
|
|
405
|
+
<button class="card card-small" (click)="selection.value = 'dependency'" tabindex="0">
|
|
411
406
|
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>
|
|
412
|
-
|
|
413
407
|
<span>Add Dependency</span>
|
|
414
|
-
</
|
|
408
|
+
</button>
|
|
415
409
|
|
|
416
|
-
<
|
|
410
|
+
<button class="card card-small" (click)="selection.value = 'test'" tabindex="0">
|
|
417
411
|
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>
|
|
418
|
-
|
|
419
412
|
<span>Run and Watch Tests</span>
|
|
420
|
-
</
|
|
413
|
+
</button>
|
|
421
414
|
|
|
422
|
-
<
|
|
415
|
+
<button class="card card-small" (click)="selection.value = 'build'" tabindex="0">
|
|
423
416
|
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>
|
|
424
|
-
|
|
425
417
|
<span>Build for Production</span>
|
|
426
|
-
</
|
|
418
|
+
</button>
|
|
427
419
|
</div>
|
|
428
420
|
|
|
429
421
|
<!-- Terminal -->
|
|
@@ -29,7 +29,7 @@ describe('AppComponent', () => {
|
|
|
29
29
|
it('should render title', () => {
|
|
30
30
|
const fixture = TestBed.createComponent(AppComponent);
|
|
31
31
|
fixture.detectChanges();
|
|
32
|
-
const compiled = fixture.nativeElement;
|
|
33
|
-
expect(compiled.querySelector('.content span')
|
|
32
|
+
const compiled = fixture.nativeElement as HTMLElement;
|
|
33
|
+
expect(compiled.querySelector('.content span')?.textContent).toContain('<%= name %> app is running!');
|
|
34
34
|
});
|
|
35
35
|
});
|
package/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.ts.template
CHANGED
|
@@ -14,7 +14,7 @@ import { Component, OnInit<% if(!!viewEncapsulation) { %>, ViewEncapsulation<% }
|
|
|
14
14
|
display: block;
|
|
15
15
|
}
|
|
16
16
|
`<% } %>
|
|
17
|
-
]<% } else { %>
|
|
17
|
+
]<% } else if (style !== 'none') { %>
|
|
18
18
|
styleUrls: ['./<%= dasherize(name) %><%= type ? '.' + dasherize(type): '' %>.<%= style %>']<% } %><% if(!!viewEncapsulation) { %>,
|
|
19
19
|
encapsulation: ViewEncapsulation.<%= viewEncapsulation %><% } if (changeDetection !== 'Default') { %>,
|
|
20
20
|
changeDetection: ChangeDetectionStrategy.<%= changeDetection %><% } %>
|
package/component/index.js
CHANGED
|
@@ -6,10 +6,29 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
const core_1 = require("@angular-devkit/core");
|
|
11
30
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
12
|
-
const ts = require("../third_party/github.com/Microsoft/TypeScript/lib/typescript");
|
|
31
|
+
const ts = __importStar(require("../third_party/github.com/Microsoft/TypeScript/lib/typescript"));
|
|
13
32
|
const ast_utils_1 = require("../utility/ast-utils");
|
|
14
33
|
const change_1 = require("../utility/change");
|
|
15
34
|
const find_module_1 = require("../utility/find-module");
|
|
@@ -17,6 +36,7 @@ const lint_fix_1 = require("../utility/lint-fix");
|
|
|
17
36
|
const parse_name_1 = require("../utility/parse-name");
|
|
18
37
|
const validation_1 = require("../utility/validation");
|
|
19
38
|
const workspace_1 = require("../utility/workspace");
|
|
39
|
+
const schema_1 = require("./schema");
|
|
20
40
|
function readIntoSourceFile(host, modulePath) {
|
|
21
41
|
const text = host.read(modulePath);
|
|
22
42
|
if (text === null) {
|
|
@@ -91,9 +111,10 @@ function default_1(options) {
|
|
|
91
111
|
options.selector || buildSelector(options, (project && project.prefix) || '');
|
|
92
112
|
validation_1.validateName(options.name);
|
|
93
113
|
validation_1.validateHtmlSelector(options.selector);
|
|
114
|
+
const skipStyleFile = options.inlineStyle || options.style === schema_1.Style.None;
|
|
94
115
|
const templateSource = schematics_1.apply(schematics_1.url('./files'), [
|
|
95
116
|
options.skipTests ? schematics_1.filter((path) => !path.endsWith('.spec.ts.template')) : schematics_1.noop(),
|
|
96
|
-
|
|
117
|
+
skipStyleFile ? schematics_1.filter((path) => !path.endsWith('.__style__.template')) : schematics_1.noop(),
|
|
97
118
|
options.inlineTemplate ? schematics_1.filter((path) => !path.endsWith('.html.template')) : schematics_1.noop(),
|
|
98
119
|
schematics_1.applyTemplates({
|
|
99
120
|
...core_1.strings,
|
package/component/schema.d.ts
CHANGED
|
@@ -71,7 +71,8 @@ export interface Schema {
|
|
|
71
71
|
*/
|
|
72
72
|
skipTests?: boolean;
|
|
73
73
|
/**
|
|
74
|
-
* The file extension or preprocessor to use for style files
|
|
74
|
+
* The file extension or preprocessor to use for style files, or 'none' to skip generating
|
|
75
|
+
* the style file.
|
|
75
76
|
*/
|
|
76
77
|
style?: Style;
|
|
77
78
|
/**
|
|
@@ -91,11 +92,13 @@ export declare enum ChangeDetection {
|
|
|
91
92
|
OnPush = "OnPush"
|
|
92
93
|
}
|
|
93
94
|
/**
|
|
94
|
-
* The file extension or preprocessor to use for style files
|
|
95
|
+
* The file extension or preprocessor to use for style files, or 'none' to skip generating
|
|
96
|
+
* the style file.
|
|
95
97
|
*/
|
|
96
98
|
export declare enum Style {
|
|
97
99
|
Css = "css",
|
|
98
100
|
Less = "less",
|
|
101
|
+
None = "none",
|
|
99
102
|
Sass = "sass",
|
|
100
103
|
Scss = "scss"
|
|
101
104
|
}
|
package/component/schema.js
CHANGED
|
@@ -12,12 +12,14 @@ var ChangeDetection;
|
|
|
12
12
|
ChangeDetection["OnPush"] = "OnPush";
|
|
13
13
|
})(ChangeDetection = exports.ChangeDetection || (exports.ChangeDetection = {}));
|
|
14
14
|
/**
|
|
15
|
-
* The file extension or preprocessor to use for style files
|
|
15
|
+
* The file extension or preprocessor to use for style files, or 'none' to skip generating
|
|
16
|
+
* the style file.
|
|
16
17
|
*/
|
|
17
18
|
var Style;
|
|
18
19
|
(function (Style) {
|
|
19
20
|
Style["Css"] = "css";
|
|
20
21
|
Style["Less"] = "less";
|
|
22
|
+
Style["None"] = "none";
|
|
21
23
|
Style["Sass"] = "sass";
|
|
22
24
|
Style["Scss"] = "scss";
|
|
23
25
|
})(Style = exports.Style || (exports.Style = {}));
|
package/component/schema.json
CHANGED
|
@@ -77,10 +77,10 @@
|
|
|
77
77
|
]
|
|
78
78
|
},
|
|
79
79
|
"style": {
|
|
80
|
-
"description": "The file extension or preprocessor to use for style files.",
|
|
80
|
+
"description": "The file extension or preprocessor to use for style files, or 'none' to skip generating the style file.",
|
|
81
81
|
"type": "string",
|
|
82
82
|
"default": "css",
|
|
83
|
-
"enum": ["css", "scss", "sass", "less"],
|
|
83
|
+
"enum": ["css", "scss", "sass", "less", "none"],
|
|
84
84
|
"x-user-analytics": 5
|
|
85
85
|
},
|
|
86
86
|
"type": {
|
package/directive/index.js
CHANGED
|
@@ -6,10 +6,29 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
const core_1 = require("@angular-devkit/core");
|
|
11
30
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
12
|
-
const ts = require("../third_party/github.com/Microsoft/TypeScript/lib/typescript");
|
|
31
|
+
const ts = __importStar(require("../third_party/github.com/Microsoft/TypeScript/lib/typescript"));
|
|
13
32
|
const ast_utils_1 = require("../utility/ast-utils");
|
|
14
33
|
const change_1 = require("../utility/change");
|
|
15
34
|
const find_module_1 = require("../utility/find-module");
|
|
@@ -120,6 +120,11 @@
|
|
|
120
120
|
"factory": "./update-12/schematic-options",
|
|
121
121
|
"description": "Remove invalid 'skipTests' option in '@schematics/angular:module' Angular schematic options."
|
|
122
122
|
},
|
|
123
|
+
"replace-deprecated-prod-flag": {
|
|
124
|
+
"version": "12.1.0",
|
|
125
|
+
"factory": "./update-12/replace-prod-flag",
|
|
126
|
+
"description": "Replace the deprecated '--prod' in package.json scripts."
|
|
127
|
+
},
|
|
123
128
|
"production-by-default": {
|
|
124
129
|
"version": "9999.0.0",
|
|
125
130
|
"factory": "./update-12/production-default-config",
|
|
@@ -6,6 +6,25 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
const core_1 = require("@angular-devkit/core");
|
|
11
30
|
const workspace_1 = require("../../utility/workspace");
|
|
@@ -72,12 +91,12 @@ async function isES5SupportNeeded(projectRoot) {
|
|
|
72
91
|
const criteria = ['y', 'a'];
|
|
73
92
|
try {
|
|
74
93
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
75
|
-
const browserslist = await Promise.resolve().then(() => require('browserslist'));
|
|
94
|
+
const browserslist = (await Promise.resolve().then(() => __importStar(require('browserslist')))).default;
|
|
76
95
|
const supportedBrowsers = browserslist(undefined, {
|
|
77
96
|
path: core_1.getSystemPath(projectRoot),
|
|
78
97
|
});
|
|
79
98
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
80
|
-
const { feature, features } = await Promise.resolve().then(() => require('caniuse-lite'));
|
|
99
|
+
const { feature, features } = await Promise.resolve().then(() => __importStar(require('caniuse-lite')));
|
|
81
100
|
const data = feature(features['es6-module']);
|
|
82
101
|
return supportedBrowsers.some((browser) => {
|
|
83
102
|
const [agentId, version] = browser.split(' ');
|
|
@@ -0,0 +1,9 @@
|
|
|
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 default function (): Rule;
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
const json_file_1 = require("../../utility/json-file");
|
|
11
|
+
function default_1() {
|
|
12
|
+
return (tree) => {
|
|
13
|
+
const file = new json_file_1.JSONFile(tree, 'package.json');
|
|
14
|
+
const scripts = file.get(['scripts']);
|
|
15
|
+
if (!scripts || typeof scripts !== 'object') {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
19
|
+
const updatedScripts = Object.entries(scripts).map(([key, value]) => [
|
|
20
|
+
key,
|
|
21
|
+
typeof value === 'string'
|
|
22
|
+
? value.replace(/ --prod(?!\w)/g, ' --configuration production')
|
|
23
|
+
: value,
|
|
24
|
+
]);
|
|
25
|
+
file.modify(['scripts'], Object.fromEntries(updatedScripts));
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
exports.default = default_1;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
const core_1 = require("@angular-devkit/core");
|
|
10
11
|
const workspace_1 = require("../../utility/workspace");
|
|
11
12
|
const BrowserBuilderOptions = [
|
|
12
13
|
['aot', false, true],
|
|
@@ -22,9 +23,15 @@ const ServerBuilderOptions = [
|
|
|
22
23
|
['optimization', false, true],
|
|
23
24
|
];
|
|
24
25
|
function default_1() {
|
|
25
|
-
return workspace_1.updateWorkspace((workspace) => {
|
|
26
|
-
for (const [, target] of workspace_1.allWorkspaceTargets(workspace)) {
|
|
27
|
-
if (!
|
|
26
|
+
return (_tree, context) => workspace_1.updateWorkspace((workspace) => {
|
|
27
|
+
for (const [targetName, target, projectName] of workspace_1.allWorkspaceTargets(workspace)) {
|
|
28
|
+
if (!target.builder.startsWith('@angular-devkit/') &&
|
|
29
|
+
!target.builder.startsWith('@nguniversal/')) {
|
|
30
|
+
context.logger.warn(core_1.tags.stripIndent `
|
|
31
|
+
"${targetName}" target in "${projectName}" project is using a third-party builder.
|
|
32
|
+
You may need to adjust the options to retain the existing behavior.
|
|
33
|
+
For more information, see the breaking changes section within the release notes: https://github.com/angular/angular-cli/releases/tag/v12.0.0
|
|
34
|
+
`);
|
|
28
35
|
continue;
|
|
29
36
|
}
|
|
30
37
|
// Only interested in Angular Devkit browser and server builders
|
|
@@ -6,8 +6,27 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
const ts = require("../../third_party/github.com/Microsoft/TypeScript/lib/typescript");
|
|
29
|
+
const ts = __importStar(require("../../third_party/github.com/Microsoft/TypeScript/lib/typescript"));
|
|
11
30
|
function* visit(directory) {
|
|
12
31
|
for (const path of directory.subfiles) {
|
|
13
32
|
if (path.endsWith('.ts') && !path.endsWith('.d.ts')) {
|
|
@@ -6,8 +6,27 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
const ts = require("../../third_party/github.com/Microsoft/TypeScript/lib/typescript");
|
|
29
|
+
const ts = __importStar(require("../../third_party/github.com/Microsoft/TypeScript/lib/typescript"));
|
|
11
30
|
function* visit(directory) {
|
|
12
31
|
for (const path of directory.subfiles) {
|
|
13
32
|
if (path.endsWith('.ts') && !path.endsWith('.d.ts')) {
|
|
@@ -6,9 +6,28 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
exports.updateServerMainFile = void 0;
|
|
11
|
-
const ts = require("../../third_party/github.com/Microsoft/TypeScript/lib/typescript");
|
|
30
|
+
const ts = __importStar(require("../../third_party/github.com/Microsoft/TypeScript/lib/typescript"));
|
|
12
31
|
const ast_utils_1 = require("../../utility/ast-utils");
|
|
13
32
|
const workspace_1 = require("../../utility/workspace");
|
|
14
33
|
const workspace_models_1 = require("../../utility/workspace-models");
|
package/module/index.js
CHANGED
|
@@ -6,10 +6,29 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
const core_1 = require("@angular-devkit/core");
|
|
11
30
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
12
|
-
const ts = require("../third_party/github.com/Microsoft/TypeScript/lib/typescript");
|
|
31
|
+
const ts = __importStar(require("../third_party/github.com/Microsoft/TypeScript/lib/typescript"));
|
|
13
32
|
const ast_utils_1 = require("../utility/ast-utils");
|
|
14
33
|
const change_1 = require("../utility/change");
|
|
15
34
|
const find_module_1 = require("../utility/find-module");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schematics/angular",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.2",
|
|
4
4
|
"description": "Schematics specific to Angular",
|
|
5
5
|
"homepage": "https://github.com/angular/angular-cli",
|
|
6
6
|
"keywords": [
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
],
|
|
16
16
|
"schematics": "./collection.json",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@angular-devkit/core": "12.1.
|
|
19
|
-
"@angular-devkit/schematics": "12.1.
|
|
18
|
+
"@angular-devkit/core": "12.1.2",
|
|
19
|
+
"@angular-devkit/schematics": "12.1.2",
|
|
20
20
|
"jsonc-parser": "3.0.0"
|
|
21
21
|
},
|
|
22
22
|
"repository": {
|
package/pipe/index.js
CHANGED
|
@@ -6,10 +6,29 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
const core_1 = require("@angular-devkit/core");
|
|
11
30
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
12
|
-
const ts = require("../third_party/github.com/Microsoft/TypeScript/lib/typescript");
|
|
31
|
+
const ts = __importStar(require("../third_party/github.com/Microsoft/TypeScript/lib/typescript"));
|
|
13
32
|
const ast_utils_1 = require("../utility/ast-utils");
|
|
14
33
|
const change_1 = require("../utility/change");
|
|
15
34
|
const find_module_1 = require("../utility/find-module");
|
package/service-worker/index.js
CHANGED
|
@@ -6,11 +6,30 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
const core_1 = require("@angular-devkit/core");
|
|
11
30
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
12
31
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
13
|
-
const ts = require("../third_party/github.com/Microsoft/TypeScript/lib/typescript");
|
|
32
|
+
const ts = __importStar(require("../third_party/github.com/Microsoft/TypeScript/lib/typescript"));
|
|
14
33
|
const ast_utils_1 = require("../utility/ast-utils");
|
|
15
34
|
const change_1 = require("../utility/change");
|
|
16
35
|
const dependencies_1 = require("../utility/dependencies");
|
package/universal/index.js
CHANGED
|
@@ -6,11 +6,30 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
const core_1 = require("@angular-devkit/core");
|
|
11
30
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
12
31
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
13
|
-
const ts = require("../third_party/github.com/Microsoft/TypeScript/lib/typescript");
|
|
32
|
+
const ts = __importStar(require("../third_party/github.com/Microsoft/TypeScript/lib/typescript"));
|
|
14
33
|
const ast_utils_1 = require("../utility/ast-utils");
|
|
15
34
|
const change_1 = require("../utility/change");
|
|
16
35
|
const dependencies_1 = require("../utility/dependencies");
|
package/utility/ast-utils.js
CHANGED
|
@@ -6,10 +6,29 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
exports.addRouteDeclarationToModule = exports.getRouterModuleDeclaration = exports.getEnvironmentExportName = exports.isImported = exports.addBootstrapToModule = exports.addExportToModule = exports.addProviderToModule = exports.addImportToModule = exports.addDeclarationToModule = exports.addSymbolToNgModuleMetadata = exports.getMetadataField = exports.getDecoratorMetadata = exports.insertAfterLastOccurrence = exports.findNode = exports.getSourceNodes = exports.findNodes = exports.insertImport = void 0;
|
|
11
30
|
const core_1 = require("@angular-devkit/core");
|
|
12
|
-
const ts = require("../third_party/github.com/Microsoft/TypeScript/lib/typescript");
|
|
31
|
+
const ts = __importStar(require("../third_party/github.com/Microsoft/TypeScript/lib/typescript"));
|
|
13
32
|
const change_1 = require("./change");
|
|
14
33
|
/**
|
|
15
34
|
* Add Import `import { symbolName } from fileName` if the import doesn't exit
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.latestVersions = void 0;
|
|
11
11
|
exports.latestVersions = {
|
|
12
12
|
// These versions should be kept up to date with latest Angular peer dependencies.
|
|
13
|
-
Angular: '~12.1.
|
|
13
|
+
Angular: '~12.1.2',
|
|
14
14
|
RxJs: '~6.6.0',
|
|
15
15
|
ZoneJs: '~0.11.4',
|
|
16
16
|
TypeScript: '~4.3.2',
|
|
@@ -19,5 +19,5 @@ exports.latestVersions = {
|
|
|
19
19
|
// published together from the same monorepo, and they are both
|
|
20
20
|
// non-experimental, they will always have the same version.
|
|
21
21
|
DevkitBuildAngular: '~' + require('../package.json')['version'],
|
|
22
|
-
ngPackagr: '^12.
|
|
22
|
+
ngPackagr: '^12.1.0',
|
|
23
23
|
};
|
package/utility/ng-ast-utils.js
CHANGED
|
@@ -6,12 +6,31 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
exports.getAppModulePath = exports.findBootstrapModulePath = exports.findBootstrapModuleCall = void 0;
|
|
11
30
|
const core_1 = require("@angular-devkit/core");
|
|
12
31
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
13
32
|
const path_1 = require("path");
|
|
14
|
-
const ts = require("../third_party/github.com/Microsoft/TypeScript/lib/typescript");
|
|
33
|
+
const ts = __importStar(require("../third_party/github.com/Microsoft/TypeScript/lib/typescript"));
|
|
15
34
|
const ast_utils_1 = require("../utility/ast-utils");
|
|
16
35
|
function findBootstrapModuleCall(host, mainPath) {
|
|
17
36
|
const mainBuffer = host.read(mainPath);
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@angular/cli": "<%= '~' + version %>",
|
|
27
27
|
"@angular/compiler-cli": "<%= latestVersions.Angular %>",<% if (!minimal) { %>
|
|
28
|
-
"@types/jasmine": "~3.
|
|
28
|
+
"@types/jasmine": "~3.8.0",<% } %>
|
|
29
29
|
"@types/node": "^12.11.1",<% if (!minimal) { %>
|
|
30
|
-
"jasmine-core": "~3.
|
|
30
|
+
"jasmine-core": "~3.8.0",
|
|
31
31
|
"karma": "~6.3.0",
|
|
32
32
|
"karma-chrome-launcher": "~3.1.0",
|
|
33
33
|
"karma-coverage": "~2.0.3",
|
|
34
34
|
"karma-jasmine": "~4.0.0",
|
|
35
|
-
"karma-jasmine-html-reporter": "
|
|
35
|
+
"karma-jasmine-html-reporter": "~1.7.0",<% } %>
|
|
36
36
|
"typescript": "<%= latestVersions.TypeScript %>"
|
|
37
37
|
}
|
|
38
38
|
}
|