neon-testing 2.0.1-beta.4 → 2.0.1-beta.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neon-testing",
3
- "version": "2.0.1-beta.4",
3
+ "version": "2.0.1-beta.6",
4
4
  "description": "A Vitest utility for seamless integration tests with Neon Postgres",
5
5
  "keywords": [
6
6
  "neon",
@@ -23,7 +23,7 @@
23
23
  "singleton.ts",
24
24
  "utils.ts",
25
25
  "vite-plugin.ts",
26
- "vitest-setup.ts"
26
+ "vitest-setup.js"
27
27
  ],
28
28
  "scripts": {
29
29
  "test": "vitest",
package/vite-plugin.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import { fileURLToPath } from "node:url";
2
- import type { Plugin, UserConfig } from "vite";
2
+ import type { Plugin } from "vite";
3
3
 
4
- export function neonTesting() {
4
+ export function neonTesting(): Plugin {
5
5
  return {
6
6
  name: "neon-testing-plugin",
7
7
  enforce: "pre",
8
- config(user: any) {
8
+ config(user) {
9
9
  const setupPath = fileURLToPath(
10
- new URL("./vitest-setup.ts", import.meta.url),
10
+ new URL("./vitest-setup.js", import.meta.url),
11
11
  );
12
12
 
13
13
  const setup = new Set([...(user.test?.setupFiles ?? []), setupPath]);
@@ -18,5 +18,5 @@ export function neonTesting() {
18
18
  },
19
19
  };
20
20
  },
21
- } satisfies Plugin;
21
+ };
22
22
  }
@@ -1,5 +1,4 @@
1
- const isVitest =
2
- process.env.VITEST === "true" || !!process.env.VITEST_WORKER_ID;
1
+ const isVitest = process.env.VITEST;
3
2
 
4
3
  if (isVitest) {
5
4
  if (process.env.DATABASE_URL) {