diff --git a/docs/generated/manifests/nx-api.json b/docs/generated/manifests/nx-api.json index 75e17d7962523..06fd85d4bc487 100644 --- a/docs/generated/manifests/nx-api.json +++ b/docs/generated/manifests/nx-api.json @@ -108,7 +108,7 @@ "type": "executor" }, "/nx-api/angular/executors/application": { - "description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities. _Note: this is only supported in Angular versions >= 17.0.0_.", + "description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities.", "file": "generated/packages/angular/executors/application.json", "hidden": false, "name": "application", @@ -200,7 +200,7 @@ "type": "generator" }, "/nx-api/angular/generators/convert-to-application-executor": { - "description": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder. _Note: this is only supported in Angular versions >= 17.0.0_.", + "description": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder.", "file": "generated/packages/angular/generators/convert-to-application-executor.json", "hidden": false, "name": "convert-to-application-executor", diff --git a/docs/generated/packages-metadata.json b/docs/generated/packages-metadata.json index 04e75a49bb135..4e6c182b8db5f 100644 --- a/docs/generated/packages-metadata.json +++ b/docs/generated/packages-metadata.json @@ -103,7 +103,7 @@ "type": "executor" }, { - "description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities. _Note: this is only supported in Angular versions >= 17.0.0_.", + "description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities.", "file": "generated/packages/angular/executors/application.json", "hidden": false, "name": "application", @@ -195,7 +195,7 @@ "type": "generator" }, { - "description": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder. _Note: this is only supported in Angular versions >= 17.0.0_.", + "description": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder.", "file": "generated/packages/angular/generators/convert-to-application-executor.json", "hidden": false, "name": "convert-to-application-executor", diff --git a/docs/generated/packages/angular/documents/angular-nx-version-matrix.md b/docs/generated/packages/angular/documents/angular-nx-version-matrix.md index a725c3b6bd918..6628023534f11 100644 --- a/docs/generated/packages/angular/documents/angular-nx-version-matrix.md +++ b/docs/generated/packages/angular/documents/angular-nx-version-matrix.md @@ -14,6 +14,7 @@ We provide a recommended version, and it is usually the latest minor version of | Angular Version | **Nx Version _(recommended)_** | Nx Version _(range)_ | | --------------- | ------------------------------ | ---------------------------------------- | +| ~19.0.0 | **latest** | >=20.2.0 <=latest | | ~18.2.0 | **latest** | >=19.6.0 <=latest | | ~18.1.0 | **latest** | >=19.5.0 <=latest | | ~18.0.0 | **latest** | >=19.1.0 <=latest | @@ -21,9 +22,9 @@ We provide a recommended version, and it is usually the latest minor version of | ~17.2.0 | **latest** | >=18.1.1 <=latest | | ~17.1.0 | **latest** | >=17.3.0 <=latest | | ~17.0.0 | **latest** | >=17.1.0 <=latest | -| ~16.2.0 | **latest** | >=16.7.0 <=latest | -| ~16.1.0 | **latest** | >=16.4.0 <=latest | -| ~16.0.0 | **latest** | >=16.1.0 <=latest | +| ~16.2.0 | **~20.1.0** | >=16.7.0 <20.2.0 | +| ~16.1.0 | **~20.1.0** | >=16.4.0 <20.2.0 | +| ~16.0.0 | **~20.1.0** | >=16.1.0 <20.2.0 | | ~15.2.0 | **~19.0.0** | >=15.8.0 <19.1.0 | | ~15.1.0 | **~19.0.0** | >=15.5.0 <19.1.0 | | ~15.0.0 | **~19.0.0** | >=15.2.0 <=15.4.8 \|\| >=15.7.0 <19.1.0 | diff --git a/docs/generated/packages/angular/executors/application.json b/docs/generated/packages/angular/executors/application.json index 9509fe80b324f..96c3103273280 100644 --- a/docs/generated/packages/angular/executors/application.json +++ b/docs/generated/packages/angular/executors/application.json @@ -4,7 +4,7 @@ "schema": { "$schema": "http://json-schema.org/draft-07/schema", "title": "Schema for Nx Application Executor", - "description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities. _Note: this is only supported in Angular versions >= 17.0.0_.", + "description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities.", "examplesFile": "This executor is a drop-in replacement for the `@angular-devkit/build-angular:application` builder provided by the Angular CLI. It builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities.\n\nIn addition to the features provided by the Angular CLI builder, the `@nx/angular:application` executor also supports the following:\n\n- Providing esbuild plugins\n- Providing a function to transform the application's `index.html` file\n- Incremental builds\n\n{% callout type=\"check\" title=\"Dev Server\" %}\nThe [`@nx/angular:dev-server` executor](/nx-api/angular/executors/dev-server) is required to serve your application when using the `@nx/angular:application` to build it. It is a drop-in replacement for the Angular CLI's `@angular-devkit/build-angular:dev-server` builder and ensures the application is correctly served with Vite when using the `@nx/angular:application` executor.\n{% /callout %}\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Providing esbuild plugins\" %}\n\nThe executor accepts a `plugins` option that allows you to provide esbuild plugins that will be used when building your application. It allows providing a path to a plugin file or an object with a `path` and `options` property to provide options to the plugin.\n\n```json {% fileName=\"apps/my-app/project.json\" highlightLines=[\"8-16\"] %}\n{\n ...\n \"targets\": {\n \"build\": {\n \"executor\": \"@nx/angular:application\",\n \"options\": {\n ...\n \"plugins\": [\n \"apps/my-app/plugins/plugin1.js\",\n {\n \"path\": \"apps/my-app/plugins/plugin2.js\",\n \"options\": {\n \"someOption\": \"some value\"\n }\n }\n ]\n }\n }\n ...\n }\n}\n```\n\n```ts {% fileName=\"apps/my-app/plugins/plugin1.js\" %}\nconst plugin1 = {\n name: 'plugin1',\n setup(build) {\n const options = build.initialOptions;\n options.define.PLUGIN1_TEXT = '\"Value was provided at build time\"';\n },\n};\n\nmodule.exports = plugin1;\n```\n\n```ts {% fileName=\"apps/my-app/plugins/plugin2.js\" %}\nfunction plugin2({ someOption }) {\n return {\n name: 'plugin2',\n setup(build) {\n const options = build.initialOptions;\n options.define.PLUGIN2_TEXT = JSON.stringify(someOption);\n },\n };\n}\n\nmodule.exports = plugin2;\n```\n\nAdditionally, we need to inform TypeScript of the defined variables to prevent type-checking errors during the build. We can achieve this by creating or updating a type definition file included in the TypeScript build process (e.g. `src/types.d.ts`) with the following content:\n\n```ts {% fileName=\"apps/my-app/src/types.d.ts\" %}\ndeclare const PLUGIN1_TEXT: number;\ndeclare const PLUGIN2_TEXT: string;\n```\n\n{% /tab %}\n\n{% tab label=\"Transforming the 'index.html' file\" %}\n\nThe executor accepts an `indexHtmlTransformer` option to provide a path to a file with a default export for a function that receives the application's `index.html` file contents and outputs the updated contents.\n\n```json {% fileName=\"apps/my-app/project.json\" highlightLines=[8] %}\n{\n ...\n \"targets\": {\n \"build\": {\n \"executor\": \"@nx/angular:application\",\n \"options\": {\n ...\n \"indexHtmlTransformer\": \"apps/my-app/index-html.transformer.ts\"\n }\n }\n ...\n }\n}\n```\n\n```ts {% fileName=\"apps/my-app/index-html.transformer.ts\" %}\nexport default function (indexContent: string) {\n return indexContent.replace(\n 'my-app',\n 'my-app (transformed)'\n );\n}\n```\n\n{% /tab %}\n{% /tabs %}\n", "outputCapture": "direct-nodejs", "type": "object", @@ -55,7 +55,18 @@ }, "server": { "type": "string", - "description": "The full path for the server entry point to the application, relative to the current workspace." + "description": "The full path for the server entry point to the application, relative to the current workspace.", + "oneOf": [ + { + "type": "string", + "description": "The full path for the server entry point to the application, relative to the current workspace." + }, + { + "const": false, + "type": "boolean", + "description": "Indicates that a server entry point is not provided. _Note: this is only supported in Angular versions >= 19.0.0_." + } + ] }, "polyfills": { "description": "A list of polyfills to include in the build. Can be a full path for a file, relative to the current workspace or module specifier. Example: 'zone.js'.", @@ -71,6 +82,29 @@ "type": "string", "description": "Customize the base path for the URLs of resources in 'index.html' and component stylesheets. This option is only necessary for specific deployment scenarios, such as with Angular Elements or when utilizing different CDN locations. _Note: this is only supported in Angular versions >= 17.3.0_." }, + "security": { + "description": "Security features to protect against XSS and other common attacks. _Note: this is only supported in Angular versions >= 19.0.0_.", + "type": "object", + "additionalProperties": false, + "properties": { + "autoCsp": { + "description": "Enables automatic generation of a hash-based Strict Content Security Policy (https://web.dev/articles/strict-csp#choose-hash) based on scripts in index.html. Will default to true once we are out of experimental/preview phases. It defaults to `false`.", + "oneOf": [ + { + "type": "object", + "properties": { + "unsafeEval": { + "type": "boolean", + "description": "Include the `unsafe-eval` directive (https://web.dev/articles/strict-csp#remove-eval) in the auto-CSP. Please only enable this if you are absolutely sure that you need to, as allowing calls to eval will weaken the XSS defenses provided by the auto-CSP. It default to `false`." + } + }, + "additionalProperties": false + }, + { "type": "boolean" } + ] + } + } + }, "scripts": { "description": "Global scripts to be included in the build.", "type": "array", @@ -157,6 +191,28 @@ "type": "array", "items": { "type": "string" }, "default": [] + }, + "sass": { + "description": "Options to pass to the sass preprocessor. _Note: this is only supported in Angular versions >= 19.0.0_.", + "type": "object", + "properties": { + "fatalDeprecations": { + "description": "A set of deprecations to treat as fatal. If a deprecation warning of any provided type is encountered during compilation, the compiler will error instead. If a Version is provided, then all deprecations that were active in that compiler version will be treated as fatal.", + "type": "array", + "items": { "type": "string" } + }, + "silenceDeprecations": { + "description": " A set of active deprecations to ignore. If a deprecation warning of any provided type is encountered during compilation, the compiler will ignore it instead.", + "type": "array", + "items": { "type": "string" } + }, + "futureDeprecations": { + "description": "A set of future deprecations to opt into early. Future deprecations passed here will be treated as active by the compiler, emitting warnings as necessary.", + "type": "array", + "items": { "type": "string" } + } + }, + "additionalProperties": false } }, "additionalProperties": false @@ -546,8 +602,7 @@ "default": [] }, "prerender": { - "description": "Prerender (SSG) pages of your application during build time.", - "default": false, + "description": "Prerender (SSG) pages of your application during build time. It defaults to `false` in Angular versions < 19.0.0. Otherwise, the value will be `undefined`.", "oneOf": [ { "type": "boolean", @@ -584,6 +639,11 @@ "entry": { "type": "string", "description": "The server entry-point that when executed will spawn the web server." + }, + "experimentalPlatform": { + "description": "Specifies the platform for which the server bundle is generated. This affects the APIs and modules available in the server-side code. \n\n- `node`: (Default) Generates a bundle optimized for Node.js environments. \n- `neutral`: Generates a platform-neutral bundle suitable for environments like edge workers, and other serverless platforms. This option avoids using Node.js-specific APIs, making the bundle more portable. \n\nPlease note that this feature does not provide polyfills for Node.js modules. Additionally, it is experimental, and the feature may undergo changes in future versions. _Note: this is only supported in Angular versions >= 19.0.0_.", + "default": "node", + "enum": ["node", "neutral"] } }, "additionalProperties": false @@ -592,8 +652,12 @@ }, "appShell": { "type": "boolean", - "description": "Generates an application shell during build time.", - "default": false + "description": "Generates an application shell during build time. It defaults to `false` in Angular versions < 19.0.0. Otherwise, the value will be `undefined`." + }, + "outputMode": { + "type": "string", + "description": "Defines the build output target. 'static': Generates a static site for deployment on any static hosting service. 'server': Produces an application designed for deployment on a server that supports server-side rendering (SSR). _Note: this is only supported in Angular versions >= 19.0.0_.", + "enum": ["static", "server"] }, "buildLibsFromSource": { "type": "boolean", @@ -739,7 +803,7 @@ }, "presets": [] }, - "description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities. _Note: this is only supported in Angular versions >= 17.0.0_.", + "description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities.", "aliases": [], "hidden": false, "path": "/packages/angular/src/executors/application/schema.json", diff --git a/docs/generated/packages/angular/executors/browser-esbuild.json b/docs/generated/packages/angular/executors/browser-esbuild.json index 4617a8ba3bb5f..78316149d6d91 100644 --- a/docs/generated/packages/angular/executors/browser-esbuild.json +++ b/docs/generated/packages/angular/executors/browser-esbuild.json @@ -514,7 +514,7 @@ "default": true }, "plugins": { - "description": "A list of ESBuild plugins. _Note: this is only supported in Angular versions >= 17.0.0_.", + "description": "A list of ESBuild plugins.", "type": "array", "items": { "oneOf": [ diff --git a/docs/generated/packages/angular/executors/dev-server.json b/docs/generated/packages/angular/executors/dev-server.json index ec2c44ac3b23f..a91014df74843 100644 --- a/docs/generated/packages/angular/executors/dev-server.json +++ b/docs/generated/packages/angular/executors/dev-server.json @@ -93,8 +93,7 @@ }, "hmr": { "type": "boolean", - "description": "Enable hot module replacement.", - "default": false + "description": "Enable hot module replacement. It defaults to `false` in Angular versions < 19.0.0. Otherwise, the value will be `undefined`." }, "watch": { "type": "boolean", @@ -107,7 +106,7 @@ }, "forceEsbuild": { "type": "boolean", - "description": "Force the development server to use the 'browser-esbuild' builder when building. This is a developer preview option for the esbuild-based build system. _Note: this is only supported in Angular versions >= 16.1.0_.", + "description": "Force the development server to use the 'browser-esbuild' builder when building. This is a developer preview option for the esbuild-based build system.", "default": false }, "inspect": { @@ -145,7 +144,7 @@ "x-priority": "important" }, "esbuildMiddleware": { - "description": "A list of HTTP request middleware functions. _Note: this is only supported in Angular versions >= 17.0.0_.", + "description": "A list of HTTP request middleware functions.", "type": "array", "items": { "type": "string", diff --git a/docs/generated/packages/angular/executors/ng-packagr-lite.json b/docs/generated/packages/angular/executors/ng-packagr-lite.json index c90d21a0d901b..5afa9203fc2ba 100644 --- a/docs/generated/packages/angular/executors/ng-packagr-lite.json +++ b/docs/generated/packages/angular/executors/ng-packagr-lite.json @@ -10,10 +10,6 @@ "cli": "nx", "type": "object", "presets": [ - { - "name": "Buildable Library with Tailwind", - "keys": ["project", "tailwindConfig"] - }, { "name": "Updating Project Dependencies for Buildable Library", "keys": ["project"] @@ -39,10 +35,6 @@ "poll": { "type": "number", "description": "Enable and define the file watching poll time period in milliseconds. _Note: this is only supported in Angular versions >= 18.0.0_." - }, - "tailwindConfig": { - "type": "string", - "description": "The full path for the Tailwind configuration file, relative to the workspace root. If not provided and a `tailwind.config.js` file exists in the project or workspace root, it will be used. Otherwise, Tailwind will not be configured." } }, "additionalProperties": false, diff --git a/docs/generated/packages/angular/executors/package.json b/docs/generated/packages/angular/executors/package.json index 2df3b53f6d4ca..d8136cf2f53f0 100644 --- a/docs/generated/packages/angular/executors/package.json +++ b/docs/generated/packages/angular/executors/package.json @@ -10,13 +10,6 @@ "cli": "nx", "type": "object", "presets": [ - { - "name": "Publishable Library with Tailwind", - "keys": [ - "project", - "tailwindConfig" - ] - }, { "name": "Updating Project Dependencies for Publishable Library", "keys": [ @@ -44,12 +37,6 @@ "poll": { "type": "number", "description": "Enable and define the file watching poll time period in milliseconds. _Note: this is only supported in Angular versions >= 18.0.0_." - }, - "tailwindConfig": { - "type": "string", - "description": "The full path for the Tailwind configuration file, relative to the workspace root. If not provided and a `tailwind.config.js` file exists in the project or workspace root, it will be used. Otherwise, Tailwind will not be configured. _Note: starting with Angular v17, this option is no longer used and the configuration will be picked up if exists at the project or workspace root_.", - "x-completion-type": "file", - "x-completion-glob": "tailwind.config@(.js|.cjs|.mjs|.ts)" } }, "additionalProperties": false, diff --git a/docs/generated/packages/angular/generators/application.json b/docs/generated/packages/angular/generators/application.json index 27845a6855f38..9d8c205e128e7 100644 --- a/docs/generated/packages/angular/generators/application.json +++ b/docs/generated/packages/angular/generators/application.json @@ -166,9 +166,10 @@ "default": false }, "bundler": { - "description": "Bundler to use to build the application. It defaults to `esbuild` for Angular versions >= 17.0.0. Otherwise, it defaults to `webpack`. _Note: The `esbuild` bundler is only considered stable from Angular v17._", + "description": "Bundler to use to build the application.", "type": "string", - "enum": ["webpack", "esbuild"], + "enum": ["esbuild", "webpack"], + "default": "esbuild", "x-prompt": "Which bundler do you want to use to build the application?", "x-priority": "important" }, @@ -177,6 +178,10 @@ "type": "boolean", "x-prompt": "Do you want to enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering)?", "default": false + }, + "serverRouting": { + "description": "Creates a server application using the Server Routing and App Engine APIs (Developer Preview). _Note: this is only supported in Angular versions >= 19.0.0_.", + "type": "boolean" } }, "additionalProperties": false, diff --git a/docs/generated/packages/angular/generators/component.json b/docs/generated/packages/angular/generators/component.json index bea59dcc8c6e3..0d404b9450851 100644 --- a/docs/generated/packages/angular/generators/component.json +++ b/docs/generated/packages/angular/generators/component.json @@ -104,6 +104,11 @@ "default": false, "x-priority": "important" }, + "exportDefault": { + "type": "boolean", + "default": false, + "description": "Use default export for the component instead of a named export." + }, "skipFormat": { "description": "Skip formatting files.", "type": "boolean", diff --git a/docs/generated/packages/angular/generators/convert-to-application-executor.json b/docs/generated/packages/angular/generators/convert-to-application-executor.json index f394734b7eb98..7561824b213ad 100644 --- a/docs/generated/packages/angular/generators/convert-to-application-executor.json +++ b/docs/generated/packages/angular/generators/convert-to-application-executor.json @@ -5,7 +5,7 @@ "$schema": "http://json-schema.org/schema", "$id": "NxAngularConvertToApplicationExecutorGenerator", "cli": "nx", - "title": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder. _Note: this is only supported in Angular versions >= 17.0.0_.", + "title": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder.", "description": "Converts a project or all projects using one of the `@angular-devkit/build-angular:browser`, `@angular-devkit/build-angular:browser-esbuild`, `@nx/angular:browser` and `@nx/angular:browser-esbuild` executors to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder. If the converted target is using one of the `@nx/angular` executors, the `@nx/angular:application` executor will be used. Otherwise, the `@angular-devkit/build-angular:application` builder will be used.", "type": "object", "properties": { @@ -25,7 +25,7 @@ "additionalProperties": false, "presets": [] }, - "description": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder. _Note: this is only supported in Angular versions >= 17.0.0_.", + "description": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder.", "implementation": "/packages/angular/src/generators/convert-to-application-executor/convert-to-application-executor.ts", "aliases": [], "hidden": false, diff --git a/docs/generated/packages/angular/generators/host.json b/docs/generated/packages/angular/generators/host.json index b5a8f60a83661..94872b74ae16b 100644 --- a/docs/generated/packages/angular/generators/host.json +++ b/docs/generated/packages/angular/generators/host.json @@ -169,6 +169,10 @@ "default": false, "x-priority": "important" }, + "serverRouting": { + "description": "Creates a server application using the Server Routing and App Engine APIs (Developer Preview). _Note: this is only supported in Angular versions >= 19.0.0_.", + "type": "boolean" + }, "typescriptConfiguration": { "type": "boolean", "description": "Whether the module federation configuration and webpack configuration files should use TS.", diff --git a/docs/generated/packages/angular/generators/remote.json b/docs/generated/packages/angular/generators/remote.json index 268d6b61bbf4a..f6aa75dfec956 100644 --- a/docs/generated/packages/angular/generators/remote.json +++ b/docs/generated/packages/angular/generators/remote.json @@ -162,6 +162,10 @@ "type": "boolean", "default": false }, + "serverRouting": { + "description": "Creates a server application using the Server Routing and App Engine APIs (Developer Preview). _Note: this is only supported in Angular versions >= 19.0.0_.", + "type": "boolean" + }, "typescriptConfiguration": { "type": "boolean", "description": "Whether the module federation configuration and webpack configuration files should use TS.", diff --git a/docs/generated/packages/angular/generators/setup-ssr.json b/docs/generated/packages/angular/generators/setup-ssr.json index a10318cebd78a..5c03b2aab9c6b 100644 --- a/docs/generated/packages/angular/generators/setup-ssr.json +++ b/docs/generated/packages/angular/generators/setup-ssr.json @@ -16,13 +16,6 @@ "x-prompt": "What app would you like to generate an Angular Universal configuration for?", "x-dropdown": "projects" }, - "appId": { - "type": "string", - "format": "html-selector", - "description": "The `appId` to use with `withServerTransition`.", - "default": "serverApp", - "x-deprecated": "This is deprecated and ignored since Angular 16 and not supported since Angular 17." - }, "main": { "type": "string", "format": "path", @@ -56,7 +49,12 @@ }, "hydration": { "type": "boolean", - "description": "Set up Hydration for the SSR application. It defaults to `true` for Angular versions >= 17.0.0. Otherwise, it defaults to `false`." + "description": "Set up Hydration for the SSR application.", + "default": true + }, + "serverRouting": { + "description": "Creates a server application using the Server Routing and App Engine APIs (Developer Preview). _Note: this is only supported in Angular versions >= 19.0.0_.", + "type": "boolean" }, "skipFormat": { "type": "boolean", diff --git a/docs/generated/packages/workspace/generators/new.json b/docs/generated/packages/workspace/generators/new.json index 8ea49dbecb671..1d1d63cb935a6 100644 --- a/docs/generated/packages/workspace/generators/new.json +++ b/docs/generated/packages/workspace/generators/new.json @@ -80,6 +80,10 @@ "type": "boolean", "default": false }, + "serverRouting": { + "description": "Use the Angular Server Routing and App Engine APIs (Developer Preview).", + "type": "boolean" + }, "prefix": { "description": "The prefix to use for Angular component and directive selectors.", "type": "string" diff --git a/docs/generated/packages/workspace/generators/preset.json b/docs/generated/packages/workspace/generators/preset.json index 3ebfe23c9410b..89a5aedc41643 100644 --- a/docs/generated/packages/workspace/generators/preset.json +++ b/docs/generated/packages/workspace/generators/preset.json @@ -97,6 +97,10 @@ "type": "boolean", "default": false }, + "serverRouting": { + "description": "Use the Angular Server Routing and App Engine APIs (Developer Preview).", + "type": "boolean" + }, "prefix": { "description": "The prefix to use for Angular component and directive selectors.", "type": "string" diff --git a/docs/shared/guides/using-tailwind-css-with-angular-projects.md b/docs/shared/guides/using-tailwind-css-with-angular-projects.md index db30735fa6386..7156b5321d202 100644 --- a/docs/shared/guides/using-tailwind-css-with-angular-projects.md +++ b/docs/shared/guides/using-tailwind-css-with-angular-projects.md @@ -423,8 +423,7 @@ to have the following targets: "executor": "@nx/angular:package", "outputs": ["{workspaceRoot}/dist/libs/lib1"], "options": { - "project": "libs/lib1/ng-package.json", - "tailwindConfig": "libs/lib1/tailwind.config.js" + "project": "libs/lib1/ng-package.json" }, "configurations": { "production": { diff --git a/docs/shared/packages/angular/angular-nx-version-matrix.md b/docs/shared/packages/angular/angular-nx-version-matrix.md index a725c3b6bd918..6628023534f11 100644 --- a/docs/shared/packages/angular/angular-nx-version-matrix.md +++ b/docs/shared/packages/angular/angular-nx-version-matrix.md @@ -14,6 +14,7 @@ We provide a recommended version, and it is usually the latest minor version of | Angular Version | **Nx Version _(recommended)_** | Nx Version _(range)_ | | --------------- | ------------------------------ | ---------------------------------------- | +| ~19.0.0 | **latest** | >=20.2.0 <=latest | | ~18.2.0 | **latest** | >=19.6.0 <=latest | | ~18.1.0 | **latest** | >=19.5.0 <=latest | | ~18.0.0 | **latest** | >=19.1.0 <=latest | @@ -21,9 +22,9 @@ We provide a recommended version, and it is usually the latest minor version of | ~17.2.0 | **latest** | >=18.1.1 <=latest | | ~17.1.0 | **latest** | >=17.3.0 <=latest | | ~17.0.0 | **latest** | >=17.1.0 <=latest | -| ~16.2.0 | **latest** | >=16.7.0 <=latest | -| ~16.1.0 | **latest** | >=16.4.0 <=latest | -| ~16.0.0 | **latest** | >=16.1.0 <=latest | +| ~16.2.0 | **~20.1.0** | >=16.7.0 <20.2.0 | +| ~16.1.0 | **~20.1.0** | >=16.4.0 <20.2.0 | +| ~16.0.0 | **~20.1.0** | >=16.1.0 <20.2.0 | | ~15.2.0 | **~19.0.0** | >=15.8.0 <19.1.0 | | ~15.1.0 | **~19.0.0** | >=15.5.0 <19.1.0 | | ~15.0.0 | **~19.0.0** | >=15.2.0 <=15.4.8 \|\| >=15.7.0 <19.1.0 | diff --git a/docs/shared/reference/nx-json.md b/docs/shared/reference/nx-json.md index a6e5bcb4f0152..2fdcb9f0e6b4a 100644 --- a/docs/shared/reference/nx-json.md +++ b/docs/shared/reference/nx-json.md @@ -319,7 +319,7 @@ Task Atomizer plugins create several targets with a similar pattern. For example ```json {% fileName="nx.json" %} { "targetDefaults": { - "e2e-ci--**/*": { + "e2e-ci--**/**": { "options": { "headless": true } @@ -329,7 +329,7 @@ Task Atomizer plugins create several targets with a similar pattern. For example ``` {% callout type="info" title="Pattern Matching" %} -Nx uses glob patterns for matching against the target name. This means that the `**/*` pattern above is required because the target name contains a `/`. If your target name does not contain a `/`, you can use a simpler pattern like `e2e-ci-*`. +Nx uses glob patterns to match against the target name. This means that the `**/**` pattern above is required because tests can be nested within a directory which would make the target name contain a `/`. If your target name does not contain a `/`, you can use a simpler pattern like `e2e-ci-*`. {% /callout %} ## Release diff --git a/e2e/angular/src/config.test.ts b/e2e/angular/src/config.test.ts index f19ae00cab59e..95e0d4c099f5d 100644 --- a/e2e/angular/src/config.test.ts +++ b/e2e/angular/src/config.test.ts @@ -80,8 +80,8 @@ const angularV1Json = (appName: string) => `{ }, { "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" + "maximumWarning": "4kb", + "maximumError": "8kb" } ], "outputHashing": "all" diff --git a/e2e/angular/src/ng-add.test.ts b/e2e/angular/src/ng-add.test.ts index e9839f2b6e3ba..5a500ae1939cd 100644 --- a/e2e/angular/src/ng-add.test.ts +++ b/e2e/angular/src/ng-add.test.ts @@ -199,8 +199,8 @@ describe('convert Angular CLI workspace to an Nx workspace', () => { }, { type: 'anyComponentStyle', - maximumWarning: '2kB', - maximumError: '4kB', + maximumWarning: '4kB', + maximumError: '8kB', }, ], outputHashing: 'all', diff --git a/e2e/angular/src/projects.test.ts b/e2e/angular/src/projects.test.ts index 158ede3dcd4fc..9a630ef1d9a19 100644 --- a/e2e/angular/src/projects.test.ts +++ b/e2e/angular/src/projects.test.ts @@ -163,6 +163,15 @@ describe('Angular Projects', () => { }, 1000000); it('should lint correctly with eslint and handle external HTML files and inline templates', async () => { + // disable the prefer-standalone rule for app1 which is not standalone + let app1EslintConfig = readFile(`${app1}/eslint.config.js`); + app1EslintConfig = app1EslintConfig.replace( + `'@angular-eslint/directive-selector': [`, + `'@angular-eslint/prefer-standalone': 'off', + '@angular-eslint/directive-selector': [` + ); + updateFile(`${app1}/eslint.config.js`, app1EslintConfig); + // check apps and lib pass linting for initial generated code runCLI(`run-many --target lint --projects=${app1},${lib1} --parallel`); @@ -380,6 +389,7 @@ describe('Angular Projects', () => { @Component({ selector: 'app-root', + standalone: false, templateUrl: './app.component.html', }) export class AppComponent { diff --git a/e2e/angular/src/tailwind.test.ts b/e2e/angular/src/tailwind.test.ts index 4072723b2e258..4d14252b41f2b 100644 --- a/e2e/angular/src/tailwind.test.ts +++ b/e2e/angular/src/tailwind.test.ts @@ -137,6 +137,7 @@ describe('Tailwind support', () => { @Component({ selector: '${project}-foo', + standalone: false, template: '', styles: [\` .custom-btn { @@ -176,7 +177,7 @@ describe('Tailwind support', () => { libSpacing: (typeof spacing)['root'] ) => { const builtComponentContent = readFile( - `dist/${lib}/esm2022/lib/foo.component.mjs` + `dist/${lib}/fesm2022/${project}-${lib}.mjs` ); let expectedStylesRegex = new RegExp( `styles: \\[\\"\\.custom\\-btn(\\[_ngcontent\\-%COMP%\\])?{margin:${libSpacing.md};padding:${libSpacing.sm}}(\\\\n)?\\"\\]` diff --git a/e2e/eslint/src/linter.test.ts b/e2e/eslint/src/linter.test.ts index 31a4c9a14dfc6..67fe89ec353e5 100644 --- a/e2e/eslint/src/linter.test.ts +++ b/e2e/eslint/src/linter.test.ts @@ -701,6 +701,7 @@ describe('Linter', () => { runCLI( `generate @nx/react:app --name=${myapp} --unitTestRunner=jest --linter eslint --directory="."` ); + runCLI('reset', { env: { CI: 'false' } }); verifySuccessfulStandaloneSetup(myapp); let appEslint = readJson('.eslintrc.json'); @@ -716,6 +717,7 @@ describe('Linter', () => { runCLI( `generate @nx/js:lib libs/${mylib} --unitTestRunner=jest --linter eslint` ); + runCLI('reset', { env: { CI: 'false' } }); verifySuccessfulMigratedSetup(myapp, mylib); appEslint = readJson(`.eslintrc.json`); @@ -737,6 +739,7 @@ describe('Linter', () => { runCLI( `generate @nx/angular:app --name=${myapp} --directory="." --linter eslint --no-interactive` ); + runCLI('reset', { env: { CI: 'false' } }); verifySuccessfulStandaloneSetup(myapp); let appEslint = readJson('.eslintrc.json'); @@ -751,6 +754,7 @@ describe('Linter', () => { runCLI( `generate @nx/js:lib libs/${mylib} --linter eslint --no-interactive` ); + runCLI('reset', { env: { CI: 'false' } }); verifySuccessfulMigratedSetup(myapp, mylib); appEslint = readJson(`.eslintrc.json`); @@ -770,6 +774,7 @@ describe('Linter', () => { runCLI( `generate @nx/node:app --name=${myapp} --linter eslint --directory="." --no-interactive` ); + runCLI('reset', { env: { CI: 'false' } }); verifySuccessfulStandaloneSetup(myapp); let appEslint = readJson('.eslintrc.json'); @@ -786,6 +791,7 @@ describe('Linter', () => { runCLI( `generate @nx/js:lib libs/${mylib} --linter eslint --no-interactive` ); + runCLI('reset', { env: { CI: 'false' } }); verifySuccessfulMigratedSetup(myapp, mylib); appEslint = readJson(`.eslintrc.json`); diff --git a/nx-dev/nx-dev/pages/_app.tsx b/nx-dev/nx-dev/pages/_app.tsx index 2ae6cc0006536..565ffb2f63781 100644 --- a/nx-dev/nx-dev/pages/_app.tsx +++ b/nx-dev/nx-dev/pages/_app.tsx @@ -153,6 +153,15 @@ export default function CustomApp({ `, }} /> +