Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: angular/angular-cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v9.1.3
Choose a base ref
...
head repository: angular/angular-cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v9.1.4
Choose a head ref
  • 7 commits
  • 8 files changed
  • 2 contributors

Commits on Apr 23, 2020

  1. Copy the full SHA
    b523231 View commit details

Commits on Apr 24, 2020

  1. ci: remove circle ci cache fallback

    Cache fallback can be useful in some cases, but in our case it is hindering the CI performance as the cache is growing everyday which results in slower CI times because of the restoring and saving phases.
    
    A fresh cache size is about 450Mb, while currently with fallbacking enabled it has grown to 3.8Gb
    
    Below are some timings taken were we see that having cache fallbacking is doesn't help CI times:
    
    | Caching                   | Cache Size | Restore Cache | Yarn Install | Save Cache | Total Time Elapsed |
    |---------------------------|------------|---------------|--------------|------------|--------------------|
    | Cache w/ Fallback (Miss)  | 3.81Gb     | 2m 50s        | 30s          | 7m 20s     | 10m 40s            |
    | Cache w/ Fallback (Hit)   | 3.81Gb      | 2m 50s        | 20s          | 0          | 3m 10s             |
    | Cache wo/ Fallback (Miss) | 0          | 0             | 40s          | 30s        | 1m 10s              |
    | Cache wo/ Fallback (Hit)  | 458mb      | 20s           | 20s          | 0          | 40s                |
    alan-agius4 authored and mgechev committed Apr 24, 2020
    Copy the full SHA
    20d6ad9 View commit details
  2. Copy the full SHA
    aab41a6 View commit details
  3. Copy the full SHA
    1b2847e View commit details

Commits on Apr 27, 2020

  1. build: fix typescript 3.9 compilation

    alan-agius4 authored and mgechev committed Apr 27, 2020
    Copy the full SHA
    f1119ff View commit details

Commits on Apr 29, 2020

  1. fix(@angular-devkit/build-angular): disable inline svg optimizations

    SVGO can cause optimizations which are not compatible in all browsers.
    
    FIxes: #17564
    alan-agius4 authored and mgechev committed Apr 29, 2020
    Copy the full SHA
    3f620d5 View commit details
  2. release: v9.1.4

    mgechev committed Apr 29, 2020
    Copy the full SHA
    7819b2a View commit details
10 changes: 2 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -12,14 +12,10 @@ version: 2.1
# Variables

## IMPORTANT
# If you change the cache key prefix, also sync the fallback_cache_key fallback to match.
# Keep the static part of the cache key as prefix to enable correct fallbacks.
# Windows needs its own cache key because binaries in node_modules are different.
# See https://circleci.com/docs/2.0/caching/#restoring-cache for how prefixes work in CircleCI.
var_1: &cache_key angular_devkit-0.12.0-{{ checksum "yarn.lock" }}
var_2: &cache_key_fallback angular_devkit-0.12.0
var_1_win: &cache_key_win angular_devkit-win-0.12.0-{{ checksum "yarn.lock" }}
var_2_win: &cache_key_fallback_win angular_devkit-win-0.12.0
var_1: &cache_key angular_devkit-12.9-{{ checksum "yarn.lock" }}
var_1_win: &cache_key_win angular_devkit-win-12.9-{{ checksum "yarn.lock" }}
var_3: &default_nodeversion "12.9"
# Workspace initially persisted by the `setup` job, and then enhanced by `setup-and-build-win`.
# https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
@@ -133,7 +129,6 @@ jobs:
- restore_cache:
keys:
- *cache_key
- *cache_key_fallback
- run: yarn install --frozen-lockfile
- persist_to_workspace:
root: *workspace_location
@@ -308,7 +303,6 @@ jobs:
- restore_cache:
keys:
- *cache_key_win
- *cache_key_fallback_win
- run: yarn install --frozen-lockfile
- run: yarn build
- save_cache:
2 changes: 1 addition & 1 deletion packages/angular/cli/commands/analytics.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/schema",
"$id": "ng-cli://commands/analytics.json",
"description": "Configures the gathering of Angular CLI usage metrics. See https://v8.angular.io/cli/usage-analytics-gathering.",
"description": "Configures the gathering of Angular CLI usage metrics. See https://angular.io/cli/usage-analytics-gathering.",
"$longDescription": "./analytics-long.md",

"$aliases": [],
Original file line number Diff line number Diff line change
@@ -77,7 +77,10 @@ export class OptimizeCssWebpackPlugin {
}

const cssNanoOptions: cssNano.CssNanoOptions = {
preset: 'default',
preset: ['default', {
// Disable SVG optimization, as this can cause optimizations which are not compatible in all browsers.
svgo: false,
}],
};

