1253 Commits

Author SHA1 Message Date
Kristiyan Kostadinov
f06f4422c6 build: update to TypeScript 5.4
Updates the repo to TypeScript 5.4.
2024-02-28 12:59:28 -05:00
Charles Lyding
34481d07f5 Revert "refactor(@schematics/angular): remove private /components API"
The removed APIs are needed to support `ng add @angular/material@16` with
Angular CLI v17. These APIs should be able to be safely removed with v18.

This reverts commit 6a4d733ddaf67c0b93f48ff39cd2a987dcd2b024.
2024-02-22 10:04:29 -08:00
Charles Lyding
d7dccbf6b4 refactor(@schematics/angular): correct several comment typos
There were several typos in the comments for the Angular schematics utilities.
2024-02-12 22:21:50 +01:00
Alan Agius
6a4d733dda refactor(@schematics/angular): remove private /components API
Last usages of this API has been removed in https://github.com/angular/components/pull/28424
2024-01-26 22:15:06 +01:00
Alan Agius
03e1aa7904 feat(@schematics/angular): add support to bun package manager
This commit adds support to use `bun` as a package manager.

Closes #26837
2024-01-25 18:02:35 +01:00
Alan Agius
6c65730b60 build: update angular to 17.2.0-next 2024-01-25 09:11:51 +01:00
Alan Agius
90363dd6bf fix(@schematics/angular): retain trailing comma when adding providers to app config
This fixes an issue which caused the new provider to be added in the position of the trailing comma. With this change the trailing comma is retained.

Closes #26911
2024-01-23 18:35:01 +01:00
Angular Robot
248b4c9a75 build: update all non-major dependencies 2024-01-23 10:52:36 +01:00
Val-Git
ea8102ac7f refactor(@angular/cli): change Twitter icon in the application schematic 2024-01-10 10:48:34 -08:00
JiaLiPassion
2bb667ec16 build: update zone.js to 0.14.3 2024-01-10 09:11:21 +01:00
Alan Agius
dfde2750b4 fix(@schematics/angular): retain existing EOL when adding imports
This commit updates the AST utility to retain the existing EOF when adding imports
2024-01-05 16:30:06 +01:00
Alan Agius
1e364bd00c fix(@schematics/angular): retain existing EOL when updating JSON files
This commit updates the JSON utility to retain the existing EOF when updating files.
2024-01-05 16:30:06 +01:00
Alan Agius
94082a7ca4 refactor(@schematics/angular): update server schematic to use new dependency utility
This commit updates the server schematic to use the new dependency utility.
2024-01-05 16:29:53 +01:00
Alan Agius
10eebe9e69 build: update dependency browser-sync to v3
(cherry picked from commit 953780fdce795c9d65f54633f578470cf415858e)
2024-01-02 16:03:22 +01:00
Paweł Fraś
9be1a82018 refactor(@schematics/angular): fix typo in "expression" variable name inside "addSymbolToNgModuleMetadata" function 2023-12-27 09:00:27 -05:00
Alan Agius
4469e481fc fix(@schematics/angular): do not trigger NPM install when using ---skip-install and --ssr
The `skipInstall` option was never passed to the ssr schematic, which caused NPM install to also be invoked when running `ng new --ssr`.
2023-12-26 18:28:45 +01:00
Krzysztof Platis
aec581daf0 fix(@schematics/angular): add missing property "buildTarget" to interface "ServeBuilderOptions" 2023-12-21 10:28:29 -08:00
Alan Agius
ceffafe1a3 fix(@angular-devkit/build-angular): provide better error messages for failed file reads
This commit adds a more actionable error message when `readFile` fails during index generation.
2023-12-20 15:58:13 +01:00
Alan Agius
a1f3ae5799 fix(@schematics/angular): do not generate standalone component when using ng generate module
Adjust the module schematic to always generate non standalone components.

