Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add benchmark package and AIO benchmark #12022

Merged
merged 4 commits into from
Sep 10, 2018
Merged

Conversation

filipesilva
Copy link
Contributor

No description provided.

@filipesilva filipesilva force-pushed the benchmark branch 2 times, most recently from c5ae566 to 66f2647 Compare August 29, 2018 11:07
@filipesilva filipesilva added target: major This PR is targeted for the next major release and removed state: WIP labels Aug 29, 2018
@filipesilva filipesilva changed the title Benchmark feat(@angular-devkit/benchmark): add package Aug 29, 2018
@filipesilva filipesilva changed the title feat(@angular-devkit/benchmark): add package Add benchmark package and AIO benchmark Aug 30, 2018
@filipesilva
Copy link
Contributor Author

Somewhat softblocked on soyuka/pidusage#80, since I can't get the correct elapsed times on docker. But I can see them correct locally.

Copy link
Contributor

@alexeagle alexeagle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some preliminary comments before commute to work

.monorepo.json Outdated
@@ -87,6 +87,11 @@
"hash": "9d2161b7ca9044c2286c7d66e10ead12",
"snapshotRepo": "angular/angular-devkit-architect-cli-builds"
},
"@angular-devkit/benchmark": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a necessary part of this PR to introduce (and publish) a new npm package?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was part of the original design, so that the benchmark could be ran over other projects.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it could make the PR smaller to create the package in a separate step, but up to you whether that's worth the trouble

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we should publish it yet though. There's already a large amount of packages under management.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we build it, but exclude from the publishing process?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good. is there a facility to do that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The publish script honors the "private": true, field in package.json and does not attempt to publish those packages. I added that to the benchmark package.

"initialize": "yarn clone && yarn setup && yarn update",
"clone": "(git clone https://github.com/angular/angular || true) && cd angular && git fetch origin && git reset --hard dd2a650c3455f3bc0a88f8181758a84aacb25fea",
"setup": "cd angular && yarn && cd aio && yarn && yarn setup",
"//": "Shouldn't need to install the package twice, but the first install seems to leave two @ngtools/webpack installs around.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ouch... can (should) we fix it now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spent a lot of time trying to work around yarn behaviour when installing local packages and it seems broken in a lot of ways. I've seen double packages being left around, mysterious 'failure to link' and others. Can't say I'm very inclined to continue mucking about in it right now.

"setup": "cd angular && yarn && cd aio && yarn && yarn setup",
"//": "Shouldn't need to install the package twice, but the first install seems to leave two @ngtools/webpack installs around.",
"update": "cd angular/aio && yarn add ../../../../dist/_angular-devkit_build-angular.tgz --dev && yarn add ../../../../dist/_angular-devkit_build-angular.tgz --dev",
"benchmark": "cd angular/aio && benchmark --verbose -- yarn ~~build --configuration=stable"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this ~~ thing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a script in AIO:

"~~build": "ng build",

It's one of the only ones that doesn't have pre and post scripts that would add noise to the benchmark.

"//packages/angular_devkit/core",
"@rxjs",
"@rxjs//operators",
# @typings: node
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gregmagolan ideally with the changes you're working on, this should become a real load-bearing dependency so it matches google3

