@testing-library/svelte 5.2.6 → 5.2.7
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 +7 -6
- package/src/component-types.d.ts +7 -7
- package/types/component-types.d.ts +7 -7
- package/types/pure.d.ts +1 -1
- package/types/pure.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@testing-library/svelte",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.7",
|
|
4
4
|
"description": "Simple and complete Svelte testing utilities that encourage good testing practices.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -103,9 +103,10 @@
|
|
|
103
103
|
"@testing-library/user-event": "^14.5.2",
|
|
104
104
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
105
105
|
"@typescript-eslint/parser": "^8.0.0",
|
|
106
|
-
"@vitest/coverage-v8": "^2.0.2",
|
|
106
|
+
"@vitest/coverage-v8": "0.x.x || ^1.0.0 || ^2.0.2",
|
|
107
107
|
"all-contributors-cli": "^6.26.1",
|
|
108
108
|
"doctoc": "^2.2.1",
|
|
109
|
+
"esbuild": "*",
|
|
109
110
|
"eslint": "^8.57.0",
|
|
110
111
|
"eslint-config-prettier": "^9.1.0",
|
|
111
112
|
"eslint-config-standard": "^17.1.0",
|
|
@@ -115,7 +116,7 @@
|
|
|
115
116
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
116
117
|
"eslint-plugin-svelte": "^2.42.0",
|
|
117
118
|
"expect-type": "^1.1.0",
|
|
118
|
-
"happy-dom": "^
|
|
119
|
+
"happy-dom": "^16.3.0",
|
|
119
120
|
"jest": "^29.7.0",
|
|
120
121
|
"jest-environment-jsdom": "^29.7.0",
|
|
121
122
|
"jsdom": "^25.0.0",
|
|
@@ -123,10 +124,10 @@
|
|
|
123
124
|
"prettier": "^3.3.3",
|
|
124
125
|
"prettier-plugin-svelte": "^3.2.5",
|
|
125
126
|
"svelte": "^3 || ^4 || ^5 || ^5.0.0-next.0",
|
|
126
|
-
"svelte-check": "^4.0.4",
|
|
127
|
+
"svelte-check": "^3.0.0 || ^4.0.4",
|
|
127
128
|
"svelte-jester": "^5.0.0",
|
|
128
129
|
"typescript": "^5.5.3",
|
|
129
|
-
"vite": "^5.3.3",
|
|
130
|
-
"vitest": "^2.0.2"
|
|
130
|
+
"vite": "^4.0.0 || ^5.3.3",
|
|
131
|
+
"vitest": "0.x.x || ^1.0.0 || ^2.0.2"
|
|
131
132
|
}
|
|
132
133
|
}
|
package/src/component-types.d.ts
CHANGED
|
@@ -45,17 +45,17 @@ export type Props<C extends Component> = ComponentProps<C>
|
|
|
45
45
|
* In Svelte 5, this is the set of variables marked as `export`'d.
|
|
46
46
|
* In Svelte 4, this is simply the instance of the component class.
|
|
47
47
|
*/
|
|
48
|
-
export type Exports<C> =
|
|
49
|
-
? C
|
|
50
|
-
: C extends ModernComponent<any, infer E>
|
|
48
|
+
export type Exports<C> = IS_MODERN_SVELTE extends true
|
|
49
|
+
? C extends ModernComponent<any, infer E>
|
|
51
50
|
? E
|
|
52
|
-
: never
|
|
51
|
+
: C & { $set: never; $on: never; $destroy: never }
|
|
52
|
+
: C
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* Options that may be passed to `mount` when rendering the component.
|
|
56
56
|
*
|
|
57
57
|
* In Svelte 4, these are the options passed to the component constructor.
|
|
58
58
|
*/
|
|
59
|
-
export type MountOptions<C extends Component> =
|
|
60
|
-
?
|
|
61
|
-
:
|
|
59
|
+
export type MountOptions<C extends Component> = IS_MODERN_SVELTE extends true
|
|
60
|
+
? Parameters<typeof mount<Props<C>, Exports<C>>>[1]
|
|
61
|
+
: LegacyConstructorOptions<Props<C>>
|
|
@@ -45,17 +45,17 @@ export type Props<C extends Component> = ComponentProps<C>
|
|
|
45
45
|
* In Svelte 5, this is the set of variables marked as `export`'d.
|
|
46
46
|
* In Svelte 4, this is simply the instance of the component class.
|
|
47
47
|
*/
|
|
48
|
-
export type Exports<C> =
|
|
49
|
-
? C
|
|
50
|
-
: C extends ModernComponent<any, infer E>
|
|
48
|
+
export type Exports<C> = IS_MODERN_SVELTE extends true
|
|
49
|
+
? C extends ModernComponent<any, infer E>
|
|
51
50
|
? E
|
|
52
|
-
: never
|
|
51
|
+
: C & { $set: never; $on: never; $destroy: never }
|
|
52
|
+
: C
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* Options that may be passed to `mount` when rendering the component.
|
|
56
56
|
*
|
|
57
57
|
* In Svelte 4, these are the options passed to the component constructor.
|
|
58
58
|
*/
|
|
59
|
-
export type MountOptions<C extends Component> =
|
|
60
|
-
?
|
|
61
|
-
:
|
|
59
|
+
export type MountOptions<C extends Component> = IS_MODERN_SVELTE extends true
|
|
60
|
+
? Parameters<typeof mount<Props<C>, Exports<C>>>[1]
|
|
61
|
+
: LegacyConstructorOptions<Props<C>>
|
package/types/pure.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export type FireObject = { [K in import("@testing-library/dom").EventType]: (...
|
|
|
28
28
|
* @param {() => unknown} [fn] - A function, which may be `async`, to call before flushing updates.
|
|
29
29
|
* @returns {Promise<void>}
|
|
30
30
|
*/
|
|
31
|
-
export function act(fn?: (
|
|
31
|
+
export function act(fn?: () => unknown): Promise<void>;
|
|
32
32
|
/** Unmount all components and remove elements added to `<body>`. */
|
|
33
33
|
export function cleanup(): void;
|
|
34
34
|
/**
|
package/types/pure.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pure.d.ts","sourceRoot":"","sources":["../src/pure.js"],"names":[],"mappings":";;;mCAewD,CAAC,SAA5C,OAAQ,sBAAsB,EAAE,SAAU,IAC1C,OAAO,sBAAsB,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,sBAAsB,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;;;;0BAMvD,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