Closes #26700
2023-12-19 16:48:12 +01:00
Alan Agius
a708dccff3 feat(@schematics/angular): update SSR and application builder migration schematics to work with new outputPath
In #26675 we introduced a long-form variant of `outputPath`, this commit updates the application builder migration and ssr schematics to handle this change.
2023-12-19 07:20:25 +01:00
Alan Agius
364a16b7a6 feat(@angular-devkit/build-angular): move browser-sync as optional dependency
`browser-sync` is now an optional dependency of `@angular-devkit/build-angular`. This package is only needed when using the legacy `@angular-devkit/build-angular:ssr-dev-server` builder.

Closes #26349
2023-12-06 11:47:28 -05:00
Alan Agius
e2f92ab957 fix(@schematics/angular): enable TypeScript skipLibCheck in new workspace
This commit enables `skipLibCheck` in new workspaces which is now recommanded by TypeScript.  When enabled, type checking of declaration files is skipped as rather than doing a full check of all `d.ts` files, TypeScript will type check the code you specifically refer to in your app’s source code.

See: https://www.typescriptlang.org/tsconfig#skipLibCheck
2023-12-01 17:57:57 -08:00
Alan Agius
bb8550eda2 build: update TypeScript to 5.3.2
Update several schematics files to use TypeScript 5.3.2
2023-12-01 17:10:03 +01:00
Alan Agius
b513d89b77 feat(@schematics/angular): add optional migration to use application builder
This commits adds an optional migration to migration existing projects to use the vite and esbuild based application builder.

The migration can be opted-in when running `ng update @angular/cli --name=use-application-builder`
2023-12-01 13:38:06 +01:00
cexbrayat
571722d2a9 fix(@schematics/angular): remove CommonModule import from standalone components
`ng g c` no longer generates a component with the `CommonModule` import.
This import is not useful if developers adopt the control flow syntax in their templates.
Instead, developers are encouraged to import the individual directives/pipes if needed.
2023-11-23 14:25:07 +01:00
Kristiyan Kostadinov
3810bd4e0a build: update to TypeScript 5.3
Updates the repo to TypeScript 5.3.
2023-11-22 14:59:05 -05:00
Matthieu Riegler
3c66ba78b4 refactor(@angular-devkit/schematics): use self-closing tag for router-outlet
Let's make the component as simple a possible.
2023-11-20 08:06:08 -05:00
Matthieu Riegler
18231e0804 refactor(@angular-devkit/schematics): remove CommonModule
The template now uses the new control flow syntax
2023-11-20 08:06:08 -05:00
Charles Lyding
9e356754ce build: update Angular version to v17.1 prerelease
Angular package dependency versions and the version used to generate a new project have been updated to use 17.1.0-next.0.
2023-11-17 12:34:39 -05:00
Alan Agius
c7b7e593db fix(@schematics/angular): remove downlevelIteration from tsconfig.json for new workspaces
We no longer need `downlevelIteration` as ES5 is output is no longer supported by the CLI.
2023-11-13 08:28:43 +01:00
Alan Agius
80b024bc0d fix(@schematics/angular): add helper script to spawn SSR server from dist
This commit adds a helper script in the `package.json` when running `ng add @angular/ssr` or `ng new --ssr` that can be used to spawn the SSR server.

Example of script:
```json
{
    "scripts": {
       "serve:ssr:my-app": "node dist/my-app/server/server.mjs"
    }
}
```

