57 Commits

Author SHA1 Message Date
Alan Agius
4b0223b64e build: automate @angular/cli schema.json generation
With this change we automate the generation of `@angular/cli/lib/config/schema.json`. While on paper we could use quicktype for this. Quicktype doesn't handle `patternProperties` and `oneOf` that well.

How does this works?
Relative `$ref` will be resolved and inlined as part of the root schema definitions.

Example
```json
"@schematics/angular:enum": {
    "$ref": "../../../../schematics/angular/enum/schema.json"
},
```

Will be parsed and transformed to
```json
"@schematics/angular:enum": {
  "$ref": "#/definitions/SchematicsAngularEnumSchema"
},
"definitions: {
  "SchematicsAngularEnumSchema": {
    "title": "Angular Enum Options Schema",
    "type": "object",
    "description": "Generates a new, generic enum definition for the given or default project.",
    "properties": {...}
   }
}
```
2021-03-11 21:51:37 +01:00
Alan Agius
7169c74422 ci: update to build_bazel_rules_nodejs version 3
More info: https://github.com/bazelbuild/rules_nodejs/wiki#migrating-to-30
2021-02-02 07:45:29 +01:00
Keen Yee Liau
297fc923ab build: remove experimental build event protocol 2020-09-11 13:24:38 -04:00
Alan Agius
fa2c542554 build: update integration test runner
As per: 4d702a20fa/tools/npm_integration_test/test_runner.js
2020-08-19 16:00:07 +02:00
Alan Agius
d1adba1347 build: update build_bazel_rules_nodejs to 2.0.2 2020-08-19 16:00:07 +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
Filipe Silva
8063836042 build: add rbe_ubuntu1604-angular docker permissions 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
982c3bcd17 test(@angular/cli): add npm_integration_test 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
3f9ca97034 build: use latest ts_proto_library format 2020-04-23 10:31:56 -07:00
Keen Yee Liau
2fa444af27 build: change deps in ts_proto_library to proto 2020-04-23 10:31:56 -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
Filipe Silva
60e92d54fb style: reformat bazel files 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
Alan Agius
f635479cef build: update nodejs rules to 1.0+ 2020-01-27 11:03:51 -08:00
Greg Magolan
fe5bba54a5 build: should use data for fine grained npm dependencies in nodejs_binary 2019-10-24 12:05:25 -07:00
Alan Agius
e31d5d89b7 build: update bazel packages 2019-10-24 12:05:25 -07:00
Charles
920ee8595a build: update bazel dependencies and configuration (#15291)
This leverages the configuration from FW where possible.
Bazel updated to 28.1
Rules for nodejs/typescript/karma/jasmine updated to 0.35.0
2019-08-12 11:40:50 -07:00
Joey Perrott
5da90e9075 ci: setup RBE on CI 2019-07-10 04:07:42 +08:00
Alex Eagle
ee619c9a34 build: run Bazel format/lint fix 2019-04-22 08:38:00 -07:00
Alex Eagle
1b6602c066 build: use Bazel from npm
Also hook up bazel format/lint
2019-04-22 08:38:00 -07:00
Filipe Silva
efac7b61ba ci: rebase PRs on target branch 2019-03-11 13:45:18 -07:00
Alex Eagle
4e262f966f build: Update to latest bazel rules 2019-03-06 11:27:48 -08:00
Alan Agius
1cdeccfc9e build: update quicktype-core to generate camelCase acronyms
At the moment for insatance `Css` will be generated as `CSS` since it's an acronym

See: https://github.com/quicktype/quicktype/blob/master/src/quicktype-core/support/Acronyms.ts
2018-12-11 11:55:54 -08:00
Alan Agius
aae1afd114 build: add support for x-deprecated when generating schema
When using the CLI and a property is deprecated we emit a warning by using the `x-deprecated` field. However API consumers have no way to know that a property is deprecated at the moment.

This converts `x-deprecated` to  `@deprecated` comments
2018-12-06 11:25:49 -08:00
vikerman
d63dbf1433
chore: add license to BUILD file 2018-11-05 13:46:00 -08:00
Keen Yee Liau
a3b05a0283 build: Use fine-grained node_module deps
This commit updates the BUILD files to specify fine-grained node_module deps
by replacing "@typings" comments with actual @npm node module.

Moved tools/bazel.rc -> .bazelrc

Removed "jasmine" typings from base tsconfig.json

Added @bazel/karma to devDependencies, needed for `ts_web_test`
2018-10-31 20:56:27 -07:00
Alex Eagle
3b3e434c4e build: add utility for reading build event protocol 2018-10-23 11:39:26 -07:00
Charles Lyding
b06ee93e07 build: add check yarn preinstall script
Direct copy of the script from core.
2018-10-03 16:36:53 -07:00
Hans
3127fed50a ci: remove external BUILD code that should not be internal 2018-09-17 14:56:57 -07:00
Hans
c63b4d8d2b ci: disable bazel in devkit-admin build
Replace the build step with a custom JSON schema output parallel to
bazel.
2018-09-13 16:44:17 -07:00
Hans
aeb7c46332 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.
2018-09-13 16:44:17 -07:00
Filipe Silva
2393ab9aba build: simplify bazel dependencies 2018-08-22 16:36:10 -07:00
Filipe Silva
b1ad957a15 build: update bazel workspace 2018-08-22 16:36:10 -07:00
Hans Larsen
44086c60ff build: move devkit repo back to angular-cli 2018-06-05 18:50:06 -07:00
Charles Lyding
48296d21b3 test: partial lint rule upgrade and fixes 2018-05-15 09:37:54 -04:00
Charles Lyding
02274c7312 build: update auto-doc to support generate command 2018-05-02 10:46:27 -07:00
Charles Lyding
ceeb292a29 refactor(@angular/cli): remove chalk dependency 2018-05-01 10:24:36 -07:00
Charles Lyding
f15af9f662 build: basic command wiki documentation tool 2018-04-30 15:03:12 -07:00
Filipe Silva
1854589cd9 build: use devkit snapshots for e2e 2018-04-26 15:21:54 -07:00
Charles Lyding
523d07309c build: disable schema type generation 2018-04-23 18:00:49 -06:00
Hans Larsen
9a9bc00a45 feat: remove ngtools entirely from this repository 2018-03-29 08:15:03 -07:00
Filipe Silva
c7485e7709 refactor: remove unused dependencies 2018-03-28 21:38:25 +01:00
Charles Lyding
804472d284 refactor(@angular/cli): remove denodeify dependency 2018-02-20 10:27:20 -08:00
Mike Brocchi
5a736bd90b refactor: Update rxjs operators to be lettable
Fixes #8912
2018-01-23 09:55:02 -08:00
Filipe Silva
2d23be1c29 build: update chalk to 2.2.0 2017-10-27 09:38:40 -07:00
Filipe Silva
fd82e1870e build: update chalk to 2.2
`chalk@2.2` is incompatible with `@types/chalk`.
2017-10-24 12:03:55 -07:00
Hans Larsen
3af138f689 test: add support for devkit
Using --devkit=/absolute/path/to/devkit/repo the e2e tests will now
run with the devkit passed in. It will build the devkit first, then
change the package.json to use the proper devkit tgz.
2017-09-18 19:02:09 -07:00