@effect-app/vue 4.0.0-beta.22 → 4.0.0-beta.220

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.
Files changed (103) hide show
  1. package/CHANGELOG.md +1605 -0
  2. package/dist/commander.d.ts +628 -0
  3. package/dist/commander.d.ts.map +1 -0
  4. package/dist/commander.js +1060 -0
  5. package/dist/confirm.d.ts +19 -0
  6. package/dist/confirm.d.ts.map +1 -0
  7. package/dist/confirm.js +24 -0
  8. package/dist/errorReporter.d.ts +4 -4
  9. package/dist/errorReporter.d.ts.map +1 -1
  10. package/dist/errorReporter.js +12 -18
  11. package/dist/form.d.ts +14 -5
  12. package/dist/form.d.ts.map +1 -1
  13. package/dist/form.js +41 -12
  14. package/dist/index.d.ts +1 -1
  15. package/dist/intl.d.ts +15 -0
  16. package/dist/intl.d.ts.map +1 -0
  17. package/dist/intl.js +9 -0
  18. package/dist/lib.d.ts +6 -9
  19. package/dist/lib.d.ts.map +1 -1
  20. package/dist/lib.js +35 -10
  21. package/dist/makeClient.d.ts +152 -339
  22. package/dist/makeClient.d.ts.map +1 -1
  23. package/dist/makeClient.js +221 -376
  24. package/dist/makeContext.d.ts +1 -1
  25. package/dist/makeContext.d.ts.map +1 -1
  26. package/dist/makeIntl.d.ts +1 -1
  27. package/dist/makeIntl.d.ts.map +1 -1
  28. package/dist/makeUseCommand.d.ts +8 -0
  29. package/dist/makeUseCommand.d.ts.map +1 -0
  30. package/dist/makeUseCommand.js +13 -0
  31. package/dist/mutate.d.ts +52 -34
  32. package/dist/mutate.d.ts.map +1 -1
  33. package/dist/mutate.js +137 -46
  34. package/dist/query.d.ts +19 -39
  35. package/dist/query.d.ts.map +1 -1
  36. package/dist/query.js +128 -72
  37. package/dist/routeParams.d.ts +1 -1
  38. package/dist/runtime.d.ts +7 -4
  39. package/dist/runtime.d.ts.map +1 -1
  40. package/dist/runtime.js +27 -17
  41. package/dist/toast.d.ts +50 -0
  42. package/dist/toast.d.ts.map +1 -0
  43. package/dist/toast.js +32 -0
  44. package/dist/withToast.d.ts +27 -0
  45. package/dist/withToast.d.ts.map +1 -0
  46. package/dist/withToast.js +59 -0
  47. package/examples/streamMutation.ts +70 -0
  48. package/package.json +48 -50
  49. package/src/commander.ts +3393 -0
  50. package/src/{experimental/confirm.ts → confirm.ts} +10 -14
  51. package/src/errorReporter.ts +62 -74
  52. package/src/form.ts +56 -17
  53. package/src/intl.ts +12 -0
  54. package/src/lib.ts +47 -20
  55. package/src/makeClient.ts +568 -1134
  56. package/src/{experimental/makeUseCommand.ts → makeUseCommand.ts} +6 -4
  57. package/src/mutate.ts +265 -127
  58. package/src/query.ts +197 -183
  59. package/src/runtime.ts +41 -20
  60. package/src/{experimental/toast.ts → toast.ts} +13 -27
  61. package/src/{experimental/withToast.ts → withToast.ts} +40 -12
  62. package/test/Mutation.test.ts +176 -23
  63. package/test/dist/form.test.d.ts.map +1 -1
  64. package/test/dist/lib.test.d.ts.map +1 -0
  65. package/test/dist/streamFinal.test.d.ts.map +1 -0
  66. package/test/dist/streamFn.test.d.ts.map +1 -0
  67. package/test/dist/stubs.d.ts +3529 -122
  68. package/test/dist/stubs.d.ts.map +1 -1
  69. package/test/dist/stubs.js +182 -31
  70. package/test/form-validation-errors.test.ts +23 -19
  71. package/test/form.test.ts +20 -2
  72. package/test/lib.test.ts +240 -0
  73. package/test/makeClient.test.ts +292 -38
  74. package/test/streamFinal.test.ts +63 -0
  75. package/test/streamFn.test.ts +455 -0
  76. package/test/stubs.ts +218 -42
  77. package/tsconfig.examples.json +20 -0
  78. package/tsconfig.json +0 -1
  79. package/tsconfig.json.bak +5 -2
  80. package/tsconfig.src.json +34 -34
  81. package/tsconfig.test.json +2 -2
  82. package/vitest.config.ts +5 -5
  83. package/dist/experimental/commander.d.ts +0 -359
  84. package/dist/experimental/commander.d.ts.map +0 -1
  85. package/dist/experimental/commander.js +0 -557
  86. package/dist/experimental/confirm.d.ts +0 -19
  87. package/dist/experimental/confirm.d.ts.map +0 -1
  88. package/dist/experimental/confirm.js +0 -28
  89. package/dist/experimental/intl.d.ts +0 -16
  90. package/dist/experimental/intl.d.ts.map +0 -1
  91. package/dist/experimental/intl.js +0 -5
  92. package/dist/experimental/makeUseCommand.d.ts +0 -8
  93. package/dist/experimental/makeUseCommand.d.ts.map +0 -1
  94. package/dist/experimental/makeUseCommand.js +0 -13
  95. package/dist/experimental/toast.d.ts +0 -47
  96. package/dist/experimental/toast.d.ts.map +0 -1
  97. package/dist/experimental/toast.js +0 -41
  98. package/dist/experimental/withToast.d.ts +0 -25
  99. package/dist/experimental/withToast.d.ts.map +0 -1
  100. package/dist/experimental/withToast.js +0 -45
  101. package/eslint.config.mjs +0 -24
  102. package/src/experimental/commander.ts +0 -1835
  103. package/src/experimental/intl.ts +0 -9
