30 Commits

Author SHA1 Message Date
Charles Lyding
17e168379e build: additional fixes for tsetse rule compliance
Due to bazel rules_nodejs caching, several additional `JSON.parse` usages were not
caught in the first set of fixes. These have now been addressed. Also,
the `must-use-promises` rule has been patched to match the behavior of the
`@typescript-eslint/no-floating-promises` for consistency.
The bazel option `suppressTsconfigOverrideWarnings` was also removed from the
`tsconfig` as it is a no-op and was previously used for now removed feature.
Test files are currently excluded from the `JSON.parse` rule to avoid large
changes to test code.
2024-06-25 11:17:33 -04:00
Ash Ramirez
434a3740f0 refactor(@angular/cli): update aio links -> adev links
Updates for all angular.io links to the new angular.dev domain. Additionally, adjustment to new resources where the equivalent does not exist on the new site (e.g. Tour of Heroes tutorial)
2024-06-06 11:12:06 +02:00
Charles Lyding
57d57b4211 fix(@angular-devkit/architect): resolve builder aliases from containing package
When resolving a builder alias, the base path for the resolution will now
use the containing package. This prevents potential resolution failure due
to varying package manager installation strategies.
2024-05-02 10:00:18 -04:00
Charles Lyding
6d9a06a437 refactor(@angular-devkit/architect): allow aliasing builder names in package builder manifest
A builder's manifest definition within a package (typically `builders.json`) can now contain
a string value that will be used as a builder specifier when loading the named builder. This
allows a builder name to be aliased to another builder. The other builder may also be in
another package.
The build resolution logic has also been updated to remove use of the global `require` to
support eventual direct ESM usage.
2024-04-09 07:50:10 -04:00
Charles Lyding
6d8d948ad0 refactor(@angular-devkit/build-angular): cache compiled load ESM file helper
The dynamically compiled ESM import helper is now cached to prevent the need
to recompile the helper function everytime a load ESM helper call is made.
This helper is currently used to workaround dynamic import limitations with
the TypeScript compilation output. Once the build process is updated, it will
no longer be required.
2023-11-03 10:36:27 +01:00
Charles Lyding
1b9880c5cb refactor(@angular-devkit/architect): assert catch clause variable type before usage
Prepares the `@angular-devkit/architect` package for the eventual change of enabling the
TypeScript `useUnknownInCatchVariables` option. This option provides additional
code safety by ensuring that the catch clause variable is the proper type before
attempting to access its properties. Similar changes will be needed in the other
packages in the repository prior to enabling `useUnknownInCatchVariables`.
2022-06-14 11:28:21 +02:00
Alan Agius
5def2de1bf fix(@angular-devkit/architect): correctly handle ESM builders
Previoiusly, we didn't correctly handle ESM builders as the `import` was always downlevelled to `require` by TypeScript.
2022-01-24 20:33:21 +01:00
Alan Agius
09e039500f feat(@angular-devkit/architect): include workspace extensions in project metadata 2021-10-06 08:02:22 -05:00
Charles Lyding
b3d7080147 build: enable esModuleInterop TypeScript option
The `esModuleInterop` option is recommended to be enable by TypeScript and corrects several assumptions TypeScript would otherwise make when importing CommonJS files.
This option change helps ensure compatibility as packages move towards ESM.
Reference: https://www.typescriptlang.org/tsconfig#esModuleInterop
2021-06-13 11:45:55 -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
Joey Perrott
003854257c build: migrate all file header to use Google LLC rather than Google Inc 2021-04-27 08:35:22 +02:00
Alan Agius
1da359ac08 feat(@angular-devkit/architect): add implementation for defaultConfiguration
With this change, the architect can be configured to use a default configuration when it's not provided as part of the target.

Consider the below, where `defaultConfiguration` is configured to `production`. Running `ng build` will be invoked with "production" configuration.

```js
"build": {
  "builder": "@angular-devkit/build-angular:browser",
  "defaultConfiguration": "production",
  "options": {
      ...
  },
  "configurations": {
    "production": {
        ...
    }
  }
}
```
2021-03-08 08:45:54 -06:00
Alan Agius
aedfcc1862 build: update to @types/node version 12 2021-02-08 14:07:24 -05:00
Charles Lyding
24b0a49a73 refactor(@angular-devkit/architect): abstract workspace access from architect
This change allows architect runtime implementations to have more control over how builder information and options for targets are found.  A workspace file (and accompanying definition class) is not necessarily needed now.  This also has benefits for unit testing by reducing the amount of potential setup needed per test.
2020-11-16 08:52:22 -05:00
Tobias Gassmann
57b80ee09c fix(@angular-devkit/architect): add name of the non-existing project to error message 2020-08-13 10:14:28 +02: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
Filipe Silva
aaf2d802a8 fix(@angular-devkit/architect): temporary workaround for TS bug with UMDs
The TS bug is https://github.com/microsoft/TypeScript/issues/36780.

The workaround is needed because `ts_library` emits UMDs currently. This will change with https://github.com/bazelbuild/rules_typescript/pull/492 and https://github.com/bazelbuild/rules_nodejs/pull/1687.
2020-04-07 09:07:19 -07:00
Filipe Silva
86d4385440 build: use TypeScript 3.7 2020-01-09 13:43:49 -08:00
Charles Lyding
8ffb755ef0 refactor(@angular-devkit/architect): remove usage of experimental workspace API 2019-10-25 09:53:34 -07:00
Charles Lyding
c8f8028e80 fix(@angular-devkit/architect): clone workspace objects before builder use 2019-10-25 09:53:34 -07:00
Filipe Silva
27c3650d80 feat(@angular-devkit/architect): support multiple configs in WorkspaceNodeModulesArchitectHost
Add support for parsing multiple configurations in a single string using comma as a separator.

This support is only at the host level (`WorkspaceNodeModulesArchitectHost` in this case) and does not change the underlying Architect API.

Different hosts are able to compose target options in different ways.
2019-10-14 13:40:48 -07:00
Charles Lyding
0d104c0aba feat(@angular-devkit/architect): support accessing project metadata 2019-09-24 13:18:33 -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
Alan Agius
53d027837e fix(@angular-devkit/architect): error out when invalid configurations are provided
Fixes #14654
2019-06-10 13:43:39 -07:00
Charles Lyding
548fefddbd docs(@angular-devkit/architect): add comment about deprecated workspace usage 2019-05-09 10:04:57 -07:00
Charles Lyding
cbb493eb81 refactor(@angular-devkit/architect): support stable workspaces API 2019-05-07 16:24:37 -06:00
Charles Lyding
588d61e608 refactor(@angular-devkit/architect): remove temporary index2 entrypoint 2019-04-04 19:49:56 -07:00
Hans Larsen
128af102a3 feat(@angular-devkit/architect): getOptionsForTarget should return null
If the target does not exist in the workspace.
2019-03-13 13:51:22 -07:00
Hans Larsen
e2163a0bde refactor(@angular-devkit/architect): clarify some error messages
They will be redone in classes before RC, but for now this helps diagnose
obscure messages.
2019-03-13 13:51:22 -07:00
Hans Larsen
79a6988275 feat(@angular-devkit/architect): add node architect host
This host resolves using the package resolution and reading the targets
from the workspace API.
2019-02-19 13:51:29 -08:00