426 Commits

Author SHA1 Message Date
Hans Larsen
0f0f289bf7 fix(@angular-devkit/core): fix true schemas post transform step
Also tighten the types a bit, and add a test that failed before and works now.
2019-02-19 13:51:29 -08:00
Hans Larsen
558ef00523 feat(@angular-devkit/architect-cli): CLI tool to use new Architect API
Move the entire Architect CLI to use the new API, and report progress using
a progress bar for each worker currently executing. Shows log at the end
of the execution.

This is meant to be used as a debugging tool to help people move their builders
to the new API.
2019-02-19 13:51:29 -08:00
Hans Larsen
df1b56c251 feat(@angular-devkit/build-angular): move tslint to new API
It is only new files and the old builder is still available. The new
one can only be used by the new Architect API.
2019-02-19 13:51:29 -08:00
Hans Larsen
685d4d0c6c feat(@angular-devkit/architect): add generic architect builders
Four builders were added;
- true, always succeed
- false, always fails
- concat, runs all targets or builders in succession
- allOf, runs all targets or builders in parallel
2019-02-19 13:51:29 -08:00
Hans Larsen
79a6988275 feat(@angular-devkit/architect): add node architect host
This host resolves using the package resolution and reading the targets
from the workspace API.
2019-02-19 13:51:29 -08:00
Hans Larsen
68220f13e4 feat(@angular-devkit/architect): New Architect API first draft
The new API has been described in this design doc:
https://docs.google.com/document/d/1SpN_2XEooI9_CPjqspAcNEBjVY874OWPZqOenjuF0qo/view

This first drafts add support for the API (given some deep imports). It is
still in draft mode but is committed to make it available to people to
start testing and moving their own builders.

This API rebuilds (not backward compatible) the Architect API package. To
use it people will need to import "@angular-devkit/architect/src/index2"
to start using it. A reference builder will be added in the next commit.

There are 2 pieces missing from this commit that will be added in the
same PR; 1) the architect-host and CLI to test, and 2) a reference
builder moved from the old API to the new one. These will be part of
the same PR.

Finally, there are missing tests in this package, but everything tested
manually and automatically works so far. Test coverage will be added
before the package is considered finished.

Due to a desire to keep architect, our tests and the scope of this PR
limited and keep the two APIs separated, every clashing files will
have a "2" suffix added to it. Once all builders have been moved and
we are sure everything works, all those files will be moved to their
final destination and the old API will be removed, in one PR.
2019-02-19 13:51:29 -08:00
Hans Larsen
7023255c3d feat(@angular-devkit/core): jobs should re-log instead of forwarding
Current behaviour is to have logs forwarded, but this is flawed because on the
job side the logger is actually re-created. This allows logs to be actually part
of the caller side logging infrastructure.
2019-02-19 13:51:29 -08:00
Hans Larsen
81967900d0 feat(@angular-devkit/core): logger.log() should keep own metadata
It was possible to overwrite the metadata of the logger itself (name, path)
when calling "log()". This should not happen. If there is a need to overwrite
the loggers metadata itself one should use "next()" and construct or forward
their own log entry.
2019-02-19 13:51:29 -08:00
Hans Larsen
d856f8f8f8 feat(@angular-devkit/core): export terminal capabilities 2019-02-19 13:51:29 -08:00
Renovate Bot
d5144c3bf3 build: update chokidar to version 2.1.2 2019-02-19 10:15:18 -08:00
Charles Lyding
94b087c9e1 fix(@angular-devkit/build-angular): disable by default stylesheet root relative URL rebasing
BREAKING CHANGE:
Root relative URLs are a standardized method to reference a resource path from the root of a host.  The previous behavior of the Angular CLI prevented this from occuring and resulted in an inability to reference stylesheet assets in this manner.  The initial reason for this behavior is no longer present in the internal implementation of the Angular CLI.  Therefore, this now unnecessary and non-standard behavior is being phased out.  If an application currently relies on this behavior, a compatibility option `rebaseRootRelativeCssUrls` has been provided for the 8.x release cycle to facilitate transition away from this non-standard and limiting behavior.  The recommended method to transition is to use relative paths within the source stylesheet.  This allows the build system to process and generate a full URL for the asset.
2019-02-19 10:14:46 -08:00
Alex Eagle
9f33253f36 refactor: use vendored supports-color 2019-02-18 18:44:56 -08:00
Alex Eagle
fae77e9257 build: vendor chalk/supports-color in third_party
Also requires vendoring its single dependency
2019-02-18 18:44:56 -08:00
Renovate Bot
1bba17fa0d build: update webpack to version 4.29.4 2019-02-17 11:29:17 -08:00
Louis Larry
32d85622ed fix(@angular-devkit/schematics): add aliases to collection-schema.json 2019-02-15 15:11:10 -08:00
Charles Lyding
5016843c39 style(@angular-devkit/build-angular): remove comment reference to eject 2019-02-15 15:09:11 -08:00
Charles Lyding
d849834445 feat(@angular-devkit/core): support console logger color customization 2019-02-15 08:01:41 -08:00
Hans Larsen
889c2549d1 fix(@angular-devkit/core): remove static initialization using process object
It does not work in a browser.
2019-02-14 11:54:56 -08:00
Alan Agius
1fd4ed6c5d fix(@angular-devkit/schematics): use join instead of normal string concatenation
This leads to cleaner paths while debugging

Fixes #13654
2019-02-13 15:26:51 -08:00
Alan
daab547731 docs: remove analyse link from statsJson description
https://webpack.github.io/analyse has been broken for over a year and it seems that it is no longer maintained.

See  https://github.com/webpack/analyse/issues/30