package/test/stubs.ts CHANGED
@@ -1,18 +1,20 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
  import { type MessageFormatElement } from "@formatjs/icu-messageformat-parser"
3
3
  import * as Intl from "@formatjs/intl"
4
+ import { QueryClient, VueQueryPlugin } from "@tanstack/vue-query"
4
5
  import { Effect, Layer, ManagedRuntime, Option, S } from "effect-app"
5
6
  import { ApiClientFactory, makeRpcClient } from "effect-app/client"
6
7
  import { RpcContextMap } from "effect-app/rpc"
8
+ import * as Exit from "effect/Exit"
7
9
  import * as FetchHttpClient from "effect/unstable/http/FetchHttpClient"
8
- import { ref } from "vue"
9
- import { Commander } from "../src/experimental/commander.js"
10
- import { I18n } from "../src/experimental/intl.js"
11
- import { makeUseCommand } from "../src/experimental/makeUseCommand.js"
12
- import * as Toast from "../src/experimental/toast.js"
13
- import { WithToast } from "../src/experimental/withToast.js"
14
- import { LegacyMutation, makeClient } from "../src/makeClient.js"
10
+ import { createApp, ref } from "vue"
11
+ import { Commander } from "../src/commander.js"
12
+ import { I18n } from "../src/intl.js"
13
+ import { makeClient } from "../src/makeClient.js"
15
14
  import { type MakeIntlReturn } from "../src/makeIntl.js"
15
+ import { makeUseCommand } from "../src/makeUseCommand.js"
16
+ import * as Toast from "../src/toast.js"
17
+ import { WithToast } from "../src/withToast.js"
16
18
 
17
19
  const fakeToastLayer = (toasts: any[] = []) =>
18
20
  Layer.effect(
@@ -26,33 +28,40 @@ const fakeToastLayer = (toasts: any[] = []) =>
26
28
  toasts.splice(idx, 1)
27
29
  }
28
30
  }
