362 Commits

Author SHA1 Message Date
Renovate Bot
c315b47068 build: update all non-major dependencies 2022-03-23 12:59:21 -07:00
Tobias Speicher
137651645c refactor: replace deprecated String.prototype.substr()
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
2022-03-21 12:27:52 -07:00
Alan Agius
4ebfe03415 feat(@angular/cli): drop support for Node.js 12
Node.js v12 will become EOL on 2022-04-30. As a result, Angular CLI v14 will no longer support Node.js v12.

BREAKING CHANGE:

Support for Node.js v12 has been removed as it will become EOL on 2022-04-30. Please use Node.js v14.15 or later.
2022-03-04 22:38:45 +01:00
Renovate Bot
a3c0aa9f86 build: update all non-major dependencies 2022-03-03 18:53:49 +01:00
Daniele Maltese
b20f34ec17 docs(@angular-devkit/core): typo in string.ts doc
Typo in underscore function code documentation.
2022-02-24 11:15:33 -08:00
Charles Lyding
51e1521359 build: remove unused development dependency seedrandom
The `seedrandom` dependency is not currently used within the package or project.
As a result, it has been removed to prevent unneeded packages from being installed during development.
2022-02-16 17:19:51 +01:00
Renovate Bot
f8c3ad8d41 build: update all non-major dependencies 2022-02-07 10:55:10 +00:00
Alan Agius
bf733d6758 fix(@angular-devkit/core): correctly resolve schema references defaults
Closes #22600
2022-02-02 11:48:32 -08:00
Alan Agius
a0c02af7e3 refactor(@angular-devkit/core): remove deprecated fs, object and array APIs
BREAKING CHANGE:

The below APIs have been removed without replacement. Users should leverage other Node.js or other APIs.
- `fs` namespace
- `clean`
- `mapObject`
2022-01-31 11:35:18 -08:00
Renovate Bot
79a474de68 build: update all non-major dependencies 2022-01-19 07:21:10 +01:00
Derek Cormier
c2737dd51a build: use placeholder version for stamping 2022-01-12 10:02:23 -08:00
Derek Cormier
4b5c52b0d8 build: perform package.json substitutions in bazel build 2022-01-10 10:25:49 -08:00
Doug Parker
f9187bcc9b refactor(@angular-devkit/core): update missing workspace file error to explicitly call out angular.json
Internally, we've gotten a lot of bugs of users running the CLI in the wrong directory and not understanding this error. Hopefully calling this out more explicitly will key users to double-check their working directory before filing a bug.
2021-12-11 09:20:16 +01:00
Derek Cormier
31801c1a1a build: reproduce original package structure using bazel 2021-12-10 11:06:41 +01:00
Renovate Bot
3925768e7e build: update all non-major dependencies 2021-11-22 08:55:46 +01:00
Renovate Bot
22f8e8a83a build: update all non-major dependencies 2021-11-17 09:32:28 +00:00
Renovate Bot
f049feeace build: update all non-major dependencies 2021-11-09 13:04:00 -05:00
Alan Agius
079ef070c9 refactor(@angular-devkit/build-angular): replace Ivy Enabled analytics dimension with AOT Enabled
The motivation behind this change is that since version 12, application are always built using Ivy, in addition to this, adding AOT as dimension might be  helpful in our decision process if we want to remove JIT.
2021-10-13 21:03:50 +02:00
Alan Agius
cd000d283e test(@angular-devkit/core): address lint issues 2021-10-13 16:50:37 +02:00
Alan Agius
a169f26513 refactor(@angular-devkit/core): use chokidar types instead of custom interface
Replace `ChokidarWatcher` with types from `chokidar`
2021-10-09 07:04:18 +02:00
Alan Agius
1b3a5429b0 fix(@angular-devkit/core): add missing option peer dependency on chokidar 2021-10-09 07:04:18 +02:00
Charles Lyding
a54e5e0655 fix(@angular-devkit/core): support Node.js v16 with NodeJsSyncHost/NodeJsAsyncHost delete operation
The `NodeJsSyncHost`/`NodeJsAsyncHost` classes' `delete` method uses `fs.rmdirSync`/`fs.rmdir` to delete directories. However, Node.js v16's `fs.rmdirSync`/`fs.rmdir` will now throw an `ENOENT` error if the path does not exist. `fs.rmSync`/`fs.rm` is now the preferred option when using Node.js v16 but since this function is not available on Node.js v12 both are tried with `fs.rmSync`/`fs.rm` given preference.
Once Node.js 12 support is dropped, the `delete` method could potentially be refactored to avoid the `isDirectory` check and only use `fs.rmSync`/`fs.rm` which supports both files and directories.
2021-10-06 06:11:09 -05:00
Renovate Bot
3f31a6757f build: update all non-major dependencies 2021-09-14 09:05:32 +01:00
Charles Lyding
a7de97e485 build: add Bazel ts_library rule package_name properties to all packages
rules_nodejs 4 requires that a package_name property be specified within a ts_library rule for the output to be linked into the package repository. Failing to add the property can cause test failures due to unresolved packages.
2021-08-26 07:30:44 +02:00
Charles Lyding
51f89d633f test: enable no-useless-escape lint rule
The `no-useless-escape` eslint rule has now been enabled which removes unneeded characters and complexity from string literals and regular expressions. All files that were in violation of this rule have also been corrected.
2021-08-24 10:51:14 +01:00
Renovate Bot
7f7d699c46 build: update dependency ajv-formats to v2.1.1 2021-08-16 12:22:47 -04:00
Alan Agius
d722fdf1f6 refactor(@angular-devkit/core): remove deprecated JSON parser
BREAKING CHANGE: The deprecated JSON parser has been removed from public API. [jsonc-parser](https://www.npmjs.com/package/jsonc-parser) should be used instead.
2021-08-16 10:01:04 -04:00
Alan Agius
0c92ea5ca3 feat(@angular-devkit/core): remove deprecated schema id handling
BREAKING CHANGE: With this change we drop support for the deprecated behaviour to transform `id` in schemas. Use `$id` instead.

Note: this only effects schematics and builders authors.
2021-08-10 21:40:19 +02:00
Charles Lyding
1cb07caddc build: transition from ts-api-guardian to dev-infra api-golden utility
The dev-infra tooling now directly provides public API change testing capabilities that leverage the `api-extractor` utility. These new testing capabilities are shared with framework and components.
`ts-api-guardian` has been removed as a dependency as a result.
2021-07-21 14:55:18 -07:00
Charles Lyding
222e711136 build: add secondary entrypoint package.json files to packages
The new public API tooling searches for nested package.json files to determine the location of secondary entrypoints. All secondary entrypoints for the CLI related packages now contain a secondary entrypoint package.json file.
The internal monorepo package discovery script was also updated to support the presence of the nested package.json files.
2021-07-21 14:55:18 -07:00
Renovate Bot
2933b9a4f1 build: update dependency ajv to v8.6.2 2021-07-16 12:19:17 +02:00
Renovate Bot
2bd859e6d5 build: update all non-major dependencies 2021-07-06 10:21:28 -04:00
Charles Lyding
9afe185fc6 build: enable noImplicitOverride TypeScript option
The `noImplicitOverride` TypeScript option improves code quality by ensuring that properties from base classes are not accidentally overriden.
Reference: https://www.typescriptlang.org/tsconfig#noImplicitOverride
2021-07-02 06:40:36 -04:00
Alan Agius
1dd3bda57f test: fix failing tests which were not shown
Previously when an unhandled error occured Bazel would mark the suit as passed instead of failed.

See: https://togithub.com/bazelbuild/rules_nodejs/commit/3c4ef58
2021-06-10 16:25:19 +02:00
Renovate Bot
9a4b55aa91 build: update all non-major dependencies 2021-06-06 19:07:02 +02:00
why520crazy
966c0aebbc fix(@angular-devkit/core): transform path using getSystemPath for NodeJsAsyncHost's exists method 2021-06-02 09:16:19 +02:00
Renovate Bot
0553de187c build: update all non-major dependencies 2021-06-02 09:16:03 +02:00
Alan Agius
f209cb5545 test(@angular-devkit/core): update host tests to not use deprecated Jasmine behaviour
```
DEPRECATION: An asynchronous before/it/after function was defined with the async keyword but also took a done callback. This is not supported and will stop working in the future. Either remove the done callback (recommended) or remove the async keyword.
```
2021-05-31 12:48:18 +01:00
Alan Agius
06af7d7e7b fix(@angular-devkit/core): handle async schema validations 2021-05-31 12:48:18 +01:00
Alan Agius
9f85bc5625 fix(@angular-devkit/core): handle complex smart defaults in schemas 2021-05-31 12:48:18 +01:00
Alan Agius
600d266ca4 fix(@angular-devkit/core): show allowed enum values when validation on enum fails 2021-05-31 12:48:18 +01:00
Alan Agius
621938dd5e test(@angular-devkit/core): fix memory host spec
This previously caused an `UnhandledPromiseRejection` which caused tests not to run. But Jasmine, still reported success.

```
yarn bazel test //packages/angular_devkit/core:core_test --test_summary=detailed --test_output=all

INFO: Analyzed target //packages/angular_devkit/core:core_test (1 packages loaded, 10 targets configured).
INFO: Found 1 test target...
Target //packages/angular_devkit/core:core_test up-to-date:
  dist/bin/packages/angular_devkit/core/core_test.sh
  dist/bin/packages/angular_devkit/core/core_test_loader.js
  dist/bin/packages/angular_devkit/core/core_test_require_patch.js
INFO: Elapsed time: 0.327s, Critical Path: 0.03s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
PASSED: //packages/angular_devkit/core:core_test (see /private/var/tmp/_bazel_alanagius/5168427e57f204ca069c602aa7ed1931/execroot/angular_cli/bazel-out/darwin-fastbuild/testlogs/packages/angular_devkit/core/core_test/test.log)
INFO: From Testing //packages/angular_devkit/core:core_test
==================== Test output for //packages/angular_devkit/core:core_test:
(node:12829) UnhandledPromiseRejectionWarning: Error: Cannot find module '/private/var/tmp/_bazel_alanagius/5168427e57f204ca069c602aa7ed1931/execroot/angular_cli/node_modules/@angular-devkit/core/src/index.js'. Please verify that the package.json has a valid "main" entry
    at tryPackage (internal/modules/cjs/loader.js:303:19)
    at Function.Module._findPath (internal/modules/cjs/loader.js:516:18)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:867:27)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (packages/angular_devkit/core/src/virtual-fs/host/memory_spec.ts:10:1)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Loader.requireShim [as require_] (node_modules/jasmine/lib/loader.js:35:3)
    at node_modules/jasmine/lib/loader.js:28:12
    at new Promise (<anonymous>)
    at Loader.load (node_modules/jasmine/lib/loader.js:27:12)
    at Jasmine.loadSpecs (node_modules/jasmine/lib/jasmine.js:91:23)
    at Jasmine.execute (node_modules/jasmine/lib/jasmine.js:267:3)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:12829) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:12829) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
================================================================================
Test cases: finished with 1 passing and 0 failing out of 1 test cases

Executed 0 out of 1 test: 1 test passes.
```
2021-05-31 12:48:18 +01:00
Alan Agius
43926a21ba fix(@angular-devkit/build-angular): compile schema in synchronously
AJV only support a single schema with the same ID, compiling schemas async can cause a race condition were multiple schemas with the same name as compiled at the same time.

Closes #20847
2021-05-19 16:34:55 +02:00
Renovate Bot
2c7e5d9fc9 build: update all non-major dependencies 2021-05-18 13:15:00 +02:00
Renovate Bot
d279b12e61 build: update all non-major dependencies 2021-05-10 16:22:25 +01:00
Renovate Bot
24ca8b22ae build: update all non-major dependencies 2021-05-05 08:58:50 -04:00
Alan Agius
e992c9a70b build: update files to be fix eslint header/header failures 2021-05-04 09:59:40 -04:00
Charles Lyding
c1512e4274 build: update files to be eslint compliant
All TypeScript files have been updated to pass the new eslint-based linting checks. eslint compatible disabling comments have also been added in place of the previous tslint comments.
2021-05-03 07:31:02 -04:00
Charles Lyding
37a06a7c37 build: format all files
All files are now formatted using the ng-dev tools via prettier.
2021-04-28 16:05:49 -07:00
Renovate Bot
8b34305777 build: update all non-major dependencies 2021-04-28 12:18:43 +02:00