Closes #26315
2023-11-13 08:27:13 +01:00
cexbrayat
0b987b5eeb fix(@schematics/angular): html indentation
The div was badly aligned in `app.component.html`
2023-11-08 18:57:57 +01:00
cexbrayat
47700e3c50 fix(@schematics/angular): use styleUrl
The `ng g c` schematic is already using `styleUrl`, but `app.component.ts` was still using `styleUrls`.
2023-11-08 18:57:40 +01:00
cexbrayat
da7dea654f fix(@schematics/angular): use href property binding for links 2023-11-08 15:04:33 +01:00
Alan Agius
0ccb4c7d0b build: update Angular packages to version 17 stable
Update all versions to stable
2023-11-08 13:56:40 +01:00
Alan Agius
a2fa0c995e refactor(@schematics/angular): add fallback fonts
Just in case Inter Tight is not available.
2023-11-07 19:14:34 +01:00
Alan Agius
7e72fd86fa refactor(@schematics/angular): remove unused CSS
Only h1 is used in the initial template.
2023-11-07 19:14:34 +01:00
Alan Agius
be6ef55369 refactor(@schematics/angular): use control flow to reduce code
This commit uses control flow to reduces code in the template
2023-11-07 19:14:34 +01:00
Alan Agius
f9a798be05 fix(@angular/pwa): replace Angular logos
This commit replaces the Angular old logo with the new one.
2023-11-07 19:14:34 +01:00
Alan Agius
1f02aa9f61 fix(@schematics/angular): add missing icons in ng-new template
This commit adds a number of missing icons.

Closes #26257
2023-11-07 19:14:34 +01:00
Doug Parker
42934bcffe feat(@schematics/angular): update ng new generated application 2023-11-06 15:53:53 -08:00
Alan Agius
65e5331740 fix(@schematics/angular): add missing express REQUEST and RESPONSE tokens
This commit updates the nguniversal migration to add `REQUEST` and `RESPONSE` tokens.

Closes #26110
2023-10-31 08:59:15 +01:00
Alan Agius
11420667f9 build: use single Node.js toolchain to run unit tests
E2E tests are used to run tests on multiple platforms and node.js versions.
2023-10-30 17:50:47 +01:00
Doug Parker
7b1fd9cf38 refactor(@schematics/angular): update component schematic to use single style or styleUrl property
An array is no longer required in v17 and we always generate a single style or style URL anyways, so we may as well drop the array.
2023-10-30 09:00:18 +01:00
Charles Lyding
00872eaa0a fix(@schematics/angular): enable TypeScript esModuleInterop by default for ESM compliance
The `esModuleInterop` TypeScript option is a TypeScript recommended option that ensures that TypeScript
emits compliant ESM code when transforming namespace and default imports. This is important for new projects
because they now use the `application` builder which emits full ESM code. Not using this option with certain
third-party packages (e.g., `moment`) can result in build warnings and the potential for runtime failure. For existing
applications that are considering migrating, information pertaining to this situation will be available within
the documentation.

Since the `allowSyntheticDefaultImports` is implied and automatically enabled when `esModuleInterop` is enabled,
the previous option has been replaced with this one.

Reference: https://www.typescriptlang.org/tsconfig#esModuleInterop
2023-10-27 09:29:13 -07:00
Charles Lyding
c5827d412f fix(@schematics/angular): allow dash in selector before a number
This commit updates the validator regexp to allow a dash before a number.

Closes #25164
2023-10-26 16:58:21 +02:00
Alan Agius
f6a088bc18 fix(@angular/ssr): correctly set config URL
When calling `renderApplication` or `renderModule` the URL would be overridden to undefined as the `url` option was not provided as an option.
2023-10-24 16:11:45 +02:00
Alan Agius
c07cbd5073 fix(@schematics/angular): do not add unnecessary dependency on @angular/ssr during migration
Prior to this change the Universal migration ran and added `@angular/ssr` even the workspace did not depend on `@nguniversal/` packages.

Closes #26083
2023-10-23 15:17:08 +02:00
Alan Agius
53f93b93bb fix(@schematics/angular): noop workspace config migration when already executed
Prior to this change there was a missing check that causes the migration to remove valid config when it was executed multiple times or on configs that do not contain the deprecated option.

Closes #26063
2023-10-19 13:16:03 +02:00
Alan Agius
17fd0ade13 fix(@angular-devkit/build-angular): update ssr option definition
This commits updates the `ssr` application builder option definition. The main change is that now the option does not accept the entry-point as a value. Instead it should be passed in the `entry` suboption.

Example
```json
"ssr": {
    "entry": "server.ts"
}
```

This change in this option is important to allow us in the future to add additional sub options. Like potentially a `platform` or `target`.
2023-10-19 13:15:31 +02:00