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: v10.0.5
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: v10.0.6
Choose a head ref
  • 7 commits
  • 8 files changed
  • 6 contributors

Commits on Aug 5, 2020

  1. ci: increase CircleCI no output timeout for bazel tests

    Bazel does not provide additional output while testing and this can cause unintended failures for long test times.
    
    (cherry picked from commit cbdfce6)
    clydin committed Aug 5, 2020
    Copy the full SHA
    9b3369a View commit details

Commits on Aug 7, 2020

  1. fix(@angular-devkit/build-angular): generate service worker manifest …

    …when running build in watch mode
    
    Closes #16883
    alan-agius4 authored and filipesilva committed Aug 7, 2020
    Copy the full SHA
    36eb009 View commit details
  2. ci: fix markdown typo

    dgp1130 authored and filipesilva committed Aug 7, 2020
    Copy the full SHA
    a3637af View commit details

Commits on Aug 10, 2020

  1. fix(@angular-devkit/build-angular): better handle relative paths with…

    … bundleDependencies=false
    
    When `bundleDependencies` is turned off, webpack only bundles modules imported via relative path.
    Existing check works well for import paths like `'./some/file'`,
    but fails for imports traversing the dir structure up, like `'../some/file'`.
    amakhrov authored and filipesilva committed Aug 10, 2020
    Copy the full SHA
    780c82d View commit details
  2. fix(@ngtools/webpack): issue warning when using strictMetadataEmit

    `strictMetadataEmit` option which is not intended to be used  for applications. See: https://angular.io/guide/angular-compiler-options#strictmetadataemit
    
    Closes #18424
    alan-agius4 authored and filipesilva committed Aug 10, 2020
    Copy the full SHA
    fb94db7 View commit details

Commits on Aug 13, 2020

  1. fix(@angular-devkit/architect): add name of the non-existing project …

    …to error message
    
    (cherry picked from commit 57b80ee)
    tobias74 authored and alan-agius4 committed Aug 13, 2020
    Copy the full SHA
    85ff78d View commit details
  2. release: v10.0.6

    mgechev committed Aug 13, 2020
    Copy the full SHA
    e82adfc View commit details
5 changes: 4 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -228,7 +228,9 @@ jobs:
- custom_attach_workspace
- setup_bazel_rbe
- run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
- run: yarn bazel:test
- run:
command: yarn bazel:test
no_output_timeout: 20m

integration:
executor: test-executor
@@ -237,6 +239,7 @@ jobs:
- custom_attach_workspace
- run:
command: yarn bazel:integration
no_output_timeout: 20m

snapshot_publish:
executor: action-executor
2 changes: 1 addition & 1 deletion docs/process/release.md
Original file line number Diff line number Diff line change
@@ -120,7 +120,7 @@ yarn admin packages --version
```

Now push the commit and the tag to the upstream repository. **Make sure to use
`--follow-tags, as tags need to be pushed immediately or CI may fail!**
`--follow-tags`, as tags need to be pushed immediately or CI may fail!**