29
- const fakeToast = (message: string, options?: Toast.ToastOpts) => {
30
- const id = options?.id ?? Math.random().toString(36).substring(2, 15)
31
- console.log(`Toast [${id}]: ${message}`, options)
31
+ const scheduleAutoDismiss = (toast: any, timeout: number | undefined) => {
32
+ // Treat Infinity / undefined as "stays until explicitly replaced/dismissed".
33
+ // Node's setTimeout silently clamps Infinity to 1ms which would otherwise
34
+ // cause the toast to disappear before assertions can observe it.
35
+ if (timeout === undefined || !Number.isFinite(timeout)) return
36
+ toast.timeoutId = setTimeout(() => {
37
+ const i = toasts.indexOf(toast)
38
+ if (i > -1) toasts.splice(i, 1)
39
+ }, timeout)
40
+ }
41
+ const fakeToast =
42
+ (type: "error" | "warning" | "success" | "info") => (message: string, options?: Toast.ToastOpts) => {
43
+ const id = options?.id ?? Math.random().toString(36).substring(2, 15)
44
+ console.log(`Toast [${type}][${id}]: ${message}`, options)
32
45
 
33
- options = { ...options, id }
34
- const idx = toasts.findIndex((_) => _.id === id)
35
- if (idx > -1) {
36
- const toast = toasts[idx]
37
- clearTimeout(toast.timeoutId)
38
- Object.assign(toast, { message, options })
39
- toast.timeoutId = setTimeout(() => {
40
- toasts.splice(idx, 1)
41
- }, options?.timeout ?? 3000)
42
- } else {
43
- const toast: any = { id, message, options }
44
- toast.timeoutId = setTimeout(() => {
45
- toasts.splice(idx, 1)
46
- }, options?.timeout ?? 3000)
47
- toasts.push(toast)
46
+ options = { ...options, id }
47
+ const idx = toasts.findIndex((_) => _.id === id)
48
+ if (idx > -1) {
49
+ const toast = toasts[idx]
50
+ clearTimeout(toast.timeoutId)
51
+ Object.assign(toast, { type, message, options })
52
+ scheduleAutoDismiss(toast, options?.timeout ?? 3000)
53
+ } else {
54
+ const toast: any = { id, type, message, options }
55
+ toasts.push(toast)
56
+ scheduleAutoDismiss(toast, options?.timeout ?? 3000)
57
+ }
58
+ return id
48
59
  }
49
- return id
50
- }
51
60
  return Toast.Toast.of(Toast.wrap({
52
- error: fakeToast,
53
- warning: fakeToast,
54
- success: fakeToast,
55
- info: fakeToast,
61
+ error: fakeToast("error"),
62
+ warning: fakeToast("warning"),
63
+ success: fakeToast("success"),
64
+ info: fakeToast("info"),
56
65
  dismiss
57
66
  })) as any
58
67
  })
@@ -91,21 +100,166 @@ export const useExperimental = (
91
100
  return Effect.runSync(makeUseCommand<WithToast | Toast.Toast | I18n>(Layer.empty).pipe(Effect.provide(layers)))
92
101
  }
93
102
 
103
+ // Effect-returning variant: keeps the caller's runtime context (e.g. a TestClock
104
+ // provided by `it.effect`) so virtual-time advances reach the runtime captured
105
+ // inside Commander.
106
+ export const useExperimentalE = (
107
+ options?: { messages?: Record<string, string> | Record<string, MessageFormatElement[]>; toasts: any[] }
108
+ ) => {
109
+ const FakeIntlLayer = fakeIntlLayer(options?.messages)
110
+ const FakeToastLayer = fakeToastLayer(options?.toasts)
111
+ const CommanderLayer = Commander.Default.pipe(Layer.provide([FakeIntlLayer, FakeToastLayer]))
112
+ const WithToastLayer = WithToast.Default.pipe(Layer.provide(FakeToastLayer))
113
+ const layers = Layer.mergeAll(CommanderLayer, WithToastLayer, FakeToastLayer, FakeIntlLayer)
114
+
115
+ return makeUseCommand<WithToast | Toast.Toast | I18n>(Layer.empty).pipe(Effect.provide(layers))
116
+ }
117
+
94
118
  export class RequestContextMap extends RpcContextMap.makeMap({}) {}
95
- export const { TaggedRequest: Req } = makeRpcClient(RequestContextMap)
96
- export class GetSomething2 extends Req<GetSomething2>()("GetSomething2", {
119
+ const stubMiddleware = {
120
+ requestContextMap: RequestContextMap.config,
121
+ requestContext: undefined as never
122
+ }
123
+ export const { TaggedRequestFor } = makeRpcClient(stubMiddleware)
124
+
125
+ export const SomethingReq = TaggedRequestFor("Something")
126
+ const SomethingQuery = SomethingReq.Query
127
+ const SomethingCommand = SomethingReq.Command
128
+
129
+ class SomethingGetSomething2 extends SomethingQuery<SomethingGetSomething2>()("GetSomething2", {
97
130
  id: S.String
98
- }, { success: S.NumberFromString }) {}
131
+ }, { success: S.FiniteFromString }) {}
99
132
 
