@storybook/addon-vitest 0.0.0-pr-32795-sha-f0ac445c → 0.0.0-pr-32717-sha-b8c5e103

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,138 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_oycy7mg2pm from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_oycy7mg2pm from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_oycy7mg2pm from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_oycy7mg2pm.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_oycy7mg2pm.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_oycy7mg2pm.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
- // ../../node_modules/pathe/dist/shared/pathe.ff20891b.mjs
14
- var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
15
- function normalizeWindowsPath(input = "") {
16
- return input && input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
17
- }
18
- var _UNC_REGEX = /^[/\\]{2}/, _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, _DRIVE_LETTER_RE = /^[A-Za-z]:$/, _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/, sep = "/", delimiter = ":", normalize = function(path2) {
19
- if (path2.length === 0)
20
- return ".";
21
- path2 = normalizeWindowsPath(path2);
22
- let isUNCPath = path2.match(_UNC_REGEX), isPathAbsolute = isAbsolute(path2), trailingSeparator = path2[path2.length - 1] === "/";
23
- return path2 = normalizeString(path2, !isPathAbsolute), path2.length === 0 ? isPathAbsolute ? "/" : trailingSeparator ? "./" : "." : (trailingSeparator && (path2 += "/"), _DRIVE_LETTER_RE.test(path2) && (path2 += "/"), isUNCPath ? isPathAbsolute ? `//${path2}` : `//./${path2}` : isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2);
24
- }, join = function(...arguments_) {
25
- if (arguments_.length === 0)
26
- return ".";
27
- let joined;
28
- for (let argument of arguments_)
29
- argument && argument.length > 0 && (joined === void 0 ? joined = argument : joined += `/${argument}`);
30
- return joined === void 0 ? "." : normalize(joined.replace(/\/\/+/g, "/"));
31
- };
32
- function cwd() {
33
- return typeof process < "u" && typeof process.cwd == "function" ? process.cwd().replace(/\\/g, "/") : "/";
34
- }
35
- var resolve = function(...arguments_) {
36
- arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
37
- let resolvedPath = "", resolvedAbsolute = !1;
38
- for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
39
- let path2 = index >= 0 ? arguments_[index] : cwd();
40
- !path2 || path2.length === 0 || (resolvedPath = `${path2}/${resolvedPath}`, resolvedAbsolute = isAbsolute(path2));
41
- }
42
- return resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute), resolvedAbsolute && !isAbsolute(resolvedPath) ? `/${resolvedPath}` : resolvedPath.length > 0 ? resolvedPath : ".";
43
- };
44
- function normalizeString(path2, allowAboveRoot) {
45
- let res = "", lastSegmentLength = 0, lastSlash = -1, dots = 0, char = null;
46
- for (let index = 0; index <= path2.length; ++index) {
47
- if (index < path2.length)
48
- char = path2[index];
49
- else {
50
- if (char === "/")
51
- break;
52
- char = "/";
53
- }
54
- if (char === "/") {
55
- if (!(lastSlash === index - 1 || dots === 1)) if (dots === 2) {
56
- if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
57
- if (res.length > 2) {
58
- let lastSlashIndex = res.lastIndexOf("/");
59
- lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0;
60
- continue;
61
- } else if (res.length > 0) {
62
- res = "", lastSegmentLength = 0, lastSlash = index, dots = 0;
63
- continue;
64
- }
65
- }
66
- allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2);
67
- } else
68
- res.length > 0 ? res += `/${path2.slice(lastSlash + 1, index)}` : res = path2.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1;
69
- lastSlash = index, dots = 0;
70
- } else char === "." && dots !== -1 ? ++dots : dots = -1;
71
- }
72
- return res;
73
- }
74
- var isAbsolute = function(p) {
75
- return _IS_ABSOLUTE_RE.test(p);
76
- }, toNamespacedPath = function(p) {
77
- return normalizeWindowsPath(p);
78
- }, _EXTNAME_RE = /.(\.[^./]+)$/, extname = function(p) {
79
- let match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
80
- return match && match[1] || "";
81
- }, relative = function(from, to) {
82
- let _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/"), _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
83
- if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0])
84
- return _to.join("/");
85
- let _fromCopy = [..._from];
86
- for (let segment of _fromCopy) {
87
- if (_to[0] !== segment)
88
- break;
89
- _from.shift(), _to.shift();
90
- }
91
- return [..._from.map(() => ".."), ..._to].join("/");
92
- }, dirname = function(p) {
93
- let segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
94
- return segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0]) && (segments[0] += "/"), segments.join("/") || (isAbsolute(p) ? "/" : ".");
95
- }, format = function(p) {
96
- let segments = [p.root, p.dir, p.base ?? p.name + p.ext].filter(Boolean);
97
- return normalizeWindowsPath(
98
- p.root ? resolve(...segments) : segments.join("/")
99
- );
100
- }, basename = function(p, extension) {
101
- let lastSegment = normalizeWindowsPath(p).split("/").pop();
102
- return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
103
- }, parse = function(p) {
104
- let root = normalizeWindowsPath(p).split("/").shift() || "/", base = basename(p), extension = extname(base);
105
- return {
106
- root,
107
- dir: dirname(p),
108
- base,
109
- ext: extension,
110
- name: base.slice(0, base.length - extension.length)
111
- };
112
- }, path = {
113
- __proto__: null,
114
- basename,
115
- delimiter,
116
- dirname,
117
- extname,
118
- format,
119
- isAbsolute,
120
- join,
121
- normalize,
122
- normalizeString,
123
- parse,
124
- relative,
125
- resolve,
126
- sep,
127
- toNamespacedPath
128
- };
129
-
130
- export {
131
- sep,
132
- normalize,
133
- join,
134
- resolve,
135
- relative,
136
- dirname,
137
- path
138
- };