@storybook/addon-vitest 10.2.0-alpha.1 → 10.2.0-alpha.2

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.
@@ -1,36 +1,36 @@
1
- import CJS_COMPAT_NODE_URL_v9cj2j9732f from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_v9cj2j9732f from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_v9cj2j9732f from "node:module";
1
+ import CJS_COMPAT_NODE_URL_pxsfxj9du6e from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_pxsfxj9du6e from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_pxsfxj9du6e from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_v9cj2j9732f.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_v9cj2j9732f.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_v9cj2j9732f.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_pxsfxj9du6e.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_pxsfxj9du6e.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_pxsfxj9du6e.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  require_picocolors
14
- } from "../_node-chunks/chunk-5XBMJ6BR.js";
14
+ } from "../_node-chunks/chunk-4HEYL5QI.js";
15
15
  import {
16
16
  require_dist
17
- } from "../_node-chunks/chunk-GYW6H727.js";
17
+ } from "../_node-chunks/chunk-G46UBKFY.js";
18
18
  import {
19
19
  join,
20
20
  normalize,
21
21
  relative,
22
22
  resolve,
23
23
  sep
24
- } from "../_node-chunks/chunk-W4J4CLIT.js";
24
+ } from "../_node-chunks/chunk-JCSFLSIG.js";
25
25
  import {
26
26
  __commonJS,
27
27
  __require,
28
28
  __toESM
29
- } from "../_node-chunks/chunk-H55ZHNTN.js";
29
+ } from "../_node-chunks/chunk-4EVO7BNQ.js";
30
30
 
