39 Commits

Author SHA1 Message Date
Charles Lyding
b6a3353edb refactor(@angular-devkit/core): deprecate unused isFile/isDirectory utilities
`isFile` and `isDirectory` are tooling only APIs for Node.js that are no longer used by the Angular CLI.
2020-10-20 18:47:35 +02:00
Alan Agius
622d08447d refactor: use ansi-colors instead of removed terminal utils 2020-09-10 20:19:33 +02:00
Alan Agius
208336dee0 refactor(@angular-devkit/core): remove resolve methods and options
BREAKING CHANGE: deprecated API's `ModuleNotFoundException`, `ResolveOptions`, `resolve` have been removed. Use `MODULE_NOT_FOUND` and `require.resolve` instead.

**Note**: this change only effect users using `@angular-devkit/core` public API and not application developers.
2020-09-03 00:20:12 +03:00
Doug Parker
5dc60f13c3 refactor(@angular-devkit/core): fix strict typing errors in node/
This fixes a few error surfaced by adding `"strict": true` to `tsconfig.json`.
* `_callFs(fs.readdir, /* ... */)` needs explicit types because `fs.readdir` has a few overloads, which was confusing type inference.
* `TempScopedNodeJsSyncHost._sync` is an uninitialized property, but it was already being checked for `undefined`, so I simply made its type optional.
* `TempScopedNodeJsSyncHost.files` had an incorrect type assertion, but was otherwise correct. I just removed the assertion and let type inference do the trick.
2020-08-20 20:36:02 -04:00
Alan Agius
3e76676fe1 test: disable resolve global test which fails under bazel
This test currently fails under Bazel. `Expected function not to throw, but it threw Error: Could not find module "npm" from "/"..`

NB: The resolve method is deprecated
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
santoshyadavdev
dfef55e3f7 refactor(@angular-devkit/core): remove any types 2020-08-18 16:32:42 +02: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
Filipe Silva
60e92d54fb style: reformat bazel files 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
Sachin Grover
54b79ade65 fix(@angular-devkit/core): Rename to a non-existing dir
Added unit test and requested changes.
Fixes #16484
2020-02-07 08:29:40 -08:00
Alan Agius
613f7dbcd4 refactor(@angular-devkit/core): deprecate old terminal and resolve APIs 2019-10-22 13:26:52 -07:00
Alan Agius
b0dcfd08a0 fix(@angular/cli): logic to determine if the installed CLI is out of date
With this change we now check if the current CLI version is the latest published version. If it is not, we install a temporary version to run the `ng update` with.
2019-10-22 13:13:54 -07:00
Keen Yee Liau
5a2a055c4d build: g3 sync for angular_devkit
Fix all build errors in g3
2019-10-01 13:15:50 -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
Charles Lyding
225cd36f49 fix(@angular-devkit/core): NodeJSAsyncHost.isFile should check for a file 2019-05-09 10:09:51 -07:00
Alan Agius
8fcf9a4401 fix(@angular-devkit/core): host.delete() completes but never emits
RxJS `EMPTY` creates an Observable that emits no items immediately emits a complete notification.

Fixes #14235
2019-04-23 08:03:35 -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
Alan Agius
ae13974f1d build: update to rxjs 6.4 2019-02-26 08:33:48 -08:00
Charles Lyding
d849834445 feat(@angular-devkit/core): support console logger color customization 2019-02-15 08:01:41 -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
Alan Agius
2ed1719eaa fix(@angular-devkit/core): remove colors for info messages
Rely on the terminal to provide the color for info messages

fixes #13497
2019-01-23 10:37:51 -08:00
Mikel Ward
7d15c5dd02 fix(@angular-devkit/core): Make default and info log messages use default colors
Previously, we set the color to white, which is (nearly) invisible on
terminals with a white background.

Fixes #13439.
2019-01-15 17:10:22 -08:00
Hans
a3a657f7e7 feat(@angular-devkit/core): Jobs API added
See the README for more details about usage.
2018-12-14 10:55:04 -08:00
Hans
6bf80edf54 ci: add golden-api file for core/node
This is necessary as we introduce namespaces in jobs.
2018-12-14 10:55:04 -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
Alan Agius
bd4dc38359 refactor: use createConsoleLogger and remove duplicate code (#12787) 2018-11-08 10:30:41 -08:00
Alan Agius
6e0b60df32 fix(@angular/cli): errors and warnings are hard to read in windows cmd (#12767)
* fix(@angular-devkit/core): errors and warnings are hard to read in windows cmd

Closes #12755

* fix(@angular/cli): errors and warnings are hard to read in windows cmd

Closes #12755
2018-10-31 21:03:03 -07: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
04ed3010b2 feat(@angular-devkit/core): createConsoleLogger now accepts 2 parameters to add custom stdout and stderr 2018-09-18 11:33:11 -07:00
Charles Lyding
d202480a17 build: update/cleanup tslint rules & fix errors 2018-08-23 11:35:34 -07:00
Filipe Silva
9720077a4b build: make resolution logic compatible with Bazel 2018-08-22 16:36:10 -07:00
Filipe Silva
b9a8fd1392 fix(@angular-devkit/core): propagate node host delete errors 2018-07-05 11:43:11 -04:00
Alan Agius
3108ce30ab refactor: remove redundant error in catch 2018-07-02 08:20:59 -04:00
Alex Eagle
938a236f40 build: fixes for google3 build 2018-06-08 14:33:31 -07:00
Hans Larsen
44086c60ff build: move devkit repo back to angular-cli 2018-06-05 18:50:06 -07:00