```bash
git push upstream --follow-tags
Original file line number Diff line number Diff line change
@@ -129,7 +129,7 @@ export class WorkspaceNodeModulesArchitectHost implements ArchitectHost<NodeModu

const projectDefinition = this._workspace.projects.get(projectName);
if (!projectDefinition) {
throw new Error('Project does not exist.');
throw new Error(`Project "${projectName}" does not exist.`);
}

const metadata = ({
@@ -154,7 +154,7 @@ export class WorkspaceNodeModulesArchitectHost implements ArchitectHost<NodeModu
private findProjectTarget(target: Target) {
const projectDefinition = this._workspace.projects.get(target.project);
if (!projectDefinition) {
throw new Error('Project does not exist.');
throw new Error(`Project "${target.project}" does not exist.`);
}

return projectDefinition.targets.get(target.target);
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ export function getServerConfig(wco: WebpackConfigOptions): Configuration {
...externalDependencies,
(context: string, request: string, callback: (error?: null, result?: string) => void) => {
// Absolute & Relative paths are not externals
if (request.startsWith('./') || isAbsolute(request)) {
if (request.startsWith('.') || isAbsolute(request)) {
callback();

return;
2 changes: 1 addition & 1 deletion packages/angular_devkit/build_angular/src/browser/index.ts
Original file line number Diff line number Diff line change
@@ -747,7 +747,7 @@ export function buildWebpackBrowser(
}
}

if (!options.watch && options.serviceWorker) {
if (options.serviceWorker) {
for (const [locale, outputPath] of outputPaths.entries()) {
let localeBaseHref;
if (i18n.locales[locale] && i18n.locales[locale].baseHref !== '') {
Original file line number Diff line number Diff line change
@@ -7,8 +7,10 @@
*/
import { Architect } from '@angular-devkit/architect';
import { normalize, virtualFs } from '@angular-devkit/core';
import { debounceTime, take, tap } from 'rxjs/operators';
import { createArchitect, host } from '../../test-utils';

// tslint:disable-next-line: no-big-function
describe('Browser Builder service worker', () => {
const manifest = {
index: '/index.html',
@@ -124,6 +126,60 @@ describe('Browser Builder service worker', () => {
await run.stop();
});

it('works in watch mode', async () => {
host.writeMultipleFiles({
'src/ngsw-config.json': JSON.stringify(manifest),
'src/assets/folder-asset.txt': 'folder-asset.txt',
'src/styles.css': `body { background: url(./spectrum.png); }`,
});

const overrides = { serviceWorker: true, watch: true };
const run = await architect.scheduleTarget(target, overrides);
let buildNumber = 0;

await run.output
.pipe(
debounceTime(3000),
tap(buildEvent => {
expect(buildEvent.success).toBeTrue();

const ngswJsonPath = normalize('dist/ngsw.json');
expect(host.scopedSync().exists(ngswJsonPath)).toBeTrue();
const ngswJson = JSON.parse(virtualFs.fileBufferToString(host.scopedSync().read(ngswJsonPath)));

const hashTableEntries = Object.keys(ngswJson.hashTable);

buildNumber += 1;
switch (buildNumber) {
case 1:
expect(hashTableEntries).toEqual([
'/assets/folder-asset.txt',
'/favicon.ico',
'/index.html',
'/spectrum.png',
]);

host.copyFile('src/assets/folder-asset.txt', 'src/assets/folder-new-asset.txt');
break;

case 2:
expect(hashTableEntries).toEqual([
'/assets/folder-asset.txt',
'/assets/folder-new-asset.txt',
'/favicon.ico',
'/index.html',
'/spectrum.png',
]);
break;
}
}),
take(2),
)
.toPromise();

await run.stop();
});

it('works with service worker and baseHref', async () => {
host.writeMultipleFiles({
'src/ngsw-config.json': JSON.stringify(manifest),
8 changes: 8 additions & 0 deletions packages/ngtools/webpack/src/angular_compiler_plugin.ts
Original file line number Diff line number Diff line change
@@ -275,6 +275,14 @@ export class AngularCompilerPlugin {
);
}

if (this._compilerOptions.strictMetadataEmit) {
this._warnings.push(
new Error(
`Using Angular compiler option 'strictMetadataEmit' for applications might cause undefined behavior.`,
),
);
}

if (this._discoverLazyRoutes === false && this.options.additionalLazyModules
&& Object.keys(this.options.additionalLazyModules).length > 0) {
this._warnings.push(
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: '~10.0.6',
Angular: '~10.0.9',
RxJs: '~6.5.5',
ZoneJs: '~0.10.3',
TypeScript: '~3.9.5',
@@ -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.1000.5',
DevkitBuildNgPackagr: '~0.1000.5',
DevkitBuildWebpack: '~0.1000.5',
DevkitBuildAngular: '~0.1000.6',
DevkitBuildNgPackagr: '~0.1000.6',
DevkitBuildWebpack: '~0.1000.6',

ngPackagr: '^10.0.0',
};