5 Commits

Author SHA1 Message Date
Jan Martin
54594b5abf feat(@angular-devkit/build-angular): support karma with esbuild
Adds a new "builderMode" setting for Karma that can be used to switch
between webpack ("browser") and esbuild ("application"). It supports a
third value "detect" that will use the same bundler that's also used for
development builds.

The detect mode is modelled after the logic used for the dev-server builder.

This initial implementation doesn't properly support `--watch` mode or code
coverage.
2024-09-26 09:35:18 -07:00
Alan Agius
dbcea96274 refactor(@angular-devkit/build-angular): simplify how specs are found and loaded
Prior to this change specs where found and loaded using Webpack's `require.context` API. The `require.context` is found in the users project `test.ts`. This resulted in a complex and hacky setup especially to filter tests when the `include` builder option is provided, were we had to amend the `test.ts` in memory.

With this change we find all the specs files and add them as part of the main entrypoint.

Closes #23751 and closes #22531
2022-09-23 18:52:26 -04:00
Alan Agius
7a24609143 fix(@angular-devkit/build-angular): disable glob mounting for patterns that start with a forward slash
By default, a glob pattern starting with a forward slash will be "mounted" onto the system root. This causes globs to escape the workspace root.

With this change we configure disable glob "mounting" and also change the root to the same setting of the `cwd`.

Closes #23467
2022-06-30 08:41:12 -04:00
Alan Agius
7068de2809 refactor(@angular-devkit/build-angular): clean find tests logic
With this change we clean up and reduce the complexity of the `findTests` logic that handles the `include` option in the karma builder.
2022-01-27 11:05:36 -08:00
Charles Lyding
0afdff028c refactor(@angular-devkit/build-angular): move all builders into a builders subdirectory
All Angular builders are now located within one subdirectory of the `src` directory. This organization provides better discovery of the builders and will allow builder specific code to be stored in a single area.
2021-08-05 06:49:55 +02:00