orcheo-canvas 0.2.1 → 0.2.4
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/.bumpversion.cfg +1 -1
- package/package.json +1 -1
- package/vite.config.ts +10 -11
- package/vitest.config.ts +25 -0
package/.bumpversion.cfg
CHANGED
package/package.json
CHANGED
package/vite.config.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineConfig } from '
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
2
|
import react from '@vitejs/plugin-react'
|
|
3
3
|
import path from 'path'
|
|
4
4
|
import { fileURLToPath } from 'url'
|
|
@@ -17,19 +17,18 @@ export default defineConfig({
|
|
|
17
17
|
'@features': path.resolve(__dirname, './src/features'),
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
|
+
// Fix for use-sync-external-store CJS/ESM compatibility with React 19
|
|
21
|
+
optimizeDeps: {
|
|
22
|
+
include: ['use-sync-external-store/shim', 'use-sync-external-store/shim/with-selector']
|
|
23
|
+
},
|
|
24
|
+
build: {
|
|
25
|
+
commonjsOptions: {
|
|
26
|
+
include: [/use-sync-external-store/, /node_modules/]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
20
29
|
server: {
|
|
21
30
|
allowedHosts: [
|
|
22
31
|
'orcheo-canvas.ai-colleagues.com'
|
|
23
32
|
]
|
|
24
|
-
},
|
|
25
|
-
test: {
|
|
26
|
-
environment: 'jsdom',
|
|
27
|
-
setupFiles: './src/setupTests.ts',
|
|
28
|
-
alias: {
|
|
29
|
-
'@openai/chatkit-react': path.resolve(
|
|
30
|
-
__dirname,
|
|
31
|
-
'./src/test-utils/chatkit-stub.ts',
|
|
32
|
-
),
|
|
33
|
-
},
|
|
34
33
|
}
|
|
35
34
|
})
|
package/vitest.config.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference types="vitest" />
|
|
2
|
+
import { defineConfig, mergeConfig } from 'vitest/config'
|
|
3
|
+
import path from 'path'
|
|
4
|
+
import { fileURLToPath } from 'url'
|
|
5
|
+
import viteConfig from './vite.config'
|
|
6
|
+
|
|
7
|
+
// ES Module equivalent of __dirname
|
|
8
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
9
|
+
|
|
10
|
+
// Extend vite.config.ts with test-specific configuration
|
|
11
|
+
export default mergeConfig(
|
|
12
|
+
viteConfig,
|
|
13
|
+
defineConfig({
|
|
14
|
+
test: {
|
|
15
|
+
environment: 'jsdom',
|
|
16
|
+
setupFiles: './src/setupTests.ts',
|
|
17
|
+
alias: {
|
|
18
|
+
'@openai/chatkit-react': path.resolve(
|
|
19
|
+
__dirname,
|
|
20
|
+
'./src/test-utils/chatkit-stub.ts',
|
|
21
|
+
),
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
})
|
|
25
|
+
)
|