@nx/angular 19.4.3 → 19.5.0-beta.1
Sign up to get free protection for your applications and to get access to all the features.
- package/migrations.json +79 -0
- package/ng-package.json +1 -1
- package/package.json +10 -10
- package/plugins/component-testing.js +1 -2
- package/src/builders/dev-server/dev-server.impl.js +1 -2
- package/src/builders/dev-server/lib/normalize-options.js +1 -2
- package/src/builders/dev-server/lib/validate-options.js +5 -2
- package/src/builders/dev-server/schema.d.ts +1 -0
- package/src/builders/dev-server/schema.json +11 -0
- package/src/builders/module-federation-dev-ssr/module-federation-dev-ssr.impl.js +1 -2
- package/src/builders/utilities/buildable-libs.js +1 -2
- package/src/builders/utilities/module-federation.js +4 -5
- package/src/builders/utilities/webpack.js +3 -4
- package/src/builders/webpack-browser/webpack-browser.impl.js +1 -2
- package/src/builders/webpack-server/webpack-server.impl.js +1 -2
- package/src/executors/application/application.impl.js +1 -1
- package/src/executors/application/utils/validate-options.js +1 -2
- package/src/executors/browser-esbuild/browser-esbuild.impl.js +1 -1
- package/src/executors/delegate-build/delegate-build.impl.js +1 -2
- package/src/executors/extract-i18n/extract-i18n.impl.js +1 -1
- package/src/executors/module-federation-dev-server/lib/build-static-remotes.js +1 -2
- package/src/executors/module-federation-dev-server/lib/normalize-options.js +1 -2
- package/src/executors/module-federation-dev-server/lib/parse-static-remotes-config.js +1 -2
- package/src/executors/module-federation-dev-server/lib/start-dev-remotes.js +1 -2
- package/src/executors/module-federation-dev-server/lib/start-static-remotes-file-server.js +1 -2
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +1 -2
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-packagr.js +1 -2
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ngc/compile-source-files.js +1 -2
- package/src/executors/package/ng-packagr-adjustments/ng-packagr.js +1 -2
- package/src/executors/package/ng-packagr-adjustments/ngc/compile-source-files.js +1 -2
- package/src/executors/package/ng-packagr-adjustments/utils/ng-compiler-cli.js +1 -2
- package/src/executors/package/package.impl.js +2 -2
- package/src/executors/utilities/angular-version-utils.js +2 -3
- package/src/executors/utilities/buildable-libs.js +1 -2
- package/src/executors/utilities/esbuild-extensions.js +3 -4
- package/src/executors/utilities/module-loader.js +2 -3
- package/src/executors/utilities/ng-packagr/tailwindcss.js +3 -4
- package/src/executors/utilities/patch-builder-context.js +1 -2
- package/src/executors/utilities/typescript.js +1 -2
- package/src/generators/add-linting/add-linting.js +1 -2
- package/src/generators/add-linting/lib/add-angular-eslint-dependencies.js +1 -2
- package/src/generators/add-linting/lib/buildable-project.js +1 -2
- package/src/generators/add-linting/lib/create-eslint-configuration.d.ts +24 -24
- package/src/generators/add-linting/lib/create-eslint-configuration.js +2 -2
- package/src/generators/application/application.js +2 -3
- package/src/generators/application/files/base/tsconfig.json__tpl__ +2 -2
- package/src/generators/application/files/ng-module/src/app/app.component.spec.ts__tpl__ +4 -3
- package/src/generators/application/files/standalone-components/src/app/app.component.spec.ts__tpl__ +4 -3
- package/src/generators/application/lib/add-e2e.js +1 -2
- package/src/generators/application/lib/add-linting.js +1 -2
- package/src/generators/application/lib/add-proxy-config.js +1 -2
- package/src/generators/application/lib/add-unit-test-runner.js +1 -2
- package/src/generators/application/lib/create-files.js +8 -5
- package/src/generators/application/lib/create-project.js +1 -2
- package/src/generators/application/lib/enable-strict-type-checking.js +1 -2
- package/src/generators/application/lib/normalize-options.js +1 -2
- package/src/generators/application/lib/set-app-strict-default.js +1 -2
- package/src/generators/application/lib/set-generator-defaults.js +1 -2
- package/src/generators/application/lib/update-editor-tsconfig.js +1 -2
- package/src/generators/component/component.js +2 -3
- package/src/generators/component/lib/component.js +1 -2
- package/src/generators/component/lib/module.js +1 -2
- package/src/generators/component/lib/normalize-options.js +1 -2
- package/src/generators/component/lib/set-generator-defaults.js +1 -2
- package/src/generators/component-cypress-spec/component-cypress-spec.js +1 -2
- package/src/generators/component-cypress-spec/lib/get-args-default-value.js +1 -2
- package/src/generators/component-cypress-spec/lib/get-component-selector.js +1 -2
- package/src/generators/component-story/component-story.js +1 -2
- package/src/generators/component-test/component-test.js +1 -2
- package/src/generators/convert-to-application-executor/convert-to-application-executor.js +1 -2
- package/src/generators/convert-to-with-mf/convert-to-with-mf.js +1 -2
- package/src/generators/convert-to-with-mf/lib/check-name-matches.js +1 -2
- package/src/generators/convert-to-with-mf/lib/check-shared-npm-packages.js +1 -2
- package/src/generators/convert-to-with-mf/lib/get-webpack-config-path.js +1 -2
- package/src/generators/convert-to-with-mf/lib/is-host-remote-config.js +3 -4
- package/src/generators/convert-to-with-mf/lib/parse-ast-webpack-config.js +1 -2
- package/src/generators/convert-to-with-mf/lib/write-new-webpack-config.js +1 -2
- package/src/generators/cypress-component-configuration/cypress-component-configuration.js +2 -3
- package/src/generators/directive/directive.js +1 -2
- package/src/generators/directive/lib/normalize-options.js +1 -2
- package/src/generators/federate-module/federate-module.js +1 -2
- package/src/generators/federate-module/lib/add-file-to-remote-tsconfig.js +1 -2
- package/src/generators/federate-module/lib/add-path-to-exposes.js +1 -2
- package/src/generators/federate-module/lib/add-path-to-ts-config.js +1 -2
- package/src/generators/federate-module/lib/add-remote.js +1 -2
- package/src/generators/federate-module/lib/check-remote-exists.js +1 -2
- package/src/generators/host/host.js +2 -3
- package/src/generators/host/lib/update-ssr-setup.js +7 -2
- package/src/generators/init/init.js +1 -2
- package/src/generators/library/files/base/tsconfig.json__tpl__ +2 -2
- package/src/generators/library/lib/add-children.js +1 -2
- package/src/generators/library/lib/add-load-children.js +1 -2
- package/src/generators/library/lib/add-module.js +1 -2
- package/src/generators/library/lib/add-project.js +1 -2
- package/src/generators/library/lib/add-standalone-component.js +1 -2
- package/src/generators/library/lib/create-files.js +3 -2
- package/src/generators/library/lib/enable-strict-type-checking.js +2 -3
- package/src/generators/library/lib/normalize-options.js +1 -2
- package/src/generators/library/lib/set-generator-defaults.js +1 -2
- package/src/generators/library/lib/update-lib-package-npm-scope.js +1 -2
- package/src/generators/library/lib/update-tsconfig.js +1 -2
- package/src/generators/library/library.js +2 -3
- package/src/generators/library-secondary-entry-point/lib/add-files.js +1 -2
- package/src/generators/library-secondary-entry-point/lib/add-path-mapping.js +1 -2
- package/src/generators/library-secondary-entry-point/lib/normalize-options.js +1 -2
- package/src/generators/library-secondary-entry-point/lib/update-tsconfig-included-files.js +1 -2
- package/src/generators/library-secondary-entry-point/library-secondary-entry-point.js +1 -2
- package/src/generators/move/lib/update-module-name.js +1 -2
- package/src/generators/move/lib/update-ng-package.js +1 -2
- package/src/generators/move/lib/update-secondary-entry-points.js +1 -2
- package/src/generators/move/move-impl.js +1 -2
- package/src/generators/move/move.js +2 -3
- package/src/generators/ng-add/migrate-from-angular-cli.js +1 -2
- package/src/generators/ng-add/ng-add.js +1 -2
- package/src/generators/ng-add/utilities/dependencies.js +1 -2
- package/src/generators/ng-add/utilities/format-files-task.js +1 -2
- package/src/generators/ng-add/utilities/projects.js +2 -3
- package/src/generators/ng-add/utilities/validation-logging.js +2 -3
- package/src/generators/ng-add/utilities/workspace.js +13 -14
- package/src/generators/ngrx/lib/add-exports-barrel.js +1 -2
- package/src/generators/ngrx/lib/add-imports-to-module.js +1 -2
- package/src/generators/ngrx/lib/add-ngrx-to-package-json.js +1 -2
- package/src/generators/ngrx/lib/generate-files.js +1 -2
- package/src/generators/ngrx/lib/normalize-options.js +1 -2
- package/src/generators/ngrx/lib/validate-options.js +1 -2
- package/src/generators/ngrx/ngrx.js +1 -2
- package/src/generators/ngrx-feature-store/lib/add-exports-barrel.js +1 -2
- package/src/generators/ngrx-feature-store/lib/add-imports.js +1 -2
- package/src/generators/ngrx-feature-store/lib/add-ngrx-to-package-json.js +1 -2
- package/src/generators/ngrx-feature-store/lib/generate-files.js +1 -2
- package/src/generators/ngrx-feature-store/lib/normalize-options.js +1 -2
- package/src/generators/ngrx-feature-store/lib/validate-options.js +1 -2
- package/src/generators/ngrx-feature-store/ngrx-feature-store.js +1 -2
- package/src/generators/ngrx-root-store/lib/add-imports.js +1 -2
- package/src/generators/ngrx-root-store/lib/add-ngrx-to-package-json.js +1 -2
- package/src/generators/ngrx-root-store/lib/normalize-options.js +1 -2
- package/src/generators/ngrx-root-store/lib/validate-options.js +1 -2
- package/src/generators/ngrx-root-store/ngrx-root-store.js +1 -2
- package/src/generators/pipe/lib/normalize-options.js +1 -2
- package/src/generators/pipe/pipe.js +1 -2
- package/src/generators/remote/lib/find-next-available-port.js +1 -2
- package/src/generators/remote/lib/update-ssr-setup.js +7 -2
- package/src/generators/remote/remote.js +2 -3
- package/src/generators/scam/lib/convert-component-to-scam.js +1 -2
- package/src/generators/scam/lib/normalize-options.js +1 -2
- package/src/generators/scam/scam.js +1 -2
- package/src/generators/scam-directive/lib/convert-directive-to-scam.js +1 -2
- package/src/generators/scam-directive/lib/normalize-options.js +1 -2
- package/src/generators/scam-directive/scam-directive.js +1 -2
- package/src/generators/scam-pipe/lib/convert-pipe-to-scam.js +1 -2
- package/src/generators/scam-pipe/lib/normalize-options.js +1 -2
- package/src/generators/scam-pipe/scam-pipe.js +1 -2
- package/src/generators/scam-to-standalone/lib/convert-scam-to-standalone.js +1 -2
- package/src/generators/scam-to-standalone/lib/get-component-data-from-ast.js +1 -2
- package/src/generators/scam-to-standalone/lib/get-module-metadata-from-ast.js +1 -2
- package/src/generators/scam-to-standalone/lib/get-target-project.js +1 -2
- package/src/generators/scam-to-standalone/lib/replace-module-usages-with-component.js +1 -2
- package/src/generators/scam-to-standalone/lib/selector-exists-in-ast.js +1 -2
- package/src/generators/scam-to-standalone/lib/verify-is-inline-scam.js +1 -2
- package/src/generators/scam-to-standalone/lib/verify-module-is-scam.js +1 -2
- package/src/generators/scam-to-standalone/scam-to-standalone.js +1 -2
- package/src/generators/setup-mf/files/host-files/app.component.spec.ts__tmpl__ +8 -5
- package/src/generators/setup-mf/lib/add-cypress-workaround.js +1 -2
- package/src/generators/setup-mf/lib/add-remote-entry.js +1 -2
- package/src/generators/setup-mf/lib/add-remote-to-host.js +3 -4
- package/src/generators/setup-mf/lib/change-build-target.js +1 -2
- package/src/generators/setup-mf/lib/fix-bootstrap.js +1 -2
- package/src/generators/setup-mf/lib/generate-config.js +1 -2
- package/src/generators/setup-mf/lib/get-remotes-with-ports.js +1 -2
- package/src/generators/setup-mf/lib/normalize-options.js +1 -2
- package/src/generators/setup-mf/lib/remove-dead-code-from-remote.js +1 -2
- package/src/generators/setup-mf/lib/setup-host-if-dynamic.js +1 -2
- package/src/generators/setup-mf/lib/setup-serve-target.js +1 -2
- package/src/generators/setup-mf/lib/setup-tspath-for-remote.js +1 -2
- package/src/generators/setup-mf/lib/update-host-app-routes.d.ts +2 -2
- package/src/generators/setup-mf/lib/update-host-app-routes.js +5 -10
- package/src/generators/setup-mf/lib/update-tsconfig.js +1 -2
- package/src/generators/setup-mf/setup-mf.js +10 -4
- package/src/generators/setup-ssr/lib/add-dependencies.js +1 -2
- package/src/generators/setup-ssr/lib/add-hydration.js +1 -2
- package/src/generators/setup-ssr/lib/add-server-file.js +1 -2
- package/src/generators/setup-ssr/lib/generate-files.js +1 -2
- package/src/generators/setup-ssr/lib/generate-server-ts-config.js +2 -3
- package/src/generators/setup-ssr/lib/normalize-options.js +1 -2
- package/src/generators/setup-ssr/lib/set-router-initial-navigation.js +1 -2
- package/src/generators/setup-ssr/lib/update-project-config.js +2 -3
- package/src/generators/setup-ssr/lib/validate-options.js +1 -2
- package/src/generators/setup-ssr/setup-ssr.js +1 -2
- package/src/generators/setup-tailwind/lib/add-tailwind-config-path-to-project.js +1 -2
- package/src/generators/setup-tailwind/lib/add-tailwind-config.js +1 -2
- package/src/generators/setup-tailwind/lib/add-tailwind-required-packages.js +1 -2
- package/src/generators/setup-tailwind/lib/detect-tailwind-installed-version.js +1 -2
- package/src/generators/setup-tailwind/lib/normalize-options.js +1 -2
- package/src/generators/setup-tailwind/lib/update-application-styles.js +1 -2
- package/src/generators/setup-tailwind/setup-tailwind.js +1 -2
- package/src/generators/stories/lib/get-e2e-project.js +1 -2
- package/src/generators/stories/stories.js +1 -2
- package/src/generators/storybook-configuration/lib/assert-compatible-storybook-version.js +1 -2
- package/src/generators/storybook-configuration/lib/generate-stories.js +1 -2
- package/src/generators/storybook-configuration/lib/generate-storybook-configuration.js +1 -2
- package/src/generators/storybook-configuration/lib/validate-options.js +1 -2
- package/src/generators/storybook-configuration/storybook-configuration.js +1 -2
- package/src/generators/utils/add-jest.js +1 -2
- package/src/generators/utils/add-mf-env-to-inputs.js +1 -2
- package/src/generators/utils/dependencies.js +1 -2
- package/src/generators/utils/ensure-angular-dependencies.js +1 -2
- package/src/generators/utils/entry-point.js +1 -2
- package/src/generators/utils/export-scam.js +1 -2
- package/src/generators/utils/find-module.js +2 -3
- package/src/generators/utils/insert-ngmodule-import.js +2 -3
- package/src/generators/utils/path.js +1 -2
- package/src/generators/utils/project.js +1 -2
- package/src/generators/utils/selector.js +2 -3
- package/src/generators/utils/storybook-ast/component-info.js +3 -4
- package/src/generators/utils/storybook-ast/entry-point.js +1 -2
- package/src/generators/utils/storybook-ast/module-info.js +2 -3
- package/src/generators/utils/storybook-ast/storybook-inputs.js +4 -5
- package/src/generators/utils/storybook-ast/tree-utilities.js +1 -2
- package/src/generators/utils/testing.js +5 -6
- package/src/generators/utils/update-app-editor-tsconfig-excluded-files.js +1 -2
- package/src/generators/utils/update-project-root-tsconfig.js +2 -2
- package/src/generators/utils/validations.js +1 -2
- package/src/generators/utils/version-utils.js +6 -7
- package/src/generators/web-worker/lib/add-snippet.js +1 -2
- package/src/generators/web-worker/lib/normalize-options.js +1 -2
- package/src/generators/web-worker/web-worker.js +1 -2
- package/src/migrations/update-14-2-0/remove-show-circular-dependencies-option.js +1 -1
- package/src/migrations/update-14-2-0/update-angular-cli.js +1 -1
- package/src/migrations/update-14-2-0/update-libraries-secondary-entrypoints.js +1 -1
- package/src/migrations/update-14-2-0/update-ngcc-target.js +1 -1
- package/src/migrations/update-14-2-0/update-router-initial-navigation.js +6 -3
- package/src/migrations/update-14-2-0/update-tsconfig-target.js +2 -2
- package/src/migrations/update-14-5-0/migrate-mfe-to-mf.js +4 -5
- package/src/migrations/update-14-5-2/update-angular-cli.js +1 -1
- package/src/migrations/update-14-6-0/update-angular-cli.js +1 -1
- package/src/migrations/update-14-8-0/rename-webpack-server.js +1 -1
- package/src/migrations/update-15-0-0/add-karma-inputs.js +1 -1
- package/src/migrations/update-15-0-0/switch-to-jasmine-marbles.js +1 -1
- package/src/migrations/update-15-2-0/remove-browserlist-config.js +1 -1
- package/src/migrations/update-15-2-0/remove-platform-server-exports.js +1 -1
- package/src/migrations/update-15-2-0/update-angular-cli.js +1 -1
- package/src/migrations/update-15-2-0/update-karma-main-file.js +1 -1
- package/src/migrations/update-15-2-0/update-typescript-target.js +1 -1
- package/src/migrations/update-15-2-0/update-workspace-config.js +1 -1
- package/src/migrations/update-15-5-0/update-angular-cli.js +1 -1
- package/src/migrations/update-15-7-0/install-required-packages.js +1 -1
- package/src/migrations/update-15-8-0/update-angular-cli.js +1 -1
- package/src/migrations/update-15-9-0/update-file-server-executor.js +1 -1
- package/src/migrations/update-15-9-0/update-testing-tsconfig.js +1 -2
- package/src/migrations/update-16-0-0/remove-karma-defaults.js +1 -1
- package/src/migrations/update-16-0-0/remove-library-generator-simple-module-name-option.js +1 -1
- package/src/migrations/update-16-0-0/remove-protractor-defaults.js +1 -1
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +1 -1
- package/src/migrations/update-16-1-0/extract-standalone-config-from-bootstrap.js +1 -1
- package/src/migrations/update-16-1-0/remove-ngcc-invocation.js +1 -1
- package/src/migrations/update-16-1-0/remove-render-module-platform-server-exports.js +1 -1
- package/src/migrations/update-16-1-0/update-angular-cli.js +1 -1
- package/src/migrations/update-16-1-0/update-server-executor-config.js +1 -1
- package/src/migrations/update-16-2-0/switch-data-persistence-operators-imports-to-ngrx-router-store.js +1 -1
- package/src/migrations/update-16-4-0/rename-angular-eslint-accesibility-rules.js +1 -1
- package/src/migrations/update-16-4-0/update-angular-cli.js +1 -1
- package/src/migrations/update-16-6-0/explicitly-set-projects-to-update-buildable-deps.js +1 -1
- package/src/migrations/update-16-7-0/update-angular-cli.js +1 -1
- package/src/migrations/update-17-1-0/browser-target-to-build-target.js +1 -1
- package/src/migrations/update-17-1-0/replace-nguniversal-builders.js +1 -1
- package/src/migrations/update-17-1-0/replace-nguniversal-engines.js +1 -1
- package/src/migrations/update-17-1-0/update-angular-cli.js +1 -1
- package/src/migrations/update-17-1-0/update-zone-js-deep-import.js +1 -1
- package/src/migrations/update-17-2-0/rename-webpack-dev-server.js +1 -1
- package/src/migrations/update-17-3-0/add-autoprefixer-dependency.js +1 -1
- package/src/migrations/update-17-3-0/add-browser-sync-dependency.js +1 -1
- package/src/migrations/update-17-3-0/update-angular-cli.js +1 -1
- package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.js +1 -1
- package/src/migrations/update-18-1-0/update-angular-cli.js +1 -1
- package/src/migrations/update-18-1-1/fix-target-defaults-inputs.js +1 -1
- package/src/migrations/update-18-2-0/update-angular-cli.js +1 -1
- package/src/migrations/update-19-1-0/update-angular-cli.js +1 -1
- package/src/migrations/update-19-2-1/add-typescript-eslint-utils.d.ts +1 -1
- package/src/migrations/update-19-2-1/add-typescript-eslint-utils.js +2 -2
- package/src/migrations/update-19-5-0/update-angular-cli.d.ts +3 -0
- package/src/migrations/update-19-5-0/update-angular-cli.js +23 -0
- package/src/migrations/utils/projects.js +1 -2
- package/src/utils/backward-compatible-versions.js +4 -2
- package/src/utils/cli-config-utils.js +1 -2
- package/src/utils/get-mf-projects.js +1 -2
- package/src/utils/mf/utils.js +4 -4
- package/src/utils/mf/with-module-federation-ssr.d.ts +2 -2
- package/src/utils/mf/with-module-federation-ssr.js +6 -3
- package/src/utils/mf/with-module-federation.d.ts +2 -2
- package/src/utils/mf/with-module-federation.js +8 -6
- package/src/utils/nx-devkit/ast-utils.js +23 -24
- package/src/utils/nx-devkit/route-utils.js +2 -3
- package/src/utils/nx-devkit/testing.js +4 -5
- package/src/utils/targets.js +1 -2
- package/src/utils/version-utils.js +2 -3
- package/src/utils/versions.d.ts +6 -5
- package/src/utils/versions.js +7 -6
- package/tailwind.js +1 -2
@@ -1,6 +1,28 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.isStandalone = isStandalone;
|
4
|
+
exports.getDecoratorMetadata = getDecoratorMetadata;
|
5
|
+
exports.removeFromNgModule = removeFromNgModule;
|
6
|
+
exports.addImportToComponent = addImportToComponent;
|
7
|
+
exports.addImportToDirective = addImportToDirective;
|
8
|
+
exports.addImportToPipe = addImportToPipe;
|
9
|
+
exports.addImportToModule = addImportToModule;
|
10
|
+
exports.addImportToTestBed = addImportToTestBed;
|
11
|
+
exports.addDeclarationsToTestBed = addDeclarationsToTestBed;
|
12
|
+
exports.replaceIntoToTestBed = replaceIntoToTestBed;
|
13
|
+
exports.getBootstrapComponent = getBootstrapComponent;
|
14
|
+
exports.addRouteToNgModule = addRouteToNgModule;
|
15
|
+
exports.isNgStandaloneApp = isNgStandaloneApp;
|
16
|
+
exports.addProviderToBootstrapApplication = addProviderToBootstrapApplication;
|
17
|
+
exports.addProviderToAppConfig = addProviderToAppConfig;
|
18
|
+
exports.addProviderToModule = addProviderToModule;
|
19
|
+
exports.addProviderToComponent = addProviderToComponent;
|
20
|
+
exports.addViewProviderToComponent = addViewProviderToComponent;
|
21
|
+
exports.addDeclarationToModule = addDeclarationToModule;
|
22
|
+
exports.addEntryComponents = addEntryComponents;
|
23
|
+
exports.readBootstrapInfo = readBootstrapInfo;
|
24
|
+
exports.getDecoratorPropertyValueNode = getDecoratorPropertyValueNode;
|
25
|
+
exports.getTsSourceFile = getTsSourceFile;
|
4
26
|
const js_1 = require("@nx/js");
|
5
27
|
const path_1 = require("path");
|
6
28
|
const devkit_1 = require("@nx/devkit");
|
@@ -62,7 +84,6 @@ function isStandalone(sourceFile, decoratorName) {
|
|
62
84
|
const decoratorMetadata = getDecoratorMetadata(sourceFile, decoratorName, '@angular/core');
|
63
85
|
return decoratorMetadata.some((node) => node.getText().includes('standalone: true'));
|
64
86
|
}
|
65
|
-
exports.isStandalone = isStandalone;
|
66
87
|
function getDecoratorMetadata(source, identifier, module) {
|
67
88
|
if (!tsModule) {
|
68
89
|
tsModule = (0, ensure_typescript_1.ensureTypescript)();
|
@@ -105,7 +126,6 @@ function getDecoratorMetadata(source, identifier, module) {
|
|
105
126
|
expr.arguments[0].kind == tsModule.SyntaxKind.ObjectLiteralExpression)
|
106
127
|
.map((expr) => expr.arguments[0]);
|
107
128
|
}
|
108
|
-
exports.getDecoratorMetadata = getDecoratorMetadata;
|
109
129
|
function _addSymbolToDecoratorMetadata(host, source, filePath, metadataField, expression, decoratorName) {
|
110
130
|
const nodes = getDecoratorMetadata(source, decoratorName, '@angular/core');
|
111
131
|
let node = nodes[0];
|
@@ -241,7 +261,6 @@ function removeFromNgModule(host, source, modulePath, property) {
|
|
241
261
|
return (0, js_1.removeChange)(host, source, modulePath, matchingProperty.getStart(source), matchingProperty.getFullText(source));
|
242
262
|
}
|
243
263
|
}
|
244
|
-
exports.removeFromNgModule = removeFromNgModule;
|
245
264
|
/**
|
246
265
|
* Add an import to a Standalone Component
|
247
266
|
* @param host Virtual Tree
|
@@ -252,7 +271,6 @@ exports.removeFromNgModule = removeFromNgModule;
|
|
252
271
|
function addImportToComponent(host, source, componentPath, symbolName) {
|
253
272
|
return _addSymbolToDecoratorMetadata(host, source, componentPath, 'imports', symbolName, 'Component');
|
254
273
|
}
|
255
|
-
exports.addImportToComponent = addImportToComponent;
|
256
274
|
/**
|
257
275
|
* Add an import to a Standalone Directive
|
258
276
|
* @param host Virtual Tree
|
@@ -263,7 +281,6 @@ exports.addImportToComponent = addImportToComponent;
|
|
263
281
|
function addImportToDirective(host, source, directivePath, symbolName) {
|
264
282
|
return _addSymbolToDecoratorMetadata(host, source, directivePath, 'imports', symbolName, 'Directive');
|
265
283
|
}
|
266
|
-
exports.addImportToDirective = addImportToDirective;
|
267
284
|
/**
|
268
285
|
* Add an import to a Standalone Pipe
|
269
286
|
* @param host Virtual Tree
|
@@ -274,7 +291,6 @@ exports.addImportToDirective = addImportToDirective;
|
|
274
291
|
function addImportToPipe(host, source, pipePath, symbolName) {
|
275
292
|
return _addSymbolToDecoratorMetadata(host, source, pipePath, 'imports', symbolName, 'Pipe');
|
276
293
|
}
|
277
|
-
exports.addImportToPipe = addImportToPipe;
|
278
294
|
/**
|
279
295
|
* Add an import to an NgModule
|
280
296
|
* @param host Virtual Tree
|
@@ -285,7 +301,6 @@ exports.addImportToPipe = addImportToPipe;
|
|
285
301
|
function addImportToModule(host, source, modulePath, symbolName) {
|
286
302
|
return _addSymbolToNgModuleMetadata(host, source, modulePath, 'imports', symbolName);
|
287
303
|
}
|
288
|
-
exports.addImportToModule = addImportToModule;
|
289
304
|
function addImportToTestBed(host, source, specPath, symbolName) {
|
290
305
|
if (!tsModule) {
|
291
306
|
tsModule = (0, ensure_typescript_1.ensureTypescript)();
|
@@ -305,7 +320,6 @@ function addImportToTestBed(host, source, specPath, symbolName) {
|
|
305
320
|
}
|
306
321
|
return source;
|
307
322
|
}
|
308
|
-
exports.addImportToTestBed = addImportToTestBed;
|
309
323
|
function addDeclarationsToTestBed(host, source, specPath, symbolName) {
|
310
324
|
if (!tsModule) {
|
311
325
|
tsModule = (0, ensure_typescript_1.ensureTypescript)();
|
@@ -325,7 +339,6 @@ function addDeclarationsToTestBed(host, source, specPath, symbolName) {
|
|
325
339
|
}
|
326
340
|
return source;
|
327
341
|
}
|
328
|
-
exports.addDeclarationsToTestBed = addDeclarationsToTestBed;
|
329
342
|
function replaceIntoToTestBed(host, source, specPath, newSymbol, previousSymbol) {
|
330
343
|
if (!tsModule) {
|
331
344
|
tsModule = (0, ensure_typescript_1.ensureTypescript)();
|
@@ -345,7 +358,6 @@ function replaceIntoToTestBed(host, source, specPath, newSymbol, previousSymbol)
|
|
345
358
|
}
|
346
359
|
return source;
|
347
360
|
}
|
348
|
-
exports.replaceIntoToTestBed = replaceIntoToTestBed;
|
349
361
|
function getBootstrapComponent(source, moduleClassName) {
|
350
362
|
const bootstrap = getMatchingProperty(source, 'bootstrap', 'NgModule', '@angular/core');
|
351
363
|
if (!bootstrap) {
|
@@ -359,7 +371,6 @@ function getBootstrapComponent(source, moduleClassName) {
|
|
359
371
|
}
|
360
372
|
return bootstrapComponent.getText();
|
361
373
|
}
|
362
|
-
exports.getBootstrapComponent = getBootstrapComponent;
|
363
374
|
function getMatchingProperty(source, property, identifier, module) {
|
364
375
|
const nodes = getDecoratorMetadata(source, identifier, module);
|
365
376
|
let node = nodes[0];
|
@@ -379,7 +390,6 @@ function addRouteToNgModule(host, ngModulePath, source, route) {
|
|
379
390
|
return (0, js_1.insertChange)(host, source, ngModulePath, routes.end, `, ${route}`);
|
380
391
|
}
|
381
392
|
}
|
382
|
-
exports.addRouteToNgModule = addRouteToNgModule;
|
383
393
|
function getListOfRoutes(source) {
|
384
394
|
if (!tsModule) {
|
385
395
|
tsModule = (0, ensure_typescript_1.ensureTypescript)();
|
@@ -431,7 +441,6 @@ function isNgStandaloneApp(tree, projectName) {
|
|
431
441
|
});
|
432
442
|
return nodes.length > 0;
|
433
443
|
}
|
434
|
-
exports.isNgStandaloneApp = isNgStandaloneApp;
|
435
444
|
/**
|
436
445
|
* Add a provider to bootstrapApplication call for Standalone Applications
|
437
446
|
* @param tree Virtual Tree
|
@@ -454,7 +463,6 @@ function addProviderToBootstrapApplication(tree, filePath, providerToAdd) {
|
|
454
463
|
const newFileContents = `${fileContents.slice(0, arrayNode.getStart() + 1)}${providerToAdd},${fileContents.slice(arrayNode.getStart() + 1, fileContents.length)}`;
|
455
464
|
tree.write(filePath, newFileContents);
|
456
465
|
}
|
457
|
-
exports.addProviderToBootstrapApplication = addProviderToBootstrapApplication;
|
458
466
|
/**
|
459
467
|
* Add a provider to appConfig for Standalone Applications
|
460
468
|
* NOTE: The appConfig must be marked with type ApplicationConfig and the providers must be declared as an array in the config
|
@@ -478,7 +486,6 @@ function addProviderToAppConfig(tree, filePath, providerToAdd) {
|
|
478
486
|
const newFileContents = `${fileContents.slice(0, arrayNode.getStart() + 1)}${providerToAdd},${fileContents.slice(arrayNode.getStart() + 1, fileContents.length)}`;
|
479
487
|
tree.write(filePath, newFileContents);
|
480
488
|
}
|
481
|
-
exports.addProviderToAppConfig = addProviderToAppConfig;
|
482
489
|
/**
|
483
490
|
* Add a provider to an NgModule
|
484
491
|
* @param host Virtual Tree
|
@@ -489,7 +496,6 @@ exports.addProviderToAppConfig = addProviderToAppConfig;
|
|
489
496
|
function addProviderToModule(host, source, modulePath, symbolName) {
|
490
497
|
return _addSymbolToNgModuleMetadata(host, source, modulePath, 'providers', symbolName);
|
491
498
|
}
|
492
|
-
exports.addProviderToModule = addProviderToModule;
|
493
499
|
/**
|
494
500
|
* Add a provider to a Standalone Component
|
495
501
|
* @param host Virtual Tree
|
@@ -500,7 +506,6 @@ exports.addProviderToModule = addProviderToModule;
|
|
500
506
|
function addProviderToComponent(host, source, componentPath, symbolName) {
|
501
507
|
return _addSymbolToDecoratorMetadata(host, source, componentPath, 'providers', symbolName, 'Component');
|
502
508
|
}
|
503
|
-
exports.addProviderToComponent = addProviderToComponent;
|
504
509
|
/**
|
505
510
|
* Add a view provider to a Standalone Component
|
506
511
|
* @param host Virtual Tree
|
@@ -511,15 +516,12 @@ exports.addProviderToComponent = addProviderToComponent;
|
|
511
516
|
function addViewProviderToComponent(host, source, componentPath, symbolName) {
|
512
517
|
return _addSymbolToDecoratorMetadata(host, source, componentPath, 'viewProviders', symbolName, 'Component');
|
513
518
|
}
|
514
|
-
exports.addViewProviderToComponent = addViewProviderToComponent;
|
515
519
|
function addDeclarationToModule(host, source, modulePath, symbolName) {
|
516
520
|
return _addSymbolToNgModuleMetadata(host, source, modulePath, 'declarations', symbolName);
|
517
521
|
}
|
518
|
-
exports.addDeclarationToModule = addDeclarationToModule;
|
519
522
|
function addEntryComponents(host, source, modulePath, symbolName) {
|
520
523
|
return _addSymbolToNgModuleMetadata(host, source, modulePath, 'entryComponents', symbolName);
|
521
524
|
}
|
522
|
-
exports.addEntryComponents = addEntryComponents;
|
523
525
|
function readBootstrapInfo(host, app) {
|
524
526
|
if (!tsModule) {
|
525
527
|
tsModule = (0, ensure_typescript_1.ensureTypescript)();
|
@@ -562,7 +564,6 @@ function readBootstrapInfo(host, app) {
|
|
562
564
|
bootstrapComponentFileName,
|
563
565
|
};
|
564
566
|
}
|
565
|
-
exports.readBootstrapInfo = readBootstrapInfo;
|
566
567
|
function getDecoratorPropertyValueNode(host, modulePath, identifier, property, module) {
|
567
568
|
if (!tsModule) {
|
568
569
|
tsModule = (0, ensure_typescript_1.ensureTypescript)();
|
@@ -572,7 +573,6 @@ function getDecoratorPropertyValueNode(host, modulePath, identifier, property, m
|
|
572
573
|
const templateNode = getMatchingProperty(moduleSource, property, identifier, module);
|
573
574
|
return templateNode.getChildAt(templateNode.getChildCount() - 1);
|
574
575
|
}
|
575
|
-
exports.getDecoratorPropertyValueNode = getDecoratorPropertyValueNode;
|
576
576
|
function getMatchingObjectLiteralElement(node, source, property) {
|
577
577
|
if (!tsModule) {
|
578
578
|
tsModule = (0, ensure_typescript_1.ensureTypescript)();
|
@@ -604,4 +604,3 @@ function getTsSourceFile(host, path) {
|
|
604
604
|
const source = tsModule.createSourceFile(path, content, tsModule.ScriptTarget.Latest, true);
|
605
605
|
return source;
|
606
606
|
}
|
607
|
-
exports.getTsSourceFile = getTsSourceFile;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.addRoute = addRoute;
|
4
|
+
exports.addProviderToRoute = addProviderToRoute;
|
4
5
|
const js_1 = require("@nx/js");
|
5
6
|
const ast_utils_1 = require("./ast-utils");
|
6
7
|
const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
|
@@ -48,7 +49,6 @@ function addRoute(tree, routesFile, route, lazy = true, routesConst, importPath)
|
|
48
49
|
${route},${routesFileContents.slice(routesArrayNodes[0].getStart() + 1)}`;
|
49
50
|
tree.write(routesFile, newRoutesFileContents);
|
50
51
|
}
|
51
|
-
exports.addRoute = addRoute;
|
52
52
|
/**
|
53
53
|
* Add a provider to a standalone routes definition
|
54
54
|
* @param tree Virtual Tree
|
@@ -99,4 +99,3 @@ function addProviderToRoute(tree, routesFile, routeToAddProviderTo, providerToAd
|
|
99
99
|
}
|
100
100
|
}
|
101
101
|
}
|
102
|
-
exports.addProviderToRoute = addProviderToRoute;
|
@@ -1,17 +1,18 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.getAppConfig = getAppConfig;
|
4
|
+
exports.getLibConfig = getLibConfig;
|
5
|
+
exports.createApp = createApp;
|
6
|
+
exports.createLib = createLib;
|
4
7
|
const devkit_1 = require("@nx/devkit");
|
5
8
|
var appConfig; // configure built in createApp()
|
6
9
|
var libConfig;
|
7
10
|
function getAppConfig() {
|
8
11
|
return appConfig;
|
9
12
|
}
|
10
|
-
exports.getAppConfig = getAppConfig;
|
11
13
|
function getLibConfig() {
|
12
14
|
return libConfig;
|
13
15
|
}
|
14
|
-
exports.getLibConfig = getLibConfig;
|
15
16
|
function createApp(tree, appName, routing = true) {
|
16
17
|
appName = (0, devkit_1.names)(appName).fileName;
|
17
18
|
// save for getAppDir() lookup by external *.spec.ts tests
|
@@ -60,7 +61,6 @@ platformBrowserDynamic()
|
|
60
61
|
tags: [],
|
61
62
|
});
|
62
63
|
}
|
63
|
-
exports.createApp = createApp;
|
64
64
|
function createLib(tree, libName) {
|
65
65
|
const { name, className, fileName, propertyName } = (0, devkit_1.names)(libName);
|
66
66
|
libConfig = {
|
@@ -81,4 +81,3 @@ export class ${className}Module { }
|
|
81
81
|
tree.write(libConfig.barrel, `export * from './lib/${fileName}.module';
|
82
82
|
`);
|
83
83
|
}
|
84
|
-
exports.createLib = createLib;
|
package/src/utils/targets.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.allTargetOptions =
|
3
|
+
exports.allTargetOptions = allTargetOptions;
|
4
4
|
function* allTargetOptions(target) {
|
5
5
|
if (target.options) {
|
6
6
|
yield [undefined, target.options];
|
@@ -14,4 +14,3 @@ function* allTargetOptions(target) {
|
|
14
14
|
}
|
15
15
|
}
|
16
16
|
}
|
17
|
-
exports.allTargetOptions = allTargetOptions;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.getPkgVersionForAngularMajorVersion = getPkgVersionForAngularMajorVersion;
|
4
|
+
exports.getPkgVersionsForAngularMajorVersion = getPkgVersionsForAngularMajorVersion;
|
4
5
|
const tslib_1 = require("tslib");
|
5
6
|
const semver_1 = require("semver");
|
6
7
|
const backward_compatible_versions_1 = require("./backward-compatible-versions");
|
@@ -11,10 +12,8 @@ function getPkgVersionForAngularMajorVersion(pkgVersionName, angularMajorVersion
|
|
11
12
|
? backward_compatible_versions_1.backwardCompatibleVersions[`angularV${angularMajorVersion}`]?.[pkgVersionName] ?? versions[pkgVersionName]
|
12
13
|
: versions[pkgVersionName];
|
13
14
|
}
|
14
|
-
exports.getPkgVersionForAngularMajorVersion = getPkgVersionForAngularMajorVersion;
|
15
15
|
function getPkgVersionsForAngularMajorVersion(angularMajorVersion) {
|
16
16
|
return angularMajorVersion < (0, semver_1.major)((0, semver_1.coerce)(versions_1.angularVersion))
|
17
17
|
? backward_compatible_versions_1.backwardCompatibleVersions[`angularV${angularMajorVersion}`] ?? versions
|
18
18
|
: versions;
|
19
19
|
}
|
20
|
-
exports.getPkgVersionsForAngularMajorVersion = getPkgVersionsForAngularMajorVersion;
|
package/src/utils/versions.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
export declare const nxVersion: any;
|
2
|
-
export declare const angularVersion = "~18.
|
3
|
-
export declare const angularDevkitVersion = "~18.
|
4
|
-
export declare const ngPackagrVersion = "~18.
|
2
|
+
export declare const angularVersion = "~18.1.0";
|
3
|
+
export declare const angularDevkitVersion = "~18.1.0";
|
4
|
+
export declare const ngPackagrVersion = "~18.1.0";
|
5
5
|
export declare const ngrxVersion = "^18.0.0";
|
6
6
|
export declare const rxjsVersion = "~7.8.0";
|
7
7
|
export declare const zoneJsVersion = "~0.14.3";
|
@@ -12,9 +12,10 @@ export declare const typesCorsVersion = "~2.8.5";
|
|
12
12
|
export declare const expressVersion = "~4.18.2";
|
13
13
|
export declare const typesExpressVersion = "4.17.14";
|
14
14
|
export declare const browserSyncVersion = "^3.0.0";
|
15
|
-
export declare const moduleFederationNodeVersion = "
|
15
|
+
export declare const moduleFederationNodeVersion = "^2.3.0";
|
16
|
+
export declare const moduleFederationEnhancedVersion = "~0.2.3";
|
16
17
|
export declare const angularEslintVersion = "^18.0.1";
|
17
|
-
export declare const typescriptEslintVersion = "^
|
18
|
+
export declare const typescriptEslintVersion = "^7.16.0";
|
18
19
|
export declare const tailwindVersion = "^3.0.2";
|
19
20
|
export declare const postcssVersion = "^8.4.5";
|
20
21
|
export declare const postcssUrlVersion = "~10.1.3";
|
package/src/utils/versions.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.jsoncEslintParserVersion = exports.jasmineMarblesVersion = exports.typesNodeVersion = exports.jestPresetAngularVersion = exports.tsNodeVersion = exports.autoprefixerVersion = exports.postcssUrlVersion = exports.postcssVersion = exports.tailwindVersion = exports.typescriptEslintVersion = exports.angularEslintVersion = exports.moduleFederationNodeVersion = exports.browserSyncVersion = exports.typesExpressVersion = exports.expressVersion = exports.typesCorsVersion = exports.corsVersion = exports.tsLibVersion = exports.angularJsVersion = exports.zoneJsVersion = exports.rxjsVersion = exports.ngrxVersion = exports.ngPackagrVersion = exports.angularDevkitVersion = exports.angularVersion = exports.nxVersion = void 0;
|
3
|
+
exports.jsoncEslintParserVersion = exports.jasmineMarblesVersion = exports.typesNodeVersion = exports.jestPresetAngularVersion = exports.tsNodeVersion = exports.autoprefixerVersion = exports.postcssUrlVersion = exports.postcssVersion = exports.tailwindVersion = exports.typescriptEslintVersion = exports.angularEslintVersion = exports.moduleFederationEnhancedVersion = exports.moduleFederationNodeVersion = exports.browserSyncVersion = exports.typesExpressVersion = exports.expressVersion = exports.typesCorsVersion = exports.corsVersion = exports.tsLibVersion = exports.angularJsVersion = exports.zoneJsVersion = exports.rxjsVersion = exports.ngrxVersion = exports.ngPackagrVersion = exports.angularDevkitVersion = exports.angularVersion = exports.nxVersion = void 0;
|
4
4
|
exports.nxVersion = require('../../package.json').version;
|
5
|
-
exports.angularVersion = '~18.
|
6
|
-
exports.angularDevkitVersion = '~18.
|
7
|
-
exports.ngPackagrVersion = '~18.
|
5
|
+
exports.angularVersion = '~18.1.0';
|
6
|
+
exports.angularDevkitVersion = '~18.1.0';
|
7
|
+
exports.ngPackagrVersion = '~18.1.0';
|
8
8
|
exports.ngrxVersion = '^18.0.0';
|
9
9
|
exports.rxjsVersion = '~7.8.0';
|
10
10
|
exports.zoneJsVersion = '~0.14.3';
|
@@ -15,9 +15,10 @@ exports.typesCorsVersion = '~2.8.5';
|
|
15
15
|
exports.expressVersion = '~4.18.2';
|
16
16
|
exports.typesExpressVersion = '4.17.14';
|
17
17
|
exports.browserSyncVersion = '^3.0.0';
|
18
|
-
exports.moduleFederationNodeVersion = '
|
18
|
+
exports.moduleFederationNodeVersion = '^2.3.0';
|
19
|
+
exports.moduleFederationEnhancedVersion = '~0.2.3';
|
19
20
|
exports.angularEslintVersion = '^18.0.1';
|
20
|
-
exports.typescriptEslintVersion = '^
|
21
|
+
exports.typescriptEslintVersion = '^7.16.0';
|
21
22
|
exports.tailwindVersion = '^3.0.2';
|
22
23
|
exports.postcssVersion = '^8.4.5';
|
23
24
|
exports.postcssUrlVersion = '~10.1.3';
|
package/tailwind.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.createGlobPatternsForDependencies =
|
3
|
+
exports.createGlobPatternsForDependencies = createGlobPatternsForDependencies;
|
4
4
|
const generate_globs_1 = require("@nx/js/src/utils/generate-globs");
|
5
5
|
/**
|
6
6
|
* Generates a set of glob patterns based off the source root of the app and its dependencies
|
@@ -26,4 +26,3 @@ function createGlobPatternsForDependencies(dirPath, fileGlobPattern = '/**/!(*.s
|
|
26
26
|
return [];
|
27
27
|
}
|
28
28
|
}
|
29
|
-
exports.createGlobPatternsForDependencies = createGlobPatternsForDependencies;
|