97 Commits

Author SHA1 Message Date
Charles Lyding
24b0a49a73 refactor(@angular-devkit/architect): abstract workspace access from architect
This change allows architect runtime implementations to have more control over how builder information and options for targets are found.  A workspace file (and accompanying definition class) is not necessarily needed now.  This also has benefits for unit testing by reducing the amount of potential setup needed per test.
2020-11-16 08:52:22 -05:00
Alan Agius
d3ad09508f refactor(@angular-devkit/architect): remove deprecated TestLogger
BREAKING CHANGE:

Deprecated `TestLogger` has been removed. Use `logging` API from `'@angular-devkit/core'` instead.

**Note:** this change doesn't effect application developers.
2020-09-22 10:29:53 -05:00
Renovate Bot
8dac017e23 build: update rxjs to version 6.6.3 2020-09-07 14:44:16 +02:00
Charles Lyding
301d926c8c feat(@angular-devkit/architect): support async generator based builders
"Watch" type builders (builders with more than one result) can now be implemented as async generator functions. This allows such a builder to be more easily implemented in cases where an upstream API is async iterator/generator based or when async generators are the preferred method of implementation.
2020-08-26 09:23:45 -04:00
Alan Agius
d1adba1347 build: update build_bazel_rules_nodejs to 2.0.2 2020-08-19 16:00:07 +02:00
Tobias Gassmann
57b80ee09c fix(@angular-devkit/architect): add name of the non-existing project to error message 2020-08-13 10:14:28 +02:00
Renovate Bot
36668a36a7 build: update rxjs to version 6.6.2 2020-07-31 09:52:10 +02:00
Keen Yee Liau
fa9136a971 build: minor fixes for google3 sync
This commit makes a few minor changes to enable syncing the CLI repository
into google3.

1. mark pkg_tar and pkg_npm as external
2. remove dependencies (marked as comment) which are stale in google3
3. remove TS files generated from JSON schema in BUILD files since these
   files are compiled and added to the g3 codebase at sync time
4. Some minor typing changes
5. Remove duplicate licenses
6. mark dependencies which are not available in g3 as external
7. Immediately type the result of JSON.parse() as required by g3 linter.
   Otherwise, the type defaults to `any`.
2020-07-24 22:52:22 +02:00
Alan Agius
05588fcee1 refactor: clean up unused code and imports 2020-07-24 08:01:52 +02:00
Renovate Bot
51a159d1c9 build: update rxjs to version 6.6.0 2020-07-02 11:00:00 +02:00
Greg Magolan
be3d063422 build: exclude nested node_modules laid out by yarn workspaces from all globs 2020-04-30 15:12:46 -07:00
Filipe Silva
b51cf8d1e6 build: use ts_library macro with common defaults 2020-04-30 15:12:46 -07:00
Filipe Silva
9a28114f6b test: remove non-bazel test setup 2020-04-30 15:12:46 -07:00
Filipe Silva
eceb5cdaa6 build: use rules_nodejs 1.6.0 features
Contains fixes related to the symlink behaviour inside of bazel. Without it, webpack needs to be configured to be aware of symlinks and preserve the paths.
2020-04-30 15:12:46 -07:00
Keen Yee Liau
e5db6a8ccd build: BUILD files formatted to have load statements at the top 2020-04-23 10:31:56 -07:00
Charles Lyding
98b3eb5b9e build: update rxjs to version 6.5.5 2020-04-15 13:17:31 -07:00
Filipe Silva
60e92d54fb style: reformat bazel files 2020-04-07 09:07:19 -07:00
Filipe Silva
0a7be8006e test(@angular-devkit/architect): run tests in Bazel 2020-04-07 09:07:19 -07:00
Filipe Silva
5f3f736936 build: move BUILD.bazel files for secondary entry points into own folder
Without this change, module names will be computed with incorrect paths containing duplicate path fragments (e.g. `@angular-devkit/architect/testing/testing/test-logger`).
2020-04-07 09:07:19 -07:00
Filipe Silva
f2d2cd12c4 build: also produce tar.gz for bazel npm_package rules 2020-04-07 09:07:19 -07:00
Filipe Silva
7c746a444b build: use ts_json_schema's ts output directly
This PR changes ts_json_schema to not create a ts_library rule for the json schema, and instead let consuming ts_libraries use and compile the resulting .ts files themselves.

This is needed in order to maintain the module_name of the consuming libraries on the .ts files resulting from json compilation.
2020-04-07 09:07:19 -07:00
Filipe Silva
b668cacd45 refactor: use BUILD.bazel instead of BUILD
Using an extension gives editors a chance to figure out the correct language syntax to use.
2020-04-07 09:07:19 -07:00
Filipe Silva
aaf2d802a8 fix(@angular-devkit/architect): temporary workaround for TS bug with UMDs
The TS bug is https://github.com/microsoft/TypeScript/issues/36780.

