@storybook/addon-vitest 11.0.0-beta.0 → 11.0.0-beta.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,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_q65v6j674l from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_q65v6j674l from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_q65v6j674l from "node:module";
1
+ import CJS_COMPAT_NODE_URL_ycvuvp62uk from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_ycvuvp62uk from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_ycvuvp62uk from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_q65v6j674l.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_q65v6j674l.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_q65v6j674l.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_ycvuvp62uk.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_ycvuvp62uk.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_ycvuvp62uk.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -13,7 +13,7 @@ import {
13
13
  __commonJS,
14
14
  __require,
15
15
  __toESM
16
- } from "../_node-chunks/chunk-4GNOAC4E.js";
16
+ } from "../_node-chunks/chunk-BIBVDNHH.js";
17
17
 
18
18
  // ../../../node_modules/tree-kill/index.js
19
19
  var require_tree_kill = __commonJS({
@@ -1,20 +1,20 @@
1
- import CJS_COMPAT_NODE_URL_q65v6j674l from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_q65v6j674l from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_q65v6j674l from "node:module";
1
+ import CJS_COMPAT_NODE_URL_ycvuvp62uk from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_ycvuvp62uk from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_ycvuvp62uk from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_q65v6j674l.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_q65v6j674l.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_q65v6j674l.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_ycvuvp62uk.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_ycvuvp62uk.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_ycvuvp62uk.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-RNV4WF5A.js";
14
+ } from "../_node-chunks/chunk-SXATVQ73.js";
15
15
  import {
16
16
  require_dist
17
- } from "../_node-chunks/chunk-3W3XGTQZ.js";
17
+ } from "../_node-chunks/chunk-YLZRXWKY.js";
18
18
  import {
19
19
  join,
20
20
  normalize,
@@ -22,13 +22,13 @@ import {
22
22
  relative,
23
23
  resolve,
24
24
  sep
25
- } from "../_node-chunks/chunk-YGNVYBQM.js";
25
+ } from "../_node-chunks/chunk-H6P4MQ2A.js";
26
26
  import {
27
27
  STORYBOOK_CORE_GHOST_STORIES_PROVIDE_KEY,
28
28
  STORYBOOK_CORE_RENDER_ANALYSIS_PROVIDE_KEY,
29
29
  STORYBOOK_TEST_FEATURES_PROVIDE_KEY,
30
30
  STORYBOOK_TEST_INITIAL_GLOBALS_PROVIDE_KEY
31
- } from "../_node-chunks/chunk-U6IN5TYZ.js";
31
+ } from "../_node-chunks/chunk-M4HPIOHU.js";
32
32
  import {
33
33
  __commonJS,
34
34
  __esm,
@@ -36,7 +36,7 @@ import {
36
36
  __require,
37
37
  __toCommonJS,
38
38
  __toESM
39
- } from "../_node-chunks/chunk-4GNOAC4E.js";
39
+ } from "../_node-chunks/chunk-BIBVDNHH.js";
40
40
 
41
41
  // ../../../node_modules/braces/lib/utils.js