Closes #10589
2019-02-13 15:26:12 -08:00
Renovate Bot
17388866a5 build: update ajv to version 6.9.1 2019-02-13 15:22:06 -08:00
hrocha16
b611e7fc58 fix(@angular-devkit/build-angular): added warning for ES2017 2019-02-13 15:20:41 -08:00
Charles Lyding
af88936ef5 fix(@angular-devkit/build-angular): remove unneeded script element type 2019-02-13 15:20:15 -08:00
Alan
1efc9d29af fix(@angular-devkit/build-angular): throw error when multiple bundles have been name the same
Naming more than 1 bundle with the same name might cause undefined behavior.

Fixes #13568
2019-02-13 15:19:01 -08:00
Alan
5415bcc6f8 refactor: deprecate protractor baseUrl option from builder
Users should use baseUrl property in the Protractor config file
2019-02-08 16:09:30 -08:00
Alan
8252f20615 fix(@angular-devkit/build-angular): error when both baseUrl and devServerTarget are used in protractor
Users cannot use both baseUrl and devServerTarget, and the later superseeds the baseUrl.

Fixes #13611
2019-02-08 16:09:30 -08:00
Alan
7bc2e396d3 refactor: change error message to use option name instead of args 2019-02-08 16:09:30 -08:00
Alan
e0e129c22a build: update angular packages to version 8 2019-02-08 16:06:37 -08:00
Charles Lyding
43a968942c feat(@angular-devkit/schematics): support pnpm as a package manager option 2019-02-08 16:06:11 -08:00
Renovate Bot
87fd5d1f3e build: update karma-source-map-support to version 1.4.0 2019-02-08 16:05:45 -08:00
Hans Larsen
e2bebe9871 test: add a test for deferred jobs
Just one more bit of coverage.
2019-02-07 15:57:48 -08:00
Hans Larsen
c4798b69d6 refactor(@angular-devkit/core): move core/node experimental files to own directory
It's just cleaner that way.
2019-02-07 15:57:48 -08:00
Hans Larsen
445946515d refactor(@angular-devkit/core): set JobStrategy type arguments default 2019-02-07 15:57:48 -08:00
Hans Larsen
988835d024 feat(@angular-devkit/core): add a reuse JobStrategy
It allows a job to be reused if it's still running. This includes redirecting
the inputs to the new job.
2019-02-07 15:57:48 -08:00
Hans Larsen
4571197326 feat(@angular-devkit/core): add a fallback registry
Its get method goes through an array of registries and return the first
one found.
2019-02-07 15:57:48 -08:00
Hans Larsen
c461ed5960 feat(@angular-devkit/core): createJobFactory does not have to have options
It matches the other factories.
2019-02-07 15:57:48 -08:00
Hans Larsen
0e6384b8c4 fix(@angular-devkit/core): Properly subscribe/unsubscribe to observables
This has been a source of headaches when debugging the Architect jobs.
We keep all subscriptions now and unsubscribe them when the result is
done.
2019-02-07 15:57:48 -08:00
Hans Larsen
ef93ff8c78 refactor(@angular-devkit/core): Type JobHandlerContext properly
The input field is not an unknown JsonValue, the type is part of the
generic. It's validated by the scheduler.
2019-02-07 15:57:48 -08:00
Hans Larsen
ca31640505 refactor(@angular-devkit/core): change the job context scheduler to generic
That scheduler is really an any scheduler and would need to be typed
appropriately. There could be multiple schedulers that this job is
part of and it is impossible to ensure the scheduler is a more specific
type than unknown.

Note: This was wrongly typed before.

Context: JsonValue is the JSON equivalent of the unknown TS type.
2019-02-07 15:57:48 -08:00
Hans Larsen
5f73b17f7a refactor(@angular-devkit/core): add invalid argument exception class
Before we were (wrongly) using the InboundMessage exception class. This was
an oversight. This commit introduces a new InvalidArgument exception for this
special case.
2019-02-07 15:57:48 -08:00
Renovate Bot
b5a5e99baf build: update webpack-dev-middleware to version 3.5.2 (#13609) 2019-02-07 08:32:49 -08:00
Filipe Silva
733efe71e3 fix(@angular-devkit/build-optimizer): prefix renamed extended classes (#13613)
Fix #11796
2019-02-07 08:28:19 -08:00
Renovate Bot
4ecd232733 build: update webpack to version 4.29.3 (#13608) 2019-02-07 08:24:43 -08:00
Renovate Bot
be79d2a662 build: update chokidar to version 2.1.0 (#13599) 2019-02-07 08:24:05 -08:00
Renovate Bot
37b4714b97 build: update webpack to version 4.29.1 2019-02-05 21:28:52 -08:00
Filipe Silva
87caf2118b fix(@angular/cli): update terser-webpack-plugin (#13589)
Fix #13582
2019-02-05 21:16:05 -08:00
Filipe Silva
e6f96fb744 fix(@angular-devkit/build-angular): use sourcemap object in karma plugin (#13584)
Followup to https://github.com/angular/angular-cli/pull/13062

Fix https://github.com/angular/angular-cli/issues/13580
2019-02-05 21:15:49 -08:00
Renovate Bot
0496b514ad build: update ajv to version 6.8.1 (#13583) 2019-02-05 21:15:36 -08:00
Alan Agius
b27fabe786 fix(@angular-devkit/build-angular): remove deprecated istanbul from dependencies (#13567)
It also seems this package was unused

Fix #13562
2019-02-05 21:15:25 -08:00
Alan Agius
bf566c7101 build: update karma and jasmine dependencies (#13566)
* feat(@schematics/angular): update karma and jasmine dependencies

* feat(@angular-devkit/build-angular): update karma and jasmine dependencies

* build: update karma and jasmine dependencies

* test: add test expectations in shell component
2019-02-05 21:15:08 -08:00