@nx/vite 23.0.0-beta.2 → 23.0.0-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/PLUGIN.md +33 -0
- package/{executors.d.ts → dist/executors.d.ts} +0 -3
- package/{executors.js → dist/executors.js} +1 -3
- package/{index.d.ts → dist/index.d.ts} +0 -3
- package/{index.js → dist/index.js} +1 -3
- package/{plugin.d.ts → dist/plugin.d.ts} +0 -1
- package/{plugins → dist/plugins}/nx-copy-assets.plugin.d.ts +1 -2
- package/{plugins → dist/plugins}/nx-copy-assets.plugin.js +2 -2
- package/{plugins → dist/plugins}/nx-tsconfig-paths.plugin.d.ts +0 -1
- package/{plugins → dist/plugins}/nx-tsconfig-paths.plugin.js +7 -8
- package/{plugins → dist/plugins}/nx-vite-build-coordination.plugin.d.ts +0 -1
- package/{plugins → dist/plugins}/rollup-replace-files.plugin.d.ts +0 -1
- package/{src → dist/src}/executors/build/build.impl.d.ts +0 -1
- package/{src → dist/src}/executors/build/build.impl.js +10 -40
- package/{src → dist/src}/executors/build/compat.d.ts +0 -1
- package/{src → dist/src}/executors/build/schema.json +1 -0
- package/{src → dist/src}/executors/dev-server/compat.d.ts +0 -1
- package/{src → dist/src}/executors/dev-server/dev-server.impl.d.ts +0 -1
- package/{src → dist/src}/executors/dev-server/dev-server.impl.js +5 -35
- package/{src → dist/src}/executors/dev-server/schema.json +1 -0
- package/{src → dist/src}/executors/preview-server/compat.d.ts +0 -1
- package/{src → dist/src}/executors/preview-server/preview-server.impl.d.ts +0 -1
- package/{src → dist/src}/executors/preview-server/preview-server.impl.js +5 -35
- package/{src → dist/src}/executors/preview-server/schema.json +1 -0
- package/{src → dist/src}/generators/configuration/configuration.d.ts +0 -1
- package/{src → dist/src}/generators/configuration/configuration.js +23 -11
- package/{src → dist/src}/generators/configuration/lib/convert-non-vite.d.ts +0 -1
- package/{src → dist/src}/generators/configuration/lib/convert-non-vite.js +2 -2
- package/{src → dist/src}/generators/convert-to-inferred/convert-to-inferred.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/convert-to-inferred.js +4 -12
- package/{src → dist/src}/generators/convert-to-inferred/lib/build-post-target-transformer.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/lib/build-post-target-transformer.js +2 -2
- package/{src → dist/src}/generators/convert-to-inferred/lib/preview-post-target-transformer.d.ts +1 -2
- package/{src → dist/src}/generators/convert-to-inferred/lib/serve-post-target-transformer.d.ts +1 -2
- package/{src → dist/src}/generators/convert-to-inferred/lib/utils.d.ts +0 -1
- package/{src → dist/src}/generators/init/init.d.ts +0 -1
- package/{src → dist/src}/generators/init/init.js +2 -3
- package/{src → dist/src}/generators/init/lib/utils.d.ts +0 -1
- package/{src → dist/src}/generators/init/lib/utils.js +13 -16
- package/dist/src/generators/setup-paths-plugin/lib/utils.d.ts +1 -0
- package/dist/src/generators/setup-paths-plugin/lib/utils.js +2 -0
- package/{src → dist/src}/generators/setup-paths-plugin/setup-paths-plugin.d.ts +0 -1
- package/{src → dist/src}/migrations/update-20-0-4/add-vite-temp-files-to-git-ignore.d.ts +0 -1
- package/dist/src/migrations/update-20-0-4/add-vite-temp-files-to-git-ignore.md +12 -0
- package/{src → dist/src}/migrations/update-20-5-0/eslint-ignore-vite-temp-files.d.ts +0 -1
- package/dist/src/migrations/update-20-5-0/eslint-ignore-vite-temp-files.js +44 -0
- package/dist/src/migrations/update-20-5-0/eslint-ignore-vite-temp-files.md +45 -0
- package/{src → dist/src}/migrations/update-20-5-0/install-jiti.d.ts +0 -1
- package/dist/src/migrations/update-20-5-0/install-jiti.md +6 -0
- package/{src → dist/src}/migrations/update-20-5-0/update-resolve-conditions.d.ts +0 -1
- package/dist/src/migrations/update-20-5-0/update-resolve-conditions.md +42 -0
- package/{src → dist/src}/migrations/update-22-2-0/migrate-vitest-to-vitest-package.d.ts +0 -1
- package/{src → dist/src}/migrations/update-22-2-0/migrate-vitest-to-vitest-package.js +30 -14
- package/dist/src/migrations/update-23-0-0/ai-instructions-for-vite-8.md +254 -0
- package/dist/src/migrations/update-23-0-0/ensure-vitest-package-migration.d.ts +2 -0
- package/dist/src/migrations/update-23-0-0/ensure-vitest-package-migration.js +205 -0
- package/dist/src/migrations/update-23-0-0/ensure-vitest-package-migration.md +18 -0
- package/dist/src/migrations/update-23-0-0/rename-rollup-options-to-rolldown-options.d.ts +2 -0
- package/dist/src/migrations/update-23-0-0/rename-rollup-options-to-rolldown-options.js +47 -0
- package/dist/src/migrations/update-23-0-0/rename-rollup-options-to-rolldown-options.md +65 -0
- package/{src → dist/src}/plugins/plugin.d.ts +0 -10
- package/{src → dist/src}/plugins/plugin.js +22 -215
- package/dist/src/utils/deprecation.d.ts +7 -0
- package/dist/src/utils/deprecation.js +31 -0
- package/{src → dist/src}/utils/detect-ui-framework.d.ts +0 -1
- package/{src → dist/src}/utils/e2e-web-server-info-utils.d.ts +2 -3
- package/{src → dist/src}/utils/e2e-web-server-info-utils.js +9 -10
- package/{src → dist/src}/utils/ensure-dependencies.d.ts +0 -2
- package/{src → dist/src}/utils/ensure-dependencies.js +0 -16
- package/{src → dist/src}/utils/executor-utils.d.ts +0 -2
- package/{src → dist/src}/utils/executor-utils.js +3 -7
- package/{src → dist/src}/utils/find-vite-config.d.ts +0 -1
- package/{src → dist/src}/utils/generator-utils.d.ts +1 -4
- package/{src → dist/src}/utils/generator-utils.js +10 -38
- package/{src → dist/src}/utils/ignore-vite-temp-files.d.ts +0 -1
- package/{src → dist/src}/utils/ignore-vite-temp-files.js +7 -35
- package/{src → dist/src}/utils/nx-tsconfig-paths-find-file.d.ts +0 -1
- package/{src → dist/src}/utils/options-utils.d.ts +0 -1
- package/{src → dist/src}/utils/options-utils.js +0 -3
- package/{src → dist/src}/utils/test-files/test-vite-configs.d.ts +3 -4
- package/{src → dist/src}/utils/test-files/test-vite-configs.js +3 -3
- package/dist/src/utils/version-utils.d.ts +3 -0
- package/dist/src/utils/version-utils.js +26 -0
- package/dist/src/utils/versions.d.ts +11 -0
- package/dist/src/utils/versions.js +16 -0
- package/{src → dist/src}/utils/vite-config-edit-utils.d.ts +0 -1
- package/executors.json +12 -22
- package/generators.json +8 -13
- package/migrations.json +44 -7
- package/package.json +75 -30
- package/executors.d.ts.map +0 -1
- package/index.d.ts.map +0 -1
- package/plugin.d.ts.map +0 -1
- package/plugins/nx-copy-assets.plugin.d.ts.map +0 -1
- package/plugins/nx-tsconfig-paths.plugin.d.ts.map +0 -1
- package/plugins/nx-vite-build-coordination.plugin.d.ts.map +0 -1
- package/plugins/rollup-replace-files.plugin.d.ts.map +0 -1
- package/src/executors/build/build.impl.d.ts.map +0 -1
- package/src/executors/build/compat.d.ts.map +0 -1
- package/src/executors/dev-server/compat.d.ts.map +0 -1
- package/src/executors/dev-server/dev-server.impl.d.ts.map +0 -1
- package/src/executors/preview-server/compat.d.ts.map +0 -1
- package/src/executors/preview-server/preview-server.impl.d.ts.map +0 -1
- package/src/executors/test/compat.d.ts +0 -3
- package/src/executors/test/compat.d.ts.map +0 -1
- package/src/executors/test/compat.js +0 -6
- package/src/executors/test/lib/nx-reporter.d.ts +0 -19
- package/src/executors/test/lib/nx-reporter.d.ts.map +0 -1
- package/src/executors/test/lib/nx-reporter.js +0 -39
- package/src/executors/test/lib/utils.d.ts +0 -5
- package/src/executors/test/lib/utils.d.ts.map +0 -1
- package/src/executors/test/lib/utils.js +0 -68
- package/src/executors/test/schema.d.ts +0 -7
- package/src/executors/test/schema.json +0 -36
- package/src/executors/test/vitest.impl.d.ts +0 -10
- package/src/executors/test/vitest.impl.d.ts.map +0 -1
- package/src/executors/test/vitest.impl.js +0 -49
- package/src/generators/configuration/configuration.d.ts.map +0 -1
- package/src/generators/configuration/lib/convert-non-vite.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/convert-to-inferred.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/lib/build-post-target-transformer.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/lib/preview-post-target-transformer.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/lib/serve-post-target-transformer.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/lib/test-post-target-transformer.d.ts +0 -6
- package/src/generators/convert-to-inferred/lib/test-post-target-transformer.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/lib/test-post-target-transformer.js +0 -56
- package/src/generators/convert-to-inferred/lib/utils.d.ts.map +0 -1
- package/src/generators/init/init.d.ts.map +0 -1
- package/src/generators/init/lib/utils.d.ts.map +0 -1
- package/src/generators/setup-paths-plugin/lib/utils.d.ts +0 -1
- package/src/generators/setup-paths-plugin/lib/utils.d.ts.map +0 -1
- package/src/generators/setup-paths-plugin/lib/utils.js +0 -0
- package/src/generators/setup-paths-plugin/setup-paths-plugin.d.ts.map +0 -1
- package/src/generators/vitest/files/tsconfig.spec.json__tmpl__ +0 -22
- package/src/generators/vitest/schema.d.ts +0 -15
- package/src/generators/vitest/schema.json +0 -65
- package/src/generators/vitest/vitest-generator.d.ts +0 -8
- package/src/generators/vitest/vitest-generator.d.ts.map +0 -1
- package/src/generators/vitest/vitest-generator.js +0 -51
- package/src/migrations/update-20-0-4/add-vite-temp-files-to-git-ignore.d.ts.map +0 -1
- package/src/migrations/update-20-5-0/eslint-ignore-vite-temp-files.d.ts.map +0 -1
- package/src/migrations/update-20-5-0/eslint-ignore-vite-temp-files.js +0 -76
- package/src/migrations/update-20-5-0/install-jiti.d.ts.map +0 -1
- package/src/migrations/update-20-5-0/update-resolve-conditions.d.ts.map +0 -1
- package/src/migrations/update-22-2-0/create-ai-instructions-for-vitest-4.d.ts +0 -3
- package/src/migrations/update-22-2-0/create-ai-instructions-for-vitest-4.d.ts.map +0 -1
- package/src/migrations/update-22-2-0/create-ai-instructions-for-vitest-4.js +0 -16
- package/src/migrations/update-22-2-0/migrate-vitest-to-vitest-package.d.ts.map +0 -1
- package/src/plugins/plugin.d.ts.map +0 -1
- package/src/utils/detect-ui-framework.d.ts.map +0 -1
- package/src/utils/e2e-web-server-info-utils.d.ts.map +0 -1
- package/src/utils/ensure-dependencies.d.ts.map +0 -1
- package/src/utils/executor-utils.d.ts.map +0 -1
- package/src/utils/find-vite-config.d.ts.map +0 -1
- package/src/utils/generator-utils.d.ts.map +0 -1
- package/src/utils/ignore-vite-temp-files.d.ts.map +0 -1
- package/src/utils/nx-tsconfig-paths-find-file.d.ts.map +0 -1
- package/src/utils/options-utils.d.ts.map +0 -1
- package/src/utils/test-files/test-vite-configs.d.ts.map +0 -1
- package/src/utils/version-utils.d.ts +0 -15
- package/src/utils/version-utils.d.ts.map +0 -1
- package/src/utils/version-utils.js +0 -87
- package/src/utils/versions.d.ts +0 -31
- package/src/utils/versions.d.ts.map +0 -1
- package/src/utils/versions.js +0 -36
- package/src/utils/vite-config-edit-utils.d.ts.map +0 -1
- /package/{LICENSE → dist/LICENSE} +0 -0
- /package/{plugin.js → dist/plugin.js} +0 -0
- /package/{plugins → dist/plugins}/nx-vite-build-coordination.plugin.js +0 -0
- /package/{plugins → dist/plugins}/rollup-replace-files.plugin.js +0 -0
- /package/{src → dist/src}/executors/build/compat.js +0 -0
- /package/{src → dist/src}/executors/build/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/dev-server/compat.js +0 -0
- /package/{src → dist/src}/executors/dev-server/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/preview-server/compat.js +0 -0
- /package/{src → dist/src}/executors/preview-server/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/configuration/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/configuration/schema.json +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/lib/preview-post-target-transformer.js +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/lib/serve-post-target-transformer.js +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/lib/utils.js +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/schema.json +0 -0
- /package/{src → dist/src}/generators/init/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/init/schema.json +0 -0
- /package/{src → dist/src}/generators/setup-paths-plugin/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/setup-paths-plugin/schema.json +0 -0
- /package/{src → dist/src}/generators/setup-paths-plugin/setup-paths-plugin.js +0 -0
- /package/{src → dist/src}/migrations/update-20-0-4/add-vite-temp-files-to-git-ignore.js +0 -0
- /package/{src → dist/src}/migrations/update-20-5-0/install-jiti.js +0 -0
- /package/{src → dist/src}/migrations/update-20-5-0/update-resolve-conditions.js +0 -0
- /package/{src/migrations/update-22-2-0/files → dist/src/migrations/update-22-2-0}/ai-instructions-for-vitest-4.md +0 -0
- /package/{src → dist/src}/utils/detect-ui-framework.js +0 -0
- /package/{src → dist/src}/utils/find-vite-config.js +0 -0
- /package/{src → dist/src}/utils/nx-tsconfig-paths-find-file.js +0 -0
- /package/{src → dist/src}/utils/vite-config-edit-utils.js +0 -0
package/package.json
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/vite",
|
|
3
|
-
"version": "23.0.0-beta.
|
|
3
|
+
"version": "23.0.0-beta.20",
|
|
4
4
|
"private": false,
|
|
5
|
+
"type": "commonjs",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist",
|
|
8
|
+
"!dist/tsconfig.tsbuildinfo",
|
|
9
|
+
"!dist/spec",
|
|
10
|
+
"migrations.json",
|
|
11
|
+
"executors.json",
|
|
12
|
+
"generators.json"
|
|
13
|
+
],
|
|
5
14
|
"description": "The Nx Plugin for building and testing applications using Vite",
|
|
6
15
|
"repository": {
|
|
7
16
|
"type": "git",
|
|
@@ -15,9 +24,63 @@
|
|
|
15
24
|
"CLI",
|
|
16
25
|
"Front-end"
|
|
17
26
|
],
|
|
18
|
-
"main": "./index.js",
|
|
19
|
-
"
|
|
20
|
-
"
|
|
27
|
+
"main": "./dist/index.js",
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"typesVersions": {
|
|
30
|
+
"*": {
|
|
31
|
+
"plugin": [
|
|
32
|
+
"dist/plugin.d.ts"
|
|
33
|
+
],
|
|
34
|
+
"executors": [
|
|
35
|
+
"dist/executors.d.ts"
|
|
36
|
+
],
|
|
37
|
+
"plugins/nx-copy-assets.plugin": [
|
|
38
|
+
"dist/plugins/nx-copy-assets.plugin.d.ts"
|
|
39
|
+
],
|
|
40
|
+
"plugins/nx-tsconfig-paths.plugin": [
|
|
41
|
+
"dist/plugins/nx-tsconfig-paths.plugin.d.ts"
|
|
42
|
+
],
|
|
43
|
+
"plugins/rollup-replace-files.plugin": [
|
|
44
|
+
"dist/plugins/rollup-replace-files.plugin.d.ts"
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"exports": {
|
|
49
|
+
".": {
|
|
50
|
+
"@nx/nx-source": "./index.ts",
|
|
51
|
+
"types": "./dist/index.d.ts",
|
|
52
|
+
"default": "./dist/index.js"
|
|
53
|
+
},
|
|
54
|
+
"./package.json": "./package.json",
|
|
55
|
+
"./migrations.json": "./migrations.json",
|
|
56
|
+
"./generators.json": "./generators.json",
|
|
57
|
+
"./executors.json": "./executors.json",
|
|
58
|
+
"./plugin": {
|
|
59
|
+
"@nx/nx-source": "./plugin.ts",
|
|
60
|
+
"types": "./dist/plugin.d.ts",
|
|
61
|
+
"default": "./dist/plugin.js"
|
|
62
|
+
},
|
|
63
|
+
"./executors": {
|
|
64
|
+
"@nx/nx-source": "./executors.ts",
|
|
65
|
+
"types": "./dist/executors.d.ts",
|
|
66
|
+
"default": "./dist/executors.js"
|
|
67
|
+
},
|
|
68
|
+
"./plugins/nx-copy-assets.plugin": {
|
|
69
|
+
"@nx/nx-source": "./plugins/nx-copy-assets.plugin.ts",
|
|
70
|
+
"types": "./dist/plugins/nx-copy-assets.plugin.d.ts",
|
|
71
|
+
"default": "./dist/plugins/nx-copy-assets.plugin.js"
|
|
72
|
+
},
|
|
73
|
+
"./plugins/nx-tsconfig-paths.plugin": {
|
|
74
|
+
"@nx/nx-source": "./plugins/nx-tsconfig-paths.plugin.ts",
|
|
75
|
+
"types": "./dist/plugins/nx-tsconfig-paths.plugin.d.ts",
|
|
76
|
+
"default": "./dist/plugins/nx-tsconfig-paths.plugin.js"
|
|
77
|
+
},
|
|
78
|
+
"./plugins/rollup-replace-files.plugin": {
|
|
79
|
+
"@nx/nx-source": "./plugins/rollup-replace-files.plugin.ts",
|
|
80
|
+
"types": "./dist/plugins/rollup-replace-files.plugin.d.ts",
|
|
81
|
+
"default": "./dist/plugins/rollup-replace-files.plugin.js"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
21
84
|
"author": "Victor Savkin",
|
|
22
85
|
"license": "MIT",
|
|
23
86
|
"bugs": {
|
|
@@ -31,43 +94,25 @@
|
|
|
31
94
|
"migrations": "./migrations.json"
|
|
32
95
|
},
|
|
33
96
|
"dependencies": {
|
|
34
|
-
"@
|
|
35
|
-
"@phenomnomnominal/tsquery": "~6.1.4",
|
|
97
|
+
"@phenomnomnominal/tsquery": "~6.2.0",
|
|
36
98
|
"enquirer": "~2.3.6",
|
|
37
|
-
"@nx/js": "23.0.0-beta.2",
|
|
38
|
-
"@nx/vitest": "23.0.0-beta.2",
|
|
39
99
|
"picomatch": "4.0.4",
|
|
40
100
|
"tsconfig-paths": "^4.1.2",
|
|
41
101
|
"semver": "^7.6.3",
|
|
42
102
|
"tslib": "^2.3.0",
|
|
43
|
-
"ajv": "^8.0.0"
|
|
103
|
+
"ajv": "^8.0.0",
|
|
104
|
+
"@nx/devkit": "23.0.0-beta.20",
|
|
105
|
+
"@nx/js": "23.0.0-beta.20",
|
|
106
|
+
"@nx/vitest": "23.0.0-beta.20"
|
|
44
107
|
},
|
|
45
108
|
"devDependencies": {
|
|
46
|
-
"nx": "23.0.0-beta.
|
|
109
|
+
"@nx/eslint": "23.0.0-beta.20",
|
|
110
|
+
"nx": "23.0.0-beta.20"
|
|
47
111
|
},
|
|
48
112
|
"peerDependencies": {
|
|
49
|
-
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
|
|
50
|
-
"vitest": "^1.3.1 || ^2.0.0 || ^3.0.0 || ^4.0.0"
|
|
113
|
+
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
|
|
51
114
|
},
|
|
52
115
|
"publishConfig": {
|
|
53
116
|
"access": "public"
|
|
54
|
-
},
|
|
55
|
-
"exports": {
|
|
56
|
-
".": "./index.js",
|
|
57
|
-
"./plugin": "./plugin.js",
|
|
58
|
-
"./package.json": "./package.json",
|
|
59
|
-
"./migrations.json": "./migrations.json",
|
|
60
|
-
"./generators.json": "./generators.json",
|
|
61
|
-
"./executors.json": "./executors.json",
|
|
62
|
-
"./executors": "./executors.js",
|
|
63
|
-
"./src/executors/*/schema.json": "./src/executors/*/schema.json",
|
|
64
|
-
"./src/executors/*.impl": "./src/executors/*.impl.js",
|
|
65
|
-
"./src/executors/*/schema": "./src/executors/*/schema.d.ts",
|
|
66
|
-
"./src/executors/*/compat": "./src/executors/*/compat.js",
|
|
67
|
-
"./src/generators/*/schema.json": "./src/generators/*/schema.json",
|
|
68
|
-
"./src/generators/*/schema": "./src/generators/*/schema.d.ts",
|
|
69
|
-
"./plugins/nx-copy-assets.plugin": "./plugins/nx-copy-assets.plugin.js",
|
|
70
|
-
"./plugins/nx-tsconfig-paths.plugin": "./plugins/nx-tsconfig-paths.plugin.js",
|
|
71
|
-
"./plugins/rollup-replace-files.plugin": "./plugins/rollup-replace-files.plugin.js"
|
|
72
117
|
}
|
|
73
118
|
}
|
package/executors.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"executors.d.ts","sourceRoot":"","sources":["../../../packages/vite/executors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAE,KAAK,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AAC9F,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC"}
|
package/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/vite/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uCAAuC,CAAC;AACtD,OAAO,EAAE,KAAK,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AAC9F,OAAO,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAC1F,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC"}
|
package/plugin.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../packages/vite/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,sBAAsB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nx-copy-assets.plugin.d.ts","sourceRoot":"","sources":["../../../../packages/vite/plugins/nx-copy-assets.plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAkB,MAAM,MAAM,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAG3D,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,GAAG,MAAM,CA2C1E"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nx-tsconfig-paths.plugin.d.ts","sourceRoot":"","sources":["../../../../packages/vite/plugins/nx-tsconfig-paths.plugin.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAK9B,MAAM,WAAW,oBAAoB;IACnC;;;;QAII;IACJ,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;QAKI;IACJ,UAAU,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,EAAE,CAAC;IACnC;;;QAGI;IACJ,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,wBAAgB,aAAa,CAAC,OAAO,GAAE,oBAAyB,GA4KzD,MAAM,CA0EZ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nx-vite-build-coordination.plugin.d.ts","sourceRoot":"","sources":["../../../../packages/vite/plugins/nx-vite-build-coordination.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,MAAM,CAAC;AASnC,MAAM,WAAW,oCAAoC;IACnD,YAAY,EAAE,MAAM,CAAC;CACtB;AACD,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,oCAAoC,GAC5C,MAAM,CA0ER"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rollup-replace-files.plugin.d.ts","sourceRoot":"","sources":["../../../../packages/vite/plugins/rollup-replace-files.plugin.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,YAAY,EAAE,eAAe,EAAE,GAAG;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;IACpC,SAAS,CACP,MAAM,EAAE,GAAG,EACX,QAAQ,EAAE,GAAG,EACb,OAAO,EAAE,GAAG,GACX,OAAO,CAAC;QACT,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC,CAAC;CACJ,CAuCA;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/vite/src/executors/build/build.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAMhB,MAAM,YAAY,CAAC;AAKpB,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAqBpD,wBAAuB,iBAAiB,CACtC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,wBAAwB,EACvD,OAAO,EAAE,eAAe;aA+EgB,OAAO;cAAY,MAAM;aAmIlE;AAED,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC;IAET,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACnC,CAAC,CAuDD;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compat.d.ts","sourceRoot":"","sources":["../../../../../../packages/vite/src/executors/build/compat.ts"],"names":[],"mappings":";AAGA,wBAAoD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compat.d.ts","sourceRoot":"","sources":["../../../../../../packages/vite/src/executors/dev-server/compat.ts"],"names":[],"mappings":";AAGA,wBAAwD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dev-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/vite/src/executors/dev-server/dev-server.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAGhB,MAAM,YAAY,CAAC;AAMpB,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AASxD,wBAAuB,qBAAqB,CAC1C,OAAO,EAAE,4BAA4B,EACrC,OAAO,EAAE,eAAe,GACvB,cAAc,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CA0FvD;AAiBD,eAAe,qBAAqB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compat.d.ts","sourceRoot":"","sources":["../../../../../../packages/vite/src/executors/preview-server/compat.ts"],"names":[],"mappings":";AAGA,wBAA4D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preview-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/vite/src/executors/preview-server/preview-server.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAKhB,MAAM,YAAY,CAAC;AAOpB,OAAO,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AAK5D,wBAAuB,yBAAyB,CAC9C,OAAO,EAAE,gCAAgC,EACzC,OAAO,EAAE,eAAe;;;kBAsKzB;AAoBD,eAAe,yBAAyB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compat.d.ts","sourceRoot":"","sources":["../../../../../../packages/vite/src/executors/test/compat.ts"],"names":[],"mappings":";AAGA,wBAAiD"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const vitest_impl_1 = tslib_1.__importDefault(require("./vitest.impl"));
|
|
6
|
-
exports.default = (0, devkit_1.convertNxExecutor)(vitest_impl_1.default);
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { RunnerTestFile, Reporter } from 'vitest/node';
|
|
2
|
-
export declare class NxReporter implements Reporter {
|
|
3
|
-
private watch;
|
|
4
|
-
deferred: {
|
|
5
|
-
promise: Promise<boolean>;
|
|
6
|
-
resolve: (val: boolean) => void;
|
|
7
|
-
};
|
|
8
|
-
constructor(watch: boolean);
|
|
9
|
-
[Symbol.asyncIterator](): AsyncGenerator<{
|
|
10
|
-
hasErrors: boolean;
|
|
11
|
-
}, void, unknown>;
|
|
12
|
-
private setupDeferred;
|
|
13
|
-
/** Vitest ≥ 0.29 */
|
|
14
|
-
onTestRunEnd(files: any[], errors?: any): void;
|
|
15
|
-
/** Vitest ≤ 0.28 */
|
|
16
|
-
onFinished(files: RunnerTestFile[], errors?: unknown[]): void;
|
|
17
|
-
private _handleFinished;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=nx-reporter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nx-reporter.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vite/src/executors/test/lib/nx-reporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5D,qBAAa,UAAW,YAAW,QAAQ;IAM7B,OAAO,CAAC,KAAK;IALzB,QAAQ,EAAE;QACR,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAC1B,OAAO,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;KACjC,CAAC;gBAEkB,KAAK,EAAE,OAAO;IAI3B,CAAC,MAAM,CAAC,aAAa,CAAC;;;IAQ7B,OAAO,CAAC,aAAa;IAUrB,oBAAoB;IACpB,YAAY,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,MAAM,CAAC,EAAE,GAAG;IAIvC,oBAAoB;IACpB,UAAU,CAAC,KAAK,EAAE,cAAc,EAAE,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE;IAKtD,OAAO,CAAC,eAAe;CAKxB"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NxReporter = void 0;
|
|
4
|
-
class NxReporter {
|
|
5
|
-
constructor(watch) {
|
|
6
|
-
this.watch = watch;
|
|
7
|
-
this.setupDeferred();
|
|
8
|
-
}
|
|
9
|
-
async *[Symbol.asyncIterator]() {
|
|
10
|
-
do {
|
|
11
|
-
const hasErrors = await this.deferred.promise;
|
|
12
|
-
yield { hasErrors };
|
|
13
|
-
this.setupDeferred();
|
|
14
|
-
} while (this.watch);
|
|
15
|
-
}
|
|
16
|
-
setupDeferred() {
|
|
17
|
-
let resolve;
|
|
18
|
-
this.deferred = {
|
|
19
|
-
promise: new Promise((res) => {
|
|
20
|
-
resolve = res;
|
|
21
|
-
}),
|
|
22
|
-
resolve,
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
/** Vitest ≥ 0.29 */
|
|
26
|
-
onTestRunEnd(files, errors) {
|
|
27
|
-
this._handleFinished(files, errors);
|
|
28
|
-
}
|
|
29
|
-
/** Vitest ≤ 0.28 */
|
|
30
|
-
onFinished(files, errors) {
|
|
31
|
-
this._handleFinished(files, errors);
|
|
32
|
-
}
|
|
33
|
-
// --- private ----------------------------------------------------------
|
|
34
|
-
_handleFinished(files, errors) {
|
|
35
|
-
const hasErrors = files.some((f) => f.result?.state === 'fail') || errors?.length > 0;
|
|
36
|
-
this.deferred.resolve(hasErrors);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.NxReporter = NxReporter;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ExecutorContext } from '@nx/devkit';
|
|
2
|
-
import { VitestExecutorOptions } from '../schema';
|
|
3
|
-
export declare function getOptions(options: VitestExecutorOptions, context: ExecutorContext, projectRoot: string): Promise<Record<string, any>>;
|
|
4
|
-
export declare function getOptionsAsArgv(obj: Record<string, any>): string[];
|
|
5
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vite/src/executors/test/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAIhB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAQlD,wBAAsB,UAAU,CAC9B,OAAO,EAAE,qBAAqB,EAC9B,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,MAAM,gCAuEpB;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,EAAE,CAcnE"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getOptions = getOptions;
|
|
4
|
-
exports.getOptionsAsArgv = getOptionsAsArgv;
|
|
5
|
-
const devkit_1 = require("@nx/devkit");
|
|
6
|
-
const options_utils_1 = require("../../../utils/options-utils");
|
|
7
|
-
const path_1 = require("path");
|
|
8
|
-
const executor_utils_1 = require("../../../utils/executor-utils");
|
|
9
|
-
async function getOptions(options, context, projectRoot) {
|
|
10
|
-
// Allows ESM to be required in CJS modules. Vite will be published as ESM in the future.
|
|
11
|
-
const { loadConfigFromFile, mergeConfig } = await (0, executor_utils_1.loadViteDynamicImport)();
|
|
12
|
-
const viteConfigPath = (0, options_utils_1.normalizeViteConfigFilePath)(context.root, projectRoot, options.configFile);
|
|
13
|
-
if (!viteConfigPath) {
|
|
14
|
-
throw new Error((0, devkit_1.stripIndents) `
|
|
15
|
-
Unable to load test config from config file ${viteConfigPath}.
|
|
16
|
-
|
|
17
|
-
Please make sure that vitest is configured correctly,
|
|
18
|
-
or use the @nx/vite:vitest generator to configure it for you.
|
|
19
|
-
You can read more here: https://nx.dev/nx-api/vite/generators/vitest
|
|
20
|
-
`);
|
|
21
|
-
}
|
|
22
|
-
const resolved = await loadConfigFromFile({
|
|
23
|
-
mode: options?.mode ?? 'production',
|
|
24
|
-
command: 'serve',
|
|
25
|
-
}, viteConfigPath);
|
|
26
|
-
if (!viteConfigPath || !resolved?.config?.['test']) {
|
|
27
|
-
devkit_1.logger.warn((0, devkit_1.stripIndents) `Unable to load test config from config file ${resolved?.path ?? viteConfigPath}
|
|
28
|
-
Some settings may not be applied as expected.
|
|
29
|
-
You can manually set the config in the project, ${context.projectName}, configuration.
|
|
30
|
-
`);
|
|
31
|
-
}
|
|
32
|
-
const root = projectRoot === '.'
|
|
33
|
-
? process.cwd()
|
|
34
|
-
: (0, path_1.relative)(context.cwd, (0, devkit_1.joinPathFragments)(context.root, projectRoot));
|
|
35
|
-
const { parseCLI } = await (0, executor_utils_1.loadVitestDynamicImport)();
|
|
36
|
-
const { options: { watch, ...normalizedExtraArgs }, } = parseCLI(['vitest', ...getOptionsAsArgv(options)]);
|
|
37
|
-
const { reportsDirectory, coverage, ...restNormalizedArgs } = normalizedExtraArgs;
|
|
38
|
-
const settings = {
|
|
39
|
-
// Explicitly set watch mode to false if not provided otherwise vitest
|
|
40
|
-
// will enable watch mode by default for non CI environments
|
|
41
|
-
watch: watch ?? false,
|
|
42
|
-
...restNormalizedArgs,
|
|
43
|
-
// This should not be needed as it's going to be set in vite.config.ts
|
|
44
|
-
// but leaving it here in case someone did not migrate correctly
|
|
45
|
-
root: resolved.config.root ?? root,
|
|
46
|
-
config: viteConfigPath,
|
|
47
|
-
coverage: {
|
|
48
|
-
...(coverage ?? {}),
|
|
49
|
-
...(reportsDirectory && { reportsDirectory }),
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
return mergeConfig(resolved?.config?.['test'] ?? {}, settings);
|
|
53
|
-
}
|
|
54
|
-
function getOptionsAsArgv(obj) {
|
|
55
|
-
const argv = [];
|
|
56
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
57
|
-
if (Array.isArray(value)) {
|
|
58
|
-
value.forEach((item) => argv.push(`--${key}=${item}`));
|
|
59
|
-
}
|
|
60
|
-
else if (typeof value === 'object' && value !== null) {
|
|
61
|
-
argv.push(`--${key}='${JSON.stringify(value)}'`);
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
argv.push(`--${key}=${value}`);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return argv;
|
|
68
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/schema",
|
|
3
|
-
"version": 2,
|
|
4
|
-
"cli": "nx",
|
|
5
|
-
"title": "Vitest executor",
|
|
6
|
-
"description": "Test using Vitest.",
|
|
7
|
-
"type": "object",
|
|
8
|
-
"properties": {
|
|
9
|
-
"configFile": {
|
|
10
|
-
"type": "string",
|
|
11
|
-
"description": "The path to the local vitest config, relative to the workspace root.",
|
|
12
|
-
"x-completion-type": "file",
|
|
13
|
-
"x-completion-glob": "@(vitest|vite).config@(.js|.ts)",
|
|
14
|
-
"aliases": ["config"]
|
|
15
|
-
},
|
|
16
|
-
"reportsDirectory": {
|
|
17
|
-
"type": "string",
|
|
18
|
-
"description": "Directory to write coverage report to."
|
|
19
|
-
},
|
|
20
|
-
"mode": {
|
|
21
|
-
"type": "string",
|
|
22
|
-
"description": "Mode for Vite."
|
|
23
|
-
},
|
|
24
|
-
"testFiles": {
|
|
25
|
-
"aliases": ["testFile"],
|
|
26
|
-
"type": "array",
|
|
27
|
-
"items": { "type": "string" }
|
|
28
|
-
},
|
|
29
|
-
"watch": {
|
|
30
|
-
"description": "Watch files for changes and rerun tests related to changed files.",
|
|
31
|
-
"type": "boolean"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"required": [],
|
|
35
|
-
"examplesFile": "../../../docs/test-examples.md"
|
|
36
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ExecutorContext } from '@nx/devkit';
|
|
2
|
-
import { VitestExecutorOptions } from './schema';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated Use `@nx/vitest:test` instead. This executor will be removed in Nx 23.
|
|
5
|
-
*/
|
|
6
|
-
export declare function vitestExecutor(options: VitestExecutorOptions, context: ExecutorContext): AsyncGenerator<never, {
|
|
7
|
-
success: boolean;
|
|
8
|
-
}, unknown>;
|
|
9
|
-
export default vitestExecutor;
|
|
10
|
-
//# sourceMappingURL=vitest.impl.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vitest.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/vite/src/executors/test/vitest.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAU,MAAM,YAAY,CAAC;AAGrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEjD;;GAEG;AACH,wBAAuB,cAAc,CACnC,OAAO,EAAE,qBAAqB,EAC9B,OAAO,EAAE,eAAe;;YAYzB;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.vitestExecutor = vitestExecutor;
|
|
37
|
-
const devkit_1 = require("@nx/devkit");
|
|
38
|
-
const devkit_2 = require("@nx/devkit");
|
|
39
|
-
const versions_1 = require("../../utils/versions");
|
|
40
|
-
/**
|
|
41
|
-
* @deprecated Use `@nx/vitest:test` instead. This executor will be removed in Nx 23.
|
|
42
|
-
*/
|
|
43
|
-
async function* vitestExecutor(options, context) {
|
|
44
|
-
devkit_1.logger.warn(`The '@nx/vite:test' executor is deprecated. Please use '@nx/vitest:test' instead. This executor will be removed in Nx 23.`);
|
|
45
|
-
(0, devkit_2.ensurePackage)('@nx/vitest', versions_1.nxVersion);
|
|
46
|
-
const { vitestExecutor: actualVitestExecutor } = await Promise.resolve().then(() => __importStar(require('@nx/vitest/executors')));
|
|
47
|
-
return yield* actualVitestExecutor(options, context);
|
|
48
|
-
}
|
|
49
|
-
exports.default = vitestExecutor;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../../../../packages/vite/src/generators/configuration/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAMjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAwBpB,OAAO,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AAE5D,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,gCAAgC,8BAMzC;AAED,wBAAsB,kCAAkC,CACtD,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,gCAAgC,8BAwJzC;AAED,eAAe,0BAA0B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convert-non-vite.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vite/src/generators/configuration/lib/convert-non-vite.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,IAAI,EAGL,MAAM,YAAY,CAAC;AAKpB,OAAO,EAAE,gCAAgC,EAAE,MAAM,WAAW,CAAC;AAU7D,wBAAsB,cAAc,CAClC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,gCAAgC,EACxC,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE;IACP,CAAC,UAAU,EAAE,MAAM,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC;CAChD,iBA8EF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convert-to-inferred.d.ts","sourceRoot":"","sources":["../../../../../../packages/vite/src/generators/convert-to-inferred/convert-to-inferred.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAY7E,UAAU,MAAM;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAqDlE;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-post-target-transformer.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vite/src/generators/convert-to-inferred/lib/build-post-target-transformer.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAUpB,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,mBAAmB,EAC3B,IAAI,EAAE,IAAI,EACV,cAAc,EAAE;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EACrD,2BAA2B,EAAE,mBAAmB,4BAmGjD;AA+CD,wBAAgB,mCAAmC,CACjD,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,MAAM,QA0FnB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preview-post-target-transformer.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vite/src/generators/convert-to-inferred/lib/preview-post-target-transformer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAEjE,OAAO,EAAE,aAAa,EAAE,MAAM,gEAAgE,CAAC;AAE/F,wBAAgB,4BAA4B,CAAC,aAAa,EAAE,aAAa,IAErE,QAAQ,mBAAmB,EAC3B,MAAM,IAAI,EACV,gBAAgB;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EACrD,6BAA6B,mBAAmB,8BAuCnD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serve-post-target-transformer.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vite/src/generators/convert-to-inferred/lib/serve-post-target-transformer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAEjE,OAAO,EAAE,aAAa,EAAE,MAAM,gEAAgE,CAAC;AAE/F,wBAAgB,0BAA0B,CAAC,aAAa,EAAE,aAAa,IAEnE,QAAQ,mBAAmB,EAC3B,MAAM,IAAI,EACV,gBAAgB;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EACrD,6BAA6B,mBAAmB,8BA8CnD"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type TargetConfiguration, type Tree } from '@nx/devkit';
|
|
2
|
-
export declare function testPostTargetTransformer(target: TargetConfiguration, tree: Tree, projectDetails: {
|
|
3
|
-
projectName: string;
|
|
4
|
-
root: string;
|
|
5
|
-
}, inferredTargetConfiguration: TargetConfiguration): TargetConfiguration<any>;
|
|
6
|
-
//# sourceMappingURL=test-post-target-transformer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-post-target-transformer.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vite/src/generators/convert-to-inferred/lib/test-post-target-transformer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAIjE,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,mBAAmB,EAC3B,IAAI,EAAE,IAAI,EACV,cAAc,EAAE;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EACrD,2BAA2B,EAAE,mBAAmB,4BA+CjD"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.testPostTargetTransformer = testPostTargetTransformer;
|
|
4
|
-
const utils_1 = require("./utils");
|
|
5
|
-
const plugin_migration_utils_1 = require("@nx/devkit/src/generators/plugin-migrations/plugin-migration-utils");
|
|
6
|
-
function testPostTargetTransformer(target, tree, projectDetails, inferredTargetConfiguration) {
|
|
7
|
-
if (target.options) {
|
|
8
|
-
removePropertiesFromTargetOptions(target.options, projectDetails.root);
|
|
9
|
-
}
|
|
10
|
-
if (target.configurations) {
|
|
11
|
-
for (const configurationName in target.configurations) {
|
|
12
|
-
const configuration = target.configurations[configurationName];
|
|
13
|
-
removePropertiesFromTargetOptions(configuration, projectDetails.root);
|
|
14
|
-
}
|
|
15
|
-
if (Object.keys(target.configurations).length === 0) {
|
|
16
|
-
if ('defaultConfiguration' in target) {
|
|
17
|
-
delete target.defaultConfiguration;
|
|
18
|
-
}
|
|
19
|
-
delete target.configurations;
|
|
20
|
-
}
|
|
21
|
-
if ('defaultConfiguration' in target &&
|
|
22
|
-
!target.configurations[target.defaultConfiguration]) {
|
|
23
|
-
delete target.defaultConfiguration;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
if (target.outputs) {
|
|
27
|
-
(0, plugin_migration_utils_1.processTargetOutputs)(target, [{ newName: 'coverage.reportsDirectory', oldName: 'reportsDirectory' }], inferredTargetConfiguration, {
|
|
28
|
-
projectName: projectDetails.projectName,
|
|
29
|
-
projectRoot: projectDetails.root,
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
if (target.inputs &&
|
|
33
|
-
target.inputs.every((i) => i === 'default' || i === '^production')) {
|
|
34
|
-
delete target.inputs;
|
|
35
|
-
}
|
|
36
|
-
return target;
|
|
37
|
-
}
|
|
38
|
-
function removePropertiesFromTargetOptions(targetOptions, projectRoot) {
|
|
39
|
-
if ('configFile' in targetOptions) {
|
|
40
|
-
targetOptions.config = (0, utils_1.toProjectRelativePath)(targetOptions.configFile, projectRoot);
|
|
41
|
-
delete targetOptions.configFile;
|
|
42
|
-
}
|
|
43
|
-
if ('reportsDirectory' in targetOptions) {
|
|
44
|
-
if (targetOptions.reportsDirectory.startsWith('../')) {
|
|
45
|
-
targetOptions.reportsDirectory = targetOptions.reportsDirectory.replace(/(\.\.\/)+/, '');
|
|
46
|
-
}
|
|
47
|
-
targetOptions['coverage.reportsDirectory'] = (0, utils_1.toProjectRelativePath)(targetOptions.reportsDirectory, projectRoot);
|
|
48
|
-
delete targetOptions.reportsDirectory;
|
|
49
|
-
}
|
|
50
|
-
if ('testFiles' in targetOptions) {
|
|
51
|
-
targetOptions.testNamePattern = `"/(${targetOptions.testFiles
|
|
52
|
-
.map((f) => f.replace('.', '\\.'))
|
|
53
|
-
.join('|')})/"`;
|
|
54
|
-
delete targetOptions.testFiles;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vite/src/generators/convert-to-inferred/lib/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,IAAI,EAAqB,MAAM,YAAY,CAAC;AAGzE,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,GAClB,MAAM,CAaR;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,UASzD;AAED,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,QA+BtD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../packages/vite/src/generators/init/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EAGjB,IAAI,EAEL,MAAM,YAAY,CAAC;AAKpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAI/C,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,QAe9C;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,mBAAmB,8BAEpE;AAED,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,mBAAmB,8BA2D5B;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vite/src/generators/init/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,IAAI,EAGL,MAAM,YAAY,CAAC;AAWpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAyBhD,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,mBAAmB,mDAuD5B;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,cAgB/C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vite/src/generators/setup-paths-plugin/lib/utils.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup-paths-plugin.d.ts","sourceRoot":"","sources":["../../../../../../packages/vite/src/generators/setup-paths-plugin/setup-paths-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,IAAI,EACL,MAAM,YAAY,CAAC;AAGpB,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,iBAcjC;AAqID,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "<%= extendedConfig %>",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "<%= outDir %>",
|
|
5
|
-
"types": ["vitest/globals", "vitest/importMeta", "vite/client", "node"]
|
|
6
|
-
},
|
|
7
|
-
"include": [
|
|
8
|
-
"vite.config.ts",
|
|
9
|
-
"vite.config.mts",
|
|
10
|
-
"vitest.config.ts",
|
|
11
|
-
"vitest.config.mts",
|
|
12
|
-
"src/**/*.test.ts",
|
|
13
|
-
"src/**/*.spec.ts",
|
|
14
|
-
"src/**/*.test.tsx",
|
|
15
|
-
"src/**/*.spec.tsx",
|
|
16
|
-
"src/**/*.test.js",
|
|
17
|
-
"src/**/*.spec.js",
|
|
18
|
-
"src/**/*.test.jsx",
|
|
19
|
-
"src/**/*.spec.jsx",
|
|
20
|
-
"src/**/*.d.ts"
|
|
21
|
-
]
|
|
22
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface VitestGeneratorSchema {
|
|
2
|
-
project: string;
|
|
3
|
-
uiFramework?: 'angular' | 'react' | 'vue' | 'none';
|
|
4
|
-
coverageProvider: 'v8' | 'istanbul' | 'custom';
|
|
5
|
-
inSourceTests?: boolean;
|
|
6
|
-
skipViteConfig?: boolean;
|
|
7
|
-
testTarget?: string;
|
|
8
|
-
skipFormat?: boolean;
|
|
9
|
-
testEnvironment?: 'node' | 'jsdom' | 'happy-dom' | 'edge-runtime' | string;
|
|
10
|
-
addPlugin?: boolean;
|
|
11
|
-
runtimeTsconfigFileName?: string;
|
|
12
|
-
compiler?: 'babel' | 'swc'; // default: babel
|
|
13
|
-
// internal options
|
|
14
|
-
projectType?: 'application' | 'library';
|
|
15
|
-
}
|