42
42
  var require_utils = __commonJS({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/addon-vitest",
3
- "version": "11.0.0-beta.0",
3
+ "version": "11.0.0-beta.2",
4
4
  "description": "Storybook Vitest addon: Blazing fast component testing using stories",
5
5
  "keywords": [
6
6
  "storybook",
@@ -81,13 +81,13 @@
81
81
  "@storybook/icons": "^2.0.2"
82
82
  },
83
83
  "devDependencies": {
84
- "@storybook/addon-a11y": "11.0.0-beta.0",
85
- "@storybook/builder-vite": "11.0.0-beta.0",
84
+ "@storybook/addon-a11y": "11.0.0-beta.2",
85
+ "@storybook/builder-vite": "11.0.0-beta.2",
86
86
  "@types/istanbul-lib-report": "^3.0.3",
87
87
  "@types/micromatch": "^4.0.0",
88
88
  "@types/node": "^22.19.1",
89
89
  "@types/semver": "^7.7.1",
90
- "@vitest/browser-playwright": "^5.0.0",
90
+ "@vitest/browser-playwright": "5.0.5",
91
91
  "@vitest/istanbul-lib-report": "^1.0.1",
92
92
  "empathic": "^2.0.0",
93
93
  "es-toolkit": "^1.43.0",
@@ -105,12 +105,12 @@
105
105
  "tree-kill": "^1.2.2",
106
106
  "ts-dedent": "^2.2.0",
107
107
  "typescript": "^6.0.3",
108
- "vitest": "^5.0.0"
108
+ "vitest": "5.0.5"
109
109
  },
110
110
  "peerDependencies": {
111
111
  "@vitest/browser": "^4.0.0 || ^5.0.0",
112
112
  "@vitest/browser-playwright": "^4.0.0 || ^5.0.0",
113
- "storybook": "^11.0.0-beta.0",
113
+ "storybook": "^11.0.0-beta.2",
114
114
  "vitest": "^4.0.0 || ^5.0.0"
115
115
  },
116
116
  "peerDependenciesMeta": {
@@ -1,351 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_q65v6j674l from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_q65v6j674l from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_q65v6j674l from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_q65v6j674l.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_q65v6j674l.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_q65v6j674l.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
- import {
13
- __commonJS
14
- } from "./chunk-4GNOAC4E.js";
15
-
16
- // ../../../node_modules/semver/internal/constants.js
17
- var require_constants = __commonJS({
18
- "../../../node_modules/semver/internal/constants.js"(exports, module) {
19
- "use strict";
20
- var SEMVER_SPEC_VERSION = "2.0.0", MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
21
- 9007199254740991, MAX_SAFE_COMPONENT_LENGTH = 16, MAX_SAFE_BUILD_LENGTH = 250, RELEASE_TYPES = [
22
- "major",
23
- "premajor",
24
- "minor",
25
- "preminor",
26
- "patch",
27
- "prepatch",
28
- "prerelease"
29
- ];
30
- module.exports = {
31
- MAX_LENGTH: 256,
32
- MAX_SAFE_COMPONENT_LENGTH,
33
- MAX_SAFE_BUILD_LENGTH,
34
- MAX_SAFE_INTEGER,
35
- RELEASE_TYPES,
36
- SEMVER_SPEC_VERSION,
37
- FLAG_INCLUDE_PRERELEASE: 1,
38
- FLAG_LOOSE: 2
39
- };
40
- }
41
- });
42
-
43
- // ../../../node_modules/semver/internal/debug.js
44
- var require_debug = __commonJS({
45
- "../../../node_modules/semver/internal/debug.js"(exports, module) {
46
- "use strict";
47
- var debug = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
48
- };
49
- module.exports = debug;
50
- }
51
- });
52
-
53
- // ../../../node_modules/semver/internal/re.js
54
- var require_re = __commonJS({
55
- "../../../node_modules/semver/internal/re.js"(exports, module) {
56
- "use strict";
57
- var {
58
- MAX_SAFE_COMPONENT_LENGTH,
59
- MAX_SAFE_BUILD_LENGTH,
60
- MAX_LENGTH
61
- } = require_constants(), debug = require_debug();
62
- exports = module.exports = {};
63
- var re = exports.re = [], safeRe = exports.safeRe = [], src = exports.src = [], safeSrc = exports.safeSrc = [], t = exports.t = {}, R = 0, LETTERDASHNUMBER = "[a-zA-Z0-9-]", safeRegexReplacements = [
64
- ["\\s", 1],
65
- ["\\d", MAX_LENGTH],
66
- [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
67
- ], makeSafeRegex = (value) => {
68
- for (let [token, max] of safeRegexReplacements)
69
- value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
70
- return value;
71
- }, createToken = (name, value, isGlobal) => {
72
- let safe = makeSafeRegex(value), index = R++;
73
- debug(name, index, value), t[name] = index, src[index] = value, safeSrc[index] = safe, re[index] = new RegExp(value, isGlobal ? "g" : void 0), safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
74
- };
75
- createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
76
- createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
77
- createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
78
- createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
79
- createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
80
- createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
81
- createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
82
- createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
83
- createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
84
- createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
85
- createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
86
- createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
87
- createToken("FULL", `^${src[t.FULLPLAIN]}$`);
88
- createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
89
- createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
90
- createToken("GTLT", "((?:<|>)?=?)");
91
- createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
92
- createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
93
- createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
94
- createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
95
- createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
96
- createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
97
- createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
98
- createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
99
- createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
100
- createToken("COERCERTL", src[t.COERCE], !0);
101
- createToken("COERCERTLFULL", src[t.COERCEFULL], !0);
102
- createToken("LONETILDE", "(?:~>?)");
103
- createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, !0);
104
- exports.tildeTrimReplace = "$1~";
105
- createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
106
- createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
107
- createToken("LONECARET", "(?:\\^)");
108
- createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, !0);
109
- exports.caretTrimReplace = "$1^";
110
- createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
111
- createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
112
- createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
113
- createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
114
- createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, !0);
115
- exports.comparatorTrimReplace = "$1$2$3";
116
- createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
117
- createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
118
- createToken("STAR", "(<|>)?=?\\s*\\*");
119
- createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
120
- createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
121
- }
122
- });
123
-
124
- // ../../../node_modules/semver/internal/identifiers.js
125
- var require_identifiers = __commonJS({
126
- "../../../node_modules/semver/internal/identifiers.js"(exports, module) {
127
- "use strict";
128
- var numeric = /^[0-9]+$/, compareIdentifiers = (a, b) => {
129
- if (typeof a == "number" && typeof b == "number")
130
- return a === b ? 0 : a < b ? -1 : 1;
131
- let anum = numeric.test(a), bnum = numeric.test(b);
132
- return anum && bnum && (a = +a, b = +b), a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
133
- }, rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
134
- module.exports = {
135
- compareIdentifiers,
136
- rcompareIdentifiers
137
- };
138
- }
139
- });
140
-
141
- // ../../../node_modules/semver/internal/parse-options.js
142
- var require_parse_options = __commonJS({
143
- "../../../node_modules/semver/internal/parse-options.js"(exports, module) {
144
- "use strict";
145
- var looseOption = Object.freeze({ loose: !0 }), emptyOpts = Object.freeze({}), parseOptions = (options) => options ? typeof options != "object" ? looseOption : options : emptyOpts;
146
- module.exports = parseOptions;
147
- }
148
- });
149
-
150
- // ../../../node_modules/semver/classes/semver.js
151
- var require_semver = __commonJS({
152
- "../../../node_modules/semver/classes/semver.js"(exports, module) {
153
- "use strict";
154
- var debug = require_debug(), { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants(), { safeRe: re, t } = require_re(), parseOptions = require_parse_options(), { compareIdentifiers } = require_identifiers(), isPrereleaseIdentifier = (prerelease, identifier) => {
155
- let identifiers = identifier.split(".");
156
- if (identifiers.length > prerelease.length)
157
- return !1;
158
- for (let i = 0; i < identifiers.length; i++)
159
- if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0)
160
- return !1;
161
- return !0;
162
- }, SemVer = class _SemVer {
163
- constructor(version, options) {
164
- if (options = parseOptions(options), version instanceof _SemVer) {
165
- if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease)
166
- return version;
167
- version = version.version;
168
- } else if (typeof version != "string")
169
- throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
170
- if (version.length > MAX_LENGTH)
171
- throw new TypeError(
172
- `version is longer than ${MAX_LENGTH} characters`
173
- );
174
- debug("SemVer", version, options), this.options = options, this.loose = !!options.loose, this.includePrerelease = !!options.includePrerelease;
175
- let m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
176
- if (!m)
177
- throw new TypeError(`Invalid Version: ${version}`);
178
- if (this.raw = version, this.major = +m[1], this.minor = +m[2], this.patch = +m[3], this.major > MAX_SAFE_INTEGER || this.major < 0)
179
- throw new TypeError("Invalid major version");
180
- if (this.minor > MAX_SAFE_INTEGER || this.minor < 0)
181
- throw new TypeError("Invalid minor version");
182
- if (this.patch > MAX_SAFE_INTEGER || this.patch < 0)
183
- throw new TypeError("Invalid patch version");
184
- m[4] ? this.prerelease = m[4].split(".").map((id) => {
185
- if (/^[0-9]+$/.test(id)) {
186
- let num = +id;
187
- if (num >= 0 && num < MAX_SAFE_INTEGER)
188
- return num;
189
- }
190
- return id;
191
- }) : this.prerelease = [], this.build = m[5] ? m[5].split(".") : [], this.format();
192
- }
193
- format() {
194
- return this.version = `${this.major}.${this.minor}.${this.patch}`, this.prerelease.length && (this.version += `-${this.prerelease.join(".")}`), this.version;
195
- }
196
- toString() {
197
- return this.version;
198
- }
199
- compare(other) {
200
- if (debug("SemVer.compare", this.version, this.options, other), !(other instanceof _SemVer)) {
201
- if (typeof other == "string" && other === this.version)
202
- return 0;
203
- other = new _SemVer(other, this.options);
204
- }
205
- return other.version === this.version ? 0 : this.compareMain(other) || this.comparePre(other);
206
- }
207
- compareMain(other) {
208
- return other instanceof _SemVer || (other = new _SemVer(other, this.options)), this.major < other.major ? -1 : this.major > other.major ? 1 : this.minor < other.minor ? -1 : this.minor > other.minor ? 1 : this.patch < other.patch ? -1 : this.patch > other.patch ? 1 : 0;
209
- }
210
- comparePre(other) {
211
- if (other instanceof _SemVer || (other = new _SemVer(other, this.options)), this.prerelease.length && !other.prerelease.length)
212
- return -1;
213
- if (!this.prerelease.length && other.prerelease.length)
214
- return 1;
215
- if (!this.prerelease.length && !other.prerelease.length)
216
- return 0;
217
- let i = 0;
218
- do {
219
- let a = this.prerelease[i], b = other.prerelease[i];
220
- if (debug("prerelease compare", i, a, b), a === void 0 && b === void 0)
221
- return 0;
222
- if (b === void 0)
223
- return 1;
224
- if (a === void 0)
225
- return -1;
226
- if (a === b)
227
- continue;
228
- return compareIdentifiers(a, b);
229
- } while (++i);
230
- }
231
- compareBuild(other) {
232
- other instanceof _SemVer || (other = new _SemVer(other, this.options));
233
- let i = 0;
234
- do {
235
- let a = this.build[i], b = other.build[i];
236
- if (debug("build compare", i, a, b), a === void 0 && b === void 0)
237
- return 0;
238
- if (b === void 0)
239
- return 1;
240
- if (a === void 0)
241
- return -1;
242
- if (a === b)
243
- continue;
244
- return compareIdentifiers(a, b);
245
- } while (++i);
246
- }
247
- // preminor will bump the version up to the next minor release, and immediately
248
- // down to pre-release. premajor and prepatch work the same way.
249
- inc(release, identifier, identifierBase) {
250
- if (release.startsWith("pre")) {
251
- if (!identifier && identifierBase === !1)
252
- throw new Error("invalid increment argument: identifier is empty");
253
- if (identifier) {
254
- let match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
255
- if (!match || match[1] !== identifier)
256
- throw new Error(`invalid identifier: ${identifier}`);
257
- }
258
- }
259
- switch (release) {
260
- case "premajor":
261
- this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", identifier, identifierBase);
262
- break;
263
- case "preminor":
264
- this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre", identifier, identifierBase);
265
- break;
266
- case "prepatch":
267
- this.prerelease.length = 0, this.inc("patch", identifier, identifierBase), this.inc("pre", identifier, identifierBase);
268
- break;
269
- // If the input is a non-prerelease version, this acts the same as
270
- // prepatch.
271
- case "prerelease":
272
- this.prerelease.length === 0 && this.inc("patch", identifier, identifierBase), this.inc("pre", identifier, identifierBase);
273
- break;
274
- case "release":
275
- if (this.prerelease.length === 0)
276
- throw new Error(`version ${this.raw} is not a prerelease`);
277
- this.prerelease.length = 0;
278
- break;
279
- case "major":
280
- (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) && this.major++, this.minor = 0, this.patch = 0, this.prerelease = [];
281
- break;
282
- case "minor":
283
- (this.patch !== 0 || this.prerelease.length === 0) && this.minor++, this.patch = 0, this.prerelease = [];
284
- break;
285
- case "patch":
286
- this.prerelease.length === 0 && this.patch++, this.prerelease = [];
287
- break;
288
- // This probably shouldn't be used publicly.
289
- // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
290
- case "pre": {
291
- let base = Number(identifierBase) ? 1 : 0;
292
- if (this.prerelease.length === 0)
293
- this.prerelease = [base];
294
- else {
295
- let i = this.prerelease.length;
296
- for (; --i >= 0; )
297
- typeof this.prerelease[i] == "number" && (this.prerelease[i]++, i = -2);
298
- if (i === -1) {
299
- if (identifier === this.prerelease.join(".") && identifierBase === !1)
300
- throw new Error("invalid increment argument: identifier already exists");
301
- this.prerelease.push(base);
302
- }
303
- }
304
- if (identifier) {
305
- let prerelease = [identifier, base];
306
- if (identifierBase === !1 && (prerelease = [identifier]), isPrereleaseIdentifier(this.prerelease, identifier)) {
307
- let prereleaseBase = this.prerelease[identifier.split(".").length];
308
- isNaN(prereleaseBase) && (this.prerelease = prerelease);
309
- } else
310
- this.prerelease = prerelease;
311
- }
312
- break;
313
- }
314
- default:
315
- throw new Error(`invalid increment argument: ${release}`);
316
- }
317
- return this.raw = this.format(), this.build.length && (this.raw += `+${this.build.join(".")}`), this;
318
- }
319
- };
320
- module.exports = SemVer;
321
- }
322
- });
323
-
324
- // ../../../node_modules/semver/functions/compare.js
325
- var require_compare = __commonJS({
326
- "../../../node_modules/semver/functions/compare.js"(exports, module) {
327
- "use strict";
328
- var SemVer = require_semver(), compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
329
- module.exports = compare;
330
- }
331
- });
332
-
333
- // ../../../node_modules/semver/functions/gte.js
334
- var require_gte = __commonJS({
335
- "../../../node_modules/semver/functions/gte.js"(exports, module) {
336
- "use strict";
337
- var compare = require_compare(), gte = (a, b, loose) => compare(a, b, loose) >= 0;
338
- module.exports = gte;
339
- }
340
- });
341
-
342
- export {
343
- require_constants,
344
- require_debug,
345
- require_re,
346
- require_parse_options,
347
- require_identifiers,
348
- require_semver,
349
- require_compare,
350
- require_gte
351
- };