Skip to content

Commit 4d4fc09

Browse files
alan-agius4dgp1130
authored andcommitted
build: udate angular packages to version 10
1 parent b66b9b8 commit 4d4fc09

File tree

7 files changed

+119
-99
lines changed

7 files changed

+119
-99
lines changed

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,20 +66,20 @@
6666
]
6767
},
6868
"devDependencies": {
69-
"@angular/animations": "9.1.4",
69+
"@angular/animations": "10.0.0-next.5",
7070
"@angular/cdk": "9.2.2",
71-
"@angular/common": "9.1.4",
72-
"@angular/compiler": "9.1.4",
73-
"@angular/compiler-cli": "9.1.4",
74-
"@angular/core": "9.1.4",
75-
"@angular/forms": "9.1.4",
76-
"@angular/localize": "9.1.4",
71+
"@angular/common": "10.0.0-next.5",
72+
"@angular/compiler": "10.0.0-next.5",
73+
"@angular/compiler-cli": "10.0.0-next.5",
74+
"@angular/core": "10.0.0-next.5",
75+
"@angular/forms": "10.0.0-next.5",
76+
"@angular/localize": "10.0.0-next.5",
7777
"@angular/material": "9.2.2",
78-
"@angular/platform-browser": "9.1.4",
79-
"@angular/platform-browser-dynamic": "9.1.4",
80-
"@angular/platform-server": "9.1.4",
81-
"@angular/router": "9.1.4",
82-
"@angular/service-worker": "9.1.4",
78+
"@angular/platform-browser": "10.0.0-next.5",
79+
"@angular/platform-browser-dynamic": "10.0.0-next.5",
80+
"@angular/platform-server": "10.0.0-next.5",
81+
"@angular/router": "10.0.0-next.5",
82+
"@angular/service-worker": "10.0.0-next.5",
8383
"@babel/core": "7.9.6",
8484
"@babel/generator": "7.9.6",
8585
"@babel/plugin-transform-runtime": "7.9.6",

packages/angular_devkit/build_angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"worker-plugin": "4.0.3"
7575
},
7676
"peerDependencies": {
77-
"@angular/compiler-cli": ">=9.0.0 < 10",
77+
"@angular/compiler-cli": ">=10.0.0-next.0 < 11",
7878
"typescript": ">=3.6 < 3.9"
7979
},
8080
"peerDependenciesMeta": {

packages/angular_devkit/build_angular/src/browser/specs/service-worker_spec.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ describe('Browser Builder service worker', () => {
9393
'/favicon.ico',
9494
'/index.html',
9595
],
96+
cacheQueryOptions: {
97+
ignoreVary: true,
98+
},
9699
patterns: [],
97100
},
98101
{
@@ -103,6 +106,9 @@ describe('Browser Builder service worker', () => {
103106
'/assets/folder-asset.txt',
104107
'/spectrum.png',
105108
],
109+
cacheQueryOptions: {
110+
ignoreVary: true,
111+
},
106112
patterns: [],
107113
},
108114
],
@@ -152,6 +158,9 @@ describe('Browser Builder service worker', () => {
152158
'/foo/bar/index.html',
153159
],
154160
patterns: [],
161+
cacheQueryOptions: {
162+
ignoreVary: true,
163+
},
155164
},
156165
{
157166
name: 'assets',
@@ -161,6 +170,9 @@ describe('Browser Builder service worker', () => {
161170
'/foo/bar/assets/folder-asset.txt',
162171
],
163172
patterns: [],
173+
cacheQueryOptions: {
174+
ignoreVary: true,
175+
},
164176
},
165177
],
166178
dataGroups: [],

packages/angular_devkit/build_angular/src/utils/process-bundle.ts

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -694,14 +694,8 @@ async function inlineLocalesDirect(ast: ParseResult, options: InlineOptions) {
694694

695695
const { default: generate } = await import('@babel/generator');
696696

697-
// In Angular v10.0.0 the `source_file_utils` file was moved.
698-
// (Remember to remove the `tryImport()` function when only one import path is required.)
699697
// tslint:disable-next-line: no-implicit-dependencies
700-
const utils = await tryImport<typeof import('@angular/localize/src/tools/src/translate/source_files/source_file_utils')>(
701-
'@angular/localize/src/tools/src/source_file_utils',
702-
'@angular/localize/src/tools/src/translate/source_files/source_file_utils',
703-
);
704-
698+
const utils = await import('@angular/localize/src/tools/src/source_file_utils');
705699
// tslint:disable-next-line: no-implicit-dependencies
706700
const localizeDiag = await import('@angular/localize/src/tools/src/diagnostics');
707701

@@ -783,17 +777,6 @@ async function inlineLocalesDirect(ast: ParseResult, options: InlineOptions) {
783777
return { file: options.filename, diagnostics: diagnostics.messages, count: positions.length };
784778
}
785779

786-
async function tryImport<T>(...importPaths: string[]): Promise<T> {
787-
for (const importPath of importPaths) {
788-
try {
789-
return await import(importPath);
790-
} catch {
791-
// Do nothing
792-
}
793-
}
794-
throw new Error('Unable to import from any of these paths:\n' + importPaths.map(p => ` - ${p}`).join('\n'));
795-
}
796-
797780
function inlineCopyOnly(options: InlineOptions) {
798781
if (!i18n) {
799782
throw new Error('i18n options are missing');
@@ -818,7 +801,7 @@ function findLocalizePositions(
818801
ast: ParseResult,
819802
options: InlineOptions,
820803
// tslint:disable-next-line: no-implicit-dependencies
821-
utils: typeof import('@angular/localize/src/tools/src/translate/source_files/source_file_utils'),
804+
utils: typeof import('@angular/localize/src/tools/src/source_file_utils'),
822805
): LocalizePosition[] {
823806
const positions: LocalizePosition[] = [];
824807
if (options.es5) {

packages/angular_devkit/build_ng_packagr/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"tsickle": "~0.37.1 || ~0.38.0"
1616
},
1717
"devDependencies": {
18-
"@angular/compiler": "9.1.4",
19-
"@angular/compiler-cli": "9.1.4",
18+
"@angular/compiler": "10.0.0-next.5",
19+
"@angular/compiler-cli": "10.0.0-next.5",
2020
"@angular-devkit/core": "0.0.0",
2121
"ng-packagr": "~9.1.0",
2222
"tslib": "^1.10.0"

packages/ngtools/webpack/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
"webpack-sources": "1.4.3"
2828
},
2929
"peerDependencies": {
30-
"@angular/compiler-cli": ">=9.0.0 < 10",
30+
"@angular/compiler-cli": ">=10.0.0-next.0 < 11",
3131
"typescript": ">=3.6 < 3.9",
3232
"webpack": "^4.0.0"
3333
},
3434
"devDependencies": {
35-
"@angular/compiler": "9.1.4",
36-
"@angular/compiler-cli": "9.1.4",
35+
"@angular/compiler": "10.0.0-next.5",
36+
"@angular/compiler-cli": "10.0.0-next.5",
3737
"typescript": "3.8.3",
3838
"webpack": "4.42.1"
3939
}

0 commit comments

Comments
 (0)