const postCssOptions: ProcessOptions = {
37 changes: 23 additions & 14 deletions packages/angular_devkit/core/src/utils/object.ts
Original file line number Diff line number Diff line change
@@ -6,9 +6,9 @@
* found in the LICENSE file at https://angular.io/license
*/

export function mapObject<T, V>(obj: {[k: string]: T},
mapper: (k: string, v: T) => V): {[k: string]: V} {
return Object.keys(obj).reduce((acc: {[k: string]: V}, k: string) => {
export function mapObject<T, V>(obj: { [k: string]: T },
mapper: (k: string, v: T) => V): { [k: string]: V } {
return Object.keys(obj).reduce((acc: { [k: string]: V }, k: string) => {
acc[k] = mapper(k, obj[k]);

return acc;
@@ -19,24 +19,33 @@ export function mapObject<T, V>(obj: {[k: string]: T},
const copySymbol = Symbol();

// tslint:disable-next-line:no-any
export function deepCopy<T extends any> (value: T): T {
export function deepCopy<T extends any>(value: T): T {
if (Array.isArray(value)) {
return value.map((o: T) => deepCopy(o));
// tslint:disable-next-line:no-any
return value.map((o: any) => deepCopy(o)) as unknown as T;
} else if (value && typeof value === 'object') {
if (value[copySymbol]) {
const valueCasted = value as {
[copySymbol]?: T,
toJSON?: () => string,
// tslint:disable-next-line:no-any
[key: string]: any,
};

if (valueCasted[copySymbol]) {
// This is a circular dependency. Just return the cloned value.
return value[copySymbol];
return valueCasted[copySymbol] as T;
}
if (value['toJSON']) {
return JSON.parse((value['toJSON'] as () => string)());

if (valueCasted['toJSON']) {
return JSON.parse(valueCasted['toJSON']());
}

const copy = new (Object.getPrototypeOf(value).constructor)();
value[copySymbol] = copy;
for (const key of Object.getOwnPropertyNames(value)) {
copy[key] = deepCopy(value[key]);
const copy = new (Object.getPrototypeOf(valueCasted).constructor)();
valueCasted[copySymbol] = copy;
for (const key of Object.getOwnPropertyNames(valueCasted)) {
copy[key] = deepCopy(valueCasted[key]);
}
value[copySymbol] = undefined;
valueCasted[copySymbol] = undefined;

return copy;
} else {
2 changes: 1 addition & 1 deletion packages/ngtools/webpack/src/compiler_host.ts
Original file line number Diff line number Diff line change
@@ -361,7 +361,7 @@ export class WebpackCompilerHost implements ts.CompilerHost {
getCanonicalFileName(fileName: string): string {
const path = this.resolve(fileName);

return this.useCaseSensitiveFileNames ? path : path.toLowerCase();
return this.useCaseSensitiveFileNames() ? path : path.toLowerCase();
}

useCaseSensitiveFileNames(): boolean {
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ export function replaceResources(
return (context: ts.TransformationContext) => {
const typeChecker = getTypeChecker();

const visitNode: ts.Visitor = (node: ts.Decorator) => {
const visitNode: ts.Visitor = (node: ts.Node) => {
if (ts.isClassDeclaration(node)) {
const decorators = ts.visitNodes(
node.decorators,
4 changes: 2 additions & 2 deletions packages/schematics/angular/app-shell/app-shell-long.md
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ Use this command with a routing app that is accompanied by a Universal server-si
To create an app shell, use the following command.

<code-example format="." language="bash">
ng generate app-shell --client-project my-app --universal-project server-app
ng generate app-shell my-app
</code-example>

* `my-app` is the name of your client application
@@ -44,4 +44,4 @@ To verify the that the app has been built with the default shell content:

1. Open `dist/app-shell/index.html` in your browser.

The default text "app-shell works!" verifies that the app-shell route was rendered as part of the output.
The default text "app-shell works!" verifies that the app-shell route was rendered as part of the output.
8 changes: 4 additions & 4 deletions packages/schematics/angular/utility/latest-versions.ts
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@

export const latestVersions = {
// These versions should be kept up to date with latest Angular peer dependencies.
Angular: '~9.1.3',
Angular: '~9.1.4',
RxJs: '~6.5.4',
ZoneJs: '~0.10.2',
TypeScript: '~3.8.3',
@@ -18,9 +18,9 @@ export const latestVersions = {
// For our e2e tests, these versions must match the latest tag present on the branch.
// During RC periods they will not match the latest RC until there's a new git tag, and
// should not be updated.
DevkitBuildAngular: '~0.901.3',
DevkitBuildNgPackagr: '~0.901.3',
DevkitBuildWebpack: '~0.901.3',
DevkitBuildAngular: '~0.901.4',
DevkitBuildNgPackagr: '~0.901.4',
DevkitBuildWebpack: '~0.901.4',

ngPackagr: '^9.0.0',
};