100
- export class GetSomething2WithDependencies extends Req<GetSomething2WithDependencies>()("GetSomething2", {
133
+ class SomethingGetSomething3 extends SomethingQuery<SomethingGetSomething3>()("GetSomething3", {
134
+ id: S.NullOr(S.String).withConstructorDefault
135
+ }, { success: S.FiniteFromString }) {}
136
+
137
+ class SomethingGetSomething4
138
+ extends SomethingQuery<SomethingGetSomething4>()("GetSomething4", {}, { success: S.FiniteFromString })
139
+ {}
140
+
141
+ class SomethingGetSomething2WithDependencies
142
+ extends SomethingQuery<SomethingGetSomething2WithDependencies>()("GetSomething2", {
143
+ id: S.String
144
+ }, {
145
+ // this is intentilally fake, to simulate a codec that requires a dependency
146
+ success: S.FiniteFromString as S.Codec<number, string, "dep-a">,
147
+ error: S.String
148
+ })
149
+ {}
150
+
151
+ type SomethingInvalidationResources = {
152
+ GetSomething2: typeof SomethingGetSomething2
153
+ GetSomething2WithDependencies: typeof SomethingGetSomething2WithDependencies
154
+ GetSomething3: typeof SomethingGetSomething3
155
+ }
156
+
157
+ // command stubs covering the input-shape matrix
158
+ class SomethingDoNoProps extends SomethingCommand<SomethingDoNoProps>()("DoNoProps", {}) {}
159
+
160
+ class SomethingDoOptionalOnly extends SomethingCommand<SomethingDoOptionalOnly>()("DoOptionalOnly", {
161
+ name: S.optional(S.String)
162
+ }) {}
163
+
164
+ class SomethingDoRequiredOnly extends SomethingCommand<SomethingDoRequiredOnly>()("DoRequiredOnly", {
165
+ id: S.String
166
+ }) {}
167
+
168
+ class SomethingDoMixed extends SomethingCommand<SomethingDoMixed>()("DoMixed", {
169
+ id: S.String,
170
+ name: S.optional(S.String)
171
+ }) {}
172
+
173
+ class SomethingDoSomething extends SomethingCommand<
174
+ SomethingDoSomething,
175
+ { Something: SomethingInvalidationResources }
176
+ >()("DoSomething", {
101
177
  id: S.String
102
178
  }, {
103
- // this is intentilally fake, to simulate a codec that requires a dependency
104
- success: S.NumberFromString as S.Codec<number, string, "dep-a">,
105
- error: S.String
179
+ success: S.FiniteFromString
180
+ }, (queryKey, { Something }, input, output) => {
181
+ return [
182
+ { filters: { queryKey } },
183
+ {
184
+ filters: {
185
+ queryKey: [
186
+ Something["GetSomething2"].id,
187
+ input.id,
188
+ Exit.isSuccess(output) ? output.value.toString() : "failed"
189
+ ]
190
+ }
191
+ }
192
+ ]
106
193
  }) {}
107
194
 
108
- export const Something = { GetSomething2, GetSomething2WithDependencies, meta: { moduleName: "Something" as const } }
195
+ // success schema has encoded shape { a: string | null } — used to test projection constraints
196
+ class SomethingGetStructNullable extends SomethingQuery<SomethingGetStructNullable>()("GetStructNullable", {}, {
197
+ success: S.Struct({ a: S.NullOr(S.String) })
198
+ }) {}
199
+
200
+ /** Stream event: intermediate progress update. */
201
+ export class OperationProgress extends S.TaggedClass<OperationProgress>()("OperationProgress", {
202
+ completed: S.NonNegativeInt,
203
+ total: S.NonNegativeInt
204
+ }) {}
205
+
206
+ /** Stream event: final completion result. */
207
+ export class ExportComplete extends S.TaggedClass<ExportComplete>()("ExportComplete", {
208
+ fileUrl: S.NonEmptyString
209
+ }) {}
210
+
211
+ /** Stream with no `final` schema — execute resolves with `void`. */
212
+ class SomethingStreamWithoutFinal extends SomethingCommand<SomethingStreamWithoutFinal>()("StreamWithoutFinal", {
213
+ id: S.String
214
+ }, {
215
+ stream: true,
216
+ success: S.Union([OperationProgress, ExportComplete])
217
+ }) {}
218
+
219
+ /** Stream with a `final` schema — execute resolves with `ExportComplete`. */
220
+ class SomethingStreamWithFinal extends SomethingCommand<SomethingStreamWithFinal>()("StreamWithFinal", {
221
+ id: S.String
222
+ }, {
223
+ stream: true,
224
+ success: S.Union([OperationProgress, ExportComplete]),
225
+ final: ExportComplete
226
+ }) {}
227
+
228
+ export const Something = {
229
+ GetSomething2: SomethingGetSomething2,
230
+ GetSomething2WithDependencies: SomethingGetSomething2WithDependencies,
231
+ GetSomething3: SomethingGetSomething3,
232
+ GetSomething4: SomethingGetSomething4,
233
+ DoNoProps: SomethingDoNoProps,
234
+ DoOptionalOnly: SomethingDoOptionalOnly,
235
+ DoRequiredOnly: SomethingDoRequiredOnly,
236
+ DoMixed: SomethingDoMixed,
237
+ DoSomething: SomethingDoSomething,
238
+ GetStructNullable: SomethingGetStructNullable,
239
+ StreamWithoutFinal: SomethingStreamWithoutFinal,
240
+ StreamWithFinal: SomethingStreamWithFinal
241
+ }
242
+
243
+ export const SomethingElseReq = TaggedRequestFor("SomethingElse")
244
+ const SomethingElseQuery = SomethingElseReq.Query
245
+
246
+ class SomethingElseGetSomething2 extends SomethingElseQuery<SomethingElseGetSomething2>()("GetSomething2", {
247
+ id: S.String
248
+ }, { success: S.FiniteFromString }) {}
249
+
250
+ class SomethingElseGetSomething2WithDependencies
251
+ extends SomethingElseQuery<SomethingElseGetSomething2WithDependencies>()("GetSomething2", {
252
+ id: S.String
253
+ }, {
254
+ success: S.FiniteFromString as S.Codec<number, string, "dep-a">,
255
+ error: S.String
256
+ })
257
+ {}
258
+
259
+ export const SomethingElse = {
260
+ GetSomething2: SomethingElseGetSomething2,
261
+ GetSomething2WithDependencies: SomethingElseGetSomething2WithDependencies
262
+ }
109
263
 
110
264
  export const useClient = (
111
265
  options?: { messages?: Record<string, string> | Record<string, MessageFormatElement[]>; toasts: any[] }
@@ -117,9 +271,31 @@ export const useClient = (
117
271
  const api = ApiClientFactory.layer({ url: "bogus", headers: Option.none() }).pipe(
118
272
  Layer.provide(FetchHttpClient.layer)
119
273
  )
120
- const lm = LegacyMutation.Default.pipe(Layer.provide([FakeIntlLayer, FakeToastLayer]))
121
- const layers = Layer.mergeAll(CommanderLayer, WithToastLayer, FakeToastLayer, FakeIntlLayer, api, lm)
274
+ const layers = Layer.mergeAll(CommanderLayer, WithToastLayer, FakeToastLayer, FakeIntlLayer, api)
122
275
 
123
276
  const clientFor_ = ApiClientFactory.makeFor(Layer.empty)
124
- return makeClient(() => ManagedRuntime.make(layers), clientFor_, Layer.empty)
277
+ const rawClient = makeClient(() => ManagedRuntime.make(layers), clientFor_, Layer.empty)
278
+
279
+ // Provide a Vue injection context so that composition-API hooks (e.g. useQueryClient)
280
+ // called during client initialisation work outside a component setup() function.
281
+ const vueApp = createApp({})
282
+ const testQueryClientConfig = { defaultOptions: { queries: { retry: false }, mutations: { retry: false } } }
283
+ vueApp.use(VueQueryPlugin, { queryClient: new QueryClient(testQueryClientConfig) })
284
+
285
+ const origClientFor = rawClient.clientFor
286
+ const clientFor: typeof origClientFor = function(m, ...args) {
287
+ const proxy = origClientFor(m, ...args)
288
+ // Warm up lazy mutation-hook initialisation inside the Vue injection context.
289
+ // After the first property access, useMutation() is cached and subsequent
290
+ // accesses outside the context succeed.
291
+ const firstPropertyName = Object.keys(m)[0]
292
+ if (firstPropertyName !== undefined) {
293
+ vueApp.runWithContext(() => {
294
+ void (proxy as Record<string, unknown>)[firstPropertyName]
295
+ })
296
+ }
297
+ return proxy
298
+ }
299
+
300
+ return { ...rawClient, clientFor }
125
301
  }
@@ -0,0 +1,20 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "include": [
4
+ "examples"
5
+ ],
6
+ "references": [
7
+ {
8
+ "path": "./tsconfig.src.json"
9
+ }
10
+ ],
11
+ "compilerOptions": {
12
+ "lib": [
13
+ "esnext",
14
+ "DOM"
15
+ ],
16
+ "tsBuildInfoFile": ".tsbuildinfo/examples.tsbuildinfo",
17
+ "rootDir": "examples",
18
+ "moduleResolution": "Node16"
19
+ }
20
+ }
package/tsconfig.json CHANGED
@@ -32,7 +32,6 @@
32
32
  "outDir": "build/dist",
33
33
  "resolveJsonModule": true,
34
34
  "moduleResolution": "Node16",
35
- "downlevelIteration": true,
36
35
  "noErrorTruncation": true,
37
36
  "forceConsistentCasingInFileNames": true,
38
37
  "types": [
package/tsconfig.json.bak CHANGED
@@ -7,6 +7,9 @@
7
7
  },
8
8
  {
9
9
  "path": "./tsconfig.test.json"
10
+ },
11
+ {
12
+ "path": "./tsconfig.examples.json"
10
13
  }
11
- ],
12
- }
14
+ ]
15
+ }
package/tsconfig.src.json CHANGED
@@ -1,36 +1,36 @@
1
1
  {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "lib": [
5
- "esnext",
6
- "DOM"
7
- ],
8
- "tsBuildInfoFile": "./dist/.tsbuildinfo",
9
- "esModuleInterop": true,
10
- "rootDir": "./src",
11
- // keep in here, cause madge can't detect it from extended tsconfig
12
- "moduleResolution": "Node16",
13
- "outDir": "./dist"
14
- },
15
- "include": [
16
- "./src/**/*.ts"
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "lib": [
5
+ "esnext",
6
+ "DOM"
17
7
  ],
18
- "exclude": [
19
- "./dist",
20
- "*.test.ts",
21
- "node_modules",
22
- "build",
23
- "lib",
24
- "dist",
25
- "**/*.d.ts.map",
26
- ".git",
27
- ".data",
28
- "**/.*",
29
- "**/*.tmp"
30
- ],
31
- "references": [
32
- {
33
- "path": "../effect-app"
34
- }
35
- ]
36
- }
8
+ "tsBuildInfoFile": "./dist/.tsbuildinfo",
9
+ "esModuleInterop": true,
10
+ "rootDir": "./src",
11
+ // keep in here, cause madge can't detect it from extended tsconfig
12
+ "moduleResolution": "Node16",
13
+ "outDir": "./dist"
14
+ },
15
+ "include": [
16
+ "./src/**/*.ts"
17
+ ],
18
+ "exclude": [
19
+ "./dist",
20
+ "*.test.ts",
21
+ "node_modules",
22
+ "build",
23
+ "lib",
24
+ "dist",
25
+ "**/*.d.ts.map",
26
+ ".git",
27
+ ".data",
28
+ "**/.*",
29
+ "**/*.tmp"
30
+ ],
31
+ "references": [
32
+ {
33
+ "path": "../effect-app"
34
+ }
35
+ ]
36
+ }
@@ -28,6 +28,6 @@
28
28
  "references": [
29
29
  {
30
30
  "path": "./tsconfig.src.json"
31
- },
31
+ }
32
32
  ]