"main": "index.js",
"scripts": {
"initialize": "yarn clone && yarn setup && yarn update",
"clone": "(git clone https://github.com/angular/angular || true) && cd angular && git fetch origin && git reset --hard dd2a650c3455f3bc0a88f8181758a84aacb25fea",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you use the git options to only fetch the one commit we want? we don't want to spend the time to pull all of angular's history over the network.
or possibly just fetch the archive zip from github with curl or similar, rather than clone the repo (we don't care to run any git commands in the resulting source tree right?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replacing with

    "clone": "(git clone https://github.com/angular/angular --depth 1 || true) && cd angular && git fetch origin dd2a650c3455f3bc0a88f8181758a84aacb25fea && git reset --hard dd2a650c3455f3bc0a88f8181758a84aacb25fea",

.monorepo.json Outdated
@@ -87,6 +87,11 @@
"hash": "9d2161b7ca9044c2286c7d66e10ead12",
"snapshotRepo": "angular/angular-devkit-architect-cli-builds"
},
"@angular-devkit/benchmark": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it could make the PR smaller to create the package in a separate step, but up to you whether that's worth the trouble

@@ -93,6 +96,21 @@ jobs:
- attach_workspace: *attach_options
- run: npm run admin -- build

benchmark:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the purpose of this CI job? just to make sure the benchmark runs and exits zero?
I know we've decided not to set up a monitoring job for this yet. maybe just having the benchmark execute is worth the CircleCI resources this will consume, but I think we should discuss that, and possibly not run this on CI yet

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually thought this was part of the TOOL-100 (import an example app into our repo) subtask but looking at it again that's not the case. The task only specifies importing, not running the benchmark over the app.

The idea was to be able to compare the results vs master when doing PRs that should affect performance.

If the CI job remains it's probably worth it to add the benchmark log as an CircleCI artifact to be easier to consult like angular-bazel-example does with the bundles (https://circleci.com/gh/gregmagolan/angular-bazel-example/653#artifacts/containers/0).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline and for now we will remove the CI job and run it manually.

@@ -0,0 +1,113 @@
# Angular Devkit Benchmark

This tools provides benchmark information for processes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tools->tool

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

```


NB: the `fibonacci.js` in the example is a naive implementation of a fibonacci number calculator:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I'd organize it as

## CLI Usage
<generic how to use, options, run --help>
< maybe don't repeat all the --help output here since it will get out-of-date >

## Example
given a fibonacci.js
blah
blah

we can run the benchmark:
< example command line >
< example output >

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

import { Observable } from 'rxjs';
import { map, reduce } from 'rxjs/operators';
import { AggregatedProcessStats, Capture, MetricGroup, MonitoredProcess } from './interfaces';
import { comulativeMovingAverage, max } from './utils';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spelling: cumulative

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -0,0 +1,49 @@
/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should this be a .d.ts file instead to enforce that it has no values?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

// Emit output and stats.
childProcess.stdout.on('data', (data: Buffer) => this.stdout.next(data));
childProcess.stderr.on('data', (data: Buffer) => this.stderr.next(data));
const statsSubs = timer(0, this.pollingRate).pipe(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow all the rxjs usage here feels un-idiomatic for a command-line tool but I'm learning :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the three output observables here (stats$, stdout$ and stderr$) are not very idiomatic. I didn't quite know how else I could accomplish what I wanted though.

The idea was to allow captures to be setup before the process ran to ensure no output was missed. So the observables had exist when instantiating a LocalMonitoredProcess, and output was sent there as it came from the different sources.

I couldn't find a better way to do it. Do you have any suggestions?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking at a higher level, that since our code doesn't need to respond to externally-generated events, we don't really need to be "reactive" in managing state in the app, and could use a more procedural style of programming without any rxjs. It's a broader style discussion for the whole repo.

processes, cpu, memory, pid, ppid, ctime, elapsed, timestamp,
} as AggregatedProcessStats;
}),
tap(stats => this.stats.next(stats)),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes me think: any idea how to edit a file in between runs so that we can measure the incremental dev RTT like the ibazel one does?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had some ideas, like a triggering capture. It's in the benchmark doc, but cut out of this version. It's the next thing that should be worked on imho.


process.run().pipe(
tap(() => expect(statsOutput.length).toBeGreaterThan(0)),
).toPromise().then(done, done.fail);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious, would it be more readable with async/await ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It goes from

  it('works', (done) => {
    const process = new LocalMonitoredProcess(cmd);
    process.run().pipe(
      tap(code => expect(code).toBe(0)),
    ).toPromise().then(done, done.fail);
  });

to

  it('works', async () => {
    const process = new LocalMonitoredProcess(cmd);
    const res = await process.run().pipe(toArray()).toPromise();
    expect(res).toEqual([0]);
  });

I think it looks nicer and also ensures the number of emissions.

alexeagle
alexeagle previously approved these changes Sep 10, 2018
"clone": "(git clone https://github.com/angular/angular --depth 1 || true) && cd angular && git fetch origin dd2a650c3455f3bc0a88f8181758a84aacb25fea && git checkout -f FETCH_HEAD",
"setup": "cd angular && yarn && cd aio && yarn && yarn setup",
"//": "Shouldn't need to install the package twice, but the first install seems to leave two @ngtools/webpack installs around.",
"update": "cd angular/aio && yarn add ../../../../dist/_angular-devkit_build-angular.tgz --dev && yarn add ../../../../dist/_angular-devkit_build-angular.tgz --dev",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: could move the workaround into a postupdate script

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that makes the workaround nature more obvious.

package.json Outdated
@@ -42,7 +43,6 @@
"url": "https://github.com/angular/angular-cli.git"
},
"engines": {
"node": ">=10.3.0 <11.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why removed? bad merge?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how it got there. Glad you caught it!

}

// Exit early if we can't find the command to benchmark.
if (!Array.isArray(argv['--']) || (argv['--'] as Array<string>).length < 1) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I'm surprised you need to cast ['--'] as a string[]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not ['--'] that is being cast but rather argv['--']. Depending on the content of process.argv, that array might not exist.

Looking back on this logic I think I'm casting it way more than needed. Will make an intermediate var that's properly typed.

import { existsSync, readFileSync, unlinkSync, writeFileSync } from 'fs';
import { basename, dirname, join } from 'path';
import { main } from './main';
// tslint:disable-next-line:no-implicit-dependencies
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strange I thought this was no-require-imports

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disabling TSLint here was because the temp dependency is not declared in the dependencies or devdependencies of this package. Rather, it's a top level dependency of the monorepo that we use for tests, and in other tests where it is used (/core/node/host_spec.ts) this is how we import it. Maybe we should make these explicit in the devDependencies?

// Emit output and stats.
childProcess.stdout.on('data', (data: Buffer) => this.stdout.next(data));
childProcess.stderr.on('data', (data: Buffer) => this.stderr.next(data));
const statsSubs = timer(0, this.pollingRate).pipe(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking at a higher level, that since our code doesn't need to respond to externally-generated events, we don't really need to be "reactive" in managing state in the app, and could use a more procedural style of programming without any rxjs. It's a broader style discussion for the whole repo.

},
"keywords": [],
"author": "",
"license": "ISC"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this right? probably should just remove as it is not an actual package.

@googlebot
Copy link

☹️ Sorry, but only Googlers may change the label cla: yes.

@kyliau kyliau merged commit 4a5973c into angular:master Sep 10, 2018
@filipesilva filipesilva deleted the benchmark branch September 10, 2018 21:33
filipesilva added a commit to filipesilva/angular-cli that referenced this pull request Sep 14, 2018
hansl pushed a commit that referenced this pull request Sep 14, 2018
bbogdanov pushed a commit to bbogdanov/angular-cli that referenced this pull request Sep 20, 2018
johnpapa added a commit to johnpapa/angular-cli that referenced this pull request Oct 6, 2018
* refactor(@angular/cli): rename project to workspace and clean up

Removed unnecessary fields in interfaces, added some comments. Overall QoL.

* fix(@angular/cli): add options in help for architect commands

And fix a bug with json schema to Option array.

* fix(@angular/cli): only print options once for schematic --help

* feat(@angular/cli): add long description and suboption option type

* fix(@angular/cli): only add options if theres only one builder configuration

* refactor(@angular/cli): remove parseJsonFile and add options to parseJson instead

* fix(@angular-devkit/schematics): fix task executor on Windows

Before we did not denormalize the paths, but were expecting to get paths as options.

* test(@angular-devkit/build-optimizer): also check method metadata

* feat(@angular-devkit/build-optimizer): remove constructor __param

* feat(@angular-devkit/build-optimizer): correctly identify renamed enums

* test(@angular/cli): add third party decorator prod test

* feat(@schematics/angular): add CLI 7.x migration schematic

* feat(@ngtools/webpack): add `typescript` version `3.0.x` as a peer dependency

* build: update repo to use `typescript` `3.0.x`

Updated `@angular/<packages>` to `^7.0.0-beta.4` since we need this to be able to run the tests. Due to the `@angular/compiler` in `v6` doesn't support `typescript` `3.0.x`.

* feat(@angular-devkit/build-optimizer): update `typescript` dependency to `3.0.x`

* build: add `typescript` as `devDependencies`

* feat(@angular-devkit/build-angular): add `ignore` option to `assets` object

You can now provide an array of globs to `ignore` from copying

Closes angular#11850

* feat(@angular-devkit/build-angular): add `ignore` option to `assets` object

You can now provide an array of globs to `ignore` from copying

Closes angular#11850

* feat(@schematics/angular): let Universal schematic use configurations from build architect

* feat(@schematics/angular): add several prompts to ng-new

* refactor(@angular-devkit/build-angular): clean up style webpack config

Clean up several parts of the styles config and also removed the dependency on `postcss-url`

* fix(@angular-devkit/schematics): throw `InvalidCollectionJsonException` when collection file is invalid

Closes angular#11818

* docs: fix english

* fix(@angular-devkit/build-angular): set the proper type to `fileReplacements`

Closes angular#11294

* fix(@angular-devkit/schematics): fix `generate` mangling files containing wide characters

Executing a command like `ng generate component my-component` can sometimes lead to
mangled Angular module files when inserting the component into `declaration` and
adding the import. This happens if the file contains characters that are wider than
one byte e.g. a copyright sign or an umlaut. Today it is expected to be able to use
two byte long characters in code.

The `UpdateBuffer` class operates using Buffer objects which use byte arrays internally.
Using text node positions provided by the TypeScript library, these will not match up.
This change looks up the textual position inside the Buffer and uses the correct index.

Closes angular#7851, angular#7950

* docs: update proxy.md with correct path

* fix(@schematics/angular): app shell schematic does not use production configuration

Closes: angular#11578

* fix(@schematics/angular): fix path for `ngswConfigPath` during migration

`/` will cause an error during lookup `Error: Expected to find an `ngsw-config.json` configuration file

* ci: update CI to node 10

* feat(@angular/pwa): support customized workspace configurations with add

* Update release.md

add note about `latest-versions.ts`

* release: v7.0.0-beta.0

* release: v7.0.0-beta.1

* release: v7.0.0-beta.2

* fix(@angular-devkit/build-optimizer): remove deprecated purify plugin

* fix(@angular-devkit/build-optimizer): remove deprecated wrap enums check

* refactor(@angular-devkit/build-optimizer): remove unused helper function

* refactor: pin down all direct dependencies

This is so that CLI users get the same direct dependency versions that were tested on the CI.

* fix(@schematics/angular): `module` imports paths are incorrect when `flat` option is used

Closes angular#12169

* fix(@schematics/angular): use app root to set server paths in options

* fix(@angular-devkit/core): allow stat on record host

* refactor(@ngtools/webpack): avoid double caching of files

* test(@angular-devkit/build-angular): expand polling success threshold

polling is highly dependent on CPU and IO; with shared CI machines this can cause high variability

* test(@angular-devkit/build-angular): improve resilience of watch rebuilds

* ci: add back angular snapshot e2e on master

* feat(@angular-devkit/benchmark): add package

* test: add AIO benchmark

* build: fix tarring packages on windows

* build: workaround yarn tgz bug

* fix(@schematics/angular): fix app shell schematic failure

Fixes angular#10093

* refactor(@schematics/angular): make interaction with architect targets type safe

* style: match styleguide catch callback

* docs: fix asset input path

Closes angular#12219

* fix(@angular/cli): show an error if invalid global config file found

Fixes angular#12198

* build: match engines with bazel and CI

* refactor(@ngtools/webpack): use async/await where possible

* build: use native async/await support

Node.js 8.9.4 (minimum supported version for the CLI) contains native async support.

* fix(@ngtools/webpack): remove deprecated singleFileIncludes option

* feat(@ngtools/webpack): move @angular/compiler-cli to a peer dependency

Now that the package is no longer installed globally, it can now properly use peer dependencies without issue.

* ci: remove unused unit test code coverage

This is not saved anywhere and it currently doesn't support native async/await.

* fix(@angular/cli): fix issues in google3

* fix(@schematics/angular): use 'architect' instead of 'targets' until deprecated

* test: update to support targets & architect fields

* fix(@angular/cli): warn if `targets` is present when using a schematic

* build: add support to build JSON schema through bazel

The tests verify that the output of the rule is the same as the input, and will
error if not (with a call to action). The binary produces the golden output.

We have to check the result of the transformation into git because internally
we cannot synchronize quicktype into google3.

* refactor(@schematics/update): add automated JSON schema generation

* refactor(@schematics/angular): automated JSON schema generation

* refactor(@schematics/schematics): automated JSON schema interface generation

* ci: add missing licenses from quicktype-core dependencies

And remove fixed TODOs.

* ci: bootstrap-local now prioritizes typescript files over JSON

The require() logic by default is not enough; require("file") would pick the json
if there are both a file.ts and file.json. This does not show up in prod because
js files are prioritized over json, but it does show up in bootstrap because we
compile ts in memory and there are no .js file on disk (which require()
could potentially see).

This is necessary for the schema change because schema.json and
schema.ts collides. We should also rename the commands from *-impl.ts to
just *.ts (they were named that way because of this conflict).

* refactor(@angular/pwa): automated JSON Schema generation

* refactor(@angular/cli): automated JSON schema interface generation

* ci: move bazel-build to xlarge resource class

* ci: build script uses bazel to generate the schemas

* build: support for JSON Schemas files in bootstrap-local

* build: add JSON Schema .d.ts and .js files to build output

* ci: disable bazel in devkit-admin build

Replace the build step with a custom JSON schema output parallel to
bazel.

* release: v7.0.0-beta.3

* build: use specific engines for built packages

* build: update pidusage

Fixes angular#12022 (comment)

* build: add create script to create a new project using local build

* ci: generate and publish all commands help in JSON format

* fix(@angular/cli): run --help-json now returns a basic help

It was throwing an exception about some targets not being available.

* fix(@angular/cli): chunk log so output is piped properly

Previously the output of some commands with long one-line log would not be
drained properly when piping it, causing it to be truncated.

* feat(@angular/cli): sort schematics by name in --help-json

* feat(@angular/cli): generate --helpJson will remove collection name

For the default collection.

* feat(@angular/cli): add help for ng-new schematics

Before it was missing because we need to load the schematics engine for it.
I moved the ng update logic that did this to SchematicCommand.

* fix(@angular/cli): add support for all variant of alias field name

* fix(@angular/cli): fix support for default values in options

* fix(@angular/cli): fix support for hidden options

They were showing when they should have been hidden.

* ci: remove external BUILD code that should not be internal

* refactor(@schematics/angular): replace usage of unknown for any

Google3 is still on TypeScript 2.9.

* feat(@ngtools/webpack): add support for `traceResolution`

Closes angular#8676

* docs: add jsdoc instead of comments

* feat(@schematics/angular): update ng-packagr to `4.2.0`

* build: update ng-packagr to `4.2.0`

* fix(@angular-devkit/schematics-cli): fix `list-schematics` is not printing anything

Usage:
```
$  schematics @schematics/angular: --list-schematics
$  schematics --list-schematics
```

When no colon is specified, it means that that you are passing a schematic name to be looked up in the default collection.

Closes angular#12220

* test: add tests to schematic-cli

* refactor: make the cli testable

* feat(@angular-devkit/core): `createConsoleLogger` now accepts 2 parameters to add custom `stdout` and `stderr`

* refactor: use common type for stdout and stderr

* build: add `angular_devkit/core:node`  to deps

* refactor(@schematics/angular): Parameterize findModule

This commit modifies `findModule` to accept custom regular expressions
so that a different filename convention for Angular modules is allowed.

* feat(@angular-devkit/build-angular): enable sourcemaps by default when using karma

Closes angular#12282

* docs: remove `--prod` as it's no longer needed

Closes angular#12290

* fix(@angular-devkit/build-angular): fully remove url inlining

* fix(@angular/cli): support `--version` option

* refactor(@angular/cli): correct implicit returns

* refactor(@angular-devkit/build-angular): correct implicit returns

* refactor(@angular-devkit/build-optimizer): correct implicit returns

* build: remove old monorepo version file

* build: remove unneeded gitignore file

* build: update nvmrc to use node 10

* refactor(@angular-devkit/build-optimizer): remove unused import purifier

* refactor(@angular-devkit/build-optimizer): minor type cleanup

* fix(@angular-devkit/build-optimizer): deprecate transform test functions

These were not intended to be part of the public API and will eventually be removed completely.

* test: remove development purify bin helper

* feat(@angular-devkit/build-angular): update webpack dependencies

memory leak fix, security vulnerability package updates, hash integrity fix, and other minor defect fixes

* fix(@angular/cli): fix schema error `Property targets is not allowed`

Closes angular#12192

* feat(@angular/cli): add usage notes to help JSON

* docs(@angular/cli): add comments for Command interface

* refactor(@angular/cli): remove command type

It was really unused.

* feat(@angular/cli): add subcommand to options

SubCommands are not tied to the option that triggers them. They
contain a subset of a CommandDescription interface, with at least
a short and long description and usage notes. These are generated
from the subcommand schema (e.g. schematics in case of generate).

* feat(@angular/cli): add support for parsing enums

Options can now contain enumerations of values.

* feat(@angular-devkit/core): add enum support to getTypesOfSchema

* feat(@angular/cli): remove --help-json and add format to help

--help now accepts a value which can be a boolean or a string. If the value
is not understood we simply show a message to the user that it was invalid.

* fix(@angular/cli): on error finding files, show warning

This should not prevent execution, but is useful to know.

* build: ignore dist-schema for linting

* feat(@angular/cli): if parsing comes accross an obvious error throw it

We accumulate errors this way, and throw only once at the end, with messages for
all errors.

* fix(@angular/cli): do not show stack on argument parse error

* release: v7.0.0-beta.4

* fix(@schematics/angular): remove module test (angular#11278)

The `module` schematic was generating a useless `module.spec.ts` file.
This commit removes such test.

Fixes angular#11277

* docs(@angular/cli): Added alias section to each doc for the generate commands (angular#12253)

* * fix(@angular/cli): remove helpJson and help-json mentions (angular#12331)

* fix(@angular/cli): remove helpJson and help-json mentions

* ci: use proper --help=json for creating snapshot

* feat(@angular-devkit/schematics): allow workflow impl to define their own sinks (angular#12330)

Behaviour for NodeWorkflow should be the same.

* fix(@angular/cli): cannot use same target name in when having multiple projects (angular#12327)

Closes angular#12320

* ci: add size check of new project production build (angular#12328)

* docs: example command to generate library (angular#12334)

* ci: fix parallelism for e2e node 8.x job (angular#12341)

* feat(@angular-devkit/build-angular): automatically include reflect metadata polyfill for JIT

The reflect metadata polyfill is only required by Angular when using JIT.  Since it is unanticipated it would be needed when using AOT, including it when using AOT only serves to unnecessarily increase application file sizes.
JIT is not recommended for production use.  However, if an application uses JIT in production and an alternate reflect metadata polyfill is preferred (core-js/es7/reflect is currently used), then TypeScript path mapping can be used to override the polyfill.  As an example, the following will allow the usage of the `reflect-metadata` package in lieu of the default:
```
    "paths": {
      "core-js/es7/reflect": ["node_modules/reflect-metadata"]
    }
```

* fix(@schematics/angular): remove redundant reflect polyfill

* test: update E2E polyfills test for JIT mode

* feat(@angular-devkit/build-angular): update license-webpack-plugin

Closes angular#11536

* ci: call main function from schematics bin

* feat(@schematics/angular): new 7.0.0 migration to remove polyfills

See PR angular#12346 for more information. This
PR migrates current CLI projects to the new polyfills introduced in that PR.

* fix(@angular/cli): suggest windows-compatible typescript install command

Specifying version range in single quote doesn't work in windows CMD and it returns:
> The system cannot find the file specified.

* feat(@schematics/schematics): update tsconfig.json libs to include es2018

Update the lib property in tsconfig.json files to include es2018.

* feat(@schematics/angular): update tsconfig.json libs to include es2018

Update the lib property in tsconfig.json files for Angular libraries and workspaces to include es2018.

* extended Schematics README regarding templating

to include basic info and an example about it

* fixed typo in the Schematics README

* feat(@angular-devkit/core): support of tsx files in aot mode (angular#11407)

* feat(@angular-devkit/build-angular): support of tsx absolute path import (angular#11450)

* fix(@angular-devkit/core): fix cannot delete directory (angular#11574)

* test: add unit test to cover `subdirs`

Closes angular#12143

* docs: initial schematic prompts documentation

* fix(@angular/cli): allow global config command outside project

Fixes angular#12296

* fix(@schematics/angular): dasherize library package name

Fix angular#11017

* fix(@angular/cli): `--verbose` is an unknown option of `serve`

Closes angular#11086

* refactor(@ngtools/webpack): use webpack resolver plugin for path mapping

* feat(@angular-devkit/build-angular): add profile option to browser builder

This should help users send us profile logs for builds that take too long.

* fix(@schematics/angular): generate application with projectRoot is provided

Closes angular#11925.

* docs: add local installation and specific version installation instructions

* docs: touching up local installation instructions

* docs: npx install information

* fix(@angular/cli): relax compatible angular check package location

* fix(@angular-devkit/build-angular): fully resolve project modules

* feat(@angular/cli): add support for `ShadowDom` as a `viewEncapsulation` value

* feat(@schematics/angular): add support for `ShadowDom` as a `viewEncapsulation` value

* build: update webpack types

* test: update license exceptions

* feat(@schematics/angular): add default budget of 2mb/5mb

* docs: convert console image to css

* refactor: change code to work with TypeScript 3 and add missing models

* feat(@schematics/update): add per-project .npmrc file support

* fix(@schematics/update): process always-auth and _auth correctly, better support for private repositories

* fix(@schematics/update): taking whitespaces around "=" in .npmrc into account

* refactor(@angular-devkit/core): adjust rxjs type usage

Required for upcoming upgraded to rxjs 6.3

* refactor(@angular-devkit/schematics): adjust rxjs type usage

Required for upcoming upgraded to rxjs 6.3

* build: update rxjs to 6.3

* test: update E2E update tests to use built packages

* build: ensure @ngtools/webpack uses consistent TS version

* refactor(@angular-devkit/build-angular): clean up overriding of options

* Disable Autoprefixer Grid

* feat(@schematics/angular): Add the option to allow preventing the creation of an application

Fixes angular#12216

* fix(@angular-devkit/build-angular): karma builder now serves global styles

Closes: angular#11072

* feat(@angular-devkit/build-angular): add progress option to xi18n

Add progress option to xi18n. It is passed to the webpack builder.

Fixes angular#11667.

* docs(@angular/cli): add progress to extractI18n workspace schema

* style: improve formatting of spec file

* style: remove redundant `async` in tests

In component specs only the `compileComponents` is async thus the `async` on `it` are redudnant

Closes angular#12161

* fix(@angular/cli): allow empty string arguments

* fix(@angular/cli): allow -a=value arguments

If a flag is followed by an equal sign, just treat it as a long name. So
the example above would translate to --a=value, while -abc=123 would be
"-a -b -c=123".

Fixes angular#12308

* fix(@angular/cli): numerical flags should not give 0 if empty

And numerical positional flags will be ignored.

If the value is an empty string, a number conversion would give 0. It is unexpected
from the user standpoint ("--num=" has the user expect a string value).

* fix(@angular-devkit/build-angular): addresses issue were `deployUrl` has no effect with serve

Closes angular#11952

* test: fix tests so it fails when servePath is not working

This is due that when targeting an html file, when it doesn't exists it redirects to the root page. So instead use a `js` files to test

* feat(@angular/cli): add `--defaults` option to `ng new`

Any option with a default value will not be prompted (if a prompt is defined) and the default will be used instead.

Closes angular#12084

* feat(@angular/cli): show project being linted

Fixes angular#11231

* fix(@schematics/angular): support `Fetch as Google`(Google bot) (angular#11815)

* feat(@schematics/angular): look for module in more places (angular#12389)

Recursively go through parents of the component and parents of the module name.

Fixes angular#7662.

Also shows tried directories on failure so the user has more informations.

* ci: new true builder as a private package (angular#12390)

This is useful for testing things with a builder that always succeeds. In
a project, use "devkit-admin build && npm install $DEVKIT_PATH/dist/___builder.tgz"
and you have a "@_/builders" package that contains a true builder.

This is not published on NPM so I scope this as ci.

* feat(@schematics/angular): update to latest versions of `TypeScript` and `Angular`

* feat(@ngtools/webpack): add support for `TypeScript` 3.1

* build: update to TypeScript 3.1

* test: add `skipLibCheck` to `type-warning` test

Declarations in `3.1` are not valid with TypeScript `2.8` which will cause an error and the process will exit with a non zero code.

* docs: sort changelog by feature first, then fixes

* feat(@angular-devkit/build-angular): add --reporters option to test

It was a regression, and used by enough people on CI. No reason it should be
omitted and karma.conf.js only.

Fixes angular#11376

* ci: enable size check comments

* refactor: remove code that was needed for `eject`

* fix(@angular-devkit/build-angular): don't rerun tests on unchanged compilation

Fix angular#11880

* release: v7.0.0-rc.0

* feat(@schematics/angular): update `TypeScript` to `3.1`

* release: v7.0.0-rc.1

* style: remove trailing whitespace

* refactor(@ngtools/webpack): reduce amount of filesystem calls

* ci: add count to benchmark and pass index to fn

* refactor(@angular-devkit/core): add cache to normalize

And a benchmark to show the curve, more or less.

* fix(@angular-devkit/build-angular): `ng test` without `reporters` no longer print error

Closes angular#12455

* ci: add CONTRIBUTING as a template and various changes

Added types from the commit validation script to CONTRIBUTING. Added
packages names from the package script to the scope section. Added
examples of good commit messages.

Also corrected some texts.

* docs: add getting started section to README

* ci: publish script now checks that master has next tag

* ci: publish script now checks version and tag together

* style: remove unused locals and imports

Closes angular#12435

* fix(@angular/cli): `ng update` remove duplicate `dryRun` in help

Closes angular#12423

* fix(@angular/cli): capture CPU profile

Replace the v8-profiler dependency with v8-profiler-node8 as the first one
doesn't support node 8 and 10, and that @angular/cli support only node 8
and 10.

* docs(@angular/cli): how to capture a CPU profile

Add documentation on how to generate a CPU profile capture.

* build: add v8-profiler typings

After some refactoring on the angular/cli init, v8-profiler typing is required
in order to fix a no-any lint error.

* style: disable no-implicit-dependency v8-profiler

We only use @types/v8-profiler, which is a repository dev dependency, and v8-profiler-node8
is a "when needed" dependency.

* refactor(@angular/cli): remove v8-profiler typings

Remove dependency to the @types/v8-profiler Profiler type as we don't want to depend on it.

See angular#12411 (comment)

* test: update snapshots TS version

* build: add check yarn preinstall script

Direct copy of the script from core.

* fix(@angular-devkit/build-angular): resolve assets in styles relative to importee

Closes angular#12430

* style(@schematics/angular): remove extra whitespace in EOF

Closes angular#12426

* refactor(@schematics/angular): cleanup application polyfill comments

* refactor(@angular-devkit/build-angular): remove unused html webpack plugins

* fix(@angular-devkit/build-angular): only process index HTML if option is used

* build: avoid swallowing module not found exception

* feat(@ngtools/webpack): support custom logging

* feat(@angular-devkit/build-angular): pass logger to ngtools/webpack

* feat(@ngtools/webpack): support hostReplacementPaths

Fix angular#12197

* test(@angular-devkit/build-angular): add test for type checker replacements

* fix(@angular-devkit/build-angular): workaround karma issue

See karma-runner/karma#3154

*  fix(@angular/cli): `ng update --help` shows `--packages` twice (angular#12470)

* refactor: add a better `description` for `packages`

* fix(@angular/cli): `ng update --help` shows `--packages` twice

Closes angular#12468

* ci: exit with `0` error code when running templates (angular#12473)

* docs: fix url typo

* ci: exit with `0` error code when running templates

* docs: start rewriting docs

* refactor(@ngtools/webpack): reduce webpack fs decorator system  calls

* fix(@angular-devkit/core): record host should stat backing host

* refactor(@ngtools/webpack): cache parsed source files

* test(@angular-devkit/build-angular): disable flaky poll test

* fix(@schematics/angular): tweak the `ng new` routing prompt

* fix(@schematics/angular): use proper project root for e2e

When creating an application, the project root was always "projects/e2e". This
is undesired as it leads to conflicts when creating another app.

Fix angular#12491.

* release: v7.0.0-rc.2
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants