@nx/js 23.0.0-beta.2 → 23.0.0-beta.21
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/{babel.d.ts → dist/babel.d.ts} +0 -1
- package/dist/internal.d.ts +27 -0
- package/dist/internal.js +108 -0
- package/{plugins → dist/plugins}/jest/local-registry.d.ts +0 -1
- package/{src → dist/src}/executors/copy-workspace-modules/copy-workspace-modules.d.ts +0 -1
- package/{src → dist/src}/executors/node/lib/coalescing-debounce.d.ts +0 -1
- package/{src → dist/src}/executors/node/lib/detect-module-format.d.ts +2 -2
- package/{src → dist/src}/executors/node/lib/detect-module-format.js +7 -23
- package/{src → dist/src}/executors/node/lib/esm-loader.d.ts +0 -1
- package/{src → dist/src}/executors/node/lib/kill-tree.d.ts +0 -1
- package/{src → dist/src}/executors/node/lib/line-aware-writer.d.ts +0 -1
- package/{src → dist/src}/executors/node/lib/output-file.d.ts +0 -1
- package/dist/src/executors/node/node-with-esm-loader.d.ts +1 -0
- package/{src → dist/src}/executors/node/node-with-esm-loader.js +2 -0
- package/dist/src/executors/node/node-with-require-overrides.d.ts +1 -0
- package/{src → dist/src}/executors/node/node-with-require-overrides.js +2 -0
- package/{src → dist/src}/executors/node/node.impl.d.ts +0 -1
- package/{src → dist/src}/executors/node/node.impl.js +3 -3
- package/{src → dist/src}/executors/prune-lockfile/prune-lockfile.d.ts +0 -1
- package/{src → dist/src}/executors/release-publish/extract-npm-publish-json-data.d.ts +0 -1
- package/{src → dist/src}/executors/release-publish/format-bytes.d.ts +0 -1
- package/{src → dist/src}/executors/release-publish/log-tar.d.ts +0 -1
- package/{src → dist/src}/executors/release-publish/release-publish.impl.d.ts +0 -1
- package/{src → dist/src}/executors/release-publish/release-publish.impl.js +28 -2
- package/{src → dist/src}/executors/swc/swc.impl.d.ts +0 -1
- package/{src → dist/src}/executors/tsc/lib/batch/build-task-info-per-tsconfig-map.d.ts +0 -1
- package/{src → dist/src}/executors/tsc/lib/batch/index.d.ts +0 -1
- package/{src → dist/src}/executors/tsc/lib/batch/normalize-tasks-options.d.ts +0 -1
- package/{src → dist/src}/executors/tsc/lib/batch/types.d.ts +0 -1
- package/{src → dist/src}/executors/tsc/lib/batch/watch.d.ts +0 -1
- package/{src → dist/src}/executors/tsc/lib/batch/watch.js +1 -1
- package/{src → dist/src}/executors/tsc/lib/get-custom-transformers-factory.d.ts +0 -1
- package/{src → dist/src}/executors/tsc/lib/get-task-options.d.ts +0 -1
- package/{src → dist/src}/executors/tsc/lib/get-tsconfig.d.ts +0 -1
- package/{src → dist/src}/executors/tsc/lib/index.d.ts +0 -1
- package/{src → dist/src}/executors/tsc/lib/normalize-options.d.ts +0 -1
- package/{src → dist/src}/executors/tsc/lib/typescript-compilation.d.ts +0 -1
- package/{src → dist/src}/executors/tsc/lib/typescript-compilation.js +2 -2
- package/{src → dist/src}/executors/tsc/lib/typescript-diagnostic-reporters.d.ts +0 -1
- package/{src → dist/src}/executors/tsc/tsc.batch-impl.d.ts +0 -1
- package/{src → dist/src}/executors/tsc/tsc.impl.d.ts +1 -2
- package/{src → dist/src}/executors/verdaccio/verdaccio.impl.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-swc/convert-to-swc.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-swc/convert-to-swc.js +3 -1
- package/{src → dist/src}/generators/init/init.d.ts +0 -1
- package/{src → dist/src}/generators/init/init.js +15 -42
- package/{src → dist/src}/generators/init/schema.json +1 -1
- package/{src → dist/src}/generators/library/library.d.ts +0 -1
- package/{src → dist/src}/generators/library/library.js +21 -17
- package/{src → dist/src}/generators/library/schema.d.ts +1 -1
- package/{src → dist/src}/generators/library/utils/add-release-config.d.ts +0 -1
- package/dist/src/generators/release-version/release-version.d.ts +1 -0
- package/{src → dist/src}/generators/setup-build/generator.d.ts +0 -1
- package/{src → dist/src}/generators/setup-build/generator.js +6 -6
- package/{src → dist/src}/generators/setup-prettier/generator.d.ts +0 -1
- package/{src → dist/src}/generators/setup-prettier/generator.js +2 -0
- package/{src → dist/src}/generators/setup-verdaccio/generator.d.ts +0 -1
- package/{src → dist/src}/generators/setup-verdaccio/generator.js +3 -1
- package/{src → dist/src}/generators/typescript-sync/typescript-sync.d.ts +0 -1
- package/{src → dist/src}/generators/typescript-sync/typescript-sync.js +2 -0
- package/{src → dist/src}/index.d.ts +0 -1
- package/dist/src/internal.d.ts +18 -0
- package/dist/src/internal.js +25 -0
- package/{src → dist/src}/migrations/update-21-5-0/migrate-development-custom-condition.d.ts +0 -1
- package/dist/src/migrations/update-21-5-0/migrate-development-custom-condition.md +87 -0
- package/{src → dist/src}/migrations/update-22-0-0/remove-external-options-from-js-executors.d.ts +0 -1
- package/dist/src/migrations/update-22-0-0/remove-external-options-from-js-executors.js +94 -0
- package/dist/src/migrations/update-22-0-0/remove-external-options-from-js-executors.md +79 -0
- package/{src → dist/src}/migrations/update-22-1-0/remove-redundant-ts-project-references.d.ts +0 -1
- package/dist/src/migrations/update-22-1-0/remove-redundant-ts-project-references.md +143 -0
- package/dist/src/migrations/update-23-0-0/rewrite-internal-subpath-imports.d.ts +3 -0
- package/dist/src/migrations/update-23-0-0/rewrite-internal-subpath-imports.js +144 -0
- package/{src → dist/src}/plugins/jest/start-local-registry.d.ts +0 -1
- package/{src → dist/src}/plugins/typescript/plugin.d.ts +0 -1
- package/{src → dist/src}/plugins/typescript/plugin.js +22 -8
- package/{src → dist/src}/plugins/typescript/util.d.ts +0 -1
- package/{src → dist/src}/plugins/typescript/util.js +1 -1
- package/{src → dist/src}/release/utils/semver.d.ts +0 -1
- package/{src → dist/src}/release/utils/update-lock-file.d.ts +0 -1
- package/{src → dist/src}/release/version-actions.d.ts +0 -1
- package/{src → dist/src}/release/version-actions.js +3 -3
- package/{src → dist/src}/utils/add-babel-inputs.d.ts +0 -1
- package/{src → dist/src}/utils/add-local-registry-scripts.d.ts +0 -1
- package/dist/src/utils/assert-supported-typescript-version.d.ts +2 -0
- package/dist/src/utils/assert-supported-typescript-version.js +8 -0
- package/{src → dist/src}/utils/assets/assets.d.ts +0 -1
- package/{src → dist/src}/utils/assets/copy-assets-handler.d.ts +0 -1
- package/{src → dist/src}/utils/assets/index.d.ts +0 -1
- package/{src → dist/src}/utils/assets/normalize-assets.d.ts +0 -1
- package/{src → dist/src}/utils/buildable-libs-utils.d.ts +0 -1
- package/{src → dist/src}/utils/check-dependencies.d.ts +0 -1
- package/{src → dist/src}/utils/code-frames/highlight.d.ts +0 -1
- package/{src → dist/src}/utils/code-frames/identifiers.d.ts +0 -1
- package/{src → dist/src}/utils/compiler-helper-dependency.d.ts +0 -1
- package/{src → dist/src}/utils/find-npm-dependencies.d.ts +0 -1
- package/{src → dist/src}/utils/generate-globs.d.ts +0 -1
- package/{src → dist/src}/utils/generator-prompts.d.ts +0 -1
- package/{src → dist/src}/utils/generator-prompts.js +3 -3
- package/{src → dist/src}/utils/get-import-path.d.ts +0 -1
- package/{src → dist/src}/utils/get-main-file-dir.d.ts +0 -1
- package/{src → dist/src}/utils/is-locally-linked-package-version.d.ts +0 -1
- package/{src → dist/src}/utils/is-valid-variable.d.ts +0 -1
- package/dist/src/utils/module-format/is-esm-project.d.ts +16 -0
- package/dist/src/utils/module-format/is-esm-project.js +32 -0
- package/dist/src/utils/module-format/module-format.d.ts +17 -0
- package/dist/src/utils/module-format/module-format.js +43 -0
- package/{src → dist/src}/utils/npm-config.d.ts +0 -1
- package/{src → dist/src}/utils/package-json/create-entry-points.d.ts +0 -1
- package/{src → dist/src}/utils/package-json/get-npm-scope.d.ts +0 -1
- package/{src → dist/src}/utils/package-json/index.d.ts +0 -1
- package/{src → dist/src}/utils/package-json/sort-fields.d.ts +0 -1
- package/{src → dist/src}/utils/package-json/update-package-json.d.ts +0 -1
- package/{src → dist/src}/utils/package-manager-workspaces.d.ts +0 -1
- package/{src → dist/src}/utils/prettier.d.ts +0 -1
- package/{src → dist/src}/utils/prettier.js +3 -36
- package/{src → dist/src}/utils/strip-glob-to-base-dir.d.ts +0 -1
- package/{src → dist/src}/utils/swc/add-swc-config.d.ts +0 -1
- package/{src → dist/src}/utils/swc/add-swc-dependencies.d.ts +0 -1
- package/{src → dist/src}/utils/swc/add-swc-dependencies.js +2 -2
- package/{src → dist/src}/utils/swc/compile-swc.d.ts +0 -1
- package/{src → dist/src}/utils/swc/compile-swc.js +2 -2
- package/{src → dist/src}/utils/swc/get-swcrc-path.d.ts +0 -1
- package/{src → dist/src}/utils/typescript/__mocks__/function-after-declarations-plugin.d.ts +0 -1
- package/{src → dist/src}/utils/typescript/__mocks__/function-after-plugin.d.ts +0 -1
- package/{src → dist/src}/utils/typescript/__mocks__/function-direct-export.d.ts +0 -1
- package/{src → dist/src}/utils/typescript/__mocks__/function-multiple-hooks.d.ts +0 -1
- package/{src → dist/src}/utils/typescript/__mocks__/plugin-a.d.ts +0 -1
- package/{src → dist/src}/utils/typescript/__mocks__/plugin-b.d.ts +0 -1
- package/{src → dist/src}/utils/typescript/add-tslib-dependencies.d.ts +0 -1
- package/{src → dist/src}/utils/typescript/ast-utils.d.ts +0 -1
- package/dist/src/utils/typescript/compilation.d.ts +22 -0
- package/dist/src/utils/typescript/compilation.js +119 -0
- package/{src → dist/src}/utils/typescript/compile-typescript-files.d.ts +1 -2
- package/{src → dist/src}/utils/typescript/compile-typescript-files.js +3 -3
- package/{src → dist/src}/utils/typescript/configuration.d.ts +0 -1
- package/{src → dist/src}/utils/typescript/create-ts-config.d.ts +0 -1
- package/{src → dist/src}/utils/typescript/ensure-typescript.d.ts +0 -1
- package/{src → dist/src}/utils/typescript/get-source-nodes.d.ts +0 -1
- package/{src → dist/src}/utils/typescript/load-ts-transformers.d.ts +0 -1
- package/{src → dist/src}/utils/typescript/plugin.d.ts +0 -1
- package/{src → dist/src}/utils/typescript/print-diagnostics.d.ts +0 -1
- package/{src → dist/src}/utils/typescript/raw-tsconfig.d.ts +0 -1
- package/{src → dist/src}/utils/typescript/run-type-check.d.ts +0 -1
- package/{src → dist/src}/utils/typescript/run-type-check.js +1 -1
- package/{src → dist/src}/utils/typescript/ts-config.d.ts +0 -1
- package/{src → dist/src}/utils/typescript/ts-solution-setup.d.ts +0 -1
- package/{src → dist/src}/utils/typescript/types.d.ts +0 -1
- package/dist/src/utils/typescript/types.js +2 -0
- package/{src → dist/src}/utils/versions.d.ts +2 -3
- package/{src → dist/src}/utils/versions.js +5 -4
- package/{src → dist/src}/utils/watch-for-single-file-changes.d.ts +0 -1
- package/{typescript.d.ts → dist/typescript.d.ts} +0 -1
- package/executors.json +15 -15
- package/generators.json +14 -14
- package/migrations.json +35 -7
- package/package.json +102 -11
- package/babel.d.ts.map +0 -1
- package/plugins/jest/local-registry.d.ts.map +0 -1
- package/src/executors/copy-workspace-modules/copy-workspace-modules.d.ts.map +0 -1
- package/src/executors/node/lib/coalescing-debounce.d.ts.map +0 -1
- package/src/executors/node/lib/detect-module-format.d.ts.map +0 -1
- package/src/executors/node/lib/esm-loader.d.ts.map +0 -1
- package/src/executors/node/lib/kill-tree.d.ts.map +0 -1
- package/src/executors/node/lib/line-aware-writer.d.ts.map +0 -1
- package/src/executors/node/lib/output-file.d.ts.map +0 -1
- package/src/executors/node/node-with-esm-loader.d.ts +0 -6
- package/src/executors/node/node-with-esm-loader.d.ts.map +0 -1
- package/src/executors/node/node-with-require-overrides.d.ts +0 -8
- package/src/executors/node/node-with-require-overrides.d.ts.map +0 -1
- package/src/executors/node/node.impl.d.ts.map +0 -1
- package/src/executors/prune-lockfile/prune-lockfile.d.ts.map +0 -1
- package/src/executors/release-publish/extract-npm-publish-json-data.d.ts.map +0 -1
- package/src/executors/release-publish/format-bytes.d.ts.map +0 -1
- package/src/executors/release-publish/log-tar.d.ts.map +0 -1
- package/src/executors/release-publish/release-publish.impl.d.ts.map +0 -1
- package/src/executors/swc/swc.impl.d.ts.map +0 -1
- package/src/executors/tsc/lib/batch/build-task-info-per-tsconfig-map.d.ts.map +0 -1
- package/src/executors/tsc/lib/batch/index.d.ts.map +0 -1
- package/src/executors/tsc/lib/batch/normalize-tasks-options.d.ts.map +0 -1
- package/src/executors/tsc/lib/batch/types.d.ts.map +0 -1
- package/src/executors/tsc/lib/batch/watch.d.ts.map +0 -1
- package/src/executors/tsc/lib/get-custom-transformers-factory.d.ts.map +0 -1
- package/src/executors/tsc/lib/get-task-options.d.ts.map +0 -1
- package/src/executors/tsc/lib/get-tsconfig.d.ts.map +0 -1
- package/src/executors/tsc/lib/index.d.ts.map +0 -1
- package/src/executors/tsc/lib/normalize-options.d.ts.map +0 -1
- package/src/executors/tsc/lib/typescript-compilation.d.ts.map +0 -1
- package/src/executors/tsc/lib/typescript-diagnostic-reporters.d.ts.map +0 -1
- package/src/executors/tsc/tsc.batch-impl.d.ts.map +0 -1
- package/src/executors/tsc/tsc.impl.d.ts.map +0 -1
- package/src/executors/verdaccio/verdaccio.impl.d.ts.map +0 -1
- package/src/generators/convert-to-swc/convert-to-swc.d.ts.map +0 -1
- package/src/generators/init/init.d.ts.map +0 -1
- package/src/generators/library/library.d.ts.map +0 -1
- package/src/generators/library/utils/add-release-config.d.ts.map +0 -1
- package/src/generators/release-version/release-version.d.ts +0 -1
- package/src/generators/release-version/release-version.d.ts.map +0 -1
- package/src/generators/release-version/release-version.js +0 -0
- package/src/generators/setup-build/generator.d.ts.map +0 -1
- package/src/generators/setup-prettier/generator.d.ts.map +0 -1
- package/src/generators/setup-verdaccio/generator.d.ts.map +0 -1
- package/src/generators/typescript-sync/typescript-sync.d.ts.map +0 -1
- package/src/index.d.ts.map +0 -1
- package/src/internal.d.ts +0 -6
- package/src/internal.d.ts.map +0 -1
- package/src/internal.js +0 -18
- package/src/migrations/update-21-5-0/migrate-development-custom-condition.d.ts.map +0 -1
- package/src/migrations/update-22-0-0/remove-external-options-from-js-executors.d.ts.map +0 -1
- package/src/migrations/update-22-0-0/remove-external-options-from-js-executors.js +0 -65
- package/src/migrations/update-22-1-0/remove-redundant-ts-project-references.d.ts.map +0 -1
- package/src/plugins/jest/start-local-registry.d.ts.map +0 -1
- package/src/plugins/rollup/type-definitions.d.ts +0 -8
- package/src/plugins/rollup/type-definitions.d.ts.map +0 -1
- package/src/plugins/rollup/type-definitions.js +0 -49
- package/src/plugins/typescript/plugin.d.ts.map +0 -1
- package/src/plugins/typescript/util.d.ts.map +0 -1
- package/src/release/utils/semver.d.ts.map +0 -1
- package/src/release/utils/update-lock-file.d.ts.map +0 -1
- package/src/release/version-actions.d.ts.map +0 -1
- package/src/utils/add-babel-inputs.d.ts.map +0 -1
- package/src/utils/add-local-registry-scripts.d.ts.map +0 -1
- package/src/utils/assets/assets.d.ts.map +0 -1
- package/src/utils/assets/copy-assets-handler.d.ts.map +0 -1
- package/src/utils/assets/index.d.ts.map +0 -1
- package/src/utils/assets/normalize-assets.d.ts.map +0 -1
- package/src/utils/buildable-libs-utils.d.ts.map +0 -1
- package/src/utils/check-dependencies.d.ts.map +0 -1
- package/src/utils/code-frames/highlight.d.ts.map +0 -1
- package/src/utils/code-frames/identifiers.d.ts.map +0 -1
- package/src/utils/compiler-helper-dependency.d.ts.map +0 -1
- package/src/utils/find-npm-dependencies.d.ts.map +0 -1
- package/src/utils/generate-globs.d.ts.map +0 -1
- package/src/utils/generator-prompts.d.ts.map +0 -1
- package/src/utils/get-import-path.d.ts.map +0 -1
- package/src/utils/get-main-file-dir.d.ts.map +0 -1
- package/src/utils/is-locally-linked-package-version.d.ts.map +0 -1
- package/src/utils/is-valid-variable.d.ts.map +0 -1
- package/src/utils/npm-config.d.ts.map +0 -1
- package/src/utils/package-json/create-entry-points.d.ts.map +0 -1
- package/src/utils/package-json/get-npm-scope.d.ts.map +0 -1
- package/src/utils/package-json/index.d.ts.map +0 -1
- package/src/utils/package-json/sort-fields.d.ts.map +0 -1
- package/src/utils/package-json/update-package-json.d.ts.map +0 -1
- package/src/utils/package-manager-workspaces.d.ts.map +0 -1
- package/src/utils/prettier.d.ts.map +0 -1
- package/src/utils/strip-glob-to-base-dir.d.ts.map +0 -1
- package/src/utils/swc/add-swc-config.d.ts.map +0 -1
- package/src/utils/swc/add-swc-dependencies.d.ts.map +0 -1
- package/src/utils/swc/compile-swc.d.ts.map +0 -1
- package/src/utils/swc/get-swcrc-path.d.ts.map +0 -1
- package/src/utils/typescript/__mocks__/function-after-declarations-plugin.d.ts.map +0 -1
- package/src/utils/typescript/__mocks__/function-after-plugin.d.ts.map +0 -1
- package/src/utils/typescript/__mocks__/function-direct-export.d.ts.map +0 -1
- package/src/utils/typescript/__mocks__/function-multiple-hooks.d.ts.map +0 -1
- package/src/utils/typescript/__mocks__/plugin-a.d.ts.map +0 -1
- package/src/utils/typescript/__mocks__/plugin-b.d.ts.map +0 -1
- package/src/utils/typescript/add-tslib-dependencies.d.ts.map +0 -1
- package/src/utils/typescript/ast-utils.d.ts.map +0 -1
- package/src/utils/typescript/compile-typescript-files.d.ts.map +0 -1
- package/src/utils/typescript/configuration.d.ts.map +0 -1
- package/src/utils/typescript/create-ts-config.d.ts.map +0 -1
- package/src/utils/typescript/ensure-typescript.d.ts.map +0 -1
- package/src/utils/typescript/get-source-nodes.d.ts.map +0 -1
- package/src/utils/typescript/load-ts-transformers.d.ts.map +0 -1
- package/src/utils/typescript/plugin.d.ts.map +0 -1
- package/src/utils/typescript/print-diagnostics.d.ts.map +0 -1
- package/src/utils/typescript/raw-tsconfig.d.ts.map +0 -1
- package/src/utils/typescript/run-type-check.d.ts.map +0 -1
- package/src/utils/typescript/ts-config.d.ts.map +0 -1
- package/src/utils/typescript/ts-solution-setup.d.ts.map +0 -1
- package/src/utils/typescript/types.d.ts.map +0 -1
- package/src/utils/versions.d.ts.map +0 -1
- package/src/utils/watch-for-single-file-changes.d.ts.map +0 -1
- package/typescript.d.ts.map +0 -1
- /package/{LICENSE → dist/LICENSE} +0 -0
- /package/{babel.js → dist/babel.js} +0 -0
- /package/{plugins → dist/plugins}/jest/local-registry.js +0 -0
- /package/{src → dist/src}/executors/copy-workspace-modules/copy-workspace-modules.js +0 -0
- /package/{src → dist/src}/executors/copy-workspace-modules/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/copy-workspace-modules/schema.json +0 -0
- /package/{src → dist/src}/executors/node/lib/coalescing-debounce.js +0 -0
- /package/{src → dist/src}/executors/node/lib/esm-loader.js +0 -0
- /package/{src → dist/src}/executors/node/lib/kill-tree.js +0 -0
- /package/{src → dist/src}/executors/node/lib/line-aware-writer.js +0 -0
- /package/{src → dist/src}/executors/node/lib/output-file.js +0 -0
- /package/{src → dist/src}/executors/node/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/node/schema.json +0 -0
- /package/{src → dist/src}/executors/prune-lockfile/prune-lockfile.js +0 -0
- /package/{src → dist/src}/executors/prune-lockfile/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/prune-lockfile/schema.json +0 -0
- /package/{src → dist/src}/executors/release-publish/extract-npm-publish-json-data.js +0 -0
- /package/{src → dist/src}/executors/release-publish/format-bytes.js +0 -0
- /package/{src → dist/src}/executors/release-publish/log-tar.js +0 -0
- /package/{src → dist/src}/executors/release-publish/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/release-publish/schema.json +0 -0
- /package/{src → dist/src}/executors/swc/schema.json +0 -0
- /package/{src → dist/src}/executors/swc/swc.impl.js +0 -0
- /package/{src → dist/src}/executors/tsc/lib/batch/build-task-info-per-tsconfig-map.js +0 -0
- /package/{src → dist/src}/executors/tsc/lib/batch/index.js +0 -0
- /package/{src → dist/src}/executors/tsc/lib/batch/normalize-tasks-options.js +0 -0
- /package/{src → dist/src}/executors/tsc/lib/batch/types.js +0 -0
- /package/{src → dist/src}/executors/tsc/lib/get-custom-transformers-factory.js +0 -0
- /package/{src → dist/src}/executors/tsc/lib/get-task-options.js +0 -0
- /package/{src → dist/src}/executors/tsc/lib/get-tsconfig.js +0 -0
- /package/{src → dist/src}/executors/tsc/lib/index.js +0 -0
- /package/{src → dist/src}/executors/tsc/lib/normalize-options.js +0 -0
- /package/{src → dist/src}/executors/tsc/lib/typescript-diagnostic-reporters.js +0 -0
- /package/{src → dist/src}/executors/tsc/schema.json +0 -0
- /package/{src → dist/src}/executors/tsc/tsc.batch-impl.js +0 -0
- /package/{src → dist/src}/executors/tsc/tsc.impl.js +0 -0
- /package/{src → dist/src}/executors/verdaccio/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/verdaccio/schema.json +0 -0
- /package/{src → dist/src}/executors/verdaccio/verdaccio.impl.js +0 -0
- /package/{src → dist/src}/generators/convert-to-swc/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/convert-to-swc/schema.json +0 -0
- /package/{src → dist/src}/generators/init/files/non-ts-solution/__fileName__ +0 -0
- /package/{src → dist/src}/generators/init/files/ts-solution/tsconfig.base.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/init/files/ts-solution/tsconfig.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/init/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/library/files/jest-config/jest.config.__ext__ +0 -0
- /package/{src → dist/src}/generators/library/files/lib/src/index.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/library/files/lib/src/lib/__fileName__.spec.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/library/files/lib/src/lib/__fileName__.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/library/files/readme/README.md +0 -0
- /package/{src → dist/src}/generators/library/files/tsconfig-lib/non-ts-solution/tsconfig.lib.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/library/files/tsconfig-lib/ts-solution/tsconfig.lib.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/library/schema.json +0 -0
- /package/{src → dist/src}/generators/library/utils/add-release-config.js +0 -0
- /package/{src/utils/typescript/types.js → dist/src/generators/release-version/release-version.js} +0 -0
- /package/{src → dist/src}/generators/setup-build/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/setup-build/schema.json +0 -0
- /package/{src → dist/src}/generators/setup-prettier/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/setup-prettier/schema.json +0 -0
- /package/{src → dist/src}/generators/setup-verdaccio/files/config.yml +0 -0
- /package/{src → dist/src}/generators/setup-verdaccio/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/setup-verdaccio/schema.json +0 -0
- /package/{src → dist/src}/generators/typescript-sync/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/typescript-sync/schema.json +0 -0
- /package/{src → dist/src}/index.js +0 -0
- /package/{src → dist/src}/migrations/update-21-5-0/migrate-development-custom-condition.js +0 -0
- /package/{src → dist/src}/migrations/update-22-1-0/remove-redundant-ts-project-references.js +0 -0
- /package/{src → dist/src}/plugins/jest/start-local-registry.js +0 -0
- /package/{src → dist/src}/release/utils/semver.js +0 -0
- /package/{src → dist/src}/release/utils/update-lock-file.js +0 -0
- /package/{src → dist/src}/utils/add-babel-inputs.js +0 -0
- /package/{src → dist/src}/utils/add-local-registry-scripts.js +0 -0
- /package/{src → dist/src}/utils/assets/assets.js +0 -0
- /package/{src → dist/src}/utils/assets/copy-assets-handler.js +0 -0
- /package/{src → dist/src}/utils/assets/index.js +0 -0
- /package/{src → dist/src}/utils/assets/normalize-assets.js +0 -0
- /package/{src → dist/src}/utils/buildable-libs-utils.js +0 -0
- /package/{src → dist/src}/utils/check-dependencies.js +0 -0
- /package/{src → dist/src}/utils/code-frames/highlight.js +0 -0
- /package/{src → dist/src}/utils/code-frames/identifiers.js +0 -0
- /package/{src → dist/src}/utils/compiler-helper-dependency.js +0 -0
- /package/{src → dist/src}/utils/find-npm-dependencies.js +0 -0
- /package/{src → dist/src}/utils/generate-globs.js +0 -0
- /package/{src → dist/src}/utils/get-import-path.js +0 -0
- /package/{src → dist/src}/utils/get-main-file-dir.js +0 -0
- /package/{src → dist/src}/utils/is-locally-linked-package-version.js +0 -0
- /package/{src → dist/src}/utils/is-valid-variable.js +0 -0
- /package/{src → dist/src}/utils/npm-config.js +0 -0
- /package/{src → dist/src}/utils/package-json/create-entry-points.js +0 -0
- /package/{src → dist/src}/utils/package-json/get-npm-scope.js +0 -0
- /package/{src → dist/src}/utils/package-json/index.js +0 -0
- /package/{src → dist/src}/utils/package-json/sort-fields.js +0 -0
- /package/{src → dist/src}/utils/package-json/update-package-json.js +0 -0
- /package/{src → dist/src}/utils/package-manager-workspaces.js +0 -0
- /package/{src → dist/src}/utils/schema.d.ts +0 -0
- /package/{src → dist/src}/utils/strip-glob-to-base-dir.js +0 -0
- /package/{src → dist/src}/utils/swc/add-swc-config.js +0 -0
- /package/{src → dist/src}/utils/swc/get-swcrc-path.js +0 -0
- /package/{src → dist/src}/utils/typescript/__mocks__/function-after-declarations-plugin.js +0 -0
- /package/{src → dist/src}/utils/typescript/__mocks__/function-after-plugin.js +0 -0
- /package/{src → dist/src}/utils/typescript/__mocks__/function-direct-export.js +0 -0
- /package/{src → dist/src}/utils/typescript/__mocks__/function-multiple-hooks.js +0 -0
- /package/{src → dist/src}/utils/typescript/__mocks__/plugin-a.js +0 -0
- /package/{src → dist/src}/utils/typescript/__mocks__/plugin-b.js +0 -0
- /package/{src → dist/src}/utils/typescript/add-tslib-dependencies.js +0 -0
- /package/{src → dist/src}/utils/typescript/ast-utils.js +0 -0
- /package/{src → dist/src}/utils/typescript/configuration.js +0 -0
- /package/{src → dist/src}/utils/typescript/create-ts-config.js +0 -0
- /package/{src → dist/src}/utils/typescript/ensure-typescript.js +0 -0
- /package/{src → dist/src}/utils/typescript/get-source-nodes.js +0 -0
- /package/{src → dist/src}/utils/typescript/load-ts-transformers.js +0 -0
- /package/{src → dist/src}/utils/typescript/plugin.js +0 -0
- /package/{src → dist/src}/utils/typescript/print-diagnostics.js +0 -0
- /package/{src → dist/src}/utils/typescript/raw-tsconfig.js +0 -0
- /package/{src → dist/src}/utils/typescript/ts-config.js +0 -0
- /package/{src → dist/src}/utils/typescript/ts-solution-setup.js +0 -0
- /package/{src → dist/src}/utils/watch-for-single-file-changes.js +0 -0
- /package/{typescript.js → dist/typescript.js} +0 -0
|
@@ -2,41 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.initGenerator = initGenerator;
|
|
4
4
|
exports.initGeneratorInternal = initGeneratorInternal;
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
5
6
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
-
const add_plugin_1 = require("@nx/devkit/src/utils/add-plugin");
|
|
7
|
-
const semver_1 = require("@nx/devkit/src/utils/semver");
|
|
8
|
-
const package_json_1 = require("nx/src/utils/package-json");
|
|
9
7
|
const path_1 = require("path");
|
|
10
|
-
const semver_2 = require("semver");
|
|
11
8
|
const plugin_1 = require("../../plugins/typescript/plugin");
|
|
9
|
+
const assert_supported_typescript_version_1 = require("../../utils/assert-supported-typescript-version");
|
|
12
10
|
const prettier_1 = require("../../utils/prettier");
|
|
13
11
|
const ts_config_1 = require("../../utils/typescript/ts-config");
|
|
14
12
|
const ts_solution_setup_1 = require("../../utils/typescript/ts-solution-setup");
|
|
15
13
|
const versions_1 = require("../../utils/versions");
|
|
16
|
-
async function getInstalledTypescriptVersion(tree) {
|
|
17
|
-
const tsVersionInRootPackageJson = (0, devkit_1.getDependencyVersionFromPackageJson)(tree, 'typescript');
|
|
18
|
-
if (!tsVersionInRootPackageJson) {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
if ((0, semver_2.valid)(tsVersionInRootPackageJson)) {
|
|
22
|
-
// it's a pinned version, return it
|
|
23
|
-
return tsVersionInRootPackageJson;
|
|
24
|
-
}
|
|
25
|
-
// it's a version range, check whether the installed version matches it
|
|
26
|
-
try {
|
|
27
|
-
const tsPackageJson = (0, package_json_1.readModulePackageJson)('typescript').packageJson;
|
|
28
|
-
const installedTsVersion = tsPackageJson.devDependencies?.['typescript'] ??
|
|
29
|
-
tsPackageJson.dependencies?.['typescript'];
|
|
30
|
-
// the installed version matches the package.json version range
|
|
31
|
-
if (installedTsVersion &&
|
|
32
|
-
(0, semver_2.satisfies)(installedTsVersion, tsVersionInRootPackageJson)) {
|
|
33
|
-
return installedTsVersion;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
finally {
|
|
37
|
-
return (0, semver_1.checkAndCleanWithSemver)(tree, 'typescript', tsVersionInRootPackageJson);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
14
|
async function initGenerator(tree, schema) {
|
|
41
15
|
schema.addTsPlugin ??= false;
|
|
42
16
|
const isUsingNewTsSetup = schema.addTsPlugin || (0, ts_solution_setup_1.isUsingTsSolutionSetup)(tree);
|
|
@@ -47,6 +21,7 @@ async function initGenerator(tree, schema) {
|
|
|
47
21
|
});
|
|
48
22
|
}
|
|
49
23
|
async function initGeneratorInternal(tree, schema) {
|
|
24
|
+
(0, assert_supported_typescript_version_1.assertSupportedTypescriptVersion)(tree);
|
|
50
25
|
const tasks = [];
|
|
51
26
|
const nxJson = (0, devkit_1.readNxJson)(tree);
|
|
52
27
|
schema.addPlugin ??=
|
|
@@ -54,7 +29,7 @@ async function initGeneratorInternal(tree, schema) {
|
|
|
54
29
|
nxJson.useInferencePlugins !== false;
|
|
55
30
|
schema.addTsPlugin ??= schema.addPlugin;
|
|
56
31
|
if (schema.addTsPlugin) {
|
|
57
|
-
await (0,
|
|
32
|
+
await (0, internal_1.addPlugin)(tree, await (0, devkit_1.createProjectGraphAsync)(), '@nx/js/typescript', plugin_1.createNodesV2, {
|
|
58
33
|
typecheck: [
|
|
59
34
|
{ targetName: 'typecheck' },
|
|
60
35
|
{ targetName: 'tsc:typecheck' },
|
|
@@ -100,20 +75,18 @@ async function initGeneratorInternal(tree, schema) {
|
|
|
100
75
|
}
|
|
101
76
|
const devDependencies = {
|
|
102
77
|
'@nx/js': versions_1.nxVersion,
|
|
103
|
-
//
|
|
104
|
-
//
|
|
105
|
-
|
|
106
|
-
|
|
78
|
+
// Required by SWC-compiled output (decorators -> @swc/helpers/_/_ts_decorate
|
|
79
|
+
// imports). The default @nx/jest setup transforms with @swc/jest, so any
|
|
80
|
+
// workspace using decorators (NestJS, Angular, etc.) needs @swc/helpers
|
|
81
|
+
// resolvable at test time. Cheap to ship and avoids per-generator install.
|
|
107
82
|
'@swc/helpers': versions_1.swcHelpersVersion,
|
|
108
83
|
};
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
devDependencies['typescript'] = versions_1.typescriptVersion;
|
|
116
|
-
}
|
|
84
|
+
// @swc-node/register and @swc/core are no longer installed by init - native
|
|
85
|
+
// Node.js type stripping handles .ts config loading on Node 23+ (or 22.6+
|
|
86
|
+
// with --experimental-strip-types). loadTsFile registers swc/ts-node lazily
|
|
87
|
+
// when a config uses syntax native strip can't handle.
|
|
88
|
+
if (!schema.js) {
|
|
89
|
+
devDependencies['typescript'] = versions_1.typescriptVersion;
|
|
117
90
|
}
|
|
118
91
|
if (schema.formatter === 'prettier') {
|
|
119
92
|
const prettierTask = (0, prettier_1.generatePrettierSetup)(tree, {
|
|
@@ -131,7 +104,7 @@ async function initGeneratorInternal(tree, schema) {
|
|
|
131
104
|
}
|
|
132
105
|
}
|
|
133
106
|
const installTask = !schema.skipPackageJson
|
|
134
|
-
? (0, devkit_1.addDependenciesToPackageJson)(tree, {}, devDependencies, undefined, schema.keepExistingVersions)
|
|
107
|
+
? (0, devkit_1.addDependenciesToPackageJson)(tree, {}, devDependencies, undefined, schema.keepExistingVersions ?? true)
|
|
135
108
|
: () => { };
|
|
136
109
|
tasks.push(installTask);
|
|
137
110
|
if (!schema.skipPackageJson &&
|
|
@@ -5,4 +5,3 @@ export declare function libraryGeneratorInternal(tree: Tree, schema: LibraryGene
|
|
|
5
5
|
export type AddLintOptions = Pick<NormalizedLibraryGeneratorOptions, 'name' | 'linter' | 'projectRoot' | 'unitTestRunner' | 'js' | 'setParserOptionsProject' | 'rootProject' | 'bundler' | 'addPlugin' | 'isUsingTsSolutionConfig'>;
|
|
6
6
|
export declare function addLint(tree: Tree, options: AddLintOptions): Promise<GeneratorCallback>;
|
|
7
7
|
export default libraryGenerator;
|
|
8
|
-
//# sourceMappingURL=library.d.ts.map
|
|
@@ -4,12 +4,10 @@ exports.libraryGenerator = libraryGenerator;
|
|
|
4
4
|
exports.libraryGeneratorInternal = libraryGeneratorInternal;
|
|
5
5
|
exports.addLint = addLint;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
7
8
|
const devkit_1 = require("@nx/devkit");
|
|
8
|
-
const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
|
|
9
|
-
const prompt_1 = require("@nx/devkit/src/generators/prompt");
|
|
10
|
-
const target_defaults_utils_1 = require("@nx/devkit/src/generators/target-defaults-utils");
|
|
11
|
-
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
12
9
|
const path_1 = require("path");
|
|
10
|
+
const assert_supported_typescript_version_1 = require("../../utils/assert-supported-typescript-version");
|
|
13
11
|
const generator_prompts_1 = require("../../utils/generator-prompts");
|
|
14
12
|
const sort_fields_1 = require("../../utils/package-json/sort-fields");
|
|
15
13
|
const update_package_json_1 = require("../../utils/package-json/update-package-json");
|
|
@@ -33,6 +31,7 @@ async function libraryGenerator(tree, schema) {
|
|
|
33
31
|
});
|
|
34
32
|
}
|
|
35
33
|
async function libraryGeneratorInternal(tree, schema) {
|
|
34
|
+
(0, assert_supported_typescript_version_1.assertSupportedTypescriptVersion)(tree);
|
|
36
35
|
const tasks = [];
|
|
37
36
|
const addTsPlugin = (0, ts_solution_setup_1.shouldConfigureTsSolutionSetup)(tree, schema.addPlugin);
|
|
38
37
|
tasks.push(await (0, init_1.default)(tree, {
|
|
@@ -153,7 +152,7 @@ async function libraryGeneratorInternal(tree, schema) {
|
|
|
153
152
|
tasks.push(() => (0, devkit_1.installPackagesTask)(tree, true));
|
|
154
153
|
}
|
|
155
154
|
tasks.push(() => {
|
|
156
|
-
(0,
|
|
155
|
+
(0, internal_1.logShowProjectCommand)(options.name);
|
|
157
156
|
});
|
|
158
157
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
159
158
|
}
|
|
@@ -177,7 +176,7 @@ async function configureProject(tree, options) {
|
|
|
177
176
|
options.bundler === 'tsc'))) {
|
|
178
177
|
const outputPath = getOutputPath(options);
|
|
179
178
|
const executor = getBuildExecutor(options.bundler);
|
|
180
|
-
(0,
|
|
179
|
+
(0, internal_1.addBuildTargetDefaults)(tree, executor);
|
|
181
180
|
projectConfiguration.targets.build = {
|
|
182
181
|
executor,
|
|
183
182
|
outputs: ['{options.outputPath}'],
|
|
@@ -267,7 +266,7 @@ async function addLint(tree, options) {
|
|
|
267
266
|
});
|
|
268
267
|
const { addOverrideToLintConfig, lintConfigHasOverride, isEslintConfigSupported, updateOverrideInLintConfig, addIgnoresToLintConfig,
|
|
269
268
|
// nx-ignore-next-line
|
|
270
|
-
} = require('@nx/eslint/
|
|
269
|
+
} = require('@nx/eslint/internal');
|
|
271
270
|
// if config is not supported, we don't need to do anything
|
|
272
271
|
if (!isEslintConfigSupported(tree)) {
|
|
273
272
|
return task;
|
|
@@ -318,7 +317,12 @@ async function addLint(tree, options) {
|
|
|
318
317
|
ignoredFiles.add('{projectRoot}/esbuild.config.{js,ts,mjs,mts}');
|
|
319
318
|
}
|
|
320
319
|
if (options.unitTestRunner === 'vitest') {
|
|
321
|
-
|
|
320
|
+
// When bundler is 'vite', vite.config holds both build and test config
|
|
321
|
+
// (added above). Otherwise, @nx/vitest:configuration generates a
|
|
322
|
+
// dedicated vitest.config file for non-framework JS libraries.
|
|
323
|
+
ignoredFiles.add(options.bundler === 'vite'
|
|
324
|
+
? '{projectRoot}/vite.config.{js,ts,mjs,mts}'
|
|
325
|
+
: '{projectRoot}/vitest.config.{js,ts,mjs,mts}');
|
|
322
326
|
}
|
|
323
327
|
if (ignoredFiles.size) {
|
|
324
328
|
ruleOptions.ignoredFiles = Array.from(ignoredFiles);
|
|
@@ -535,7 +539,7 @@ function replaceJestConfig(tree, options) {
|
|
|
535
539
|
});
|
|
536
540
|
}
|
|
537
541
|
async function normalizeOptions(tree, options) {
|
|
538
|
-
await (0,
|
|
542
|
+
await (0, internal_1.ensureRootProjectName)(options, 'library');
|
|
539
543
|
const nxJson = (0, devkit_1.readNxJson)(tree);
|
|
540
544
|
options.addPlugin ??=
|
|
541
545
|
process.env.NX_ADD_PLUGINS !== 'false' &&
|
|
@@ -544,7 +548,7 @@ async function normalizeOptions(tree, options) {
|
|
|
544
548
|
const hasPlugin = (0, ts_solution_setup_1.isUsingTypeScriptPlugin)(tree);
|
|
545
549
|
const isUsingTsSolutionConfig = (0, ts_solution_setup_1.isUsingTsSolutionSetup)(tree);
|
|
546
550
|
if (isUsingTsSolutionConfig) {
|
|
547
|
-
options.unitTestRunner ??= await (0,
|
|
551
|
+
options.unitTestRunner ??= await (0, internal_1.promptWhenInteractive)({
|
|
548
552
|
type: 'autocomplete',
|
|
549
553
|
name: 'unitTestRunner',
|
|
550
554
|
message: `Which unit test runner would you like to use?`,
|
|
@@ -553,7 +557,7 @@ async function normalizeOptions(tree, options) {
|
|
|
553
557
|
}, { unitTestRunner: 'none' }).then(({ unitTestRunner }) => unitTestRunner);
|
|
554
558
|
}
|
|
555
559
|
else {
|
|
556
|
-
options.unitTestRunner ??= await (0,
|
|
560
|
+
options.unitTestRunner ??= await (0, internal_1.promptWhenInteractive)({
|
|
557
561
|
type: 'autocomplete',
|
|
558
562
|
name: 'unitTestRunner',
|
|
559
563
|
message: `Which unit test runner would you like to use?`,
|
|
@@ -614,7 +618,7 @@ async function normalizeOptions(tree, options) {
|
|
|
614
618
|
(options.skipTypeCheck == null || !isUsingTsSolutionConfig)) {
|
|
615
619
|
options.skipTypeCheck = false;
|
|
616
620
|
}
|
|
617
|
-
const { projectName, names: projectNames, projectRoot, importPath, } = await (0,
|
|
621
|
+
const { projectName, names: projectNames, projectRoot, importPath, } = await (0, internal_1.determineProjectNameAndRootOptions)(tree, {
|
|
618
622
|
name: options.name,
|
|
619
623
|
projectType: 'library',
|
|
620
624
|
directory: options.directory,
|
|
@@ -652,7 +656,7 @@ function addProjectDependencies(tree, options) {
|
|
|
652
656
|
'@types/node': versions_1.typesNodeVersion,
|
|
653
657
|
esbuild: (0, devkit_1.getDependencyVersionFromPackageJson)(tree, 'esbuild') ??
|
|
654
658
|
versions_1.esbuildVersion,
|
|
655
|
-
});
|
|
659
|
+
}, undefined, true);
|
|
656
660
|
}
|
|
657
661
|
else if (options.bundler == 'rollup') {
|
|
658
662
|
const { dependencies, devDependencies } = (0, add_swc_dependencies_1.getSwcDependencies)();
|
|
@@ -660,17 +664,17 @@ function addProjectDependencies(tree, options) {
|
|
|
660
664
|
...devDependencies,
|
|
661
665
|
'@nx/rollup': versions_1.nxVersion,
|
|
662
666
|
'@types/node': versions_1.typesNodeVersion,
|
|
663
|
-
});
|
|
667
|
+
}, undefined, true);
|
|
664
668
|
}
|
|
665
669
|
else if (options.bundler === 'tsc') {
|
|
666
|
-
return (0, devkit_1.addDependenciesToPackageJson)(tree, {}, { tslib: versions_1.tsLibVersion, '@types/node': versions_1.typesNodeVersion });
|
|
670
|
+
return (0, devkit_1.addDependenciesToPackageJson)(tree, {}, { tslib: versions_1.tsLibVersion, '@types/node': versions_1.typesNodeVersion }, undefined, true);
|
|
667
671
|
}
|
|
668
672
|
else if (options.bundler === 'swc') {
|
|
669
673
|
const { dependencies, devDependencies } = (0, add_swc_dependencies_1.getSwcDependencies)();
|
|
670
|
-
return (0, devkit_1.addDependenciesToPackageJson)(tree, { ...dependencies }, { ...devDependencies, '@types/node': versions_1.typesNodeVersion });
|
|
674
|
+
return (0, devkit_1.addDependenciesToPackageJson)(tree, { ...dependencies }, { ...devDependencies, '@types/node': versions_1.typesNodeVersion }, undefined, true);
|
|
671
675
|
}
|
|
672
676
|
else {
|
|
673
|
-
return (0, devkit_1.addDependenciesToPackageJson)(tree, {}, { '@types/node': versions_1.typesNodeVersion });
|
|
677
|
+
return (0, devkit_1.addDependenciesToPackageJson)(tree, {}, { '@types/node': versions_1.typesNodeVersion }, undefined, true);
|
|
674
678
|
}
|
|
675
679
|
// Vite is being installed in the next step if bundler is vite
|
|
676
680
|
// noop
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ProjectNameAndRootOptions } from '@nx/devkit/
|
|
1
|
+
import type { ProjectNameAndRootOptions } from '@nx/devkit/internal';
|
|
2
2
|
// nx-ignore-next-line
|
|
3
3
|
const { Linter, LinterType } = require('@nx/eslint'); // use require to import to avoid circular dependency
|
|
4
4
|
import type { ProjectPackageManagerWorkspaceState } from '../../utils/package-manager-workspaces';
|
|
@@ -9,4 +9,3 @@ export declare function addReleaseConfigForTsSolution(tree: Tree, projectName: s
|
|
|
9
9
|
*/
|
|
10
10
|
export declare function addReleaseConfigForNonTsSolution(tree: Tree, projectName: string, projectConfiguration: ProjectConfiguration, defaultOutputDirectory?: string): Promise<ProjectConfiguration>;
|
|
11
11
|
export declare function releaseTasks(tree: Tree): Promise<GeneratorCallback>;
|
|
12
|
-
//# sourceMappingURL=add-release-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,4 +2,3 @@ import { type GeneratorCallback, type Tree } from '@nx/devkit';
|
|
|
2
2
|
import { SetupBuildGeneratorSchema } from './schema';
|
|
3
3
|
export declare function setupBuildGenerator(tree: Tree, options: SetupBuildGeneratorSchema): Promise<GeneratorCallback>;
|
|
4
4
|
export default setupBuildGenerator;
|
|
5
|
-
//# sourceMappingURL=generator.d.ts.map
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.setupBuildGenerator = setupBuildGenerator;
|
|
4
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const target_defaults_utils_1 = require("@nx/devkit/src/generators/target-defaults-utils");
|
|
6
6
|
const posix_1 = require("node:path/posix");
|
|
7
7
|
const devkit_internals_1 = require("nx/src/devkit-internals");
|
|
8
|
+
const assert_supported_typescript_version_1 = require("../../utils/assert-supported-typescript-version");
|
|
8
9
|
const get_import_path_1 = require("../../utils/get-import-path");
|
|
9
10
|
const update_package_json_1 = require("../../utils/package-json/update-package-json");
|
|
10
11
|
const add_swc_config_1 = require("../../utils/swc/add-swc-config");
|
|
@@ -16,6 +17,7 @@ const ts_solution_setup_1 = require("../../utils/typescript/ts-solution-setup");
|
|
|
16
17
|
const versions_1 = require("../../utils/versions");
|
|
17
18
|
let ts;
|
|
18
19
|
async function setupBuildGenerator(tree, options) {
|
|
20
|
+
(0, assert_supported_typescript_version_1.assertSupportedTypescriptVersion)(tree);
|
|
19
21
|
const tasks = [];
|
|
20
22
|
const project = (0, devkit_1.readProjectConfiguration)(tree, options.project);
|
|
21
23
|
options.buildTarget ??= 'build';
|
|
@@ -127,7 +129,7 @@ async function setupBuildGenerator(tree, options) {
|
|
|
127
129
|
updatePackageJsonForTsc(tree, options, project);
|
|
128
130
|
}
|
|
129
131
|
else {
|
|
130
|
-
(0,
|
|
132
|
+
(0, internal_1.addBuildTargetDefaults)(tree, '@nx/js:tsc');
|
|
131
133
|
const outputPath = (0, devkit_1.joinPathFragments)('dist', project.root);
|
|
132
134
|
project.targets[options.buildTarget] = {
|
|
133
135
|
executor: `@nx/js:tsc`,
|
|
@@ -144,7 +146,7 @@ async function setupBuildGenerator(tree, options) {
|
|
|
144
146
|
break;
|
|
145
147
|
}
|
|
146
148
|
case 'swc': {
|
|
147
|
-
(0,
|
|
149
|
+
(0, internal_1.addBuildTargetDefaults)(tree, '@nx/js:swc');
|
|
148
150
|
const outputPath = isTsSolutionSetup
|
|
149
151
|
? (0, devkit_1.joinPathFragments)(project.root, 'dist')
|
|
150
152
|
: (0, devkit_1.joinPathFragments)('dist', project.root);
|
|
@@ -247,7 +249,5 @@ function updatePackageJson(tree, projectName, projectRoot, main, outputPath, roo
|
|
|
247
249
|
function mergeTargetDefaults(tree, project, buildTarget) {
|
|
248
250
|
const nxJson = (0, devkit_1.readNxJson)(tree);
|
|
249
251
|
const projectTarget = project.targets[buildTarget];
|
|
250
|
-
return (0, devkit_internals_1.mergeTargetConfigurations)(projectTarget, (projectTarget.executor
|
|
251
|
-
? nxJson.targetDefaults?.[projectTarget.executor]
|
|
252
|
-
: undefined) ?? nxJson.targetDefaults?.[buildTarget]);
|
|
252
|
+
return (0, devkit_internals_1.mergeTargetConfigurations)(projectTarget, (0, internal_1.readTargetDefaultsForTarget)(buildTarget, nxJson.targetDefaults, projectTarget.executor));
|
|
253
253
|
}
|
|
@@ -2,4 +2,3 @@ import { type GeneratorCallback, type Tree } from '@nx/devkit';
|
|
|
2
2
|
import type { GeneratorOptions } from './schema';
|
|
3
3
|
export declare function setupPrettierGenerator(tree: Tree, options: GeneratorOptions): Promise<GeneratorCallback>;
|
|
4
4
|
export default setupPrettierGenerator;
|
|
5
|
-
//# sourceMappingURL=generator.d.ts.map
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.setupPrettierGenerator = setupPrettierGenerator;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const assert_supported_typescript_version_1 = require("../../utils/assert-supported-typescript-version");
|
|
5
6
|
const prettier_1 = require("../../utils/prettier");
|
|
6
7
|
const versions_1 = require("../../utils/versions");
|
|
7
8
|
async function setupPrettierGenerator(tree, options) {
|
|
9
|
+
(0, assert_supported_typescript_version_1.assertSupportedTypescriptVersion)(tree);
|
|
8
10
|
const prettierTask = (0, prettier_1.generatePrettierSetup)(tree, {
|
|
9
11
|
skipPackageJson: options.skipPackageJson,
|
|
10
12
|
});
|
|
@@ -2,4 +2,3 @@ import { Tree } from '@nx/devkit';
|
|
|
2
2
|
import { SetupVerdaccioGeneratorSchema } from './schema';
|
|
3
3
|
export declare function setupVerdaccio(tree: Tree, options: SetupVerdaccioGeneratorSchema): Promise<import("@nx/devkit").GeneratorCallback>;
|
|
4
4
|
export default setupVerdaccio;
|
|
5
|
-
//# sourceMappingURL=generator.d.ts.map
|
|
@@ -4,10 +4,12 @@ exports.setupVerdaccio = setupVerdaccio;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
6
|
const path = tslib_1.__importStar(require("path"));
|
|
7
|
+
const assert_supported_typescript_version_1 = require("../../utils/assert-supported-typescript-version");
|
|
7
8
|
const ts_solution_setup_1 = require("../../utils/typescript/ts-solution-setup");
|
|
8
9
|
const versions_1 = require("../../utils/versions");
|
|
9
10
|
const npm_config_1 = require("../../utils/npm-config");
|
|
10
11
|
async function setupVerdaccio(tree, options) {
|
|
12
|
+
(0, assert_supported_typescript_version_1.assertSupportedTypescriptVersion)(tree);
|
|
11
13
|
if (!tree.exists('.verdaccio/config.yml')) {
|
|
12
14
|
(0, devkit_1.generateFiles)(tree, path.join(__dirname, 'files'), '.verdaccio', {
|
|
13
15
|
npmUplinkRegistry: (await (0, npm_config_1.getNpmRegistry)(tree.root)) ?? 'https://registry.npmjs.org',
|
|
@@ -54,6 +56,6 @@ async function setupVerdaccio(tree, options) {
|
|
|
54
56
|
if (!options.skipFormat) {
|
|
55
57
|
await (0, devkit_1.formatFiles)(tree);
|
|
56
58
|
}
|
|
57
|
-
return (0, devkit_1.addDependenciesToPackageJson)(tree, {}, { verdaccio: versions_1.verdaccioVersion });
|
|
59
|
+
return (0, devkit_1.addDependenciesToPackageJson)(tree, {}, { verdaccio: versions_1.verdaccioVersion }, undefined, true);
|
|
58
60
|
}
|
|
59
61
|
exports.default = setupVerdaccio;
|
|
@@ -2,4 +2,3 @@ import { type Tree } from '@nx/devkit';
|
|
|
2
2
|
import { type SyncGeneratorResult } from 'nx/src/utils/sync-generators';
|
|
3
3
|
export declare function syncGenerator(tree: Tree): Promise<SyncGeneratorResult>;
|
|
4
4
|
export default syncGenerator;
|
|
5
|
-
//# sourceMappingURL=typescript-sync.d.ts.map
|
|
@@ -8,6 +8,7 @@ const jsonc_parser_1 = require("jsonc-parser");
|
|
|
8
8
|
const posix_1 = require("node:path/posix");
|
|
9
9
|
const sync_generators_1 = require("nx/src/utils/sync-generators");
|
|
10
10
|
const ts = tslib_1.__importStar(require("typescript"));
|
|
11
|
+
const assert_supported_typescript_version_1 = require("../../utils/assert-supported-typescript-version");
|
|
11
12
|
const COMMON_RUNTIME_TS_CONFIG_FILE_NAMES = [
|
|
12
13
|
'tsconfig.app.json',
|
|
13
14
|
'tsconfig.lib.json',
|
|
@@ -17,6 +18,7 @@ const COMMON_RUNTIME_TS_CONFIG_FILE_NAMES = [
|
|
|
17
18
|
'tsconfig.runtime.json',
|
|
18
19
|
];
|
|
19
20
|
async function syncGenerator(tree) {
|
|
21
|
+
(0, assert_supported_typescript_version_1.assertSupportedTypescriptVersion)(tree);
|
|
20
22
|
// Ensure that the plugin has been wired up in nx.json
|
|
21
23
|
const nxJson = (0, devkit_1.readNxJson)(tree);
|
|
22
24
|
const tsconfigInfoCaches = {
|
|
@@ -18,4 +18,3 @@ export { setupVerdaccio } from './generators/setup-verdaccio/generator';
|
|
|
18
18
|
export { isValidVariable } from './utils/is-valid-variable';
|
|
19
19
|
export { createLockFile, getLockFileName, } from 'nx/src/plugins/js/lock-file/lock-file';
|
|
20
20
|
export { createPackageJson } from 'nx/src/plugins/js/package-json/create-package-json';
|
|
21
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Backwards-compatibility shim for `@nx/js/src/internal`.
|
|
3
|
+
*
|
|
4
|
+
* The `./src/internal` subpath was removed in nx 23 — the canonical path is
|
|
5
|
+
* now `@nx/js/internal`. Additionally, `getRootTsConfigPath` moved to the
|
|
6
|
+
* main `@nx/js` entry.
|
|
7
|
+
*
|
|
8
|
+
* This shim keeps `@nx/conformance@4` / `@nx/conformance@5.0.x` working on
|
|
9
|
+
* nx 23. Both packages do:
|
|
10
|
+
* `const { getRootTsConfigPath } = await import('@nx/js/src/internal')`
|
|
11
|
+
* `const { registerTsProject } = await import('@nx/js/src/internal')`
|
|
12
|
+
*
|
|
13
|
+
* Do NOT add new exports here. Consumers should migrate to:
|
|
14
|
+
* - `@nx/js/internal` for `registerTsProject` (and other internal helpers)
|
|
15
|
+
* - `@nx/js` for `getRootTsConfigPath`
|
|
16
|
+
*/
|
|
17
|
+
export { registerTsProject } from '../internal';
|
|
18
|
+
export { getRootTsConfigPath } from './utils/typescript/ts-config';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Backwards-compatibility shim for `@nx/js/src/internal`.
|
|
4
|
+
*
|
|
5
|
+
* The `./src/internal` subpath was removed in nx 23 — the canonical path is
|
|
6
|
+
* now `@nx/js/internal`. Additionally, `getRootTsConfigPath` moved to the
|
|
7
|
+
* main `@nx/js` entry.
|
|
8
|
+
*
|
|
9
|
+
* This shim keeps `@nx/conformance@4` / `@nx/conformance@5.0.x` working on
|
|
10
|
+
* nx 23. Both packages do:
|
|
11
|
+
* `const { getRootTsConfigPath } = await import('@nx/js/src/internal')`
|
|
12
|
+
* `const { registerTsProject } = await import('@nx/js/src/internal')`
|
|
13
|
+
*
|
|
14
|
+
* Do NOT add new exports here. Consumers should migrate to:
|
|
15
|
+
* - `@nx/js/internal` for `registerTsProject` (and other internal helpers)
|
|
16
|
+
* - `@nx/js` for `getRootTsConfigPath`
|
|
17
|
+
*/
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.getRootTsConfigPath = exports.registerTsProject = void 0;
|
|
20
|
+
// registerTsProject lives in the new ./internal entry
|
|
21
|
+
var internal_1 = require("../internal");
|
|
22
|
+
Object.defineProperty(exports, "registerTsProject", { enumerable: true, get: function () { return internal_1.registerTsProject; } });
|
|
23
|
+
// getRootTsConfigPath moved to the main @nx/js entry in nx 23
|
|
24
|
+
var ts_config_1 = require("./utils/typescript/ts-config");
|
|
25
|
+
Object.defineProperty(exports, "getRootTsConfigPath", { enumerable: true, get: function () { return ts_config_1.getRootTsConfigPath; } });
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
#### Migrate `development` custom condition to unique workspace-specific name
|
|
2
|
+
|
|
3
|
+
Replace the TypeScript `development` custom condition with a unique workspace-specific name to avoid conflicts when consuming packages in other workspaces.
|
|
4
|
+
|
|
5
|
+
#### Examples
|
|
6
|
+
|
|
7
|
+
The migration will update the custom condition name in both `tsconfig.base.json` and all workspace package.json files that use the `development` custom condition:
|
|
8
|
+
|
|
9
|
+
##### Before
|
|
10
|
+
|
|
11
|
+
```json title="tsconfig.base.json" {3}
|
|
12
|
+
{
|
|
13
|
+
"compilerOptions": {
|
|
14
|
+
"customConditions": ["development"]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
##### After
|
|
20
|
+
|
|
21
|
+
```json title="tsconfig.base.json" {3}
|
|
22
|
+
{
|
|
23
|
+
"compilerOptions": {
|
|
24
|
+
"customConditions": ["@my-org/source"] // assuming the root package.json name is `@my-org/source`
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The migration also updates `package.json` files that use the `development` condition in their `exports` field and point to TypeScript files:
|
|
30
|
+
|
|
31
|
+
##### Before
|
|
32
|
+
|
|
33
|
+
```json title="libs/my-lib/package.json" {5}
|
|
34
|
+
{
|
|
35
|
+
"name": "@myorg/my-lib",
|
|
36
|
+
"exports": {
|
|
37
|
+
".": {
|
|
38
|
+
"development": "./src/index.ts",
|
|
39
|
+
"default": "./dist/index.js"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
##### After
|
|
46
|
+
|
|
47
|
+
```json title="libs/my-lib/package.json" {5}
|
|
48
|
+
{
|
|
49
|
+
"name": "@myorg/my-lib",
|
|
50
|
+
"exports": {
|
|
51
|
+
".": {
|
|
52
|
+
"@my-org/source": "./src/index.ts",
|
|
53
|
+
"default": "./dist/index.js"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
If the custom condition is not set to `["development"]` or the `package.json`'s `exports` field doesn't point to TypeScript files, the migration will not modify the configuration:
|
|
60
|
+
|
|
61
|
+
##### Before
|
|
62
|
+
|
|
63
|
+
```json title="libs/my-lib/package.json" {5}
|
|
64
|
+
{
|
|
65
|
+
"name": "@myorg/my-lib",
|
|
66
|
+
"exports": {
|
|
67
|
+
".": {
|
|
68
|
+
"development": "./dist/index.js",
|
|
69
|
+
"default": "./dist/index.js"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
##### After
|
|
76
|
+
|
|
77
|
+
```json title="libs/my-lib/package.json" {5}
|
|
78
|
+
{
|
|
79
|
+
"name": "@myorg/my-lib",
|
|
80
|
+
"exports": {
|
|
81
|
+
".": {
|
|
82
|
+
"development": "./dist/index.js",
|
|
83
|
+
"default": "./dist/index.js"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.executors = void 0;
|
|
4
|
+
exports.default = default_1;
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
6
|
+
const devkit_1 = require("@nx/devkit");
|
|
7
|
+
exports.executors = ['@nx/js:swc', '@nx/js:tsc'];
|
|
8
|
+
async function default_1(tree) {
|
|
9
|
+
// update options from project configs
|
|
10
|
+
exports.executors.forEach((executor) => {
|
|
11
|
+
(0, internal_1.forEachExecutorOptions)(tree, executor, (options, project, target, configuration) => {
|
|
12
|
+
if (options.external === undefined &&
|
|
13
|
+
options.externalBuildTargets === undefined) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const projectConfiguration = (0, devkit_1.readProjectConfiguration)(tree, project);
|
|
17
|
+
if (configuration) {
|
|
18
|
+
const config = projectConfiguration.targets[target].configurations[configuration];
|
|
19
|
+
delete config.external;
|
|
20
|
+
delete config.externalBuildTargets;
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
const config = projectConfiguration.targets[target].options;
|
|
24
|
+
delete config.external;
|
|
25
|
+
delete config.externalBuildTargets;
|
|
26
|
+
if (!Object.keys(config).length) {
|
|
27
|
+
delete projectConfiguration.targets[target].options;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
(0, devkit_1.updateProjectConfiguration)(tree, project, projectConfiguration);
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
// update options from nx.json target defaults
|
|
34
|
+
const nxJson = (0, devkit_1.readNxJson)(tree);
|
|
35
|
+
if (!nxJson.targetDefaults) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const cleanEntry = (entry) => {
|
|
39
|
+
if (entry.options) {
|
|
40
|
+
delete entry.options.external;
|
|
41
|
+
delete entry.options.externalBuildTargets;
|
|
42
|
+
if (!Object.keys(entry.options).length) {
|
|
43
|
+
delete entry.options;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
Object.entries(entry.configurations ?? {}).forEach(([, config]) => {
|
|
47
|
+
delete config.external;
|
|
48
|
+
delete config.externalBuildTargets;
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
if (Array.isArray(nxJson.targetDefaults)) {
|
|
52
|
+
const remaining = [];
|
|
53
|
+
for (const entry of nxJson.targetDefaults) {
|
|
54
|
+
const matches = exports.executors.includes(entry.executor) || exports.executors.includes(entry.target);
|
|
55
|
+
if (!matches) {
|
|
56
|
+
remaining.push(entry);
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
cleanEntry(entry);
|
|
60
|
+
const meaningfulKeys = Object.keys(entry).filter((k) => k !== 'target' &&
|
|
61
|
+
k !== 'executor' &&
|
|
62
|
+
k !== 'projects' &&
|
|
63
|
+
k !== 'plugin');
|
|
64
|
+
if (meaningfulKeys.length === 0)
|
|
65
|
+
continue;
|
|
66
|
+
remaining.push(entry);
|
|
67
|
+
}
|
|
68
|
+
if (remaining.length === 0) {
|
|
69
|
+
delete nxJson.targetDefaults;
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
nxJson.targetDefaults = remaining;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
for (const [targetOrExecutor, targetConfig] of Object.entries(nxJson.targetDefaults)) {
|
|
77
|
+
if (!exports.executors.includes(targetOrExecutor) &&
|
|
78
|
+
!exports.executors.includes(targetConfig.executor)) {
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
cleanEntry(targetConfig);
|
|
82
|
+
if (!Object.keys(targetConfig).length ||
|
|
83
|
+
(Object.keys(targetConfig).length === 1 &&
|
|
84
|
+
Object.keys(targetConfig)[0] === 'executor')) {
|
|
85
|
+
delete nxJson.targetDefaults[targetOrExecutor];
|
|
86
|
+
}
|
|
87
|
+
if (!Object.keys(nxJson.targetDefaults).length) {
|
|
88
|
+
delete nxJson.targetDefaults;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
(0, devkit_1.updateNxJson)(tree, nxJson);
|
|
93
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
94
|
+
}
|