33
- }
33
+ }
package/vitest.config.ts CHANGED
@@ -1,18 +1,18 @@
1
1
  /// <reference types="vitest" />
2
+ import vue from "@vitejs/plugin-vue"
2
3
  import { defineConfig } from "vitest/config"
3
- import vue from '@vitejs/plugin-vue'
4
4
  import makeConfig from "../../vite.config.base"
5
5
 
6
6
  export default defineConfig({
7
7
  ...makeConfig(__dirname),
8
8
  plugins: [vue()],
9
9
  test: {
10
- environment: 'jsdom',
11
- include: ['src/**/*.test.{ts,tsx}', '**/test/**/*.test.{ts,tsx}', '**/__tests__/**/*.test.{ts,tsx}'],
12
- exclude: ['node_modules/**', 'dist/**'],
10
+ environment: "jsdom",
11
+ include: ["src/**/*.test.{ts,tsx}", "**/test/**/*.test.{ts,tsx}", "**/__tests__/**/*.test.{ts,tsx}"],
12
+ exclude: ["node_modules/**", "dist/**"],
13
13
  globals: true
14
14
  },
15
15
  optimizeDeps: {
16
- exclude: ['**/__tests__/**', '**/test/**', '**/*.test.*']
16
+ exclude: ["**/__tests__/**", "**/test/**", "**/*.test.*"]
17
17
  }
18
18
  })