31
- // ../../node_modules/braces/lib/utils.js
31
+ // ../../../node_modules/braces/lib/utils.js
32
32
  var require_utils = __commonJS({
33
- "../../node_modules/braces/lib/utils.js"(exports) {
33
+ "../../../node_modules/braces/lib/utils.js"(exports) {
34
34
  "use strict";
35
35
  exports.isInteger = (num) => typeof num == "number" ? Number.isInteger(num) : typeof num == "string" && num.trim() !== "" ? Number.isInteger(Number(num)) : !1;
36
36
  exports.find = (node, type) => node.nodes.find((node2) => node2.type === type);
@@ -60,9 +60,9 @@ var require_utils = __commonJS({
60
60
  }
61
61
  });
62
62
 
63
- // ../../node_modules/braces/lib/stringify.js
63
+ // ../../../node_modules/braces/lib/stringify.js
64
64
  var require_stringify = __commonJS({
65
- "../../node_modules/braces/lib/stringify.js"(exports, module) {
65
+ "../../../node_modules/braces/lib/stringify.js"(exports, module) {
66
66
  "use strict";
67
67
  var utils = require_utils();
68
68
  module.exports = (ast, options = {}) => {
@@ -82,9 +82,9 @@ var require_stringify = __commonJS({
82
82
  }
83
83
  });
84
84
 
85
- // ../../node_modules/is-number/index.js
85
+ // ../../../node_modules/is-number/index.js
86
86
  var require_is_number = __commonJS({
87
- "../../node_modules/is-number/index.js"(exports, module) {
87
+ "../../../node_modules/is-number/index.js"(exports, module) {
88
88
  "use strict";
89
89
  module.exports = function(num) {
90
90
  return typeof num == "number" ? num - num === 0 : typeof num == "string" && num.trim() !== "" ? Number.isFinite ? Number.isFinite(+num) : isFinite(+num) : !1;
@@ -92,9 +92,9 @@ var require_is_number = __commonJS({
92
92
  }
93
93
  });
94
94
 
95
- // ../../node_modules/to-regex-range/index.js
95
+ // ../../../node_modules/to-regex-range/index.js
96
96
  var require_to_regex_range = __commonJS({
97
- "../../node_modules/to-regex-range/index.js"(exports, module) {
97
+ "../../../node_modules/to-regex-range/index.js"(exports, module) {
98
98
  "use strict";
99
99
  var isNumber = require_is_number(), toRegexRange = (min, max, options) => {
100
100
  if (isNumber(min) === !1)
@@ -210,9 +210,9 @@ var require_to_regex_range = __commonJS({
210
210
  }
211
211
  });
212
212
 
213
- // ../../node_modules/fill-range/index.js
213
+ // ../../../node_modules/fill-range/index.js
214
214
  var require_fill_range = __commonJS({
215
- "../../node_modules/fill-range/index.js"(exports, module) {
215
+ "../../../node_modules/fill-range/index.js"(exports, module) {
216
216
  "use strict";
217
217
  var util = __require("util"), toRegexRange = require_to_regex_range(), isObject = (val) => val !== null && typeof val == "object" && !Array.isArray(val), transform = (toNumber) => (value) => toNumber === !0 ? Number(value) : String(value), isValidValue = (value) => typeof value == "number" || typeof value == "string" && value !== "", isNumber = (num) => Number.isInteger(+num), zeros = (input) => {
218
218
  let value = `${input}`, index = -1;
@@ -295,9 +295,9 @@ var require_fill_range = __commonJS({
295
295
  }
296
296
  });
297
297
 
298
- // ../../node_modules/braces/lib/compile.js
298
+ // ../../../node_modules/braces/lib/compile.js
299
299
  var require_compile = __commonJS({
300
- "../../node_modules/braces/lib/compile.js"(exports, module) {
300
+ "../../../node_modules/braces/lib/compile.js"(exports, module) {
301
301
  "use strict";
302
302
  var fill = require_fill_range(), utils = require_utils(), compile = (ast, options = {}) => {
303
303
  let walk = (node, parent = {}) => {
@@ -330,9 +330,9 @@ var require_compile = __commonJS({
330
330
  }
331
331
  });
332
332
 
333
- // ../../node_modules/braces/lib/expand.js
333
+ // ../../../node_modules/braces/lib/expand.js
334
334
  var require_expand = __commonJS({
335
- "../../node_modules/braces/lib/expand.js"(exports, module) {
335
+ "../../../node_modules/braces/lib/expand.js"(exports, module) {
336
336
  "use strict";
337
337
  var fill = require_fill_range(), stringify = require_stringify(), utils = require_utils(), append = (queue = "", stash = "", enclose = !1) => {
338
338
  let result = [];
@@ -396,9 +396,9 @@ var require_expand = __commonJS({
396
396
  }
397
397
  });
398
398
 
399
- // ../../node_modules/braces/lib/constants.js
399
+ // ../../../node_modules/braces/lib/constants.js
400
400
  var require_constants = __commonJS({
401
- "../../node_modules/braces/lib/constants.js"(exports, module) {
401
+ "../../../node_modules/braces/lib/constants.js"(exports, module) {
402
402
  "use strict";
403
403
  module.exports = {
404
404
  MAX_LENGTH: 1e4,
@@ -498,9 +498,9 @@ var require_constants = __commonJS({
498
498
  }
499
499
  });
500
500
 
501
- // ../../node_modules/braces/lib/parse.js
501
+ // ../../../node_modules/braces/lib/parse.js
502
502
  var require_parse = __commonJS({
503
- "../../node_modules/braces/lib/parse.js"(exports, module) {
503
+ "../../../node_modules/braces/lib/parse.js"(exports, module) {
504
504
  "use strict";
505
505
  var stringify = require_stringify(), {
506
506
  MAX_LENGTH,
@@ -672,9 +672,9 @@ var require_parse = __commonJS({
672
672
  }
673
673
  });
674
674
 
675
- // ../../node_modules/braces/index.js
675
+ // ../../../node_modules/braces/index.js
676
676
  var require_braces = __commonJS({
677
- "../../node_modules/braces/index.js"(exports, module) {
677
+ "../../../node_modules/braces/index.js"(exports, module) {
678
678
  "use strict";
679
679
  var stringify = require_stringify(), compile = require_compile(), expand = require_expand(), parse = require_parse(), braces = (input, options = {}) => {
680
680
  let output = [];
@@ -700,9 +700,9 @@ var require_braces = __commonJS({
700
700
  }
701
701
  });
702
702
 
703
- // ../../node_modules/picomatch/lib/constants.js
703
+ // ../../../node_modules/picomatch/lib/constants.js
704
704
  var require_constants2 = __commonJS({
705
- "../../node_modules/picomatch/lib/constants.js"(exports, module) {
705
+ "../../../node_modules/picomatch/lib/constants.js"(exports, module) {
706
706
  "use strict";
707
707
  var path = __require("path"), WIN_SLASH = "\\\\/", WIN_NO_SLASH = `[^${WIN_SLASH}]`, DOT_LITERAL = "\\.", PLUS_LITERAL = "\\+", QMARK_LITERAL = "\\?", SLASH_LITERAL = "\\/", ONE_CHAR = "(?=.)", QMARK = "[^/]", END_ANCHOR = `(?:${SLASH_LITERAL}|$)`, START_ANCHOR = `(?:^|${SLASH_LITERAL})`, DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`, NO_DOT = `(?!${DOT_LITERAL})`, NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`, NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`, NO_DOTS_SLASH = `(?!${DOTS_SLASH})`, QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`, STAR = `${QMARK}*?`, POSIX_CHARS = {
708
708
  DOT_LITERAL,
@@ -877,9 +877,9 @@ var require_constants2 = __commonJS({
877
877
  }
878
878
  });
879
879
 
880
- // ../../node_modules/picomatch/lib/utils.js
880
+ // ../../../node_modules/picomatch/lib/utils.js
881
881
  var require_utils2 = __commonJS({
882
- "../../node_modules/picomatch/lib/utils.js"(exports) {
882
+ "../../../node_modules/picomatch/lib/utils.js"(exports) {
883
883
  "use strict";
884
884
  var path = __require("path"), win32 = process.platform === "win32", {
885
885
  REGEX_BACKSLASH,
@@ -913,9 +913,9 @@ var require_utils2 = __commonJS({
913
913
  }
914
914
  });
915
915
 
916
- // ../../node_modules/picomatch/lib/scan.js
916
+ // ../../../node_modules/picomatch/lib/scan.js
917
917
  var require_scan = __commonJS({
918
- "../../node_modules/picomatch/lib/scan.js"(exports, module) {
918
+ "../../../node_modules/picomatch/lib/scan.js"(exports, module) {
919
919
  "use strict";
920
920
  var utils = require_utils2(), {
921
921
  CHAR_ASTERISK,
@@ -1099,9 +1099,9 @@ var require_scan = __commonJS({
1099
1099
  }
1100
1100
  });
1101
1101
 
1102
- // ../../node_modules/picomatch/lib/parse.js
1102
+ // ../../../node_modules/picomatch/lib/parse.js
1103
1103
  var require_parse2 = __commonJS({
1104
- "../../node_modules/picomatch/lib/parse.js"(exports, module) {
1104
+ "../../../node_modules/picomatch/lib/parse.js"(exports, module) {
1105
1105
  "use strict";
1106
1106
  var constants = require_constants2(), utils = require_utils2(), {
1107
1107
  MAX_LENGTH,
@@ -1544,9 +1544,9 @@ var require_parse2 = __commonJS({
1544
1544
  }
1545
1545
  });
1546
1546
 
1547
- // ../../node_modules/picomatch/lib/picomatch.js
1547
+ // ../../../node_modules/picomatch/lib/picomatch.js
1548
1548
  var require_picomatch = __commonJS({
1549
- "../../node_modules/picomatch/lib/picomatch.js"(exports, module) {
1549
+ "../../../node_modules/picomatch/lib/picomatch.js"(exports, module) {
1550
1550
  "use strict";
1551
1551
  var path = __require("path"), scan = require_scan(), parse = require_parse2(), utils = require_utils2(), constants = require_constants2(), isObject = (val) => val && typeof val == "object" && !Array.isArray(val), picomatch = (glob, options, returnState = !1) => {
1552
1552
  if (Array.isArray(glob)) {
@@ -1615,17 +1615,17 @@ var require_picomatch = __commonJS({
1615
1615
  }
1616
1616
  });
1617
1617
 
1618
- // ../../node_modules/picomatch/index.js
1618
+ // ../../../node_modules/picomatch/index.js
1619
1619
  var require_picomatch2 = __commonJS({
1620
- "../../node_modules/picomatch/index.js"(exports, module) {
1620
+ "../../../node_modules/picomatch/index.js"(exports, module) {
1621
1621
  "use strict";
1622
1622
  module.exports = require_picomatch();
1623
1623
  }
1624
1624
  });
1625
1625
 
1626
- // ../../node_modules/micromatch/index.js
1626
+ // ../../../node_modules/micromatch/index.js
1627
1627
  var require_micromatch = __commonJS({
1628
- "../../node_modules/micromatch/index.js"(exports, module) {
1628
+ "../../../node_modules/micromatch/index.js"(exports, module) {
1629
1629
  "use strict";
1630
1630
  var util = __require("util"), braces = require_braces(), picomatch = require_picomatch2(), utils = require_utils2(), isEmptyString = (v) => v === "" || v === "./", hasBraces = (v) => {
1631
1631
  let index = v.indexOf("{");
@@ -1735,9 +1735,9 @@ var require_micromatch = __commonJS({
1735
1735
  }
1736
1736
  });
1737
1737
 
1738
- // ../../node_modules/totalist/sync/index.js
1738
+ // ../../../node_modules/totalist/sync/index.js
1739
1739
  var require_sync = __commonJS({
1740
- "../../node_modules/totalist/sync/index.js"(exports) {
1740
+ "../../../node_modules/totalist/sync/index.js"(exports) {
1741
1741
  var { join: join2, resolve: resolve2 } = __require("path"), { readdirSync, statSync } = __require("fs");
1742
1742
  function totalist(dir, callback, pre = "") {
1743
1743
  dir = resolve2(".", dir);
@@ -1749,9 +1749,9 @@ var require_sync = __commonJS({
1749
1749
  }
1750
1750
  });
1751
1751
 
1752
- // ../../node_modules/@polka/url/build.js
1752
+ // ../../../node_modules/@polka/url/build.js
1753
1753
  var require_build = __commonJS({
1754
- "../../node_modules/@polka/url/build.js"(exports) {
1754
+ "../../../node_modules/@polka/url/build.js"(exports) {
1755
1755
  var qs = __require("querystring");
1756
1756
  function parse(req) {
1757
1757
  let raw = req.url;
@@ -1769,9 +1769,9 @@ var require_build = __commonJS({
1769
1769
  }
1770
1770
  });
1771
1771
 
1772
- // ../../node_modules/mrmime/index.js
1772
+ // ../../../node_modules/mrmime/index.js
1773
1773
  var require_mrmime = __commonJS({
1774
- "../../node_modules/mrmime/index.js"(exports) {
1774
+ "../../../node_modules/mrmime/index.js"(exports) {
1775
1775
  var mimes = {
1776
1776
  "3g2": "video/3gpp2",
1777
1777
  "3gp": "video/3gpp",
@@ -2221,9 +2221,9 @@ var require_mrmime = __commonJS({
2221
2221
  }
2222
2222
  });
2223
2223
 
2224
- // ../../node_modules/sirv/build.js
2224
+ // ../../../node_modules/sirv/build.js
2225
2225
  var require_build2 = __commonJS({
2226
- "../../node_modules/sirv/build.js"(exports, module) {
2226
+ "../../../node_modules/sirv/build.js"(exports, module) {
2227
2227
  var fs = __require("fs"), { join: join2, normalize: normalize2, resolve: resolve2 } = __require("path"), { totalist } = require_sync(), { parse } = require_build(), { lookup } = require_mrmime(), noop = () => {
2228
2228
  };
2229
2229
  function isMatch(uri, arr) {
@@ -2400,7 +2400,7 @@ var WORKING_DIR = process.cwd(), defaultOptions = {
2400
2400
  }, { presets } = await experimental_loadStorybook({
2401
2401
  configDir: finalOptions.configDir,
2402
2402
  packageJson: {}
2403
- }), stories = await presets.apply("stories", []), [
2403
+ }), stories = await presets.apply("stories", []), commonConfig = { root: resolve(finalOptions.configDir, "..") }, [
2404
2404
  { storiesGlobs },
2405
2405
  framework,
2406
2406
  storybookEnv,
@@ -2414,7 +2414,7 @@ var WORKING_DIR = process.cwd(), defaultOptions = {
2414
2414
  getStoryGlobsAndFiles(presets, directories),
2415
2415
  presets.apply("framework", void 0),
2416
2416
  presets.apply("env", {}),
2417
- presets.apply("viteFinal", {}),
2417
+ presets.apply("viteFinal", commonConfig),
2418
2418
  presets.apply("staticDirs", []),
2419
2419
  extractTagsFromPreview(finalOptions.configDir),
2420
2420
  presets.apply("core"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/addon-vitest",
3
- "version": "10.2.0-alpha.1",
3
+ "version": "10.2.0-alpha.2",
4
4
  "description": "Storybook Vitest addon: Blazing fast component testing using stories",
5
5
  "keywords": [
6
6
  "storybook",
@@ -67,10 +67,6 @@
67
67
  "*.d.ts",
68
68
  "!src/**/*"
69
69
  ],
70
- "scripts": {
71
- "check": "jiti ../../../scripts/check/check-package.ts",
72
- "prep": "jiti ../../../scripts/build/build-package.ts"
73
- },
74
70
  "dependencies": {
75
71
  "@storybook/global": "^5.0.0",
76
72
  "@storybook/icons": "^2.0.0"
@@ -103,7 +99,7 @@
103
99
  "@vitest/browser": "^3.0.0 || ^4.0.0",
104
100
  "@vitest/browser-playwright": "^4.0.0",
105
101
  "@vitest/runner": "^3.0.0 || ^4.0.0",
106
- "storybook": "^10.2.0-alpha.1",
102
+ "storybook": "^10.2.0-alpha.2",
107
103
  "vitest": "^3.0.0 || ^4.0.0"
108
104
  },
109
105
  "peerDependenciesMeta": {