@n8n/chat 0.16.0 → 0.17.0

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": "@n8n/chat",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "main": "./chat.umd.js",
5
5
  "module": "./chat.es.js",
6
6
  "types": "./types/index.d.ts",
@@ -1,5 +1,3 @@
1
- import { fileURLToPath, URL } from 'node:url';
2
-
3
1
  import { defineConfig } from 'vite';
4
2
  import checker from 'vite-plugin-checker';
5
3
  import { resolve } from 'path';
@@ -8,7 +6,7 @@ import icons from 'unplugin-icons/vite';
8
6
  import dts from 'vite-plugin-dts';
9
7
 
10
8
  const includeVue = process.env.INCLUDE_VUE === 'true';
11
- const srcPath = fileURLToPath(new URL('./src', import.meta.url));
9
+ const srcPath = resolve(__dirname, 'src');
12
10
 
13
11
  const plugins = [
14
12
  vue(),
@@ -18,7 +16,7 @@ const plugins = [
18
16
  }),
19
17
  dts(),
20
18
  ];
21
- if (process.env.ENABLE_TYPE_CHECKING === 'true') {
19
+ if (!process.env.VITEST) {
22
20
  plugins.push(checker({ vueTsc: true }));
23
21
  }
24
22
 
@@ -0,0 +1,30 @@
1
+ import { resolve } from 'path';
2
+ import { mergeConfig } from 'vite';
3
+ import { type UserConfig } from 'vitest';
4
+ import { defineConfig } from 'vitest/config';
5
+ import viteConfig from './vite.config.mts';
6
+
7
+ const srcPath = resolve(__dirname, 'src');
8
+ const vitestConfig = defineConfig({
9
+ test: {
10
+ globals: true,
11
+ environment: 'jsdom',
12
+ root: srcPath,
13
+ setupFiles: ['./src/__tests__/setup.ts'],
14
+ ...(process.env.COVERAGE_ENABLED === 'true'
15
+ ? {
16
+ coverage: {
17
+ enabled: true,
18
+ provider: 'v8',
19
+ reporter: process.env.CI === 'true' ? 'cobertura' : 'text-summary',
20
+ all: true,
21
+ },
22
+ }
23
+ : {}),
24
+ },
25
+ }) as UserConfig;
26
+
27
+ export default mergeConfig(
28
+ viteConfig,
29
+ vitestConfig,
30
+ );
package/vitest.config.ts DELETED
@@ -1,20 +0,0 @@
1
- import { fileURLToPath } from 'node:url';
2
- import { mergeConfig, defineConfig } from 'vite';
3
- import { configDefaults } from 'vitest/config';
4
- import viteConfig from './vite.config';
5
-
6
- export default mergeConfig(
7
- viteConfig,
8
- defineConfig({
9
- test: {
10
- globals: true,
11
- environment: 'jsdom',
12
- exclude: [...configDefaults.exclude, 'e2e/*'],
13
- root: fileURLToPath(new URL('./', import.meta.url)),
14
- setupFiles: ['./src/__tests__/setup.ts'],
15
- transformMode: {
16
- web: [/\.[jt]sx$/],
17
- },
18
- },
19
- }),
20
- );