@forsakringskassan/vite-lib-config 5.9.0 → 5.9.2
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/write-config.mjs +6 -6
- package/package.json +1 -1
package/dist/write-config.mjs
CHANGED
|
@@ -770,9 +770,7 @@ function generateViteConfig() {
|
|
|
770
770
|
`import { defineTestConfig } from "@forsakringskassan/vitest-config-jsdom";`,
|
|
771
771
|
``,
|
|
772
772
|
`export default defineConfig({`,
|
|
773
|
-
` test: defineTestConfig(
|
|
774
|
-
` setupFiles: ["./vitest.setup.ts"],`,
|
|
775
|
-
` }),`,
|
|
773
|
+
` test: defineTestConfig(),`,
|
|
776
774
|
`});`
|
|
777
775
|
].map((it) => `${it}
|
|
778
776
|
`).join("");
|
|
@@ -837,9 +835,10 @@ async function findCypressConfigPath(cwd) {
|
|
|
837
835
|
const { findUp: findUp2 } = await Promise.resolve().then(() => (init_find_up(), find_up_exports));
|
|
838
836
|
const absolutePath = await findUp2("cypress/tsconfig.json", { cwd });
|
|
839
837
|
if (absolutePath) {
|
|
840
|
-
|
|
838
|
+
const relativePath = path3.relative(cwd, absolutePath).replaceAll("\\", "/");
|
|
839
|
+
return relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
|
|
841
840
|
}
|
|
842
|
-
return "cypress/tsconfig.json";
|
|
841
|
+
return "./cypress/tsconfig.json";
|
|
843
842
|
}
|
|
844
843
|
function shouldPrune(filename) {
|
|
845
844
|
if (filename.startsWith("tsconfig.") && filename.endsWith(".json")) {
|
|
@@ -899,7 +898,8 @@ async function run(cwd, argv) {
|
|
|
899
898
|
["tsconfig.selectors.json", generateTsconfigSelectors(options)],
|
|
900
899
|
["tsconfig.pageobjects.json", generateTsconfigPageobjects(options)],
|
|
901
900
|
["vite.config.ts", null],
|
|
902
|
-
["vite.config.mts", generateViteConfig()]
|
|
901
|
+
["vite.config.mts", generateViteConfig()],
|
|
902
|
+
["vitest.setup.ts", null]
|
|
903
903
|
]);
|
|
904
904
|
console.group("Writing configuration files");
|
|
905
905
|
console.log("API Extractor:", flagEnabled(options.enableApiExtractor));
|