124 Commits

Author SHA1 Message Date
Minko Gechev
a355e7d693 feat(@schematics/angular): drop es6 from modern polyfills
1. Remove imports of es6 polyfills introduced by the CLI.
2. Refactor the migrations for version 8 by moving the codelyzer and
polyfill transforms into different files.

The PR drops all `core-js/es6` polyfills that we've introduced with the
CLI, except the commented ones. We do not remove commented imports,
since they are not part of the internal es6 polyfills.

The migration automatically drops the
associated comments with the removed imports since they are part of the node - under its
`jsDoc` property.
2019-03-29 18:06:01 -07:00
Hans Larsen
15032aa2e8 feat(@angular-devkit/schematics): add support for analytics
Schematics context now have an (optional) analytics field that, if set,
should be used to report usage. This can be set even in some cases where
analytics is disabled (to a noop analytics).
2019-03-20 15:08:07 -07:00
Alex Eagle
eb5643e370 feat(@angular-devkit/core): Remove dep on chokidar
It is unused within our code, as webpack will do the file watching.
This removes 1.4 MB from the download size of the package.
See https://codepen.io/alexeagle/full/zbZWRM

BREAKING CHANGE:
Users who rely on angular-devkit/core to do the file watching must add chokidar to their devDependencies.
2019-03-13 13:53:53 -07:00
clydin
b1477425d9 feat(@angular-devkit/schematics): support unicode character HTML element names (#13837)
The HTML specification allows for a wide variety of characters to be present within a custom element name.  The previous behavior limited the names to mostly alphanumeric characters.  This change opens up the names to include the characters specified within the specification for custom element names.
2019-03-07 16:01:41 -08:00
clydin
324d9f2d4f feat(@angular-devkit/schematics): support basic promise/async based rules (#13660)
Currently, all third-party schematic developers are forced to use and directly depend on `rxjs` if any logic is asynchronous.   Doing so can can also add overhead and unneeded complexity for organizations that have chosen to standardize on async/await usage. This change allows such parties to rely on native promise support if desired.
2019-03-07 15:51:03 -08:00
Alex Eagle
4e262f966f build: Update to latest bazel rules 2019-03-06 11:27:48 -08:00
Alan Agius
ae13974f1d build: update to rxjs 6.4 2019-02-26 08:33:48 -08:00
Louis Larry
32d85622ed fix(@angular-devkit/schematics): add aliases to collection-schema.json 2019-02-15 15:11:10 -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
Charles Lyding
43a968942c feat(@angular-devkit/schematics): support pnpm as a package manager option 2019-02-08 16:06:11 -08:00
Charles Lyding
d18f89d483 refactor(@angular-devkit/schematics): remove unused VirtualTree classes 2019-01-25 21:42:21 -08:00
Charles Lyding
757bca4edc fix(@angular-devkit/schematics): fully scope merge actions in ScopedTree 2019-01-18 12:14:29 -08:00
Charles Lyding
0563e96cd2 feat(@angular-devkit/schematics): add applyToSubTree rule
This rule allows a group of rules to be applied to a scoped subdirectory of the current tree.
2019-01-18 12:14:29 -08:00
Peter Smith
5e9324f5ea docs(@angular-devkit/schematics): include npm link 2019-01-18 12:05:49 -08:00
Charles Lyding
8d177e8789 feat(@angular-devkit/schematics): support calling a task by file path when using a FileSystemEngineHost 2019-01-14 12:52:27 -08:00
Charles Lyding
a0ac4b0e3d feat(@angular-devkit/schematics): support executing a schematic rule on a subtree 2019-01-14 10:59:37 -08:00
Alan Agius
717b02f533 ci: add ts api guardian (#12010)
* refactor: fix `import` and `export` paths to work with classic resolution

`ts-api-guardian` only support classic module resolution which means that we need to specify `index` so that the resolution works.

* build: add `npm_package` to packages

* build: add ts-api-guardian to repo

* test: add api golden files

* refactor: use proper namespace instead of alias export

* refactor: use proper namspace einstead of alias export

* build: add `_golden_api` files

At the moment ts api guardian doesn't support aliased symbols as namespaces, this is a workaround to still have namespaced symbols in the final golden file.

* build: update angular archive for workspace

* test: fix reference to `TestHost` to use namespace

* refactor: create `fs` namespace instead of aliased export

* test: update api golden file for `@angular-devkit/core/node`
2018-11-30 11:53:54 -08:00
Jason Jean
13c057a854 refactor(@angular-devkit/schematics): improve performance of move() (#12857) 2018-11-07 14:25:27 -08:00
Keen Yee Liau
d3e1149bdf build: add missing transitive deps for typescript (#12881)
add `strict_checks = False` for building inside Google.
2018-11-06 20:40:03 -08:00
Keen Yee Liau
db78228fc4 build: add external block for tsconfig in test targets (#12879) 2018-11-06 11:12:21 -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
Alan Agius
b38a13dc02 fix(@angular-devkit/schematics): upgrade refactoring with tslint emits too much whitespace
Fixes #12653
2018-10-31 14:57:53 -07:00
Charles Lyding
9a793494dc build: update rxjs to 6.3 2018-09-26 12:57:56 -04:00
Charles Lyding
013c663986 refactor(@angular-devkit/schematics): adjust rxjs type usage
Required for upcoming upgraded to rxjs 6.3
2018-09-26 12:57:56 -04:00
Alan Agius
191edda747 test: add unit test to cover subdirs
Closes #12143
2018-09-25 17:01:03 -04:00
Luca Vazzano
b9d8eed4a7 fixed typo in the Schematics README 2018-09-25 16:38:58 -04:00
Luca Vazzano
4a2fc6f04a extended Schematics README regarding templating
to include basic info and an example about it
2018-09-25 16:38:58 -04:00
Hans
f74c1f479a feat(@angular-devkit/schematics): allow workflow impl to define their own sinks (#12330)
Behaviour for NodeWorkflow should be the same.
2018-09-20 15:19:42 -07:00
Alan Agius
8fac6a7ceb 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 #12220
2018-09-18 11:33:11 -07:00
Yi Qi
e36a259a45 fix(@angular/cli): fix issues in google3 2018-09-13 14:08:04 -07:00
Alan Agius
b8b36ba339 refactor: pin down all direct dependencies
This is so that CLI users get the same direct dependency versions that were tested on the CI.
2018-09-07 11:01:50 -07:00
Sebastian Häni
8caeb47824 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 #7851, #7950
2018-09-06 10:53:27 -07:00
Alan Agius
54f7ea2b1d fix(@angular-devkit/schematics): throw InvalidCollectionJsonException when collection file is invalid
Closes #11818
2018-09-06 10:49:50 -07:00
Hans
0070ea46e6 fix(@angular-devkit/schematics): fix task executor on Windows
Before we did not denormalize the paths, but were expecting to get paths as options.
2018-09-06 07:37:48 -07:00
Hans
9517677158 feat(@angular-devkit/core): remove addUndefinedDefaults as default post transform
And various bug fixes.
2018-09-06 07:37:48 -07:00
clydin
7e63dd791b build: limit rxjs to 6.2.x due to a defect in 6.3.0 (#12048) 2018-08-30 15:33:31 -07:00
Charles Lyding
cdbc1988f2 feat(@angular-devkit/schematics): allow schematic rules to control interactivity 2018-08-29 09:25:56 -07:00
clydin
d55deb9282 build: add bazel TS library for node tasks (#12008) 2018-08-27 10:27:44 -07:00
Charles Lyding
d202480a17 build: update/cleanup tslint rules & fix errors 2018-08-23 11:35:34 -07:00
Filipe Silva
9b7d076e2b fix(@angular-devkit/schematics): correctly resolve absolute windows paths 2018-08-22 16:36:10 -07:00
Filipe Silva
9720077a4b build: make resolution logic compatible with Bazel 2018-08-22 16:36:10 -07:00
Filipe Silva
f08ec443ff build: re-enable missing bazel tests 2018-08-22 16:36:10 -07:00
Filipe Silva
2393ab9aba build: simplify bazel dependencies 2018-08-22 16:36:10 -07:00
Filipe Silva
e17cc66f93 test(@angular-devkit/schematics): add bazel tests 2018-08-22 16:36:10 -07:00
Charles Lyding
07c829d34b fix(@angular-devkit/schematics): improve tree type checking
Fixes #11683
2018-08-17 15:26:36 -07:00
Mike Brocchi
ae9817b7ee feat(@angular/cli): Update commands to extract meta data into JSON 2018-08-13 20:58:47 -07:00
Hans Larsen
f3e389bd8c feat(@angular-devkit/schematics): add .template as an extension
New rules to deal with templates using a .template extension. Apply the template only
to those files, then remove the .template suffix.

Also added a new rename() rule that takes a matcher and a renamer. Nothing big there.

Also added a new composeFileOperator() that compose operators one after the other.
2018-08-13 16:59:32 -07:00
qiyi
cd8801ca7b fix(@angular-devkit/schematics): fix issues in google (#11857)
1. update the return type of 'validateOptionsWithSchema' to make it
conform the signature of engineHost.registerOptionsTransform
2. fix minor naming issue
2018-08-13 12:31:26 -07:00
Charles Lyding
c729b0e7d9 build: use yarn workspaces 2018-08-10 18:25:32 -07:00
Lukáš Matta
be5d3b0536 docs: fix schematics-cli url 2018-08-07 10:39:56 +01:00