@nx/angular 23.0.0-beta.2 → 23.0.0-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generators.d.ts +0 -2
- package/generators.d.ts.map +1 -1
- package/generators.js +0 -2
- package/generators.json +0 -13
- package/migrations.json +19 -536
- package/package.json +9 -11
- package/plugins/component-testing.js +8 -8
- package/src/builders/utilities/buildable-libs.d.ts +1 -1
- package/src/builders/utilities/buildable-libs.d.ts.map +1 -1
- package/src/builders/utilities/buildable-libs.js +3 -3
- package/src/builders/utilities/module-federation.d.ts.map +1 -1
- package/src/builders/utilities/module-federation.js +9 -11
- package/src/builders/utilities/webpack.d.ts.map +1 -1
- package/src/builders/utilities/webpack.js +3 -7
- package/src/executors/delegate-build/delegate-build.impl.js +3 -3
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts.map +1 -1
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +4 -5
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +4 -5
- package/src/executors/ng-packagr-lite/ng-packagr-lite.impl.js +2 -2
- package/src/executors/package/package.impl.d.ts +1 -1
- package/src/executors/package/package.impl.d.ts.map +1 -1
- package/src/executors/package/package.impl.js +5 -5
- package/src/executors/utilities/angular-version-utils.d.ts.map +1 -1
- package/src/executors/utilities/angular-version-utils.js +3 -8
- package/src/executors/utilities/buildable-libs.d.ts +1 -1
- package/src/executors/utilities/buildable-libs.d.ts.map +1 -1
- package/src/executors/utilities/buildable-libs.js +3 -3
- package/src/executors/utilities/esbuild-extensions.d.ts.map +1 -1
- package/src/executors/utilities/esbuild-extensions.js +5 -24
- package/src/executors/utilities/module-loader.d.ts +1 -1
- package/src/executors/utilities/module-loader.d.ts.map +1 -1
- package/src/executors/utilities/module-loader.js +24 -20
- package/src/generators/add-linting/add-linting.d.ts.map +1 -1
- package/src/generators/add-linting/add-linting.js +17 -17
- package/src/generators/add-linting/lib/add-angular-eslint-dependencies.d.ts.map +1 -1
- package/src/generators/add-linting/lib/add-angular-eslint-dependencies.js +4 -5
- package/src/generators/application/application.d.ts.map +1 -1
- package/src/generators/application/application.js +7 -4
- package/src/generators/application/lib/add-e2e.d.ts.map +1 -1
- package/src/generators/application/lib/add-e2e.js +5 -7
- package/src/generators/application/lib/add-unit-test-runner.d.ts +2 -2
- package/src/generators/application/lib/add-unit-test-runner.d.ts.map +1 -1
- package/src/generators/application/lib/add-unit-test-runner.js +5 -5
- package/src/generators/application/lib/create-project.d.ts.map +1 -1
- package/src/generators/application/lib/create-project.js +3 -3
- package/src/generators/application/lib/normalize-options.js +3 -3
- package/src/generators/application/lib/update-tsconfig-files.js +3 -3
- package/src/generators/component/component.d.ts.map +1 -1
- package/src/generators/component/component.js +2 -0
- package/src/generators/component/lib/component.js +2 -2
- package/src/generators/component/lib/normalize-options.js +2 -2
- package/src/generators/component-story/component-story.d.ts.map +1 -1
- package/src/generators/component-story/component-story.js +2 -0
- package/src/generators/component-test/component-test.d.ts.map +1 -1
- package/src/generators/component-test/component-test.js +2 -0
- package/src/generators/convert-to-application-executor/convert-to-application-executor.d.ts.map +1 -1
- package/src/generators/convert-to-application-executor/convert-to-application-executor.js +2 -0
- package/src/generators/convert-to-rspack/convert-to-rspack.d.ts.map +1 -1
- package/src/generators/convert-to-rspack/convert-to-rspack.js +5 -4
- package/src/generators/convert-to-rspack/lib/create-config.js +1 -1
- package/src/generators/convert-to-rspack/lib/get-custom-webpack-config.js +2 -2
- package/src/generators/convert-to-with-mf/convert-to-with-mf.d.ts +1 -1
- package/src/generators/convert-to-with-mf/convert-to-with-mf.d.ts.map +1 -1
- package/src/generators/convert-to-with-mf/convert-to-with-mf.js +5 -0
- package/src/generators/convert-to-with-mf/lib/check-name-matches.js +2 -2
- package/src/generators/convert-to-with-mf/lib/check-shared-npm-packages.js +2 -2
- package/src/generators/convert-to-with-mf/lib/is-host-remote-config.js +4 -4
- package/src/generators/convert-to-with-mf/lib/parse-ast-webpack-config.js +2 -2
- package/src/generators/convert-to-with-mf/lib/write-new-webpack-config.js +1 -1
- package/src/generators/cypress-component-configuration/cypress-component-configuration.d.ts.map +1 -1
- package/src/generators/cypress-component-configuration/cypress-component-configuration.js +8 -6
- package/src/generators/directive/directive.d.ts.map +1 -1
- package/src/generators/directive/directive.js +2 -0
- package/src/generators/directive/lib/normalize-options.js +2 -2
- package/src/generators/federate-module/federate-module.d.ts.map +1 -1
- package/src/generators/federate-module/federate-module.js +2 -0
- package/src/generators/federate-module/lib/add-path-to-exposes.js +6 -6
- package/src/generators/federate-module/lib/add-remote.js +2 -2
- package/src/generators/host/host.d.ts.map +1 -1
- package/src/generators/host/host.js +10 -7
- package/src/generators/host/lib/update-ssr-setup.js +2 -2
- package/src/generators/host/schema.d.ts +1 -0
- package/src/generators/host/schema.json +4 -0
- package/src/generators/init/init.d.ts.map +1 -1
- package/src/generators/init/init.js +4 -2
- package/src/generators/library/lib/add-children.js +2 -2
- package/src/generators/library/lib/add-load-children.js +2 -2
- package/src/generators/library/lib/add-project.js +4 -4
- package/src/generators/library/lib/create-files.js +2 -2
- package/src/generators/library/lib/normalize-options.js +3 -3
- package/src/generators/library/lib/update-tsconfig-files.js +3 -3
- package/src/generators/library/library.d.ts.map +1 -1
- package/src/generators/library/library.js +16 -11
- package/src/generators/library-secondary-entry-point/library-secondary-entry-point.d.ts.map +1 -1
- package/src/generators/library-secondary-entry-point/library-secondary-entry-point.js +2 -0
- package/src/generators/move/lib/update-module-name.js +2 -2
- package/src/generators/ng-add/migrators/migrator.d.ts.map +1 -1
- package/src/generators/ng-add/migrators/migrator.js +10 -5
- package/src/generators/ng-add/migrators/projects/e2e.migrator.js +6 -6
- package/src/generators/ng-add/ng-add.d.ts.map +1 -1
- package/src/generators/ng-add/ng-add.js +2 -0
- package/src/generators/ng-add/utilities/workspace.js +8 -8
- package/src/generators/ngrx-feature-store/lib/add-exports-barrel.js +2 -2
- package/src/generators/ngrx-feature-store/lib/add-imports.js +2 -2
- package/src/generators/ngrx-feature-store/lib/normalize-options.js +5 -5
- package/src/generators/ngrx-feature-store/ngrx-feature-store.d.ts.map +1 -1
- package/src/generators/ngrx-feature-store/ngrx-feature-store.js +2 -0
- package/src/generators/ngrx-root-store/lib/add-imports.js +2 -2
- package/src/generators/ngrx-root-store/lib/normalize-options.js +5 -5
- package/src/generators/ngrx-root-store/ngrx-root-store.d.ts.map +1 -1
- package/src/generators/ngrx-root-store/ngrx-root-store.js +2 -0
- package/src/generators/pipe/lib/normalize-options.js +2 -2
- package/src/generators/pipe/pipe.d.ts.map +1 -1
- package/src/generators/pipe/pipe.js +2 -0
- package/src/generators/remote/lib/update-ssr-setup.js +2 -2
- package/src/generators/remote/remote.d.ts.map +1 -1
- package/src/generators/remote/remote.js +7 -5
- package/src/generators/scam/lib/convert-component-to-scam.js +2 -2
- package/src/generators/scam/lib/normalize-options.js +2 -2
- package/src/generators/scam/scam.d.ts.map +1 -1
- package/src/generators/scam/scam.js +2 -0
- package/src/generators/scam-directive/lib/convert-directive-to-scam.js +2 -2
- package/src/generators/scam-directive/lib/normalize-options.js +2 -2
- package/src/generators/scam-directive/scam-directive.d.ts.map +1 -1
- package/src/generators/scam-directive/scam-directive.js +2 -0
- package/src/generators/scam-pipe/lib/convert-pipe-to-scam.js +2 -2
- package/src/generators/scam-pipe/lib/normalize-options.js +2 -2
- package/src/generators/scam-pipe/scam-pipe.d.ts.map +1 -1
- package/src/generators/scam-pipe/scam-pipe.js +2 -0
- package/src/generators/scam-to-standalone/scam-to-standalone.d.ts.map +1 -1
- package/src/generators/scam-to-standalone/scam-to-standalone.js +2 -0
- package/src/generators/setup-mf/files/ts-webpack/module-federation.config.ts__tmpl__ +1 -1
- package/src/generators/setup-mf/lib/add-cypress-workaround.js +3 -3
- package/src/generators/setup-mf/lib/add-remote-to-host.d.ts.map +1 -1
- package/src/generators/setup-mf/lib/add-remote-to-host.js +5 -6
- package/src/generators/setup-mf/lib/change-build-target.d.ts.map +1 -1
- package/src/generators/setup-mf/lib/change-build-target.js +2 -2
- package/src/generators/setup-mf/lib/remove-dead-code-from-remote.js +2 -2
- package/src/generators/setup-mf/setup-mf.d.ts.map +1 -1
- package/src/generators/setup-mf/setup-mf.js +8 -0
- package/src/generators/setup-ssr/lib/add-hydration.d.ts.map +1 -1
- package/src/generators/setup-ssr/lib/add-hydration.js +3 -4
- package/src/generators/setup-ssr/lib/add-server-file.js +2 -2
- package/src/generators/setup-ssr/lib/generate-files.js +2 -2
- package/src/generators/setup-ssr/lib/generate-server-ts-config.js +2 -2
- package/src/generators/setup-ssr/lib/normalize-options.d.ts.map +1 -1
- package/src/generators/setup-ssr/lib/normalize-options.js +2 -2
- package/src/generators/setup-ssr/lib/update-project-config.d.ts.map +1 -1
- package/src/generators/setup-ssr/lib/update-project-config.js +19 -7
- package/src/generators/setup-ssr/setup-ssr.d.ts.map +1 -1
- package/src/generators/setup-ssr/setup-ssr.js +2 -0
- package/src/generators/stories/stories.d.ts.map +1 -1
- package/src/generators/stories/stories.js +2 -0
- package/src/generators/storybook-configuration/storybook-configuration.d.ts.map +1 -1
- package/src/generators/storybook-configuration/storybook-configuration.js +2 -0
- package/src/generators/utils/add-mf-env-to-inputs.d.ts.map +1 -1
- package/src/generators/utils/add-mf-env-to-inputs.js +16 -9
- package/src/generators/utils/add-vitest.d.ts +3 -3
- package/src/generators/utils/add-vitest.d.ts.map +1 -1
- package/src/generators/utils/add-vitest.js +41 -26
- package/src/generators/utils/app-components-info.js +2 -2
- package/src/generators/utils/find-module.js +2 -2
- package/src/generators/utils/insert-ngmodule-import.js +6 -6
- package/src/generators/utils/storybook-ast/component-info.js +5 -5
- package/src/generators/utils/storybook-ast/module-info.js +9 -9
- package/src/generators/utils/storybook-ast/storybook-inputs.js +4 -4
- package/src/generators/utils/testing.js +2 -2
- package/src/generators/utils/tsconfig-utils.js +2 -2
- package/src/generators/utils/validations.js +2 -2
- package/src/generators/utils/version-utils.d.ts.map +1 -1
- package/src/generators/utils/version-utils.js +2 -7
- package/src/generators/web-worker/web-worker.d.ts.map +1 -1
- package/src/generators/web-worker/web-worker.js +2 -0
- package/src/migrations/update-19-6-1/ensure-depends-on-for-mf.d.ts.map +1 -1
- package/src/migrations/update-19-6-1/ensure-depends-on-for-mf.js +26 -19
- package/src/migrations/update-20-2-0/disable-angular-eslint-prefer-standalone.js +8 -8
- package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.d.ts.map +1 -1
- package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.js +2 -2
- package/src/migrations/update-20-2-0/remove-angular-eslint-rules.js +6 -6
- package/src/migrations/update-20-2-0/remove-tailwind-config-from-ng-packagr-executors.d.ts.map +1 -1
- package/src/migrations/update-20-2-0/remove-tailwind-config-from-ng-packagr-executors.js +45 -12
- package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.d.ts.map +1 -1
- package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.js +2 -2
- package/src/migrations/update-21-0-0/change-data-persistence-operators-imports-to-ngrx-router-store-data-persistence.js +2 -2
- package/src/migrations/update-21-5-0/utils/karma-config-analyzer.js +2 -2
- package/src/migrations/update-22-3-0/update-module-resolution.js +2 -2
- package/src/migrations/update-22-3-0/update-ssr-webpack-config.js +2 -2
- package/src/migrations/{update-17-2-0/rename-webpack-dev-server.d.ts → update-23-0-0/migrate-ngrx-generator-defaults.d.ts} +1 -1
- package/src/migrations/update-23-0-0/migrate-ngrx-generator-defaults.d.ts.map +1 -0
- package/src/migrations/update-23-0-0/migrate-ngrx-generator-defaults.js +120 -0
- package/src/migrations/update-23-0-0/migrate-with-mf-import-to-new-package.d.ts +3 -0
- package/src/migrations/update-23-0-0/migrate-with-mf-import-to-new-package.d.ts.map +1 -0
- package/src/migrations/update-23-0-0/migrate-with-mf-import-to-new-package.js +45 -0
- package/src/plugins/plugin.d.ts.map +1 -1
- package/src/plugins/plugin.js +54 -22
- package/src/utils/assert-supported-angular-version.d.ts +3 -0
- package/src/utils/assert-supported-angular-version.d.ts.map +1 -0
- package/src/utils/assert-supported-angular-version.js +9 -0
- package/src/utils/backward-compatible-versions.js +2 -2
- package/src/utils/get-mf-projects.js +3 -3
- package/src/utils/index.d.ts +1 -0
- package/src/utils/index.d.ts.map +1 -1
- package/src/utils/index.js +3 -1
- package/src/utils/nx-devkit/ast-utils.d.ts.map +1 -1
- package/src/utils/nx-devkit/ast-utils.js +17 -18
- package/src/utils/nx-devkit/route-utils.js +3 -3
- package/src/utils/versions.d.ts +1 -1
- package/src/utils/versions.d.ts.map +1 -1
- package/src/utils/versions.js +8 -3
- package/tailwind.js +2 -2
- package/module-federation/index.d.ts +0 -6
- package/module-federation/index.d.ts.map +0 -1
- package/module-federation/index.js +0 -6
- package/src/generators/add-linting/lib/create-eslint-configuration.d.ts +0 -16
- package/src/generators/add-linting/lib/create-eslint-configuration.d.ts.map +0 -1
- package/src/generators/add-linting/lib/create-eslint-configuration.js +0 -121
- package/src/generators/move/move.d.ts +0 -7
- package/src/generators/move/move.d.ts.map +0 -1
- package/src/generators/move/move.js +0 -11
- package/src/generators/move/schema.d.ts +0 -8
- package/src/generators/move/schema.json +0 -56
- package/src/generators/ngrx/files/__directory__/__fileName__.actions.ts__tmpl__ +0 -16
- package/src/generators/ngrx/files/__directory__/__fileName__.effects.spec.ts__tmpl__ +0 -37
- package/src/generators/ngrx/files/__directory__/__fileName__.effects.ts__tmpl__ +0 -22
- package/src/generators/ngrx/files/__directory__/__fileName__.facade.spec.ts__tmpl__ +0 -103
- package/src/generators/ngrx/files/__directory__/__fileName__.facade.ts__tmpl__ +0 -27
- package/src/generators/ngrx/files/__directory__/__fileName__.models.ts__tmpl__ +0 -7
- package/src/generators/ngrx/files/__directory__/__fileName__.reducer.spec.ts__tmpl__ +0 -37
- package/src/generators/ngrx/files/__directory__/__fileName__.reducer.ts__tmpl__ +0 -41
- package/src/generators/ngrx/files/__directory__/__fileName__.selectors.spec.ts__tmpl__ +0 -58
- package/src/generators/ngrx/files/__directory__/__fileName__.selectors.ts__tmpl__ +0 -38
- package/src/generators/ngrx/lib/add-exports-barrel.d.ts +0 -7
- package/src/generators/ngrx/lib/add-exports-barrel.d.ts.map +0 -1
- package/src/generators/ngrx/lib/add-exports-barrel.js +0 -44
- package/src/generators/ngrx/lib/add-imports-to-module.d.ts +0 -4
- package/src/generators/ngrx/lib/add-imports-to-module.d.ts.map +0 -1
- package/src/generators/ngrx/lib/add-imports-to-module.js +0 -181
- package/src/generators/ngrx/lib/add-ngrx-to-package-json.d.ts +0 -4
- package/src/generators/ngrx/lib/add-ngrx-to-package-json.d.ts.map +0 -1
- package/src/generators/ngrx/lib/add-ngrx-to-package-json.js +0 -23
- package/src/generators/ngrx/lib/generate-files.d.ts +0 -7
- package/src/generators/ngrx/lib/generate-files.d.ts.map +0 -1
- package/src/generators/ngrx/lib/generate-files.js +0 -23
- package/src/generators/ngrx/lib/index.d.ts +0 -7
- package/src/generators/ngrx/lib/index.d.ts.map +0 -1
- package/src/generators/ngrx/lib/index.js +0 -15
- package/src/generators/ngrx/lib/normalize-options.d.ts +0 -9
- package/src/generators/ngrx/lib/normalize-options.d.ts.map +0 -1
- package/src/generators/ngrx/lib/normalize-options.js +0 -30
- package/src/generators/ngrx/lib/validate-options.d.ts +0 -4
- package/src/generators/ngrx/lib/validate-options.d.ts.map +0 -1
- package/src/generators/ngrx/lib/validate-options.js +0 -14
- package/src/generators/ngrx/ngrx.d.ts +0 -8
- package/src/generators/ngrx/ngrx.d.ts.map +0 -1
- package/src/generators/ngrx/ngrx.js +0 -28
- package/src/generators/ngrx/schema.d.ts +0 -14
- package/src/generators/ngrx/schema.json +0 -102
- package/src/migrations/update-17-1-0/browser-target-to-build-target.d.ts +0 -4
- package/src/migrations/update-17-1-0/browser-target-to-build-target.d.ts.map +0 -1
- package/src/migrations/update-17-1-0/browser-target-to-build-target.js +0 -50
- package/src/migrations/update-17-1-0/replace-nguniversal-builders.d.ts +0 -3
- package/src/migrations/update-17-1-0/replace-nguniversal-builders.d.ts.map +0 -1
- package/src/migrations/update-17-1-0/replace-nguniversal-builders.js +0 -75
- package/src/migrations/update-17-1-0/replace-nguniversal-engines.d.ts +0 -3
- package/src/migrations/update-17-1-0/replace-nguniversal-engines.d.ts.map +0 -1
- package/src/migrations/update-17-1-0/replace-nguniversal-engines.js +0 -184
- package/src/migrations/update-17-1-0/update-angular-cli.d.ts +0 -4
- package/src/migrations/update-17-1-0/update-angular-cli.d.ts.map +0 -1
- package/src/migrations/update-17-1-0/update-angular-cli.js +0 -14
- package/src/migrations/update-17-1-0/update-zone-js-deep-import.d.ts +0 -3
- package/src/migrations/update-17-1-0/update-zone-js-deep-import.d.ts.map +0 -1
- package/src/migrations/update-17-1-0/update-zone-js-deep-import.js +0 -37
- package/src/migrations/update-17-2-0/rename-webpack-dev-server.d.ts.map +0 -1
- package/src/migrations/update-17-2-0/rename-webpack-dev-server.js +0 -40
- package/src/migrations/update-17-3-0/add-autoprefixer-dependency.d.ts +0 -3
- package/src/migrations/update-17-3-0/add-autoprefixer-dependency.d.ts.map +0 -1
- package/src/migrations/update-17-3-0/add-autoprefixer-dependency.js +0 -25
- package/src/migrations/update-17-3-0/add-browser-sync-dependency.d.ts +0 -3
- package/src/migrations/update-17-3-0/add-browser-sync-dependency.d.ts.map +0 -1
- package/src/migrations/update-17-3-0/add-browser-sync-dependency.js +0 -25
- package/src/migrations/update-17-3-0/update-angular-cli.d.ts +0 -4
- package/src/migrations/update-17-3-0/update-angular-cli.d.ts.map +0 -1
- package/src/migrations/update-17-3-0/update-angular-cli.js +0 -14
- package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.d.ts +0 -3
- package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.d.ts.map +0 -1
- package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.js +0 -26
- package/src/migrations/update-18-1-0/update-angular-cli.d.ts +0 -4
- package/src/migrations/update-18-1-0/update-angular-cli.d.ts.map +0 -1
- package/src/migrations/update-18-1-0/update-angular-cli.js +0 -14
- package/src/migrations/update-18-1-1/fix-target-defaults-inputs.d.ts +0 -3
- package/src/migrations/update-18-1-1/fix-target-defaults-inputs.d.ts.map +0 -1
- package/src/migrations/update-18-1-1/fix-target-defaults-inputs.js +0 -53
- package/src/migrations/update-18-2-0/update-angular-cli.d.ts +0 -4
- package/src/migrations/update-18-2-0/update-angular-cli.d.ts.map +0 -1
- package/src/migrations/update-18-2-0/update-angular-cli.js +0 -14
- package/src/migrations/update-19-1-0/update-angular-cli.d.ts +0 -4
- package/src/migrations/update-19-1-0/update-angular-cli.d.ts.map +0 -1
- package/src/migrations/update-19-1-0/update-angular-cli.js +0 -14
|
@@ -25,13 +25,12 @@ exports.getDecoratorPropertyValueNode = getDecoratorPropertyValueNode;
|
|
|
25
25
|
exports.getTsSourceFile = getTsSourceFile;
|
|
26
26
|
const devkit_1 = require("@nx/devkit");
|
|
27
27
|
const js_1 = require("@nx/js");
|
|
28
|
-
const
|
|
29
|
-
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
28
|
+
const internal_1 = require("@nx/js/internal");
|
|
30
29
|
const path_1 = require("path");
|
|
31
30
|
let tsModule;
|
|
32
31
|
function _angularImportsFromNode(node, _sourceFile) {
|
|
33
32
|
if (!tsModule) {
|
|
34
|
-
tsModule = (0,
|
|
33
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
35
34
|
}
|
|
36
35
|
const ms = node.moduleSpecifier;
|
|
37
36
|
let modulePath;
|
|
@@ -94,7 +93,7 @@ function isStandalone(tree, sourceFile, decoratorName) {
|
|
|
94
93
|
}
|
|
95
94
|
function getDecoratorMetadata(source, identifier, module) {
|
|
96
95
|
if (!tsModule) {
|
|
97
|
-
tsModule = (0,
|
|
96
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
98
97
|
}
|
|
99
98
|
const angularImports = (0, js_1.findNodes)(source, tsModule.SyntaxKind.ImportDeclaration)
|
|
100
99
|
.map((node) => _angularImportsFromNode(node, source))
|
|
@@ -142,7 +141,7 @@ function _addSymbolToDecoratorMetadata(host, source, filePath, metadataField, ex
|
|
|
142
141
|
return source;
|
|
143
142
|
}
|
|
144
143
|
if (!tsModule) {
|
|
145
|
-
tsModule = (0,
|
|
144
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
146
145
|
}
|
|
147
146
|
// Get all the children property assignment of object literals.
|
|
148
147
|
const matchingProperties = node.properties
|
|
@@ -311,7 +310,7 @@ function addImportToModule(host, source, modulePath, symbolName) {
|
|
|
311
310
|
}
|
|
312
311
|
function addImportToTestBed(host, source, specPath, symbolName) {
|
|
313
312
|
if (!tsModule) {
|
|
314
|
-
tsModule = (0,
|
|
313
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
315
314
|
}
|
|
316
315
|
const allCalls = ((0, js_1.findNodes)(source, tsModule.SyntaxKind.CallExpression));
|
|
317
316
|
const configureTestingModuleObjectLiterals = allCalls
|
|
@@ -330,7 +329,7 @@ function addImportToTestBed(host, source, specPath, symbolName) {
|
|
|
330
329
|
}
|
|
331
330
|
function addDeclarationsToTestBed(host, source, specPath, symbolName) {
|
|
332
331
|
if (!tsModule) {
|
|
333
|
-
tsModule = (0,
|
|
332
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
334
333
|
}
|
|
335
334
|
const allCalls = ((0, js_1.findNodes)(source, tsModule.SyntaxKind.CallExpression));
|
|
336
335
|
const configureTestingModuleObjectLiterals = allCalls
|
|
@@ -349,7 +348,7 @@ function addDeclarationsToTestBed(host, source, specPath, symbolName) {
|
|
|
349
348
|
}
|
|
350
349
|
function replaceIntoToTestBed(host, source, specPath, newSymbol, previousSymbol) {
|
|
351
350
|
if (!tsModule) {
|
|
352
|
-
tsModule = (0,
|
|
351
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
353
352
|
}
|
|
354
353
|
const allCalls = ((0, js_1.findNodes)(source, tsModule.SyntaxKind.CallExpression));
|
|
355
354
|
const configureTestingModuleObjectLiterals = allCalls
|
|
@@ -400,7 +399,7 @@ function addRouteToNgModule(host, ngModulePath, source, route) {
|
|
|
400
399
|
}
|
|
401
400
|
function getListOfRoutes(source) {
|
|
402
401
|
if (!tsModule) {
|
|
403
|
-
tsModule = (0,
|
|
402
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
404
403
|
}
|
|
405
404
|
const imports = getMatchingProperty(source, 'imports', 'NgModule', '@angular/core');
|
|
406
405
|
if (imports?.initializer.kind === tsModule.SyntaxKind.ArrayLiteralExpression) {
|
|
@@ -441,14 +440,14 @@ function isNgStandaloneApp(tree, projectName) {
|
|
|
441
440
|
hasMainFile = true;
|
|
442
441
|
}
|
|
443
442
|
else {
|
|
444
|
-
const sourceRoot = (0,
|
|
443
|
+
const sourceRoot = (0, internal_1.getProjectSourceRoot)(project, tree);
|
|
445
444
|
mainFile = (0, devkit_1.joinPathFragments)(sourceRoot, 'main.ts');
|
|
446
445
|
hasMainFile = tree.exists(mainFile);
|
|
447
446
|
}
|
|
448
447
|
if (project.projectType !== 'application' || !hasMainFile) {
|
|
449
448
|
return false;
|
|
450
449
|
}
|
|
451
|
-
(0,
|
|
450
|
+
(0, internal_1.ensureTypescript)();
|
|
452
451
|
const { ast, query } = require('@phenomnomnominal/tsquery');
|
|
453
452
|
const mainFileContents = tree.read(mainFile, 'utf-8');
|
|
454
453
|
const BOOTSTRAP_APPLICATION_SELECTOR = 'CallExpression:has(Identifier[name=bootstrapApplication])';
|
|
@@ -463,7 +462,7 @@ function isNgStandaloneApp(tree, projectName) {
|
|
|
463
462
|
* @param providerToAdd Provider to add
|
|
464
463
|
*/
|
|
465
464
|
function addProviderToBootstrapApplication(tree, filePath, providerToAdd) {
|
|
466
|
-
(0,
|
|
465
|
+
(0, internal_1.ensureTypescript)();
|
|
467
466
|
const { ast, query } = require('@phenomnomnominal/tsquery');
|
|
468
467
|
const PROVIDERS_ARRAY_SELECTOR = 'CallExpression:has(Identifier[name=bootstrapApplication]) ObjectLiteralExpression > PropertyAssignment:has(Identifier[name=providers]) > ArrayLiteralExpression';
|
|
469
468
|
const fileContents = tree.read(filePath, 'utf-8');
|
|
@@ -484,7 +483,7 @@ function addProviderToBootstrapApplication(tree, filePath, providerToAdd) {
|
|
|
484
483
|
* @param providerToAdd Provider to add
|
|
485
484
|
*/
|
|
486
485
|
function addProviderToAppConfig(tree, filePath, providerToAdd) {
|
|
487
|
-
(0,
|
|
486
|
+
(0, internal_1.ensureTypescript)();
|
|
488
487
|
const { ast, query } = require('@phenomnomnominal/tsquery');
|
|
489
488
|
const PROVIDERS_ARRAY_SELECTOR = 'VariableDeclaration:has(TypeReference > Identifier[name=ApplicationConfig]) > ObjectLiteralExpression PropertyAssignment:has(Identifier[name=providers]) > ArrayLiteralExpression';
|
|
490
489
|
const fileContents = tree.read(filePath, 'utf-8');
|
|
@@ -535,7 +534,7 @@ function addEntryComponents(host, source, modulePath, symbolName) {
|
|
|
535
534
|
}
|
|
536
535
|
function readBootstrapInfo(host, app) {
|
|
537
536
|
if (!tsModule) {
|
|
538
|
-
tsModule = (0,
|
|
537
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
539
538
|
}
|
|
540
539
|
const config = (0, devkit_1.readProjectConfiguration)(host, app);
|
|
541
540
|
let mainPath;
|
|
@@ -544,7 +543,7 @@ function readBootstrapInfo(host, app) {
|
|
|
544
543
|
config.targets.build.options?.main ??
|
|
545
544
|
config.targets.build.options?.browser;
|
|
546
545
|
if (!mainPath) {
|
|
547
|
-
const sourceRoot = (0,
|
|
546
|
+
const sourceRoot = (0, internal_1.getProjectSourceRoot)(config, host);
|
|
548
547
|
mainPath = (0, devkit_1.joinPathFragments)(sourceRoot, 'main.ts');
|
|
549
548
|
}
|
|
550
549
|
}
|
|
@@ -582,7 +581,7 @@ function readBootstrapInfo(host, app) {
|
|
|
582
581
|
}
|
|
583
582
|
function getDecoratorPropertyValueNode(host, modulePath, identifier, property, module) {
|
|
584
583
|
if (!tsModule) {
|
|
585
|
-
tsModule = (0,
|
|
584
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
586
585
|
}
|
|
587
586
|
const moduleSourceText = host.read(modulePath).toString('utf-8');
|
|
588
587
|
const moduleSource = tsModule.createSourceFile(modulePath, moduleSourceText, tsModule.ScriptTarget.Latest, true);
|
|
@@ -591,7 +590,7 @@ function getDecoratorPropertyValueNode(host, modulePath, identifier, property, m
|
|
|
591
590
|
}
|
|
592
591
|
function getMatchingObjectLiteralElement(node, source, property) {
|
|
593
592
|
if (!tsModule) {
|
|
594
|
-
tsModule = (0,
|
|
593
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
595
594
|
}
|
|
596
595
|
return (node.properties
|
|
597
596
|
.filter((prop) => prop.kind == tsModule.SyntaxKind.PropertyAssignment)
|
|
@@ -610,7 +609,7 @@ function getMatchingObjectLiteralElement(node, source, property) {
|
|
|
610
609
|
}
|
|
611
610
|
function getTsSourceFile(host, path) {
|
|
612
611
|
if (!tsModule) {
|
|
613
|
-
tsModule = (0,
|
|
612
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
614
613
|
}
|
|
615
614
|
const buffer = host.read(path);
|
|
616
615
|
if (!buffer) {
|
|
@@ -4,7 +4,7 @@ exports.addRoute = addRoute;
|
|
|
4
4
|
exports.addProviderToRoute = addProviderToRoute;
|
|
5
5
|
const js_1 = require("@nx/js");
|
|
6
6
|
const ast_utils_1 = require("./ast-utils");
|
|
7
|
-
const
|
|
7
|
+
const internal_1 = require("@nx/js/internal");
|
|
8
8
|
let tsModule;
|
|
9
9
|
/**
|
|
10
10
|
* Add a new route to a routes definition
|
|
@@ -20,7 +20,7 @@ function addRoute(tree, routesFile, route, lazy = true, routesConst, importPath)
|
|
|
20
20
|
throw new Error(`Path to parent routing declaration (${routesFile}) does not exist. Please ensure path is correct.`);
|
|
21
21
|
}
|
|
22
22
|
if (!tsModule) {
|
|
23
|
-
tsModule = (0,
|
|
23
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
24
24
|
}
|
|
25
25
|
const { ast, query } = require('@phenomnomnominal/tsquery');
|
|
26
26
|
let routesFileContents = tree.read(routesFile, 'utf-8');
|
|
@@ -58,7 +58,7 @@ function addProviderToRoute(tree, routesFile, routeToAddProviderTo, providerToAd
|
|
|
58
58
|
if (!tree.exists(routesFile)) {
|
|
59
59
|
throw new Error(`Path to parent routing declaration (${routesFile}) does not exist. Please ensure path is correct.`);
|
|
60
60
|
}
|
|
61
|
-
(0,
|
|
61
|
+
(0, internal_1.ensureTypescript)();
|
|
62
62
|
const { ast, query } = require('@phenomnomnominal/tsquery');
|
|
63
63
|
let routesFileContents = tree.read(routesFile, 'utf-8');
|
|
64
64
|
const sourceFile = ast(routesFileContents);
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare const autoprefixerVersion = "^10.4.0";
|
|
|
22
22
|
export declare const tsNodeVersion = "10.9.1";
|
|
23
23
|
export declare const lessVersion = "^4.3.0";
|
|
24
24
|
export declare const jestPresetAngularVersion = "~16.0.0";
|
|
25
|
-
export declare const typesNodeVersion = "
|
|
25
|
+
export declare const typesNodeVersion = "^22.0.0";
|
|
26
26
|
export declare const jasmineMarblesVersion = "^0.9.2";
|
|
27
27
|
export declare const vitestVersion = "^4.0.8";
|
|
28
28
|
export declare const jsdomVersion = "^27.1.0";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../../../packages/angular/src/utils/versions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,KAAwC,CAAC;AAE/D,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAC9C,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,eAAO,MAAM,WAAW,YAAY,CAAC;AACrC,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,aAAa,YAAY,CAAC;AACvC,eAAO,MAAM,YAAY,WAAW,CAAC;AAErC,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,gBAAgB,WAAW,CAAC;AACzC,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAC3C,eAAO,MAAM,2BAA2B,YAAY,CAAC;AACrD,eAAO,MAAM,+BAA+B,WAAW,CAAC;AACxD,eAAO,MAAM,mBAAmB,WAAW,CAAC;AAE5C,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAC9C,eAAO,MAAM,uBAAuB,YAAY,CAAC;AACjD,eAAO,MAAM,cAAc,WAAW,CAAC;AACvC,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAC3C,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAC7C,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,eAAO,MAAM,WAAW,WAAW,CAAC;AAEpC,eAAO,MAAM,wBAAwB,YAAY,CAAC;AAClD,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,eAAO,MAAM,qBAAqB,WAAW,CAAC;AAE9C,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,eAAO,MAAM,YAAY,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../../../packages/angular/src/utils/versions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,KAAwC,CAAC;AAE/D,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAC9C,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,eAAO,MAAM,WAAW,YAAY,CAAC;AACrC,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,aAAa,YAAY,CAAC;AACvC,eAAO,MAAM,YAAY,WAAW,CAAC;AAErC,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,gBAAgB,WAAW,CAAC;AACzC,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAC3C,eAAO,MAAM,2BAA2B,YAAY,CAAC;AACrD,eAAO,MAAM,+BAA+B,WAAW,CAAC;AACxD,eAAO,MAAM,mBAAmB,WAAW,CAAC;AAE5C,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAC9C,eAAO,MAAM,uBAAuB,YAAY,CAAC;AACjD,eAAO,MAAM,cAAc,WAAW,CAAC;AACvC,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAC3C,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAC7C,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,eAAO,MAAM,WAAW,WAAW,CAAC;AAEpC,eAAO,MAAM,wBAAwB,YAAY,CAAC;AAClD,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,eAAO,MAAM,qBAAqB,WAAW,CAAC;AAE9C,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,eAAO,MAAM,YAAY,YAAY,CAAC;AAQtC,eAAO,MAAM,wBAAwB,aAAa,CAAC;AAEnD,eAAO,MAAM,wBAAwB,WAAW,CAAC"}
|
package/src/utils/versions.js
CHANGED
|
@@ -25,11 +25,16 @@ exports.autoprefixerVersion = '^10.4.0';
|
|
|
25
25
|
exports.tsNodeVersion = '10.9.1';
|
|
26
26
|
exports.lessVersion = '^4.3.0';
|
|
27
27
|
exports.jestPresetAngularVersion = '~16.0.0';
|
|
28
|
-
exports.typesNodeVersion = '
|
|
28
|
+
exports.typesNodeVersion = '^22.0.0';
|
|
29
29
|
exports.jasmineMarblesVersion = '^0.9.2';
|
|
30
30
|
exports.vitestVersion = '^4.0.8';
|
|
31
31
|
exports.jsdomVersion = '^27.1.0';
|
|
32
|
-
//
|
|
33
|
-
//
|
|
32
|
+
// `@analogjs/vite-plugin-angular` (vitest-analog path) registers an
|
|
33
|
+
// `angularVitestPlugin` whose `transform` hook downlevels `@angular/*`
|
|
34
|
+
// fesm2022 modules via `vite.transformWithOxc({ target: 'es2016', … })`
|
|
35
|
+
// so Zone.js `fakeAsync` can intercept async/await. The lowered code
|
|
36
|
+
// emits external `@oxc-project/runtime/helpers/*` imports (oxc default
|
|
37
|
+
// `HelperMode = 'Runtime'`). Nothing upstream declares the runtime, so
|
|
38
|
+
// we add it explicitly to user projects.
|
|
34
39
|
exports.oxcProjectRuntimeVersion = '^0.115.0';
|
|
35
40
|
exports.jsoncEslintParserVersion = '^2.1.0';
|
package/tailwind.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createGlobPatternsForDependencies = createGlobPatternsForDependencies;
|
|
4
|
-
const
|
|
4
|
+
const internal_1 = require("@nx/js/internal");
|
|
5
5
|
let hasWarned = false;
|
|
6
6
|
/**
|
|
7
7
|
* @deprecated `@nx/angular/tailwind` will be removed in Nx 24. Migrate to Tailwind CSS v4 which no longer needs glob patterns.
|
|
@@ -15,7 +15,7 @@ function createGlobPatternsForDependencies(dirPath, fileGlobPattern = '/**/!(*.s
|
|
|
15
15
|
`See: https://nx.dev/docs/technologies/angular/guides/using-tailwind-css-with-angular\n`);
|
|
16
16
|
}
|
|
17
17
|
try {
|
|
18
|
-
return (0,
|
|
18
|
+
return (0, internal_1.createGlobPatternsForDependencies)(dirPath, fileGlobPattern);
|
|
19
19
|
}
|
|
20
20
|
catch (e) {
|
|
21
21
|
/**
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { withModuleFederation, withModuleFederationForSSR } from '@nx/module-federation/angular';
|
|
2
|
-
/**
|
|
3
|
-
* @deprecated Update the import path to `@nx/module-federation/angular` instead. This import path will be removed in Nx v22.
|
|
4
|
-
*/
|
|
5
|
-
export { withModuleFederation, withModuleFederationForSSR };
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/angular/module-federation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC3B,MAAM,+BAA+B,CAAC;AAEvC;;GAEG;AACH,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.withModuleFederationForSSR = exports.withModuleFederation = void 0;
|
|
4
|
-
const angular_1 = require("@nx/module-federation/angular");
|
|
5
|
-
Object.defineProperty(exports, "withModuleFederation", { enumerable: true, get: function () { return angular_1.withModuleFederation; } });
|
|
6
|
-
Object.defineProperty(exports, "withModuleFederationForSSR", { enumerable: true, get: function () { return angular_1.withModuleFederationForSSR; } });
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Tree } from '@nx/devkit';
|
|
2
|
-
import type { Linter } from 'eslint';
|
|
3
|
-
import type { AddLintingGeneratorSchema } from '../schema';
|
|
4
|
-
type EslintExtensionSchema = {
|
|
5
|
-
prefix: string;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated Use tools from `@nx/eslint/src/generators/utils/eslint-file` instead. It will be removed in Nx v22.
|
|
9
|
-
*/
|
|
10
|
-
export declare const extendAngularEslintJson: (json: Linter.LegacyConfig, options: EslintExtensionSchema) => Linter.LegacyConfig;
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated Use {@link extendAngularEslintJson} instead. It will be removed in Nx v22.
|
|
13
|
-
*/
|
|
14
|
-
export declare function createEsLintConfiguration(tree: Tree, options: AddLintingGeneratorSchema): void;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=create-eslint-configuration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-eslint-configuration.d.ts","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/add-linting/lib/create-eslint-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAG3D,KAAK,qBAAqB,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,MAAM,MAAM,CAAC,YAAY,EACzB,SAAS,qBAAqB,KAC7B,MAAM,CAAC,YA4CT,CAAC;AAEF;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,yBAAyB,GACjC,IAAI,CAqEN"}
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.extendAngularEslintJson = void 0;
|
|
4
|
-
exports.createEsLintConfiguration = createEsLintConfiguration;
|
|
5
|
-
const devkit_1 = require("@nx/devkit");
|
|
6
|
-
const string_utils_1 = require("@nx/devkit/src/utils/string-utils");
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated Use tools from `@nx/eslint/src/generators/utils/eslint-file` instead. It will be removed in Nx v22.
|
|
9
|
-
*/
|
|
10
|
-
const extendAngularEslintJson = (json, options) => {
|
|
11
|
-
const overrides = [
|
|
12
|
-
{
|
|
13
|
-
...json.overrides[0],
|
|
14
|
-
files: ['*.ts'],
|
|
15
|
-
extends: [
|
|
16
|
-
...(json.overrides[0].extends || []),
|
|
17
|
-
'plugin:@nx/angular',
|
|
18
|
-
'plugin:@angular-eslint/template/process-inline-templates',
|
|
19
|
-
],
|
|
20
|
-
rules: {
|
|
21
|
-
'@angular-eslint/directive-selector': [
|
|
22
|
-
'error',
|
|
23
|
-
{
|
|
24
|
-
type: 'attribute',
|
|
25
|
-
prefix: (0, string_utils_1.camelize)(options.prefix),
|
|
26
|
-
style: 'camelCase',
|
|
27
|
-
},
|
|
28
|
-
],
|
|
29
|
-
'@angular-eslint/component-selector': [
|
|
30
|
-
'error',
|
|
31
|
-
{
|
|
32
|
-
type: 'element',
|
|
33
|
-
prefix: (0, string_utils_1.dasherize)(options.prefix),
|
|
34
|
-
style: 'kebab-case',
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
files: ['*.html'],
|
|
41
|
-
extends: ['plugin:@nx/angular-template'],
|
|
42
|
-
/**
|
|
43
|
-
* Having an empty rules object present makes it more obvious to the user where they would
|
|
44
|
-
* extend things from if they needed to
|
|
45
|
-
*/
|
|
46
|
-
rules: {},
|
|
47
|
-
},
|
|
48
|
-
];
|
|
49
|
-
return {
|
|
50
|
-
...json,
|
|
51
|
-
overrides,
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
exports.extendAngularEslintJson = extendAngularEslintJson;
|
|
55
|
-
/**
|
|
56
|
-
* @deprecated Use {@link extendAngularEslintJson} instead. It will be removed in Nx v22.
|
|
57
|
-
*/
|
|
58
|
-
function createEsLintConfiguration(tree, options) {
|
|
59
|
-
const rootConfig = `${(0, devkit_1.offsetFromRoot)(options.projectRoot)}.eslintrc.json`;
|
|
60
|
-
// Include all project files to be linted (since they are turned off in the root eslintrc file).
|
|
61
|
-
const ignorePatterns = ['!**/*'];
|
|
62
|
-
const configJson = {
|
|
63
|
-
extends: [rootConfig],
|
|
64
|
-
ignorePatterns,
|
|
65
|
-
overrides: [
|
|
66
|
-
{
|
|
67
|
-
files: ['*.ts'],
|
|
68
|
-
extends: [
|
|
69
|
-
'plugin:@nx/angular',
|
|
70
|
-
'plugin:@angular-eslint/template/process-inline-templates',
|
|
71
|
-
],
|
|
72
|
-
/**
|
|
73
|
-
* NOTE: We no longer set parserOptions.project by default when creating new projects.
|
|
74
|
-
*
|
|
75
|
-
* We have observed that users rarely add rules requiring type-checking to their Nx workspaces, and therefore
|
|
76
|
-
* do not actually need the capabilites which parserOptions.project provides. When specifying parserOptions.project,
|
|
77
|
-
* typescript-eslint needs to create full TypeScript Programs for you. When omitting it, it can perform a simple
|
|
78
|
-
* parse (and AST tranformation) of the source files it encounters during a lint run, which is much faster and much
|
|
79
|
-
* less memory intensive.
|
|
80
|
-
*
|
|
81
|
-
* In the rare case that users attempt to add rules requiring type-checking to their setup later on (and haven't set
|
|
82
|
-
* parserOptions.project), the executor will attempt to look for the particular error typescript-eslint gives you
|
|
83
|
-
* and provide feedback to the user.
|
|
84
|
-
*/
|
|
85
|
-
parserOptions: !options.setParserOptionsProject
|
|
86
|
-
? undefined
|
|
87
|
-
: {
|
|
88
|
-
project: [`${options.projectRoot}/tsconfig.*?.json`],
|
|
89
|
-
},
|
|
90
|
-
rules: {
|
|
91
|
-
'@angular-eslint/directive-selector': [
|
|
92
|
-
'error',
|
|
93
|
-
{
|
|
94
|
-
type: 'attribute',
|
|
95
|
-
prefix: (0, string_utils_1.camelize)(options.prefix),
|
|
96
|
-
style: 'camelCase',
|
|
97
|
-
},
|
|
98
|
-
],
|
|
99
|
-
'@angular-eslint/component-selector': [
|
|
100
|
-
'error',
|
|
101
|
-
{
|
|
102
|
-
type: 'element',
|
|
103
|
-
prefix: (0, string_utils_1.dasherize)(options.prefix),
|
|
104
|
-
style: 'kebab-case',
|
|
105
|
-
},
|
|
106
|
-
],
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
files: ['*.html'],
|
|
111
|
-
extends: ['plugin:@nx/angular-template'],
|
|
112
|
-
/**
|
|
113
|
-
* Having an empty rules object present makes it more obvious to the user where they would
|
|
114
|
-
* extend things from if they needed to
|
|
115
|
-
*/
|
|
116
|
-
rules: {},
|
|
117
|
-
},
|
|
118
|
-
],
|
|
119
|
-
};
|
|
120
|
-
(0, devkit_1.writeJson)(tree, (0, devkit_1.joinPathFragments)(options.projectRoot, '.eslintrc.json'), configJson);
|
|
121
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Tree } from '@nx/devkit';
|
|
2
|
-
import type { Schema } from './schema';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated Use the `@nx/workspace:move` generator instead. It will be removed in Nx v22.
|
|
5
|
-
*/
|
|
6
|
-
export declare function angularMoveGenerator(tree: Tree, schema: Schema): Promise<void>;
|
|
7
|
-
//# sourceMappingURL=move.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"move.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/move/move.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAGf"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.angularMoveGenerator = angularMoveGenerator;
|
|
4
|
-
const move_1 = require("@nx/workspace/src/generators/move/move");
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated Use the `@nx/workspace:move` generator instead. It will be removed in Nx v22.
|
|
7
|
-
*/
|
|
8
|
-
async function angularMoveGenerator(tree, schema) {
|
|
9
|
-
process.env.NX_ANGULAR_MOVE_INVOKED = 'true';
|
|
10
|
-
await (0, move_1.moveGenerator)(tree, schema);
|
|
11
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/schema",
|
|
3
|
-
"$id": "NxAngularMove",
|
|
4
|
-
"cli": "nx",
|
|
5
|
-
"title": "Nx Angular Move",
|
|
6
|
-
"description": "Move an Angular project to another folder in the workspace.",
|
|
7
|
-
"type": "object",
|
|
8
|
-
"examples": [
|
|
9
|
-
{
|
|
10
|
-
"command": "nx g @nx/angular:move --project my-feature-lib --destination shared/my-feature-lib",
|
|
11
|
-
"description": "Move libs/my-feature-lib to libs/shared/my-feature-lib."
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"properties": {
|
|
15
|
-
"projectName": {
|
|
16
|
-
"type": "string",
|
|
17
|
-
"alias": "project",
|
|
18
|
-
"description": "The name of the Angular project to move.",
|
|
19
|
-
"x-dropdown": "projects",
|
|
20
|
-
"x-priority": "important"
|
|
21
|
-
},
|
|
22
|
-
"newProjectName": {
|
|
23
|
-
"type": "string",
|
|
24
|
-
"alias": "project",
|
|
25
|
-
"description": "The new name of the project after the move.",
|
|
26
|
-
"pattern": "(?:^@[a-zA-Z0-9-*~][a-zA-Z0-9-*._~]*\\/[a-zA-Z0-9-~][a-zA-Z0-9-._~]*|^[a-zA-Z][^:]*)$",
|
|
27
|
-
"x-priority": "important"
|
|
28
|
-
},
|
|
29
|
-
"destination": {
|
|
30
|
-
"type": "string",
|
|
31
|
-
"description": "The folder to move the Angular project into.",
|
|
32
|
-
"$default": {
|
|
33
|
-
"$source": "argv",
|
|
34
|
-
"index": 0
|
|
35
|
-
},
|
|
36
|
-
"x-priority": "important"
|
|
37
|
-
},
|
|
38
|
-
"importPath": {
|
|
39
|
-
"type": "string",
|
|
40
|
-
"description": "The new import path to use in the `tsconfig.base.json`."
|
|
41
|
-
},
|
|
42
|
-
"updateImportPath": {
|
|
43
|
-
"type": "boolean",
|
|
44
|
-
"description": "Update the import path to reflect the new location.",
|
|
45
|
-
"default": true
|
|
46
|
-
},
|
|
47
|
-
"skipFormat": {
|
|
48
|
-
"type": "boolean",
|
|
49
|
-
"aliases": ["skip-format"],
|
|
50
|
-
"description": "Skip formatting files.",
|
|
51
|
-
"default": false,
|
|
52
|
-
"x-priority": "internal"
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"required": ["projectName", "destination"]
|
|
56
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { createAction, props } from '@ngrx/store';
|
|
2
|
-
import { <%= className %>Entity } from './<%= fileName %>.models';
|
|
3
|
-
|
|
4
|
-
export const init<%= className %> = createAction(
|
|
5
|
-
'[<%= className %> Page] Init'
|
|
6
|
-
);
|
|
7
|
-
|
|
8
|
-
export const load<%= className %>Success = createAction(
|
|
9
|
-
'[<%= className %>/API] Load <%= className %> Success',
|
|
10
|
-
props<{ <%= propertyName %>: <%= className %>Entity[] }>()
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
export const load<%= className %>Failure = createAction(
|
|
14
|
-
'[<%= className %>/API] Load <%= className %> Failure',
|
|
15
|
-
props<{ error: any }>()
|
|
16
|
-
);
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { TestBed } from '@angular/core/testing';
|
|
2
|
-
import { provideMockActions } from '@ngrx/effects/testing';
|
|
3
|
-
import { Action } from '@ngrx/store';
|
|
4
|
-
import { provideMockStore } from '@ngrx/store/testing';
|
|
5
|
-
import { hot } from 'jasmine-marbles';
|
|
6
|
-
import { Observable } from 'rxjs';
|
|
7
|
-
|
|
8
|
-
import * as <%= className %>Actions from './<%= fileName %>.actions';
|
|
9
|
-
import { <%= className %>Effects } from './<%= fileName %>.effects';
|
|
10
|
-
|
|
11
|
-
describe('<%= className %>Effects', () => {
|
|
12
|
-
let actions: Observable<Action>;
|
|
13
|
-
let effects: <%= className %>Effects;
|
|
14
|
-
|
|
15
|
-
beforeEach(() => {
|
|
16
|
-
TestBed.configureTestingModule({
|
|
17
|
-
imports: [],
|
|
18
|
-
providers: [
|
|
19
|
-
<%= className %>Effects,
|
|
20
|
-
provideMockActions(() => actions),
|
|
21
|
-
provideMockStore()
|
|
22
|
-
],
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
effects = TestBed.inject(<%= className %>Effects);
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
describe('init$', () => {
|
|
29
|
-
it('should work', () => {
|
|
30
|
-
actions = hot('-a-|', { a: <%= className %>Actions.init<%= className %>() });
|
|
31
|
-
|
|
32
|
-
const expected = hot('-a-|', { a: <%= className %>Actions.load<%= className %>Success({ <%= propertyName %>: [] }) });
|
|
33
|
-
|
|
34
|
-
expect(effects.init$).toBeObservable(expected);
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Injectable, inject } from '@angular/core';
|
|
2
|
-
import { createEffect, Actions, ofType } from '@ngrx/effects';<% if (!importFromOperators) { %>
|
|
3
|
-
import { switchMap, catchError, of } from 'rxjs';<% } else { %>
|
|
4
|
-
import { of } from 'rxjs';
|
|
5
|
-
import { switchMap, catchError } from 'rxjs/operators';<% } %>
|
|
6
|
-
import * as <%= className %>Actions from './<%= fileName %>.actions';
|
|
7
|
-
import * as <%= className %>Feature from './<%= fileName %>.reducer';
|
|
8
|
-
|
|
9
|
-
@Injectable()
|
|
10
|
-
export class <%= className %>Effects {
|
|
11
|
-
private actions$ = inject(Actions);
|
|
12
|
-
|
|
13
|
-
init$ = createEffect(() => this.actions$.pipe(
|
|
14
|
-
ofType(<%= className %>Actions.init<%= className %>),
|
|
15
|
-
switchMap(() => of(<%= className %>Actions.load<%= className %>Success({ <%= propertyName %>: [] }))),
|
|
16
|
-
catchError((error) => {
|
|
17
|
-
console.error('Error', error);
|
|
18
|
-
return of(<%= className %>Actions.load<%= className %>Failure({ error }));
|
|
19
|
-
}
|
|
20
|
-
)
|
|
21
|
-
));
|
|
22
|
-
}
|