The workaround is needed because `ts_library` emits UMDs currently. This will change with https://github.com/bazelbuild/rules_typescript/pull/492 and https://github.com/bazelbuild/rules_nodejs/pull/1687.
2020-04-07 09:07:19 -07:00
Alan Agius
f635479cef build: update nodejs rules to 1.0+ 2020-01-27 11:03:51 -08:00
Filipe Silva
86d4385440 build: use TypeScript 3.7 2020-01-09 13:43:49 -08:00
Renovate Bot
3ba89181bc build: update rxjs to version 6.5.4 2020-01-07 10:26:56 -08:00
Charles Lyding
8ffb755ef0 refactor(@angular-devkit/architect): remove usage of experimental workspace API 2019-10-25 09:53:34 -07:00
Charles Lyding
c8f8028e80 fix(@angular-devkit/architect): clone workspace objects before builder use 2019-10-25 09:53:34 -07:00
Alan Agius
e31d5d89b7 build: update bazel packages 2019-10-24 12:05:25 -07:00
Filipe Silva
27c3650d80 feat(@angular-devkit/architect): support multiple configs in WorkspaceNodeModulesArchitectHost
Add support for parsing multiple configurations in a single string using comma as a separator.

This support is only at the host level (`WorkspaceNodeModulesArchitectHost` in this case) and does not change the underlying Architect API.

Different hosts are able to compose target options in different ways.
2019-10-14 13:40:48 -07:00
Charles Lyding
0d104c0aba feat(@angular-devkit/architect): support accessing project metadata 2019-09-24 13:18:33 -07:00
Alan Agius
ab5b1909d6 build: update rxjs to 6.5.3 2019-09-24 13:18:09 -07:00
Charles
ef360dd7f8 refactor(@angular-devkit/architect): use standard node resolution methods where possible (#15622)
* refactor(@angular-devkit/architect): use standard node resolution methods where possible

* refactor(@angular-devkit/core): use standard node resolution methods where possible
2019-09-18 14:49:22 +01:00
Alan Agius
a6fbee6865 style: add no-invalid-await and prefer-promise-shorthand lint rules (#15450)
Add these two lint rules for a better code quality and readability
2019-08-27 10:24:58 -07:00
Pavel Březina
51622bdeaf fix(@angular-devkit/architect): add target to ScheduleOptions to allow its use in context.scheduleBuilder
A custom builder can call `context.scheduleBuilder` to call another builder.
However, the following call will fail with `Must either have a target from
the context or a default project.` exception because `scheduleBuilder` does
not pass `target` to the called builder.

```typescript
import { JsonObject } from '@angular-devkit/core'
import { BuilderContext, BuilderOutput, BuilderRun, createBuilder } from '@angular-devkit/architect';
import { Observable, from } from 'rxjs';
import { concatMap, map } from 'rxjs/operators';

export default createBuilder(_customBuilder);

function _customBuilder(options: JsonObject, context: BuilderContext): Observable<BuilderOutput> {
    const builder = '@angular-devkit/build-angular:browser';

    return from(context.scheduleBuilder(builder, options)).pipe(
        concatMap(run => run.result)
    );
}
```

Resolves:
https://github.com/angular/angular-cli/issues/15053
2019-07-31 13:22:11 -07:00
vikerman
77d4dd9733 fix(@angular-devkit/architect): fix for newest version of rxjs 2019-07-01 16:36:43 -07:00
Alan Agius
53d027837e fix(@angular-devkit/architect): error out when invalid configurations are provided
Fixes #14654
2019-06-10 13:43:39 -07:00
Charles Lyding
19ed795cb1 fix(@angular-devkit/architect): support all observable types as build results
Fixes #14579
2019-05-30 13:33:51 -07:00
Alan Agius
c70cf991ac refactor(@angular-devkit/architect): remove index2 from testing folder 2019-05-28 21:00:29 +02:00
Charles Lyding
548fefddbd docs(@angular-devkit/architect): add comment about deprecated workspace usage 2019-05-09 10:04:57 -07:00
Keen Yee Liau
2af2b670f8 fix(build): fix Bazel lint errors 2019-05-07 20:02:34 -07:00
Keen Yee Liau
d629cd6478
Update BUILD 2019-05-07 19:02:45 -07:00
Charles Lyding
cbb493eb81 refactor(@angular-devkit/architect): support stable workspaces API 2019-05-07 16:24:37 -06:00
Filipe Silva
d546b83e04 fix(@angular-devkit/architect): error run on input schema error (#14315)
Fix #14269
2019-05-07 12:37:56 -06:00
Alan Agius
968204fa2a refactor(@angular-devkit/architect): remove _registry from being a private (#14182) 2019-05-07 12:31:45 -06:00
Charles Lyding
5f248204ec fix(@angular-devkit/architect): propagate option validation errors
By using the `SchemaValidationException` object, the underlying JSON schema validation errors will be propagated to the consuming code.  This allows for more detailed error reporting of malformed or incorrectly provided options.

Partially addresses #14269
2019-04-26 10:26:47 -07:00
Alex Eagle
d88175ddf1 Revert "build: update rxjs to version 6.5.1"
This reverts commit c4613ced63a901fe327e062d2be474d72ccc56f1.
2019-04-23 11:23:51 -07:00
Renovate Bot
c4613ced63 build: update rxjs to version 6.5.1 2019-04-23 08:07:56 -07:00
Alex Eagle
ee619c9a34 build: run Bazel format/lint fix 2019-04-22 08:38:00 -07:00
Minko Gechev
d4a1c4fca8 fix(@angular-devkit/architect): consume the default export in TestingArchitectHost
Using the TestingArchitectHost architect is unable to execute the
handler of the builder since it needs to access its `default` property.
2019-04-16 12:58:38 -07:00