These changes include fixes to tests, timeout and stop of architect to make tests work with Jasmine 4.
One noticeable change that when we didn't stop architect through `run.stop()` this causes Bazel to timeout now.
Example
```
-- Test timed out at 2022-03-24 12:07:07 UTC --
/private/var/tmp/_bazel_alanagius/5168427e57f204ca069c602aa7ed1931/sandbox/darwin-sandbox/398/execroot/angular_cli/bazel-out/darwin-fastbuild/bin/packages/angular_devkit/build_angular/build_angular_browser_test.sh.runfiles/angular_cli/packages/angular_devkit/build_angular/build_angular_browser_test.sh: line 424: 41835 Terminated: 15 "${node}" ${LAUNCHER_NODE_OPTIONS[@]+"${LAUNCHER_NODE_OPTIONS[@]}"} ${USER_NODE_OPTIONS[@]+"${USER_NODE_OPTIONS[@]}"} "${MAIN}" ${ARGS[@]+"${ARGS[@]}"} 0<&0
```
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
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.
Closes#13228
It is currently unused and requires an old version of the `source-map` package. This old version conflicts with the use of newer versions that are required to provide the necessary functionality and performance within the published packages.
Replace the v8-profiler dependency with v8-profiler-node8 as the first one
doesn't support node 8 and 10, and that @angular/cli support only node 8
and 10.
The require() logic by default is not enough; require("file") would pick the json
if there are both a file.ts and file.json. This does not show up in prod because
js files are prioritized over json, but it does show up in bootstrap because we
compile ts in memory and there are no .js file on disk (which require()
could potentially see).
This is necessary for the schema change because schema.json and
schema.ts collides. We should also rename the commands from *-impl.ts to
just *.ts (they were named that way because of this conflict).
Before it would try to load the package from the CLI project, as a
regular require() call, now it adds a check to see if it can be resolved
from the process.cwd(), before doing the previous behaviour.
Also adding a new package, webpack, which is a plugin and loader for
webpack that adds support for AoT.
It is behind a `--aot` flag in the CLI that is supported by build and
serve.
Moving Angular-CLI into `packages/` and building the angular-cli.
The published packages will now have JavaScript only (with their d.ts), instead of being a mix of TypeScript and JavaScript, and it won't have the hacks of having a custom require extension to load the TypeScript.
Our development flow will be more streamlined, tools are going to be better (no more undefined symbols that are actually defined), and the npm packages will boot up way faster (since there's no more compilation during runtime).
Locally nothing changes, use `npm link` and run your local `ng`. Using the `npm` releases though it should be all javascript from the release.
The E2E tests also now uses the `dist` folder output to install in the new E2E app, making sure the process works for an app published to npm.
Note: Even though we're following the lerna structure, we won't be using their tool anytime soon.