mito-ai 0.1.50__py3-none-any.whl
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.
- mito_ai/__init__.py +114 -0
- mito_ai/_version.py +4 -0
- mito_ai/anthropic_client.py +334 -0
- mito_ai/app_deploy/__init__.py +6 -0
- mito_ai/app_deploy/app_deploy_utils.py +44 -0
- mito_ai/app_deploy/handlers.py +345 -0
- mito_ai/app_deploy/models.py +98 -0
- mito_ai/app_manager/__init__.py +4 -0
- mito_ai/app_manager/handlers.py +167 -0
- mito_ai/app_manager/models.py +71 -0
- mito_ai/app_manager/utils.py +24 -0
- mito_ai/auth/README.md +18 -0
- mito_ai/auth/__init__.py +6 -0
- mito_ai/auth/handlers.py +96 -0
- mito_ai/auth/urls.py +13 -0
- mito_ai/chat_history/handlers.py +63 -0
- mito_ai/chat_history/urls.py +32 -0
- mito_ai/completions/completion_handlers/__init__.py +3 -0
- mito_ai/completions/completion_handlers/agent_auto_error_fixup_handler.py +59 -0
- mito_ai/completions/completion_handlers/agent_execution_handler.py +66 -0
- mito_ai/completions/completion_handlers/chat_completion_handler.py +141 -0
- mito_ai/completions/completion_handlers/code_explain_handler.py +113 -0
- mito_ai/completions/completion_handlers/completion_handler.py +42 -0
- mito_ai/completions/completion_handlers/inline_completer_handler.py +48 -0
- mito_ai/completions/completion_handlers/smart_debug_handler.py +160 -0
- mito_ai/completions/completion_handlers/utils.py +147 -0
- mito_ai/completions/handlers.py +415 -0
- mito_ai/completions/message_history.py +401 -0
- mito_ai/completions/models.py +404 -0
- mito_ai/completions/prompt_builders/__init__.py +3 -0
- mito_ai/completions/prompt_builders/agent_execution_prompt.py +57 -0
- mito_ai/completions/prompt_builders/agent_smart_debug_prompt.py +160 -0
- mito_ai/completions/prompt_builders/agent_system_message.py +472 -0
- mito_ai/completions/prompt_builders/chat_name_prompt.py +15 -0
- mito_ai/completions/prompt_builders/chat_prompt.py +116 -0
- mito_ai/completions/prompt_builders/chat_system_message.py +92 -0
- mito_ai/completions/prompt_builders/explain_code_prompt.py +32 -0
- mito_ai/completions/prompt_builders/inline_completer_prompt.py +197 -0
- mito_ai/completions/prompt_builders/prompt_constants.py +170 -0
- mito_ai/completions/prompt_builders/smart_debug_prompt.py +199 -0
- mito_ai/completions/prompt_builders/utils.py +84 -0
- mito_ai/completions/providers.py +284 -0
- mito_ai/constants.py +63 -0
- mito_ai/db/__init__.py +3 -0
- mito_ai/db/crawlers/__init__.py +6 -0
- mito_ai/db/crawlers/base_crawler.py +61 -0
- mito_ai/db/crawlers/constants.py +43 -0
- mito_ai/db/crawlers/snowflake.py +71 -0
- mito_ai/db/handlers.py +168 -0
- mito_ai/db/models.py +31 -0
- mito_ai/db/urls.py +34 -0
- mito_ai/db/utils.py +185 -0
- mito_ai/docker/mssql/compose.yml +37 -0
- mito_ai/docker/mssql/init/setup.sql +21 -0
- mito_ai/docker/mysql/compose.yml +18 -0
- mito_ai/docker/mysql/init/setup.sql +13 -0
- mito_ai/docker/oracle/compose.yml +17 -0
- mito_ai/docker/oracle/init/setup.sql +20 -0
- mito_ai/docker/postgres/compose.yml +17 -0
- mito_ai/docker/postgres/init/setup.sql +13 -0
- mito_ai/enterprise/__init__.py +3 -0
- mito_ai/enterprise/utils.py +15 -0
- mito_ai/file_uploads/__init__.py +3 -0
- mito_ai/file_uploads/handlers.py +248 -0
- mito_ai/file_uploads/urls.py +21 -0
- mito_ai/gemini_client.py +232 -0
- mito_ai/log/handlers.py +38 -0
- mito_ai/log/urls.py +21 -0
- mito_ai/logger.py +37 -0
- mito_ai/openai_client.py +382 -0
- mito_ai/path_utils.py +70 -0
- mito_ai/rules/handlers.py +44 -0
- mito_ai/rules/urls.py +22 -0
- mito_ai/rules/utils.py +56 -0
- mito_ai/settings/handlers.py +41 -0
- mito_ai/settings/urls.py +20 -0
- mito_ai/settings/utils.py +42 -0
- mito_ai/streamlit_conversion/agent_utils.py +37 -0
- mito_ai/streamlit_conversion/prompts/prompt_constants.py +172 -0
- mito_ai/streamlit_conversion/prompts/prompt_utils.py +10 -0
- mito_ai/streamlit_conversion/prompts/streamlit_app_creation_prompt.py +46 -0
- mito_ai/streamlit_conversion/prompts/streamlit_error_correction_prompt.py +28 -0
- mito_ai/streamlit_conversion/prompts/streamlit_finish_todo_prompt.py +45 -0
- mito_ai/streamlit_conversion/prompts/streamlit_system_prompt.py +56 -0
- mito_ai/streamlit_conversion/prompts/update_existing_app_prompt.py +50 -0
- mito_ai/streamlit_conversion/search_replace_utils.py +94 -0
- mito_ai/streamlit_conversion/streamlit_agent_handler.py +144 -0
- mito_ai/streamlit_conversion/streamlit_utils.py +85 -0
- mito_ai/streamlit_conversion/validate_streamlit_app.py +105 -0
- mito_ai/streamlit_preview/__init__.py +6 -0
- mito_ai/streamlit_preview/handlers.py +111 -0
- mito_ai/streamlit_preview/manager.py +152 -0
- mito_ai/streamlit_preview/urls.py +22 -0
- mito_ai/streamlit_preview/utils.py +29 -0
- mito_ai/tests/__init__.py +3 -0
- mito_ai/tests/chat_history/test_chat_history.py +211 -0
- mito_ai/tests/completions/completion_handlers_utils_test.py +190 -0
- mito_ai/tests/conftest.py +53 -0
- mito_ai/tests/create_agent_system_message_prompt_test.py +22 -0
- mito_ai/tests/data/prompt_lg.py +69 -0
- mito_ai/tests/data/prompt_sm.py +6 -0
- mito_ai/tests/data/prompt_xl.py +13 -0
- mito_ai/tests/data/stock_data.sqlite3 +0 -0
- mito_ai/tests/db/conftest.py +39 -0
- mito_ai/tests/db/connections_test.py +102 -0
- mito_ai/tests/db/mssql_test.py +29 -0
- mito_ai/tests/db/mysql_test.py +29 -0
- mito_ai/tests/db/oracle_test.py +29 -0
- mito_ai/tests/db/postgres_test.py +29 -0
- mito_ai/tests/db/schema_test.py +93 -0
- mito_ai/tests/db/sqlite_test.py +31 -0
- mito_ai/tests/db/test_db_constants.py +61 -0
- mito_ai/tests/deploy_app/test_app_deploy_utils.py +89 -0
- mito_ai/tests/file_uploads/__init__.py +2 -0
- mito_ai/tests/file_uploads/test_handlers.py +282 -0
- mito_ai/tests/message_history/test_generate_short_chat_name.py +120 -0
- mito_ai/tests/message_history/test_message_history_utils.py +469 -0
- mito_ai/tests/open_ai_utils_test.py +152 -0
- mito_ai/tests/performance_test.py +329 -0
- mito_ai/tests/providers/test_anthropic_client.py +447 -0
- mito_ai/tests/providers/test_azure.py +631 -0
- mito_ai/tests/providers/test_capabilities.py +120 -0
- mito_ai/tests/providers/test_gemini_client.py +195 -0
- mito_ai/tests/providers/test_mito_server_utils.py +448 -0
- mito_ai/tests/providers/test_model_resolution.py +130 -0
- mito_ai/tests/providers/test_openai_client.py +57 -0
- mito_ai/tests/providers/test_provider_completion_exception.py +66 -0
- mito_ai/tests/providers/test_provider_limits.py +42 -0
- mito_ai/tests/providers/test_providers.py +382 -0
- mito_ai/tests/providers/test_retry_logic.py +389 -0
- mito_ai/tests/providers/test_stream_mito_server_utils.py +140 -0
- mito_ai/tests/providers/utils.py +85 -0
- mito_ai/tests/rules/conftest.py +26 -0
- mito_ai/tests/rules/rules_test.py +117 -0
- mito_ai/tests/server_limits_test.py +406 -0
- mito_ai/tests/settings/conftest.py +26 -0
- mito_ai/tests/settings/settings_test.py +70 -0
- mito_ai/tests/settings/test_settings_constants.py +9 -0
- mito_ai/tests/streamlit_conversion/__init__.py +3 -0
- mito_ai/tests/streamlit_conversion/test_apply_search_replace.py +240 -0
- mito_ai/tests/streamlit_conversion/test_streamlit_agent_handler.py +246 -0
- mito_ai/tests/streamlit_conversion/test_streamlit_utils.py +193 -0
- mito_ai/tests/streamlit_conversion/test_validate_streamlit_app.py +112 -0
- mito_ai/tests/streamlit_preview/test_streamlit_preview_handler.py +118 -0
- mito_ai/tests/streamlit_preview/test_streamlit_preview_manager.py +292 -0
- mito_ai/tests/test_constants.py +47 -0
- mito_ai/tests/test_telemetry.py +12 -0
- mito_ai/tests/user/__init__.py +2 -0
- mito_ai/tests/user/test_user.py +120 -0
- mito_ai/tests/utils/__init__.py +3 -0
- mito_ai/tests/utils/test_anthropic_utils.py +162 -0
- mito_ai/tests/utils/test_gemini_utils.py +98 -0
- mito_ai/tests/version_check_test.py +169 -0
- mito_ai/user/handlers.py +45 -0
- mito_ai/user/urls.py +21 -0
- mito_ai/utils/__init__.py +3 -0
- mito_ai/utils/anthropic_utils.py +168 -0
- mito_ai/utils/create.py +94 -0
- mito_ai/utils/db.py +74 -0
- mito_ai/utils/error_classes.py +42 -0
- mito_ai/utils/gemini_utils.py +133 -0
- mito_ai/utils/message_history_utils.py +87 -0
- mito_ai/utils/mito_server_utils.py +242 -0
- mito_ai/utils/open_ai_utils.py +200 -0
- mito_ai/utils/provider_utils.py +49 -0
- mito_ai/utils/schema.py +86 -0
- mito_ai/utils/server_limits.py +152 -0
- mito_ai/utils/telemetry_utils.py +480 -0
- mito_ai/utils/utils.py +89 -0
- mito_ai/utils/version_utils.py +94 -0
- mito_ai/utils/websocket_base.py +88 -0
- mito_ai/version_check.py +60 -0
- mito_ai-0.1.50.data/data/etc/jupyter/jupyter_server_config.d/mito_ai.json +7 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/build_log.json +728 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/package.json +243 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/schemas/mito_ai/package.json.orig +238 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/schemas/mito_ai/toolbar-buttons.json +37 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.8f1845da6bf2b128c049.js +21602 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.8f1845da6bf2b128c049.js.map +1 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/static/node_modules_process_browser_js.4b128e94d31a81ebd209.js +198 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/static/node_modules_process_browser_js.4b128e94d31a81ebd209.js.map +1 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.78d3ccb73e7ca1da3aae.js +619 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.78d3ccb73e7ca1da3aae.js.map +1 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/static/style.js +4 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/static/style_index_js.5876024bb17dbd6a3ee6.js +712 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/static/style_index_js.5876024bb17dbd6a3ee6.js.map +1 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_auth_dist_esm_providers_cognito_apis_signOut_mjs-node_module-75790d.688c25857e7b81b1740f.js +533 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_auth_dist_esm_providers_cognito_apis_signOut_mjs-node_module-75790d.688c25857e7b81b1740f.js.map +1 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_auth_dist_esm_providers_cognito_tokenProvider_tokenProvider_-72f1c8.a917210f057fcfe224ad.js +6941 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_auth_dist_esm_providers_cognito_tokenProvider_tokenProvider_-72f1c8.a917210f057fcfe224ad.js.map +1 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_dist_esm_index_mjs.6bac1a8c4cc93f15f6b7.js +1021 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_dist_esm_index_mjs.6bac1a8c4cc93f15f6b7.js.map +1 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_ui-react_dist_esm_index_mjs.4fcecd65bef9e9847609.js +59698 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_ui-react_dist_esm_index_mjs.4fcecd65bef9e9847609.js.map +1 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_react-dom_client_js-node_modules_aws-amplify_ui-react_dist_styles_css.b43d4249e4d3dac9ad7b.js +7440 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_react-dom_client_js-node_modules_aws-amplify_ui-react_dist_styles_css.b43d4249e4d3dac9ad7b.js.map +1 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_semver_index_js.3f6754ac5116d47de76b.js +2792 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_semver_index_js.3f6754ac5116d47de76b.js.map +1 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_vscode-diff_dist_index_js.ea55f1f9346638aafbcf.js +4859 -0
- mito_ai-0.1.50.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_vscode-diff_dist_index_js.ea55f1f9346638aafbcf.js.map +1 -0
- mito_ai-0.1.50.dist-info/METADATA +221 -0
- mito_ai-0.1.50.dist-info/RECORD +205 -0
- mito_ai-0.1.50.dist-info/WHEEL +4 -0
- mito_ai-0.1.50.dist-info/entry_points.txt +2 -0
- mito_ai-0.1.50.dist-info/licenses/LICENSE +3 -0
|
@@ -0,0 +1,2792 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
(self["webpackChunkmito_ai"] = self["webpackChunkmito_ai"] || []).push([["vendors-node_modules_semver_index_js"],{
|
|
3
|
+
|
|
4
|
+
/***/ "./node_modules/semver/classes/comparator.js":
|
|
5
|
+
/*!***************************************************!*\
|
|
6
|
+
!*** ./node_modules/semver/classes/comparator.js ***!
|
|
7
|
+
\***************************************************/
|
|
8
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
const ANY = Symbol('SemVer ANY')
|
|
13
|
+
// hoisted class for cyclic dependency
|
|
14
|
+
class Comparator {
|
|
15
|
+
static get ANY () {
|
|
16
|
+
return ANY
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
constructor (comp, options) {
|
|
20
|
+
options = parseOptions(options)
|
|
21
|
+
|
|
22
|
+
if (comp instanceof Comparator) {
|
|
23
|
+
if (comp.loose === !!options.loose) {
|
|
24
|
+
return comp
|
|
25
|
+
} else {
|
|
26
|
+
comp = comp.value
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
comp = comp.trim().split(/\s+/).join(' ')
|
|
31
|
+
debug('comparator', comp, options)
|
|
32
|
+
this.options = options
|
|
33
|
+
this.loose = !!options.loose
|
|
34
|
+
this.parse(comp)
|
|
35
|
+
|
|
36
|
+
if (this.semver === ANY) {
|
|
37
|
+
this.value = ''
|
|
38
|
+
} else {
|
|
39
|
+
this.value = this.operator + this.semver.version
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
debug('comp', this)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
parse (comp) {
|
|
46
|
+
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
|
|
47
|
+
const m = comp.match(r)
|
|
48
|
+
|
|
49
|
+
if (!m) {
|
|
50
|
+
throw new TypeError(`Invalid comparator: ${comp}`)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
this.operator = m[1] !== undefined ? m[1] : ''
|
|
54
|
+
if (this.operator === '=') {
|
|
55
|
+
this.operator = ''
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// if it literally is just '>' or '' then allow anything.
|
|
59
|
+
if (!m[2]) {
|
|
60
|
+
this.semver = ANY
|
|
61
|
+
} else {
|
|
62
|
+
this.semver = new SemVer(m[2], this.options.loose)
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
toString () {
|
|
67
|
+
return this.value
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
test (version) {
|
|
71
|
+
debug('Comparator.test', version, this.options.loose)
|
|
72
|
+
|
|
73
|
+
if (this.semver === ANY || version === ANY) {
|
|
74
|
+
return true
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (typeof version === 'string') {
|
|
78
|
+
try {
|
|
79
|
+
version = new SemVer(version, this.options)
|
|
80
|
+
} catch (er) {
|
|
81
|
+
return false
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return cmp(version, this.operator, this.semver, this.options)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
intersects (comp, options) {
|
|
89
|
+
if (!(comp instanceof Comparator)) {
|
|
90
|
+
throw new TypeError('a Comparator is required')
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (this.operator === '') {
|
|
94
|
+
if (this.value === '') {
|
|
95
|
+
return true
|
|
96
|
+
}
|
|
97
|
+
return new Range(comp.value, options).test(this.value)
|
|
98
|
+
} else if (comp.operator === '') {
|
|
99
|
+
if (comp.value === '') {
|
|
100
|
+
return true
|
|
101
|
+
}
|
|
102
|
+
return new Range(this.value, options).test(comp.semver)
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
options = parseOptions(options)
|
|
106
|
+
|
|
107
|
+
// Special cases where nothing can possibly be lower
|
|
108
|
+
if (options.includePrerelease &&
|
|
109
|
+
(this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {
|
|
110
|
+
return false
|
|
111
|
+
}
|
|
112
|
+
if (!options.includePrerelease &&
|
|
113
|
+
(this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {
|
|
114
|
+
return false
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Same direction increasing (> or >=)
|
|
118
|
+
if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {
|
|
119
|
+
return true
|
|
120
|
+
}
|
|
121
|
+
// Same direction decreasing (< or <=)
|
|
122
|
+
if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {
|
|
123
|
+
return true
|
|
124
|
+
}
|
|
125
|
+
// same SemVer and both sides are inclusive (<= or >=)
|
|
126
|
+
if (
|
|
127
|
+
(this.semver.version === comp.semver.version) &&
|
|
128
|
+
this.operator.includes('=') && comp.operator.includes('=')) {
|
|
129
|
+
return true
|
|
130
|
+
}
|
|
131
|
+
// opposite directions less than
|
|
132
|
+
if (cmp(this.semver, '<', comp.semver, options) &&
|
|
133
|
+
this.operator.startsWith('>') && comp.operator.startsWith('<')) {
|
|
134
|
+
return true
|
|
135
|
+
}
|
|
136
|
+
// opposite directions greater than
|
|
137
|
+
if (cmp(this.semver, '>', comp.semver, options) &&
|
|
138
|
+
this.operator.startsWith('<') && comp.operator.startsWith('>')) {
|
|
139
|
+
return true
|
|
140
|
+
}
|
|
141
|
+
return false
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
module.exports = Comparator
|
|
146
|
+
|
|
147
|
+
const parseOptions = __webpack_require__(/*! ../internal/parse-options */ "./node_modules/semver/internal/parse-options.js")
|
|
148
|
+
const { safeRe: re, t } = __webpack_require__(/*! ../internal/re */ "./node_modules/semver/internal/re.js")
|
|
149
|
+
const cmp = __webpack_require__(/*! ../functions/cmp */ "./node_modules/semver/functions/cmp.js")
|
|
150
|
+
const debug = __webpack_require__(/*! ../internal/debug */ "./node_modules/semver/internal/debug.js")
|
|
151
|
+
const SemVer = __webpack_require__(/*! ./semver */ "./node_modules/semver/classes/semver.js")
|
|
152
|
+
const Range = __webpack_require__(/*! ./range */ "./node_modules/semver/classes/range.js")
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
/***/ }),
|
|
156
|
+
|
|
157
|
+
/***/ "./node_modules/semver/classes/range.js":
|
|
158
|
+
/*!**********************************************!*\
|
|
159
|
+
!*** ./node_modules/semver/classes/range.js ***!
|
|
160
|
+
\**********************************************/
|
|
161
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
const SPACE_CHARACTERS = /\s+/g
|
|
166
|
+
|
|
167
|
+
// hoisted class for cyclic dependency
|
|
168
|
+
class Range {
|
|
169
|
+
constructor (range, options) {
|
|
170
|
+
options = parseOptions(options)
|
|
171
|
+
|
|
172
|
+
if (range instanceof Range) {
|
|
173
|
+
if (
|
|
174
|
+
range.loose === !!options.loose &&
|
|
175
|
+
range.includePrerelease === !!options.includePrerelease
|
|
176
|
+
) {
|
|
177
|
+
return range
|
|
178
|
+
} else {
|
|
179
|
+
return new Range(range.raw, options)
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
if (range instanceof Comparator) {
|
|
184
|
+
// just put it in the set and return
|
|
185
|
+
this.raw = range.value
|
|
186
|
+
this.set = [[range]]
|
|
187
|
+
this.formatted = undefined
|
|
188
|
+
return this
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
this.options = options
|
|
192
|
+
this.loose = !!options.loose
|
|
193
|
+
this.includePrerelease = !!options.includePrerelease
|
|
194
|
+
|
|
195
|
+
// First reduce all whitespace as much as possible so we do not have to rely
|
|
196
|
+
// on potentially slow regexes like \s*. This is then stored and used for
|
|
197
|
+
// future error messages as well.
|
|
198
|
+
this.raw = range.trim().replace(SPACE_CHARACTERS, ' ')
|
|
199
|
+
|
|
200
|
+
// First, split on ||
|
|
201
|
+
this.set = this.raw
|
|
202
|
+
.split('||')
|
|
203
|
+
// map the range to a 2d array of comparators
|
|
204
|
+
.map(r => this.parseRange(r.trim()))
|
|
205
|
+
// throw out any comparator lists that are empty
|
|
206
|
+
// this generally means that it was not a valid range, which is allowed
|
|
207
|
+
// in loose mode, but will still throw if the WHOLE range is invalid.
|
|
208
|
+
.filter(c => c.length)
|
|
209
|
+
|
|
210
|
+
if (!this.set.length) {
|
|
211
|
+
throw new TypeError(`Invalid SemVer Range: ${this.raw}`)
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// if we have any that are not the null set, throw out null sets.
|
|
215
|
+
if (this.set.length > 1) {
|
|
216
|
+
// keep the first one, in case they're all null sets
|
|
217
|
+
const first = this.set[0]
|
|
218
|
+
this.set = this.set.filter(c => !isNullSet(c[0]))
|
|
219
|
+
if (this.set.length === 0) {
|
|
220
|
+
this.set = [first]
|
|
221
|
+
} else if (this.set.length > 1) {
|
|
222
|
+
// if we have any that are *, then the range is just *
|
|
223
|
+
for (const c of this.set) {
|
|
224
|
+
if (c.length === 1 && isAny(c[0])) {
|
|
225
|
+
this.set = [c]
|
|
226
|
+
break
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
this.formatted = undefined
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
get range () {
|
|
236
|
+
if (this.formatted === undefined) {
|
|
237
|
+
this.formatted = ''
|
|
238
|
+
for (let i = 0; i < this.set.length; i++) {
|
|
239
|
+
if (i > 0) {
|
|
240
|
+
this.formatted += '||'
|
|
241
|
+
}
|
|
242
|
+
const comps = this.set[i]
|
|
243
|
+
for (let k = 0; k < comps.length; k++) {
|
|
244
|
+
if (k > 0) {
|
|
245
|
+
this.formatted += ' '
|
|
246
|
+
}
|
|
247
|
+
this.formatted += comps[k].toString().trim()
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
return this.formatted
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
format () {
|
|
255
|
+
return this.range
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
toString () {
|
|
259
|
+
return this.range
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
parseRange (range) {
|
|
263
|
+
// memoize range parsing for performance.
|
|
264
|
+
// this is a very hot path, and fully deterministic.
|
|
265
|
+
const memoOpts =
|
|
266
|
+
(this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |
|
|
267
|
+
(this.options.loose && FLAG_LOOSE)
|
|
268
|
+
const memoKey = memoOpts + ':' + range
|
|
269
|
+
const cached = cache.get(memoKey)
|
|
270
|
+
if (cached) {
|
|
271
|
+
return cached
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
const loose = this.options.loose
|
|
275
|
+
// `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
|
|
276
|
+
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]
|
|
277
|
+
range = range.replace(hr, hyphenReplace(this.options.includePrerelease))
|
|
278
|
+
debug('hyphen replace', range)
|
|
279
|
+
|
|
280
|
+
// `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
|
|
281
|
+
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)
|
|
282
|
+
debug('comparator trim', range)
|
|
283
|
+
|
|
284
|
+
// `~ 1.2.3` => `~1.2.3`
|
|
285
|
+
range = range.replace(re[t.TILDETRIM], tildeTrimReplace)
|
|
286
|
+
debug('tilde trim', range)
|
|
287
|
+
|
|
288
|
+
// `^ 1.2.3` => `^1.2.3`
|
|
289
|
+
range = range.replace(re[t.CARETTRIM], caretTrimReplace)
|
|
290
|
+
debug('caret trim', range)
|
|
291
|
+
|
|
292
|
+
// At this point, the range is completely trimmed and
|
|
293
|
+
// ready to be split into comparators.
|
|
294
|
+
|
|
295
|
+
let rangeList = range
|
|
296
|
+
.split(' ')
|
|
297
|
+
.map(comp => parseComparator(comp, this.options))
|
|
298
|
+
.join(' ')
|
|
299
|
+
.split(/\s+/)
|
|
300
|
+
// >=0.0.0 is equivalent to *
|
|
301
|
+
.map(comp => replaceGTE0(comp, this.options))
|
|
302
|
+
|
|
303
|
+
if (loose) {
|
|
304
|
+
// in loose mode, throw out any that are not valid comparators
|
|
305
|
+
rangeList = rangeList.filter(comp => {
|
|
306
|
+
debug('loose invalid filter', comp, this.options)
|
|
307
|
+
return !!comp.match(re[t.COMPARATORLOOSE])
|
|
308
|
+
})
|
|
309
|
+
}
|
|
310
|
+
debug('range list', rangeList)
|
|
311
|
+
|
|
312
|
+
// if any comparators are the null set, then replace with JUST null set
|
|
313
|
+
// if more than one comparator, remove any * comparators
|
|
314
|
+
// also, don't include the same comparator more than once
|
|
315
|
+
const rangeMap = new Map()
|
|
316
|
+
const comparators = rangeList.map(comp => new Comparator(comp, this.options))
|
|
317
|
+
for (const comp of comparators) {
|
|
318
|
+
if (isNullSet(comp)) {
|
|
319
|
+
return [comp]
|
|
320
|
+
}
|
|
321
|
+
rangeMap.set(comp.value, comp)
|
|
322
|
+
}
|
|
323
|
+
if (rangeMap.size > 1 && rangeMap.has('')) {
|
|
324
|
+
rangeMap.delete('')
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
const result = [...rangeMap.values()]
|
|
328
|
+
cache.set(memoKey, result)
|
|
329
|
+
return result
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
intersects (range, options) {
|
|
333
|
+
if (!(range instanceof Range)) {
|
|
334
|
+
throw new TypeError('a Range is required')
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
return this.set.some((thisComparators) => {
|
|
338
|
+
return (
|
|
339
|
+
isSatisfiable(thisComparators, options) &&
|
|
340
|
+
range.set.some((rangeComparators) => {
|
|
341
|
+
return (
|
|
342
|
+
isSatisfiable(rangeComparators, options) &&
|
|
343
|
+
thisComparators.every((thisComparator) => {
|
|
344
|
+
return rangeComparators.every((rangeComparator) => {
|
|
345
|
+
return thisComparator.intersects(rangeComparator, options)
|
|
346
|
+
})
|
|
347
|
+
})
|
|
348
|
+
)
|
|
349
|
+
})
|
|
350
|
+
)
|
|
351
|
+
})
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
// if ANY of the sets match ALL of its comparators, then pass
|
|
355
|
+
test (version) {
|
|
356
|
+
if (!version) {
|
|
357
|
+
return false
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
if (typeof version === 'string') {
|
|
361
|
+
try {
|
|
362
|
+
version = new SemVer(version, this.options)
|
|
363
|
+
} catch (er) {
|
|
364
|
+
return false
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
for (let i = 0; i < this.set.length; i++) {
|
|
369
|
+
if (testSet(this.set[i], version, this.options)) {
|
|
370
|
+
return true
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
return false
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
module.exports = Range
|
|
378
|
+
|
|
379
|
+
const LRU = __webpack_require__(/*! ../internal/lrucache */ "./node_modules/semver/internal/lrucache.js")
|
|
380
|
+
const cache = new LRU()
|
|
381
|
+
|
|
382
|
+
const parseOptions = __webpack_require__(/*! ../internal/parse-options */ "./node_modules/semver/internal/parse-options.js")
|
|
383
|
+
const Comparator = __webpack_require__(/*! ./comparator */ "./node_modules/semver/classes/comparator.js")
|
|
384
|
+
const debug = __webpack_require__(/*! ../internal/debug */ "./node_modules/semver/internal/debug.js")
|
|
385
|
+
const SemVer = __webpack_require__(/*! ./semver */ "./node_modules/semver/classes/semver.js")
|
|
386
|
+
const {
|
|
387
|
+
safeRe: re,
|
|
388
|
+
t,
|
|
389
|
+
comparatorTrimReplace,
|
|
390
|
+
tildeTrimReplace,
|
|
391
|
+
caretTrimReplace,
|
|
392
|
+
} = __webpack_require__(/*! ../internal/re */ "./node_modules/semver/internal/re.js")
|
|
393
|
+
const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = __webpack_require__(/*! ../internal/constants */ "./node_modules/semver/internal/constants.js")
|
|
394
|
+
|
|
395
|
+
const isNullSet = c => c.value === '<0.0.0-0'
|
|
396
|
+
const isAny = c => c.value === ''
|
|
397
|
+
|
|
398
|
+
// take a set of comparators and determine whether there
|
|
399
|
+
// exists a version which can satisfy it
|
|
400
|
+
const isSatisfiable = (comparators, options) => {
|
|
401
|
+
let result = true
|
|
402
|
+
const remainingComparators = comparators.slice()
|
|
403
|
+
let testComparator = remainingComparators.pop()
|
|
404
|
+
|
|
405
|
+
while (result && remainingComparators.length) {
|
|
406
|
+
result = remainingComparators.every((otherComparator) => {
|
|
407
|
+
return testComparator.intersects(otherComparator, options)
|
|
408
|
+
})
|
|
409
|
+
|
|
410
|
+
testComparator = remainingComparators.pop()
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
return result
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
// comprised of xranges, tildes, stars, and gtlt's at this point.
|
|
417
|
+
// already replaced the hyphen ranges
|
|
418
|
+
// turn into a set of JUST comparators.
|
|
419
|
+
const parseComparator = (comp, options) => {
|
|
420
|
+
debug('comp', comp, options)
|
|
421
|
+
comp = replaceCarets(comp, options)
|
|
422
|
+
debug('caret', comp)
|
|
423
|
+
comp = replaceTildes(comp, options)
|
|
424
|
+
debug('tildes', comp)
|
|
425
|
+
comp = replaceXRanges(comp, options)
|
|
426
|
+
debug('xrange', comp)
|
|
427
|
+
comp = replaceStars(comp, options)
|
|
428
|
+
debug('stars', comp)
|
|
429
|
+
return comp
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
const isX = id => !id || id.toLowerCase() === 'x' || id === '*'
|
|
433
|
+
|
|
434
|
+
// ~, ~> --> * (any, kinda silly)
|
|
435
|
+
// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0
|
|
436
|
+
// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0
|
|
437
|
+
// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0
|
|
438
|
+
// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0
|
|
439
|
+
// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0
|
|
440
|
+
// ~0.0.1 --> >=0.0.1 <0.1.0-0
|
|
441
|
+
const replaceTildes = (comp, options) => {
|
|
442
|
+
return comp
|
|
443
|
+
.trim()
|
|
444
|
+
.split(/\s+/)
|
|
445
|
+
.map((c) => replaceTilde(c, options))
|
|
446
|
+
.join(' ')
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
const replaceTilde = (comp, options) => {
|
|
450
|
+
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]
|
|
451
|
+
return comp.replace(r, (_, M, m, p, pr) => {
|
|
452
|
+
debug('tilde', comp, _, M, m, p, pr)
|
|
453
|
+
let ret
|
|
454
|
+
|
|
455
|
+
if (isX(M)) {
|
|
456
|
+
ret = ''
|
|
457
|
+
} else if (isX(m)) {
|
|
458
|
+
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`
|
|
459
|
+
} else if (isX(p)) {
|
|
460
|
+
// ~1.2 == >=1.2.0 <1.3.0-0
|
|
461
|
+
ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`
|
|
462
|
+
} else if (pr) {
|
|
463
|
+
debug('replaceTilde pr', pr)
|
|
464
|
+
ret = `>=${M}.${m}.${p}-${pr
|
|
465
|
+
} <${M}.${+m + 1}.0-0`
|
|
466
|
+
} else {
|
|
467
|
+
// ~1.2.3 == >=1.2.3 <1.3.0-0
|
|
468
|
+
ret = `>=${M}.${m}.${p
|
|
469
|
+
} <${M}.${+m + 1}.0-0`
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
debug('tilde return', ret)
|
|
473
|
+
return ret
|
|
474
|
+
})
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
// ^ --> * (any, kinda silly)
|
|
478
|
+
// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0
|
|
479
|
+
// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0
|
|
480
|
+
// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0
|
|
481
|
+
// ^1.2.3 --> >=1.2.3 <2.0.0-0
|
|
482
|
+
// ^1.2.0 --> >=1.2.0 <2.0.0-0
|
|
483
|
+
// ^0.0.1 --> >=0.0.1 <0.0.2-0
|
|
484
|
+
// ^0.1.0 --> >=0.1.0 <0.2.0-0
|
|
485
|
+
const replaceCarets = (comp, options) => {
|
|
486
|
+
return comp
|
|
487
|
+
.trim()
|
|
488
|
+
.split(/\s+/)
|
|
489
|
+
.map((c) => replaceCaret(c, options))
|
|
490
|
+
.join(' ')
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
const replaceCaret = (comp, options) => {
|
|
494
|
+
debug('caret', comp, options)
|
|
495
|
+
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]
|
|
496
|
+
const z = options.includePrerelease ? '-0' : ''
|
|
497
|
+
return comp.replace(r, (_, M, m, p, pr) => {
|
|
498
|
+
debug('caret', comp, _, M, m, p, pr)
|
|
499
|
+
let ret
|
|
500
|
+
|
|
501
|
+
if (isX(M)) {
|
|
502
|
+
ret = ''
|
|
503
|
+
} else if (isX(m)) {
|
|
504
|
+
ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`
|
|
505
|
+
} else if (isX(p)) {
|
|
506
|
+
if (M === '0') {
|
|
507
|
+
ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`
|
|
508
|
+
} else {
|
|
509
|
+
ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`
|
|
510
|
+
}
|
|
511
|
+
} else if (pr) {
|
|
512
|
+
debug('replaceCaret pr', pr)
|
|
513
|
+
if (M === '0') {
|
|
514
|
+
if (m === '0') {
|
|
515
|
+
ret = `>=${M}.${m}.${p}-${pr
|
|
516
|
+
} <${M}.${m}.${+p + 1}-0`
|
|
517
|
+
} else {
|
|
518
|
+
ret = `>=${M}.${m}.${p}-${pr
|
|
519
|
+
} <${M}.${+m + 1}.0-0`
|
|
520
|
+
}
|
|
521
|
+
} else {
|
|
522
|
+
ret = `>=${M}.${m}.${p}-${pr
|
|
523
|
+
} <${+M + 1}.0.0-0`
|
|
524
|
+
}
|
|
525
|
+
} else {
|
|
526
|
+
debug('no pr')
|
|
527
|
+
if (M === '0') {
|
|
528
|
+
if (m === '0') {
|
|
529
|
+
ret = `>=${M}.${m}.${p
|
|
530
|
+
}${z} <${M}.${m}.${+p + 1}-0`
|
|
531
|
+
} else {
|
|
532
|
+
ret = `>=${M}.${m}.${p
|
|
533
|
+
}${z} <${M}.${+m + 1}.0-0`
|
|
534
|
+
}
|
|
535
|
+
} else {
|
|
536
|
+
ret = `>=${M}.${m}.${p
|
|
537
|
+
} <${+M + 1}.0.0-0`
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
debug('caret return', ret)
|
|
542
|
+
return ret
|
|
543
|
+
})
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
const replaceXRanges = (comp, options) => {
|
|
547
|
+
debug('replaceXRanges', comp, options)
|
|
548
|
+
return comp
|
|
549
|
+
.split(/\s+/)
|
|
550
|
+
.map((c) => replaceXRange(c, options))
|
|
551
|
+
.join(' ')
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
const replaceXRange = (comp, options) => {
|
|
555
|
+
comp = comp.trim()
|
|
556
|
+
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]
|
|
557
|
+
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
558
|
+
debug('xRange', comp, ret, gtlt, M, m, p, pr)
|
|
559
|
+
const xM = isX(M)
|
|
560
|
+
const xm = xM || isX(m)
|
|
561
|
+
const xp = xm || isX(p)
|
|
562
|
+
const anyX = xp
|
|
563
|
+
|
|
564
|
+
if (gtlt === '=' && anyX) {
|
|
565
|
+
gtlt = ''
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
// if we're including prereleases in the match, then we need
|
|
569
|
+
// to fix this to -0, the lowest possible prerelease value
|
|
570
|
+
pr = options.includePrerelease ? '-0' : ''
|
|
571
|
+
|
|
572
|
+
if (xM) {
|
|
573
|
+
if (gtlt === '>' || gtlt === '<') {
|
|
574
|
+
// nothing is allowed
|
|
575
|
+
ret = '<0.0.0-0'
|
|
576
|
+
} else {
|
|
577
|
+
// nothing is forbidden
|
|
578
|
+
ret = '*'
|
|
579
|
+
}
|
|
580
|
+
} else if (gtlt && anyX) {
|
|
581
|
+
// we know patch is an x, because we have any x at all.
|
|
582
|
+
// replace X with 0
|
|
583
|
+
if (xm) {
|
|
584
|
+
m = 0
|
|
585
|
+
}
|
|
586
|
+
p = 0
|
|
587
|
+
|
|
588
|
+
if (gtlt === '>') {
|
|
589
|
+
// >1 => >=2.0.0
|
|
590
|
+
// >1.2 => >=1.3.0
|
|
591
|
+
gtlt = '>='
|
|
592
|
+
if (xm) {
|
|
593
|
+
M = +M + 1
|
|
594
|
+
m = 0
|
|
595
|
+
p = 0
|
|
596
|
+
} else {
|
|
597
|
+
m = +m + 1
|
|
598
|
+
p = 0
|
|
599
|
+
}
|
|
600
|
+
} else if (gtlt === '<=') {
|
|
601
|
+
// <=0.7.x is actually <0.8.0, since any 0.7.x should
|
|
602
|
+
// pass. Similarly, <=7.x is actually <8.0.0, etc.
|
|
603
|
+
gtlt = '<'
|
|
604
|
+
if (xm) {
|
|
605
|
+
M = +M + 1
|
|
606
|
+
} else {
|
|
607
|
+
m = +m + 1
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
if (gtlt === '<') {
|
|
612
|
+
pr = '-0'
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
ret = `${gtlt + M}.${m}.${p}${pr}`
|
|
616
|
+
} else if (xm) {
|
|
617
|
+
ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`
|
|
618
|
+
} else if (xp) {
|
|
619
|
+
ret = `>=${M}.${m}.0${pr
|
|
620
|
+
} <${M}.${+m + 1}.0-0`
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
debug('xRange return', ret)
|
|
624
|
+
|
|
625
|
+
return ret
|
|
626
|
+
})
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
// Because * is AND-ed with everything else in the comparator,
|
|
630
|
+
// and '' means "any version", just remove the *s entirely.
|
|
631
|
+
const replaceStars = (comp, options) => {
|
|
632
|
+
debug('replaceStars', comp, options)
|
|
633
|
+
// Looseness is ignored here. star is always as loose as it gets!
|
|
634
|
+
return comp
|
|
635
|
+
.trim()
|
|
636
|
+
.replace(re[t.STAR], '')
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
const replaceGTE0 = (comp, options) => {
|
|
640
|
+
debug('replaceGTE0', comp, options)
|
|
641
|
+
return comp
|
|
642
|
+
.trim()
|
|
643
|
+
.replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
// This function is passed to string.replace(re[t.HYPHENRANGE])
|
|
647
|
+
// M, m, patch, prerelease, build
|
|
648
|
+
// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
|
|
649
|
+
// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do
|
|
650
|
+
// 1.2 - 3.4 => >=1.2.0 <3.5.0-0
|
|
651
|
+
// TODO build?
|
|
652
|
+
const hyphenReplace = incPr => ($0,
|
|
653
|
+
from, fM, fm, fp, fpr, fb,
|
|
654
|
+
to, tM, tm, tp, tpr) => {
|
|
655
|
+
if (isX(fM)) {
|
|
656
|
+
from = ''
|
|
657
|
+
} else if (isX(fm)) {
|
|
658
|
+
from = `>=${fM}.0.0${incPr ? '-0' : ''}`
|
|
659
|
+
} else if (isX(fp)) {
|
|
660
|
+
from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`
|
|
661
|
+
} else if (fpr) {
|
|
662
|
+
from = `>=${from}`
|
|
663
|
+
} else {
|
|
664
|
+
from = `>=${from}${incPr ? '-0' : ''}`
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
if (isX(tM)) {
|
|
668
|
+
to = ''
|
|
669
|
+
} else if (isX(tm)) {
|
|
670
|
+
to = `<${+tM + 1}.0.0-0`
|
|
671
|
+
} else if (isX(tp)) {
|
|
672
|
+
to = `<${tM}.${+tm + 1}.0-0`
|
|
673
|
+
} else if (tpr) {
|
|
674
|
+
to = `<=${tM}.${tm}.${tp}-${tpr}`
|
|
675
|
+
} else if (incPr) {
|
|
676
|
+
to = `<${tM}.${tm}.${+tp + 1}-0`
|
|
677
|
+
} else {
|
|
678
|
+
to = `<=${to}`
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
return `${from} ${to}`.trim()
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
const testSet = (set, version, options) => {
|
|
685
|
+
for (let i = 0; i < set.length; i++) {
|
|
686
|
+
if (!set[i].test(version)) {
|
|
687
|
+
return false
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
if (version.prerelease.length && !options.includePrerelease) {
|
|
692
|
+
// Find the set of versions that are allowed to have prereleases
|
|
693
|
+
// For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
|
|
694
|
+
// That should allow `1.2.3-pr.2` to pass.
|
|
695
|
+
// However, `1.2.4-alpha.notready` should NOT be allowed,
|
|
696
|
+
// even though it's within the range set by the comparators.
|
|
697
|
+
for (let i = 0; i < set.length; i++) {
|
|
698
|
+
debug(set[i].semver)
|
|
699
|
+
if (set[i].semver === Comparator.ANY) {
|
|
700
|
+
continue
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
if (set[i].semver.prerelease.length > 0) {
|
|
704
|
+
const allowed = set[i].semver
|
|
705
|
+
if (allowed.major === version.major &&
|
|
706
|
+
allowed.minor === version.minor &&
|
|
707
|
+
allowed.patch === version.patch) {
|
|
708
|
+
return true
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
// Version has a -pre, but it's not one of the ones we like.
|
|
714
|
+
return false
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
return true
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+
/***/ }),
|
|
722
|
+
|
|
723
|
+
/***/ "./node_modules/semver/classes/semver.js":
|
|
724
|
+
/*!***********************************************!*\
|
|
725
|
+
!*** ./node_modules/semver/classes/semver.js ***!
|
|
726
|
+
\***********************************************/
|
|
727
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
const debug = __webpack_require__(/*! ../internal/debug */ "./node_modules/semver/internal/debug.js")
|
|
732
|
+
const { MAX_LENGTH, MAX_SAFE_INTEGER } = __webpack_require__(/*! ../internal/constants */ "./node_modules/semver/internal/constants.js")
|
|
733
|
+
const { safeRe: re, t } = __webpack_require__(/*! ../internal/re */ "./node_modules/semver/internal/re.js")
|
|
734
|
+
|
|
735
|
+
const parseOptions = __webpack_require__(/*! ../internal/parse-options */ "./node_modules/semver/internal/parse-options.js")
|
|
736
|
+
const { compareIdentifiers } = __webpack_require__(/*! ../internal/identifiers */ "./node_modules/semver/internal/identifiers.js")
|
|
737
|
+
class SemVer {
|
|
738
|
+
constructor (version, options) {
|
|
739
|
+
options = parseOptions(options)
|
|
740
|
+
|
|
741
|
+
if (version instanceof SemVer) {
|
|
742
|
+
if (version.loose === !!options.loose &&
|
|
743
|
+
version.includePrerelease === !!options.includePrerelease) {
|
|
744
|
+
return version
|
|
745
|
+
} else {
|
|
746
|
+
version = version.version
|
|
747
|
+
}
|
|
748
|
+
} else if (typeof version !== 'string') {
|
|
749
|
+
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`)
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
if (version.length > MAX_LENGTH) {
|
|
753
|
+
throw new TypeError(
|
|
754
|
+
`version is longer than ${MAX_LENGTH} characters`
|
|
755
|
+
)
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
debug('SemVer', version, options)
|
|
759
|
+
this.options = options
|
|
760
|
+
this.loose = !!options.loose
|
|
761
|
+
// this isn't actually relevant for versions, but keep it so that we
|
|
762
|
+
// don't run into trouble passing this.options around.
|
|
763
|
+
this.includePrerelease = !!options.includePrerelease
|
|
764
|
+
|
|
765
|
+
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])
|
|
766
|
+
|
|
767
|
+
if (!m) {
|
|
768
|
+
throw new TypeError(`Invalid Version: ${version}`)
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
this.raw = version
|
|
772
|
+
|
|
773
|
+
// these are actually numbers
|
|
774
|
+
this.major = +m[1]
|
|
775
|
+
this.minor = +m[2]
|
|
776
|
+
this.patch = +m[3]
|
|
777
|
+
|
|
778
|
+
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
|
|
779
|
+
throw new TypeError('Invalid major version')
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
|
|
783
|
+
throw new TypeError('Invalid minor version')
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
|
|
787
|
+
throw new TypeError('Invalid patch version')
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
// numberify any prerelease numeric ids
|
|
791
|
+
if (!m[4]) {
|
|
792
|
+
this.prerelease = []
|
|
793
|
+
} else {
|
|
794
|
+
this.prerelease = m[4].split('.').map((id) => {
|
|
795
|
+
if (/^[0-9]+$/.test(id)) {
|
|
796
|
+
const num = +id
|
|
797
|
+
if (num >= 0 && num < MAX_SAFE_INTEGER) {
|
|
798
|
+
return num
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
return id
|
|
802
|
+
})
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
this.build = m[5] ? m[5].split('.') : []
|
|
806
|
+
this.format()
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
format () {
|
|
810
|
+
this.version = `${this.major}.${this.minor}.${this.patch}`
|
|
811
|
+
if (this.prerelease.length) {
|
|
812
|
+
this.version += `-${this.prerelease.join('.')}`
|
|
813
|
+
}
|
|
814
|
+
return this.version
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
toString () {
|
|
818
|
+
return this.version
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
compare (other) {
|
|
822
|
+
debug('SemVer.compare', this.version, this.options, other)
|
|
823
|
+
if (!(other instanceof SemVer)) {
|
|
824
|
+
if (typeof other === 'string' && other === this.version) {
|
|
825
|
+
return 0
|
|
826
|
+
}
|
|
827
|
+
other = new SemVer(other, this.options)
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
if (other.version === this.version) {
|
|
831
|
+
return 0
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
return this.compareMain(other) || this.comparePre(other)
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
compareMain (other) {
|
|
838
|
+
if (!(other instanceof SemVer)) {
|
|
839
|
+
other = new SemVer(other, this.options)
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
return (
|
|
843
|
+
compareIdentifiers(this.major, other.major) ||
|
|
844
|
+
compareIdentifiers(this.minor, other.minor) ||
|
|
845
|
+
compareIdentifiers(this.patch, other.patch)
|
|
846
|
+
)
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
comparePre (other) {
|
|
850
|
+
if (!(other instanceof SemVer)) {
|
|
851
|
+
other = new SemVer(other, this.options)
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
// NOT having a prerelease is > having one
|
|
855
|
+
if (this.prerelease.length && !other.prerelease.length) {
|
|
856
|
+
return -1
|
|
857
|
+
} else if (!this.prerelease.length && other.prerelease.length) {
|
|
858
|
+
return 1
|
|
859
|
+
} else if (!this.prerelease.length && !other.prerelease.length) {
|
|
860
|
+
return 0
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
let i = 0
|
|
864
|
+
do {
|
|
865
|
+
const a = this.prerelease[i]
|
|
866
|
+
const b = other.prerelease[i]
|
|
867
|
+
debug('prerelease compare', i, a, b)
|
|
868
|
+
if (a === undefined && b === undefined) {
|
|
869
|
+
return 0
|
|
870
|
+
} else if (b === undefined) {
|
|
871
|
+
return 1
|
|
872
|
+
} else if (a === undefined) {
|
|
873
|
+
return -1
|
|
874
|
+
} else if (a === b) {
|
|
875
|
+
continue
|
|
876
|
+
} else {
|
|
877
|
+
return compareIdentifiers(a, b)
|
|
878
|
+
}
|
|
879
|
+
} while (++i)
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
compareBuild (other) {
|
|
883
|
+
if (!(other instanceof SemVer)) {
|
|
884
|
+
other = new SemVer(other, this.options)
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
let i = 0
|
|
888
|
+
do {
|
|
889
|
+
const a = this.build[i]
|
|
890
|
+
const b = other.build[i]
|
|
891
|
+
debug('build compare', i, a, b)
|
|
892
|
+
if (a === undefined && b === undefined) {
|
|
893
|
+
return 0
|
|
894
|
+
} else if (b === undefined) {
|
|
895
|
+
return 1
|
|
896
|
+
} else if (a === undefined) {
|
|
897
|
+
return -1
|
|
898
|
+
} else if (a === b) {
|
|
899
|
+
continue
|
|
900
|
+
} else {
|
|
901
|
+
return compareIdentifiers(a, b)
|
|
902
|
+
}
|
|
903
|
+
} while (++i)
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
// preminor will bump the version up to the next minor release, and immediately
|
|
907
|
+
// down to pre-release. premajor and prepatch work the same way.
|
|
908
|
+
inc (release, identifier, identifierBase) {
|
|
909
|
+
if (release.startsWith('pre')) {
|
|
910
|
+
if (!identifier && identifierBase === false) {
|
|
911
|
+
throw new Error('invalid increment argument: identifier is empty')
|
|
912
|
+
}
|
|
913
|
+
// Avoid an invalid semver results
|
|
914
|
+
if (identifier) {
|
|
915
|
+
const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE])
|
|
916
|
+
if (!match || match[1] !== identifier) {
|
|
917
|
+
throw new Error(`invalid identifier: ${identifier}`)
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
switch (release) {
|
|
923
|
+
case 'premajor':
|
|
924
|
+
this.prerelease.length = 0
|
|
925
|
+
this.patch = 0
|
|
926
|
+
this.minor = 0
|
|
927
|
+
this.major++
|
|
928
|
+
this.inc('pre', identifier, identifierBase)
|
|
929
|
+
break
|
|
930
|
+
case 'preminor':
|
|
931
|
+
this.prerelease.length = 0
|
|
932
|
+
this.patch = 0
|
|
933
|
+
this.minor++
|
|
934
|
+
this.inc('pre', identifier, identifierBase)
|
|
935
|
+
break
|
|
936
|
+
case 'prepatch':
|
|
937
|
+
// If this is already a prerelease, it will bump to the next version
|
|
938
|
+
// drop any prereleases that might already exist, since they are not
|
|
939
|
+
// relevant at this point.
|
|
940
|
+
this.prerelease.length = 0
|
|
941
|
+
this.inc('patch', identifier, identifierBase)
|
|
942
|
+
this.inc('pre', identifier, identifierBase)
|
|
943
|
+
break
|
|
944
|
+
// If the input is a non-prerelease version, this acts the same as
|
|
945
|
+
// prepatch.
|
|
946
|
+
case 'prerelease':
|
|
947
|
+
if (this.prerelease.length === 0) {
|
|
948
|
+
this.inc('patch', identifier, identifierBase)
|
|
949
|
+
}
|
|
950
|
+
this.inc('pre', identifier, identifierBase)
|
|
951
|
+
break
|
|
952
|
+
case 'release':
|
|
953
|
+
if (this.prerelease.length === 0) {
|
|
954
|
+
throw new Error(`version ${this.raw} is not a prerelease`)
|
|
955
|
+
}
|
|
956
|
+
this.prerelease.length = 0
|
|
957
|
+
break
|
|
958
|
+
|
|
959
|
+
case 'major':
|
|
960
|
+
// If this is a pre-major version, bump up to the same major version.
|
|
961
|
+
// Otherwise increment major.
|
|
962
|
+
// 1.0.0-5 bumps to 1.0.0
|
|
963
|
+
// 1.1.0 bumps to 2.0.0
|
|
964
|
+
if (
|
|
965
|
+
this.minor !== 0 ||
|
|
966
|
+
this.patch !== 0 ||
|
|
967
|
+
this.prerelease.length === 0
|
|
968
|
+
) {
|
|
969
|
+
this.major++
|
|
970
|
+
}
|
|
971
|
+
this.minor = 0
|
|
972
|
+
this.patch = 0
|
|
973
|
+
this.prerelease = []
|
|
974
|
+
break
|
|
975
|
+
case 'minor':
|
|
976
|
+
// If this is a pre-minor version, bump up to the same minor version.
|
|
977
|
+
// Otherwise increment minor.
|
|
978
|
+
// 1.2.0-5 bumps to 1.2.0
|
|
979
|
+
// 1.2.1 bumps to 1.3.0
|
|
980
|
+
if (this.patch !== 0 || this.prerelease.length === 0) {
|
|
981
|
+
this.minor++
|
|
982
|
+
}
|
|
983
|
+
this.patch = 0
|
|
984
|
+
this.prerelease = []
|
|
985
|
+
break
|
|
986
|
+
case 'patch':
|
|
987
|
+
// If this is not a pre-release version, it will increment the patch.
|
|
988
|
+
// If it is a pre-release it will bump up to the same patch version.
|
|
989
|
+
// 1.2.0-5 patches to 1.2.0
|
|
990
|
+
// 1.2.0 patches to 1.2.1
|
|
991
|
+
if (this.prerelease.length === 0) {
|
|
992
|
+
this.patch++
|
|
993
|
+
}
|
|
994
|
+
this.prerelease = []
|
|
995
|
+
break
|
|
996
|
+
// This probably shouldn't be used publicly.
|
|
997
|
+
// 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
|
|
998
|
+
case 'pre': {
|
|
999
|
+
const base = Number(identifierBase) ? 1 : 0
|
|
1000
|
+
|
|
1001
|
+
if (this.prerelease.length === 0) {
|
|
1002
|
+
this.prerelease = [base]
|
|
1003
|
+
} else {
|
|
1004
|
+
let i = this.prerelease.length
|
|
1005
|
+
while (--i >= 0) {
|
|
1006
|
+
if (typeof this.prerelease[i] === 'number') {
|
|
1007
|
+
this.prerelease[i]++
|
|
1008
|
+
i = -2
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
if (i === -1) {
|
|
1012
|
+
// didn't increment anything
|
|
1013
|
+
if (identifier === this.prerelease.join('.') && identifierBase === false) {
|
|
1014
|
+
throw new Error('invalid increment argument: identifier already exists')
|
|
1015
|
+
}
|
|
1016
|
+
this.prerelease.push(base)
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
if (identifier) {
|
|
1020
|
+
// 1.2.0-beta.1 bumps to 1.2.0-beta.2,
|
|
1021
|
+
// 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
|
|
1022
|
+
let prerelease = [identifier, base]
|
|
1023
|
+
if (identifierBase === false) {
|
|
1024
|
+
prerelease = [identifier]
|
|
1025
|
+
}
|
|
1026
|
+
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
|
1027
|
+
if (isNaN(this.prerelease[1])) {
|
|
1028
|
+
this.prerelease = prerelease
|
|
1029
|
+
}
|
|
1030
|
+
} else {
|
|
1031
|
+
this.prerelease = prerelease
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
break
|
|
1035
|
+
}
|
|
1036
|
+
default:
|
|
1037
|
+
throw new Error(`invalid increment argument: ${release}`)
|
|
1038
|
+
}
|
|
1039
|
+
this.raw = this.format()
|
|
1040
|
+
if (this.build.length) {
|
|
1041
|
+
this.raw += `+${this.build.join('.')}`
|
|
1042
|
+
}
|
|
1043
|
+
return this
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
module.exports = SemVer
|
|
1048
|
+
|
|
1049
|
+
|
|
1050
|
+
/***/ }),
|
|
1051
|
+
|
|
1052
|
+
/***/ "./node_modules/semver/functions/clean.js":
|
|
1053
|
+
/*!************************************************!*\
|
|
1054
|
+
!*** ./node_modules/semver/functions/clean.js ***!
|
|
1055
|
+
\************************************************/
|
|
1056
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1057
|
+
|
|
1058
|
+
|
|
1059
|
+
|
|
1060
|
+
const parse = __webpack_require__(/*! ./parse */ "./node_modules/semver/functions/parse.js")
|
|
1061
|
+
const clean = (version, options) => {
|
|
1062
|
+
const s = parse(version.trim().replace(/^[=v]+/, ''), options)
|
|
1063
|
+
return s ? s.version : null
|
|
1064
|
+
}
|
|
1065
|
+
module.exports = clean
|
|
1066
|
+
|
|
1067
|
+
|
|
1068
|
+
/***/ }),
|
|
1069
|
+
|
|
1070
|
+
/***/ "./node_modules/semver/functions/cmp.js":
|
|
1071
|
+
/*!**********************************************!*\
|
|
1072
|
+
!*** ./node_modules/semver/functions/cmp.js ***!
|
|
1073
|
+
\**********************************************/
|
|
1074
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
|
|
1078
|
+
const eq = __webpack_require__(/*! ./eq */ "./node_modules/semver/functions/eq.js")
|
|
1079
|
+
const neq = __webpack_require__(/*! ./neq */ "./node_modules/semver/functions/neq.js")
|
|
1080
|
+
const gt = __webpack_require__(/*! ./gt */ "./node_modules/semver/functions/gt.js")
|
|
1081
|
+
const gte = __webpack_require__(/*! ./gte */ "./node_modules/semver/functions/gte.js")
|
|
1082
|
+
const lt = __webpack_require__(/*! ./lt */ "./node_modules/semver/functions/lt.js")
|
|
1083
|
+
const lte = __webpack_require__(/*! ./lte */ "./node_modules/semver/functions/lte.js")
|
|
1084
|
+
|
|
1085
|
+
const cmp = (a, op, b, loose) => {
|
|
1086
|
+
switch (op) {
|
|
1087
|
+
case '===':
|
|
1088
|
+
if (typeof a === 'object') {
|
|
1089
|
+
a = a.version
|
|
1090
|
+
}
|
|
1091
|
+
if (typeof b === 'object') {
|
|
1092
|
+
b = b.version
|
|
1093
|
+
}
|
|
1094
|
+
return a === b
|
|
1095
|
+
|
|
1096
|
+
case '!==':
|
|
1097
|
+
if (typeof a === 'object') {
|
|
1098
|
+
a = a.version
|
|
1099
|
+
}
|
|
1100
|
+
if (typeof b === 'object') {
|
|
1101
|
+
b = b.version
|
|
1102
|
+
}
|
|
1103
|
+
return a !== b
|
|
1104
|
+
|
|
1105
|
+
case '':
|
|
1106
|
+
case '=':
|
|
1107
|
+
case '==':
|
|
1108
|
+
return eq(a, b, loose)
|
|
1109
|
+
|
|
1110
|
+
case '!=':
|
|
1111
|
+
return neq(a, b, loose)
|
|
1112
|
+
|
|
1113
|
+
case '>':
|
|
1114
|
+
return gt(a, b, loose)
|
|
1115
|
+
|
|
1116
|
+
case '>=':
|
|
1117
|
+
return gte(a, b, loose)
|
|
1118
|
+
|
|
1119
|
+
case '<':
|
|
1120
|
+
return lt(a, b, loose)
|
|
1121
|
+
|
|
1122
|
+
case '<=':
|
|
1123
|
+
return lte(a, b, loose)
|
|
1124
|
+
|
|
1125
|
+
default:
|
|
1126
|
+
throw new TypeError(`Invalid operator: ${op}`)
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
module.exports = cmp
|
|
1130
|
+
|
|
1131
|
+
|
|
1132
|
+
/***/ }),
|
|
1133
|
+
|
|
1134
|
+
/***/ "./node_modules/semver/functions/coerce.js":
|
|
1135
|
+
/*!*************************************************!*\
|
|
1136
|
+
!*** ./node_modules/semver/functions/coerce.js ***!
|
|
1137
|
+
\*************************************************/
|
|
1138
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1139
|
+
|
|
1140
|
+
|
|
1141
|
+
|
|
1142
|
+
const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/semver/classes/semver.js")
|
|
1143
|
+
const parse = __webpack_require__(/*! ./parse */ "./node_modules/semver/functions/parse.js")
|
|
1144
|
+
const { safeRe: re, t } = __webpack_require__(/*! ../internal/re */ "./node_modules/semver/internal/re.js")
|
|
1145
|
+
|
|
1146
|
+
const coerce = (version, options) => {
|
|
1147
|
+
if (version instanceof SemVer) {
|
|
1148
|
+
return version
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
if (typeof version === 'number') {
|
|
1152
|
+
version = String(version)
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
if (typeof version !== 'string') {
|
|
1156
|
+
return null
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
options = options || {}
|
|
1160
|
+
|
|
1161
|
+
let match = null
|
|
1162
|
+
if (!options.rtl) {
|
|
1163
|
+
match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])
|
|
1164
|
+
} else {
|
|
1165
|
+
// Find the right-most coercible string that does not share
|
|
1166
|
+
// a terminus with a more left-ward coercible string.
|
|
1167
|
+
// Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
|
|
1168
|
+
// With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'
|
|
1169
|
+
//
|
|
1170
|
+
// Walk through the string checking with a /g regexp
|
|
1171
|
+
// Manually set the index so as to pick up overlapping matches.
|
|
1172
|
+
// Stop when we get a match that ends at the string end, since no
|
|
1173
|
+
// coercible string can be more right-ward without the same terminus.
|
|
1174
|
+
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]
|
|
1175
|
+
let next
|
|
1176
|
+
while ((next = coerceRtlRegex.exec(version)) &&
|
|
1177
|
+
(!match || match.index + match[0].length !== version.length)
|
|
1178
|
+
) {
|
|
1179
|
+
if (!match ||
|
|
1180
|
+
next.index + next[0].length !== match.index + match[0].length) {
|
|
1181
|
+
match = next
|
|
1182
|
+
}
|
|
1183
|
+
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length
|
|
1184
|
+
}
|
|
1185
|
+
// leave it in a clean state
|
|
1186
|
+
coerceRtlRegex.lastIndex = -1
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
if (match === null) {
|
|
1190
|
+
return null
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
const major = match[2]
|
|
1194
|
+
const minor = match[3] || '0'
|
|
1195
|
+
const patch = match[4] || '0'
|
|
1196
|
+
const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''
|
|
1197
|
+
const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''
|
|
1198
|
+
|
|
1199
|
+
return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)
|
|
1200
|
+
}
|
|
1201
|
+
module.exports = coerce
|
|
1202
|
+
|
|
1203
|
+
|
|
1204
|
+
/***/ }),
|
|
1205
|
+
|
|
1206
|
+
/***/ "./node_modules/semver/functions/compare-build.js":
|
|
1207
|
+
/*!********************************************************!*\
|
|
1208
|
+
!*** ./node_modules/semver/functions/compare-build.js ***!
|
|
1209
|
+
\********************************************************/
|
|
1210
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1211
|
+
|
|
1212
|
+
|
|
1213
|
+
|
|
1214
|
+
const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/semver/classes/semver.js")
|
|
1215
|
+
const compareBuild = (a, b, loose) => {
|
|
1216
|
+
const versionA = new SemVer(a, loose)
|
|
1217
|
+
const versionB = new SemVer(b, loose)
|
|
1218
|
+
return versionA.compare(versionB) || versionA.compareBuild(versionB)
|
|
1219
|
+
}
|
|
1220
|
+
module.exports = compareBuild
|
|
1221
|
+
|
|
1222
|
+
|
|
1223
|
+
/***/ }),
|
|
1224
|
+
|
|
1225
|
+
/***/ "./node_modules/semver/functions/compare-loose.js":
|
|
1226
|
+
/*!********************************************************!*\
|
|
1227
|
+
!*** ./node_modules/semver/functions/compare-loose.js ***!
|
|
1228
|
+
\********************************************************/
|
|
1229
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1230
|
+
|
|
1231
|
+
|
|
1232
|
+
|
|
1233
|
+
const compare = __webpack_require__(/*! ./compare */ "./node_modules/semver/functions/compare.js")
|
|
1234
|
+
const compareLoose = (a, b) => compare(a, b, true)
|
|
1235
|
+
module.exports = compareLoose
|
|
1236
|
+
|
|
1237
|
+
|
|
1238
|
+
/***/ }),
|
|
1239
|
+
|
|
1240
|
+
/***/ "./node_modules/semver/functions/compare.js":
|
|
1241
|
+
/*!**************************************************!*\
|
|
1242
|
+
!*** ./node_modules/semver/functions/compare.js ***!
|
|
1243
|
+
\**************************************************/
|
|
1244
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1245
|
+
|
|
1246
|
+
|
|
1247
|
+
|
|
1248
|
+
const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/semver/classes/semver.js")
|
|
1249
|
+
const compare = (a, b, loose) =>
|
|
1250
|
+
new SemVer(a, loose).compare(new SemVer(b, loose))
|
|
1251
|
+
|
|
1252
|
+
module.exports = compare
|
|
1253
|
+
|
|
1254
|
+
|
|
1255
|
+
/***/ }),
|
|
1256
|
+
|
|
1257
|
+
/***/ "./node_modules/semver/functions/diff.js":
|
|
1258
|
+
/*!***********************************************!*\
|
|
1259
|
+
!*** ./node_modules/semver/functions/diff.js ***!
|
|
1260
|
+
\***********************************************/
|
|
1261
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1262
|
+
|
|
1263
|
+
|
|
1264
|
+
|
|
1265
|
+
const parse = __webpack_require__(/*! ./parse.js */ "./node_modules/semver/functions/parse.js")
|
|
1266
|
+
|
|
1267
|
+
const diff = (version1, version2) => {
|
|
1268
|
+
const v1 = parse(version1, null, true)
|
|
1269
|
+
const v2 = parse(version2, null, true)
|
|
1270
|
+
const comparison = v1.compare(v2)
|
|
1271
|
+
|
|
1272
|
+
if (comparison === 0) {
|
|
1273
|
+
return null
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
const v1Higher = comparison > 0
|
|
1277
|
+
const highVersion = v1Higher ? v1 : v2
|
|
1278
|
+
const lowVersion = v1Higher ? v2 : v1
|
|
1279
|
+
const highHasPre = !!highVersion.prerelease.length
|
|
1280
|
+
const lowHasPre = !!lowVersion.prerelease.length
|
|
1281
|
+
|
|
1282
|
+
if (lowHasPre && !highHasPre) {
|
|
1283
|
+
// Going from prerelease -> no prerelease requires some special casing
|
|
1284
|
+
|
|
1285
|
+
// If the low version has only a major, then it will always be a major
|
|
1286
|
+
// Some examples:
|
|
1287
|
+
// 1.0.0-1 -> 1.0.0
|
|
1288
|
+
// 1.0.0-1 -> 1.1.1
|
|
1289
|
+
// 1.0.0-1 -> 2.0.0
|
|
1290
|
+
if (!lowVersion.patch && !lowVersion.minor) {
|
|
1291
|
+
return 'major'
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
// If the main part has no difference
|
|
1295
|
+
if (lowVersion.compareMain(highVersion) === 0) {
|
|
1296
|
+
if (lowVersion.minor && !lowVersion.patch) {
|
|
1297
|
+
return 'minor'
|
|
1298
|
+
}
|
|
1299
|
+
return 'patch'
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
// add the `pre` prefix if we are going to a prerelease version
|
|
1304
|
+
const prefix = highHasPre ? 'pre' : ''
|
|
1305
|
+
|
|
1306
|
+
if (v1.major !== v2.major) {
|
|
1307
|
+
return prefix + 'major'
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
if (v1.minor !== v2.minor) {
|
|
1311
|
+
return prefix + 'minor'
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
if (v1.patch !== v2.patch) {
|
|
1315
|
+
return prefix + 'patch'
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
// high and low are preleases
|
|
1319
|
+
return 'prerelease'
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
module.exports = diff
|
|
1323
|
+
|
|
1324
|
+
|
|
1325
|
+
/***/ }),
|
|
1326
|
+
|
|
1327
|
+
/***/ "./node_modules/semver/functions/eq.js":
|
|
1328
|
+
/*!*********************************************!*\
|
|
1329
|
+
!*** ./node_modules/semver/functions/eq.js ***!
|
|
1330
|
+
\*********************************************/
|
|
1331
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1332
|
+
|
|
1333
|
+
|
|
1334
|
+
|
|
1335
|
+
const compare = __webpack_require__(/*! ./compare */ "./node_modules/semver/functions/compare.js")
|
|
1336
|
+
const eq = (a, b, loose) => compare(a, b, loose) === 0
|
|
1337
|
+
module.exports = eq
|
|
1338
|
+
|
|
1339
|
+
|
|
1340
|
+
/***/ }),
|
|
1341
|
+
|
|
1342
|
+
/***/ "./node_modules/semver/functions/gt.js":
|
|
1343
|
+
/*!*********************************************!*\
|
|
1344
|
+
!*** ./node_modules/semver/functions/gt.js ***!
|
|
1345
|
+
\*********************************************/
|
|
1346
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1347
|
+
|
|
1348
|
+
|
|
1349
|
+
|
|
1350
|
+
const compare = __webpack_require__(/*! ./compare */ "./node_modules/semver/functions/compare.js")
|
|
1351
|
+
const gt = (a, b, loose) => compare(a, b, loose) > 0
|
|
1352
|
+
module.exports = gt
|
|
1353
|
+
|
|
1354
|
+
|
|
1355
|
+
/***/ }),
|
|
1356
|
+
|
|
1357
|
+
/***/ "./node_modules/semver/functions/gte.js":
|
|
1358
|
+
/*!**********************************************!*\
|
|
1359
|
+
!*** ./node_modules/semver/functions/gte.js ***!
|
|
1360
|
+
\**********************************************/
|
|
1361
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1362
|
+
|
|
1363
|
+
|
|
1364
|
+
|
|
1365
|
+
const compare = __webpack_require__(/*! ./compare */ "./node_modules/semver/functions/compare.js")
|
|
1366
|
+
const gte = (a, b, loose) => compare(a, b, loose) >= 0
|
|
1367
|
+
module.exports = gte
|
|
1368
|
+
|
|
1369
|
+
|
|
1370
|
+
/***/ }),
|
|
1371
|
+
|
|
1372
|
+
/***/ "./node_modules/semver/functions/inc.js":
|
|
1373
|
+
/*!**********************************************!*\
|
|
1374
|
+
!*** ./node_modules/semver/functions/inc.js ***!
|
|
1375
|
+
\**********************************************/
|
|
1376
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1377
|
+
|
|
1378
|
+
|
|
1379
|
+
|
|
1380
|
+
const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/semver/classes/semver.js")
|
|
1381
|
+
|
|
1382
|
+
const inc = (version, release, options, identifier, identifierBase) => {
|
|
1383
|
+
if (typeof (options) === 'string') {
|
|
1384
|
+
identifierBase = identifier
|
|
1385
|
+
identifier = options
|
|
1386
|
+
options = undefined
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
try {
|
|
1390
|
+
return new SemVer(
|
|
1391
|
+
version instanceof SemVer ? version.version : version,
|
|
1392
|
+
options
|
|
1393
|
+
).inc(release, identifier, identifierBase).version
|
|
1394
|
+
} catch (er) {
|
|
1395
|
+
return null
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
module.exports = inc
|
|
1399
|
+
|
|
1400
|
+
|
|
1401
|
+
/***/ }),
|
|
1402
|
+
|
|
1403
|
+
/***/ "./node_modules/semver/functions/lt.js":
|
|
1404
|
+
/*!*********************************************!*\
|
|
1405
|
+
!*** ./node_modules/semver/functions/lt.js ***!
|
|
1406
|
+
\*********************************************/
|
|
1407
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1408
|
+
|
|
1409
|
+
|
|
1410
|
+
|
|
1411
|
+
const compare = __webpack_require__(/*! ./compare */ "./node_modules/semver/functions/compare.js")
|
|
1412
|
+
const lt = (a, b, loose) => compare(a, b, loose) < 0
|
|
1413
|
+
module.exports = lt
|
|
1414
|
+
|
|
1415
|
+
|
|
1416
|
+
/***/ }),
|
|
1417
|
+
|
|
1418
|
+
/***/ "./node_modules/semver/functions/lte.js":
|
|
1419
|
+
/*!**********************************************!*\
|
|
1420
|
+
!*** ./node_modules/semver/functions/lte.js ***!
|
|
1421
|
+
\**********************************************/
|
|
1422
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1423
|
+
|
|
1424
|
+
|
|
1425
|
+
|
|
1426
|
+
const compare = __webpack_require__(/*! ./compare */ "./node_modules/semver/functions/compare.js")
|
|
1427
|
+
const lte = (a, b, loose) => compare(a, b, loose) <= 0
|
|
1428
|
+
module.exports = lte
|
|
1429
|
+
|
|
1430
|
+
|
|
1431
|
+
/***/ }),
|
|
1432
|
+
|
|
1433
|
+
/***/ "./node_modules/semver/functions/major.js":
|
|
1434
|
+
/*!************************************************!*\
|
|
1435
|
+
!*** ./node_modules/semver/functions/major.js ***!
|
|
1436
|
+
\************************************************/
|
|
1437
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1438
|
+
|
|
1439
|
+
|
|
1440
|
+
|
|
1441
|
+
const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/semver/classes/semver.js")
|
|
1442
|
+
const major = (a, loose) => new SemVer(a, loose).major
|
|
1443
|
+
module.exports = major
|
|
1444
|
+
|
|
1445
|
+
|
|
1446
|
+
/***/ }),
|
|
1447
|
+
|
|
1448
|
+
/***/ "./node_modules/semver/functions/minor.js":
|
|
1449
|
+
/*!************************************************!*\
|
|
1450
|
+
!*** ./node_modules/semver/functions/minor.js ***!
|
|
1451
|
+
\************************************************/
|
|
1452
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1453
|
+
|
|
1454
|
+
|
|
1455
|
+
|
|
1456
|
+
const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/semver/classes/semver.js")
|
|
1457
|
+
const minor = (a, loose) => new SemVer(a, loose).minor
|
|
1458
|
+
module.exports = minor
|
|
1459
|
+
|
|
1460
|
+
|
|
1461
|
+
/***/ }),
|
|
1462
|
+
|
|
1463
|
+
/***/ "./node_modules/semver/functions/neq.js":
|
|
1464
|
+
/*!**********************************************!*\
|
|
1465
|
+
!*** ./node_modules/semver/functions/neq.js ***!
|
|
1466
|
+
\**********************************************/
|
|
1467
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1468
|
+
|
|
1469
|
+
|
|
1470
|
+
|
|
1471
|
+
const compare = __webpack_require__(/*! ./compare */ "./node_modules/semver/functions/compare.js")
|
|
1472
|
+
const neq = (a, b, loose) => compare(a, b, loose) !== 0
|
|
1473
|
+
module.exports = neq
|
|
1474
|
+
|
|
1475
|
+
|
|
1476
|
+
/***/ }),
|
|
1477
|
+
|
|
1478
|
+
/***/ "./node_modules/semver/functions/parse.js":
|
|
1479
|
+
/*!************************************************!*\
|
|
1480
|
+
!*** ./node_modules/semver/functions/parse.js ***!
|
|
1481
|
+
\************************************************/
|
|
1482
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1483
|
+
|
|
1484
|
+
|
|
1485
|
+
|
|
1486
|
+
const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/semver/classes/semver.js")
|
|
1487
|
+
const parse = (version, options, throwErrors = false) => {
|
|
1488
|
+
if (version instanceof SemVer) {
|
|
1489
|
+
return version
|
|
1490
|
+
}
|
|
1491
|
+
try {
|
|
1492
|
+
return new SemVer(version, options)
|
|
1493
|
+
} catch (er) {
|
|
1494
|
+
if (!throwErrors) {
|
|
1495
|
+
return null
|
|
1496
|
+
}
|
|
1497
|
+
throw er
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
module.exports = parse
|
|
1502
|
+
|
|
1503
|
+
|
|
1504
|
+
/***/ }),
|
|
1505
|
+
|
|
1506
|
+
/***/ "./node_modules/semver/functions/patch.js":
|
|
1507
|
+
/*!************************************************!*\
|
|
1508
|
+
!*** ./node_modules/semver/functions/patch.js ***!
|
|
1509
|
+
\************************************************/
|
|
1510
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1511
|
+
|
|
1512
|
+
|
|
1513
|
+
|
|
1514
|
+
const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/semver/classes/semver.js")
|
|
1515
|
+
const patch = (a, loose) => new SemVer(a, loose).patch
|
|
1516
|
+
module.exports = patch
|
|
1517
|
+
|
|
1518
|
+
|
|
1519
|
+
/***/ }),
|
|
1520
|
+
|
|
1521
|
+
/***/ "./node_modules/semver/functions/prerelease.js":
|
|
1522
|
+
/*!*****************************************************!*\
|
|
1523
|
+
!*** ./node_modules/semver/functions/prerelease.js ***!
|
|
1524
|
+
\*****************************************************/
|
|
1525
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1526
|
+
|
|
1527
|
+
|
|
1528
|
+
|
|
1529
|
+
const parse = __webpack_require__(/*! ./parse */ "./node_modules/semver/functions/parse.js")
|
|
1530
|
+
const prerelease = (version, options) => {
|
|
1531
|
+
const parsed = parse(version, options)
|
|
1532
|
+
return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
|
|
1533
|
+
}
|
|
1534
|
+
module.exports = prerelease
|
|
1535
|
+
|
|
1536
|
+
|
|
1537
|
+
/***/ }),
|
|
1538
|
+
|
|
1539
|
+
/***/ "./node_modules/semver/functions/rcompare.js":
|
|
1540
|
+
/*!***************************************************!*\
|
|
1541
|
+
!*** ./node_modules/semver/functions/rcompare.js ***!
|
|
1542
|
+
\***************************************************/
|
|
1543
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1544
|
+
|
|
1545
|
+
|
|
1546
|
+
|
|
1547
|
+
const compare = __webpack_require__(/*! ./compare */ "./node_modules/semver/functions/compare.js")
|
|
1548
|
+
const rcompare = (a, b, loose) => compare(b, a, loose)
|
|
1549
|
+
module.exports = rcompare
|
|
1550
|
+
|
|
1551
|
+
|
|
1552
|
+
/***/ }),
|
|
1553
|
+
|
|
1554
|
+
/***/ "./node_modules/semver/functions/rsort.js":
|
|
1555
|
+
/*!************************************************!*\
|
|
1556
|
+
!*** ./node_modules/semver/functions/rsort.js ***!
|
|
1557
|
+
\************************************************/
|
|
1558
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1559
|
+
|
|
1560
|
+
|
|
1561
|
+
|
|
1562
|
+
const compareBuild = __webpack_require__(/*! ./compare-build */ "./node_modules/semver/functions/compare-build.js")
|
|
1563
|
+
const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))
|
|
1564
|
+
module.exports = rsort
|
|
1565
|
+
|
|
1566
|
+
|
|
1567
|
+
/***/ }),
|
|
1568
|
+
|
|
1569
|
+
/***/ "./node_modules/semver/functions/satisfies.js":
|
|
1570
|
+
/*!****************************************************!*\
|
|
1571
|
+
!*** ./node_modules/semver/functions/satisfies.js ***!
|
|
1572
|
+
\****************************************************/
|
|
1573
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1574
|
+
|
|
1575
|
+
|
|
1576
|
+
|
|
1577
|
+
const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/semver/classes/range.js")
|
|
1578
|
+
const satisfies = (version, range, options) => {
|
|
1579
|
+
try {
|
|
1580
|
+
range = new Range(range, options)
|
|
1581
|
+
} catch (er) {
|
|
1582
|
+
return false
|
|
1583
|
+
}
|
|
1584
|
+
return range.test(version)
|
|
1585
|
+
}
|
|
1586
|
+
module.exports = satisfies
|
|
1587
|
+
|
|
1588
|
+
|
|
1589
|
+
/***/ }),
|
|
1590
|
+
|
|
1591
|
+
/***/ "./node_modules/semver/functions/sort.js":
|
|
1592
|
+
/*!***********************************************!*\
|
|
1593
|
+
!*** ./node_modules/semver/functions/sort.js ***!
|
|
1594
|
+
\***********************************************/
|
|
1595
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1596
|
+
|
|
1597
|
+
|
|
1598
|
+
|
|
1599
|
+
const compareBuild = __webpack_require__(/*! ./compare-build */ "./node_modules/semver/functions/compare-build.js")
|
|
1600
|
+
const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))
|
|
1601
|
+
module.exports = sort
|
|
1602
|
+
|
|
1603
|
+
|
|
1604
|
+
/***/ }),
|
|
1605
|
+
|
|
1606
|
+
/***/ "./node_modules/semver/functions/valid.js":
|
|
1607
|
+
/*!************************************************!*\
|
|
1608
|
+
!*** ./node_modules/semver/functions/valid.js ***!
|
|
1609
|
+
\************************************************/
|
|
1610
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1611
|
+
|
|
1612
|
+
|
|
1613
|
+
|
|
1614
|
+
const parse = __webpack_require__(/*! ./parse */ "./node_modules/semver/functions/parse.js")
|
|
1615
|
+
const valid = (version, options) => {
|
|
1616
|
+
const v = parse(version, options)
|
|
1617
|
+
return v ? v.version : null
|
|
1618
|
+
}
|
|
1619
|
+
module.exports = valid
|
|
1620
|
+
|
|
1621
|
+
|
|
1622
|
+
/***/ }),
|
|
1623
|
+
|
|
1624
|
+
/***/ "./node_modules/semver/index.js":
|
|
1625
|
+
/*!**************************************!*\
|
|
1626
|
+
!*** ./node_modules/semver/index.js ***!
|
|
1627
|
+
\**************************************/
|
|
1628
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1629
|
+
|
|
1630
|
+
|
|
1631
|
+
|
|
1632
|
+
// just pre-load all the stuff that index.js lazily exports
|
|
1633
|
+
const internalRe = __webpack_require__(/*! ./internal/re */ "./node_modules/semver/internal/re.js")
|
|
1634
|
+
const constants = __webpack_require__(/*! ./internal/constants */ "./node_modules/semver/internal/constants.js")
|
|
1635
|
+
const SemVer = __webpack_require__(/*! ./classes/semver */ "./node_modules/semver/classes/semver.js")
|
|
1636
|
+
const identifiers = __webpack_require__(/*! ./internal/identifiers */ "./node_modules/semver/internal/identifiers.js")
|
|
1637
|
+
const parse = __webpack_require__(/*! ./functions/parse */ "./node_modules/semver/functions/parse.js")
|
|
1638
|
+
const valid = __webpack_require__(/*! ./functions/valid */ "./node_modules/semver/functions/valid.js")
|
|
1639
|
+
const clean = __webpack_require__(/*! ./functions/clean */ "./node_modules/semver/functions/clean.js")
|
|
1640
|
+
const inc = __webpack_require__(/*! ./functions/inc */ "./node_modules/semver/functions/inc.js")
|
|
1641
|
+
const diff = __webpack_require__(/*! ./functions/diff */ "./node_modules/semver/functions/diff.js")
|
|
1642
|
+
const major = __webpack_require__(/*! ./functions/major */ "./node_modules/semver/functions/major.js")
|
|
1643
|
+
const minor = __webpack_require__(/*! ./functions/minor */ "./node_modules/semver/functions/minor.js")
|
|
1644
|
+
const patch = __webpack_require__(/*! ./functions/patch */ "./node_modules/semver/functions/patch.js")
|
|
1645
|
+
const prerelease = __webpack_require__(/*! ./functions/prerelease */ "./node_modules/semver/functions/prerelease.js")
|
|
1646
|
+
const compare = __webpack_require__(/*! ./functions/compare */ "./node_modules/semver/functions/compare.js")
|
|
1647
|
+
const rcompare = __webpack_require__(/*! ./functions/rcompare */ "./node_modules/semver/functions/rcompare.js")
|
|
1648
|
+
const compareLoose = __webpack_require__(/*! ./functions/compare-loose */ "./node_modules/semver/functions/compare-loose.js")
|
|
1649
|
+
const compareBuild = __webpack_require__(/*! ./functions/compare-build */ "./node_modules/semver/functions/compare-build.js")
|
|
1650
|
+
const sort = __webpack_require__(/*! ./functions/sort */ "./node_modules/semver/functions/sort.js")
|
|
1651
|
+
const rsort = __webpack_require__(/*! ./functions/rsort */ "./node_modules/semver/functions/rsort.js")
|
|
1652
|
+
const gt = __webpack_require__(/*! ./functions/gt */ "./node_modules/semver/functions/gt.js")
|
|
1653
|
+
const lt = __webpack_require__(/*! ./functions/lt */ "./node_modules/semver/functions/lt.js")
|
|
1654
|
+
const eq = __webpack_require__(/*! ./functions/eq */ "./node_modules/semver/functions/eq.js")
|
|
1655
|
+
const neq = __webpack_require__(/*! ./functions/neq */ "./node_modules/semver/functions/neq.js")
|
|
1656
|
+
const gte = __webpack_require__(/*! ./functions/gte */ "./node_modules/semver/functions/gte.js")
|
|
1657
|
+
const lte = __webpack_require__(/*! ./functions/lte */ "./node_modules/semver/functions/lte.js")
|
|
1658
|
+
const cmp = __webpack_require__(/*! ./functions/cmp */ "./node_modules/semver/functions/cmp.js")
|
|
1659
|
+
const coerce = __webpack_require__(/*! ./functions/coerce */ "./node_modules/semver/functions/coerce.js")
|
|
1660
|
+
const Comparator = __webpack_require__(/*! ./classes/comparator */ "./node_modules/semver/classes/comparator.js")
|
|
1661
|
+
const Range = __webpack_require__(/*! ./classes/range */ "./node_modules/semver/classes/range.js")
|
|
1662
|
+
const satisfies = __webpack_require__(/*! ./functions/satisfies */ "./node_modules/semver/functions/satisfies.js")
|
|
1663
|
+
const toComparators = __webpack_require__(/*! ./ranges/to-comparators */ "./node_modules/semver/ranges/to-comparators.js")
|
|
1664
|
+
const maxSatisfying = __webpack_require__(/*! ./ranges/max-satisfying */ "./node_modules/semver/ranges/max-satisfying.js")
|
|
1665
|
+
const minSatisfying = __webpack_require__(/*! ./ranges/min-satisfying */ "./node_modules/semver/ranges/min-satisfying.js")
|
|
1666
|
+
const minVersion = __webpack_require__(/*! ./ranges/min-version */ "./node_modules/semver/ranges/min-version.js")
|
|
1667
|
+
const validRange = __webpack_require__(/*! ./ranges/valid */ "./node_modules/semver/ranges/valid.js")
|
|
1668
|
+
const outside = __webpack_require__(/*! ./ranges/outside */ "./node_modules/semver/ranges/outside.js")
|
|
1669
|
+
const gtr = __webpack_require__(/*! ./ranges/gtr */ "./node_modules/semver/ranges/gtr.js")
|
|
1670
|
+
const ltr = __webpack_require__(/*! ./ranges/ltr */ "./node_modules/semver/ranges/ltr.js")
|
|
1671
|
+
const intersects = __webpack_require__(/*! ./ranges/intersects */ "./node_modules/semver/ranges/intersects.js")
|
|
1672
|
+
const simplifyRange = __webpack_require__(/*! ./ranges/simplify */ "./node_modules/semver/ranges/simplify.js")
|
|
1673
|
+
const subset = __webpack_require__(/*! ./ranges/subset */ "./node_modules/semver/ranges/subset.js")
|
|
1674
|
+
module.exports = {
|
|
1675
|
+
parse,
|
|
1676
|
+
valid,
|
|
1677
|
+
clean,
|
|
1678
|
+
inc,
|
|
1679
|
+
diff,
|
|
1680
|
+
major,
|
|
1681
|
+
minor,
|
|
1682
|
+
patch,
|
|
1683
|
+
prerelease,
|
|
1684
|
+
compare,
|
|
1685
|
+
rcompare,
|
|
1686
|
+
compareLoose,
|
|
1687
|
+
compareBuild,
|
|
1688
|
+
sort,
|
|
1689
|
+
rsort,
|
|
1690
|
+
gt,
|
|
1691
|
+
lt,
|
|
1692
|
+
eq,
|
|
1693
|
+
neq,
|
|
1694
|
+
gte,
|
|
1695
|
+
lte,
|
|
1696
|
+
cmp,
|
|
1697
|
+
coerce,
|
|
1698
|
+
Comparator,
|
|
1699
|
+
Range,
|
|
1700
|
+
satisfies,
|
|
1701
|
+
toComparators,
|
|
1702
|
+
maxSatisfying,
|
|
1703
|
+
minSatisfying,
|
|
1704
|
+
minVersion,
|
|
1705
|
+
validRange,
|
|
1706
|
+
outside,
|
|
1707
|
+
gtr,
|
|
1708
|
+
ltr,
|
|
1709
|
+
intersects,
|
|
1710
|
+
simplifyRange,
|
|
1711
|
+
subset,
|
|
1712
|
+
SemVer,
|
|
1713
|
+
re: internalRe.re,
|
|
1714
|
+
src: internalRe.src,
|
|
1715
|
+
tokens: internalRe.t,
|
|
1716
|
+
SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
|
|
1717
|
+
RELEASE_TYPES: constants.RELEASE_TYPES,
|
|
1718
|
+
compareIdentifiers: identifiers.compareIdentifiers,
|
|
1719
|
+
rcompareIdentifiers: identifiers.rcompareIdentifiers,
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
|
|
1723
|
+
/***/ }),
|
|
1724
|
+
|
|
1725
|
+
/***/ "./node_modules/semver/internal/constants.js":
|
|
1726
|
+
/*!***************************************************!*\
|
|
1727
|
+
!*** ./node_modules/semver/internal/constants.js ***!
|
|
1728
|
+
\***************************************************/
|
|
1729
|
+
/***/ ((module) => {
|
|
1730
|
+
|
|
1731
|
+
|
|
1732
|
+
|
|
1733
|
+
// Note: this is the semver.org version of the spec that it implements
|
|
1734
|
+
// Not necessarily the package version of this code.
|
|
1735
|
+
const SEMVER_SPEC_VERSION = '2.0.0'
|
|
1736
|
+
|
|
1737
|
+
const MAX_LENGTH = 256
|
|
1738
|
+
const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
|
|
1739
|
+
/* istanbul ignore next */ 9007199254740991
|
|
1740
|
+
|
|
1741
|
+
// Max safe segment length for coercion.
|
|
1742
|
+
const MAX_SAFE_COMPONENT_LENGTH = 16
|
|
1743
|
+
|
|
1744
|
+
// Max safe length for a build identifier. The max length minus 6 characters for
|
|
1745
|
+
// the shortest version with a build 0.0.0+BUILD.
|
|
1746
|
+
const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6
|
|
1747
|
+
|
|
1748
|
+
const RELEASE_TYPES = [
|
|
1749
|
+
'major',
|
|
1750
|
+
'premajor',
|
|
1751
|
+
'minor',
|
|
1752
|
+
'preminor',
|
|
1753
|
+
'patch',
|
|
1754
|
+
'prepatch',
|
|
1755
|
+
'prerelease',
|
|
1756
|
+
]
|
|
1757
|
+
|
|
1758
|
+
module.exports = {
|
|
1759
|
+
MAX_LENGTH,
|
|
1760
|
+
MAX_SAFE_COMPONENT_LENGTH,
|
|
1761
|
+
MAX_SAFE_BUILD_LENGTH,
|
|
1762
|
+
MAX_SAFE_INTEGER,
|
|
1763
|
+
RELEASE_TYPES,
|
|
1764
|
+
SEMVER_SPEC_VERSION,
|
|
1765
|
+
FLAG_INCLUDE_PRERELEASE: 0b001,
|
|
1766
|
+
FLAG_LOOSE: 0b010,
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
|
|
1770
|
+
/***/ }),
|
|
1771
|
+
|
|
1772
|
+
/***/ "./node_modules/semver/internal/debug.js":
|
|
1773
|
+
/*!***********************************************!*\
|
|
1774
|
+
!*** ./node_modules/semver/internal/debug.js ***!
|
|
1775
|
+
\***********************************************/
|
|
1776
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1777
|
+
|
|
1778
|
+
/* provided dependency */ var process = __webpack_require__(/*! process/browser */ "./node_modules/process/browser.js");
|
|
1779
|
+
|
|
1780
|
+
|
|
1781
|
+
const debug = (
|
|
1782
|
+
typeof process === 'object' &&
|
|
1783
|
+
process.env &&
|
|
1784
|
+
process.env.NODE_DEBUG &&
|
|
1785
|
+
/\bsemver\b/i.test(process.env.NODE_DEBUG)
|
|
1786
|
+
) ? (...args) => console.error('SEMVER', ...args)
|
|
1787
|
+
: () => {}
|
|
1788
|
+
|
|
1789
|
+
module.exports = debug
|
|
1790
|
+
|
|
1791
|
+
|
|
1792
|
+
/***/ }),
|
|
1793
|
+
|
|
1794
|
+
/***/ "./node_modules/semver/internal/identifiers.js":
|
|
1795
|
+
/*!*****************************************************!*\
|
|
1796
|
+
!*** ./node_modules/semver/internal/identifiers.js ***!
|
|
1797
|
+
\*****************************************************/
|
|
1798
|
+
/***/ ((module) => {
|
|
1799
|
+
|
|
1800
|
+
|
|
1801
|
+
|
|
1802
|
+
const numeric = /^[0-9]+$/
|
|
1803
|
+
const compareIdentifiers = (a, b) => {
|
|
1804
|
+
const anum = numeric.test(a)
|
|
1805
|
+
const bnum = numeric.test(b)
|
|
1806
|
+
|
|
1807
|
+
if (anum && bnum) {
|
|
1808
|
+
a = +a
|
|
1809
|
+
b = +b
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
return a === b ? 0
|
|
1813
|
+
: (anum && !bnum) ? -1
|
|
1814
|
+
: (bnum && !anum) ? 1
|
|
1815
|
+
: a < b ? -1
|
|
1816
|
+
: 1
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)
|
|
1820
|
+
|
|
1821
|
+
module.exports = {
|
|
1822
|
+
compareIdentifiers,
|
|
1823
|
+
rcompareIdentifiers,
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
|
|
1827
|
+
/***/ }),
|
|
1828
|
+
|
|
1829
|
+
/***/ "./node_modules/semver/internal/lrucache.js":
|
|
1830
|
+
/*!**************************************************!*\
|
|
1831
|
+
!*** ./node_modules/semver/internal/lrucache.js ***!
|
|
1832
|
+
\**************************************************/
|
|
1833
|
+
/***/ ((module) => {
|
|
1834
|
+
|
|
1835
|
+
|
|
1836
|
+
|
|
1837
|
+
class LRUCache {
|
|
1838
|
+
constructor () {
|
|
1839
|
+
this.max = 1000
|
|
1840
|
+
this.map = new Map()
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1843
|
+
get (key) {
|
|
1844
|
+
const value = this.map.get(key)
|
|
1845
|
+
if (value === undefined) {
|
|
1846
|
+
return undefined
|
|
1847
|
+
} else {
|
|
1848
|
+
// Remove the key from the map and add it to the end
|
|
1849
|
+
this.map.delete(key)
|
|
1850
|
+
this.map.set(key, value)
|
|
1851
|
+
return value
|
|
1852
|
+
}
|
|
1853
|
+
}
|
|
1854
|
+
|
|
1855
|
+
delete (key) {
|
|
1856
|
+
return this.map.delete(key)
|
|
1857
|
+
}
|
|
1858
|
+
|
|
1859
|
+
set (key, value) {
|
|
1860
|
+
const deleted = this.delete(key)
|
|
1861
|
+
|
|
1862
|
+
if (!deleted && value !== undefined) {
|
|
1863
|
+
// If cache is full, delete the least recently used item
|
|
1864
|
+
if (this.map.size >= this.max) {
|
|
1865
|
+
const firstKey = this.map.keys().next().value
|
|
1866
|
+
this.delete(firstKey)
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
this.map.set(key, value)
|
|
1870
|
+
}
|
|
1871
|
+
|
|
1872
|
+
return this
|
|
1873
|
+
}
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
module.exports = LRUCache
|
|
1877
|
+
|
|
1878
|
+
|
|
1879
|
+
/***/ }),
|
|
1880
|
+
|
|
1881
|
+
/***/ "./node_modules/semver/internal/parse-options.js":
|
|
1882
|
+
/*!*******************************************************!*\
|
|
1883
|
+
!*** ./node_modules/semver/internal/parse-options.js ***!
|
|
1884
|
+
\*******************************************************/
|
|
1885
|
+
/***/ ((module) => {
|
|
1886
|
+
|
|
1887
|
+
|
|
1888
|
+
|
|
1889
|
+
// parse out just the options we care about
|
|
1890
|
+
const looseOption = Object.freeze({ loose: true })
|
|
1891
|
+
const emptyOpts = Object.freeze({ })
|
|
1892
|
+
const parseOptions = options => {
|
|
1893
|
+
if (!options) {
|
|
1894
|
+
return emptyOpts
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
if (typeof options !== 'object') {
|
|
1898
|
+
return looseOption
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
return options
|
|
1902
|
+
}
|
|
1903
|
+
module.exports = parseOptions
|
|
1904
|
+
|
|
1905
|
+
|
|
1906
|
+
/***/ }),
|
|
1907
|
+
|
|
1908
|
+
/***/ "./node_modules/semver/internal/re.js":
|
|
1909
|
+
/*!********************************************!*\
|
|
1910
|
+
!*** ./node_modules/semver/internal/re.js ***!
|
|
1911
|
+
\********************************************/
|
|
1912
|
+
/***/ ((module, exports, __webpack_require__) => {
|
|
1913
|
+
|
|
1914
|
+
|
|
1915
|
+
|
|
1916
|
+
const {
|
|
1917
|
+
MAX_SAFE_COMPONENT_LENGTH,
|
|
1918
|
+
MAX_SAFE_BUILD_LENGTH,
|
|
1919
|
+
MAX_LENGTH,
|
|
1920
|
+
} = __webpack_require__(/*! ./constants */ "./node_modules/semver/internal/constants.js")
|
|
1921
|
+
const debug = __webpack_require__(/*! ./debug */ "./node_modules/semver/internal/debug.js")
|
|
1922
|
+
exports = module.exports = {}
|
|
1923
|
+
|
|
1924
|
+
// The actual regexps go on exports.re
|
|
1925
|
+
const re = exports.re = []
|
|
1926
|
+
const safeRe = exports.safeRe = []
|
|
1927
|
+
const src = exports.src = []
|
|
1928
|
+
const safeSrc = exports.safeSrc = []
|
|
1929
|
+
const t = exports.t = {}
|
|
1930
|
+
let R = 0
|
|
1931
|
+
|
|
1932
|
+
const LETTERDASHNUMBER = '[a-zA-Z0-9-]'
|
|
1933
|
+
|
|
1934
|
+
// Replace some greedy regex tokens to prevent regex dos issues. These regex are
|
|
1935
|
+
// used internally via the safeRe object since all inputs in this library get
|
|
1936
|
+
// normalized first to trim and collapse all extra whitespace. The original
|
|
1937
|
+
// regexes are exported for userland consumption and lower level usage. A
|
|
1938
|
+
// future breaking change could export the safer regex only with a note that
|
|
1939
|
+
// all input should have extra whitespace removed.
|
|
1940
|
+
const safeRegexReplacements = [
|
|
1941
|
+
['\\s', 1],
|
|
1942
|
+
['\\d', MAX_LENGTH],
|
|
1943
|
+
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],
|
|
1944
|
+
]
|
|
1945
|
+
|
|
1946
|
+
const makeSafeRegex = (value) => {
|
|
1947
|
+
for (const [token, max] of safeRegexReplacements) {
|
|
1948
|
+
value = value
|
|
1949
|
+
.split(`${token}*`).join(`${token}{0,${max}}`)
|
|
1950
|
+
.split(`${token}+`).join(`${token}{1,${max}}`)
|
|
1951
|
+
}
|
|
1952
|
+
return value
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
const createToken = (name, value, isGlobal) => {
|
|
1956
|
+
const safe = makeSafeRegex(value)
|
|
1957
|
+
const index = R++
|
|
1958
|
+
debug(name, index, value)
|
|
1959
|
+
t[name] = index
|
|
1960
|
+
src[index] = value
|
|
1961
|
+
safeSrc[index] = safe
|
|
1962
|
+
re[index] = new RegExp(value, isGlobal ? 'g' : undefined)
|
|
1963
|
+
safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)
|
|
1964
|
+
}
|
|
1965
|
+
|
|
1966
|
+
// The following Regular Expressions can be used for tokenizing,
|
|
1967
|
+
// validating, and parsing SemVer version strings.
|
|
1968
|
+
|
|
1969
|
+
// ## Numeric Identifier
|
|
1970
|
+
// A single `0`, or a non-zero digit followed by zero or more digits.
|
|
1971
|
+
|
|
1972
|
+
createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*')
|
|
1973
|
+
createToken('NUMERICIDENTIFIERLOOSE', '\\d+')
|
|
1974
|
+
|
|
1975
|
+
// ## Non-numeric Identifier
|
|
1976
|
+
// Zero or more digits, followed by a letter or hyphen, and then zero or
|
|
1977
|
+
// more letters, digits, or hyphens.
|
|
1978
|
+
|
|
1979
|
+
createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)
|
|
1980
|
+
|
|
1981
|
+
// ## Main Version
|
|
1982
|
+
// Three dot-separated numeric identifiers.
|
|
1983
|
+
|
|
1984
|
+
createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` +
|
|
1985
|
+
`(${src[t.NUMERICIDENTIFIER]})\\.` +
|
|
1986
|
+
`(${src[t.NUMERICIDENTIFIER]})`)
|
|
1987
|
+
|
|
1988
|
+
createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
|
|
1989
|
+
`(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
|
|
1990
|
+
`(${src[t.NUMERICIDENTIFIERLOOSE]})`)
|
|
1991
|
+
|
|
1992
|
+
// ## Pre-release Version Identifier
|
|
1993
|
+
// A numeric identifier, or a non-numeric identifier.
|
|
1994
|
+
// Non-numberic identifiers include numberic identifiers but can be longer.
|
|
1995
|
+
// Therefore non-numberic identifiers must go first.
|
|
1996
|
+
|
|
1997
|
+
createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER]
|
|
1998
|
+
}|${src[t.NUMERICIDENTIFIER]})`)
|
|
1999
|
+
|
|
2000
|
+
createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NONNUMERICIDENTIFIER]
|
|
2001
|
+
}|${src[t.NUMERICIDENTIFIERLOOSE]})`)
|
|
2002
|
+
|
|
2003
|
+
// ## Pre-release Version
|
|
2004
|
+
// Hyphen, followed by one or more dot-separated pre-release version
|
|
2005
|
+
// identifiers.
|
|
2006
|
+
|
|
2007
|
+
createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]
|
|
2008
|
+
}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`)
|
|
2009
|
+
|
|
2010
|
+
createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]
|
|
2011
|
+
}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)
|
|
2012
|
+
|
|
2013
|
+
// ## Build Metadata Identifier
|
|
2014
|
+
// Any combination of digits, letters, or hyphens.
|
|
2015
|
+
|
|
2016
|
+
createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)
|
|
2017
|
+
|
|
2018
|
+
// ## Build Metadata
|
|
2019
|
+
// Plus sign, followed by one or more period-separated build metadata
|
|
2020
|
+
// identifiers.
|
|
2021
|
+
|
|
2022
|
+
createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER]
|
|
2023
|
+
}(?:\\.${src[t.BUILDIDENTIFIER]})*))`)
|
|
2024
|
+
|
|
2025
|
+
// ## Full Version String
|
|
2026
|
+
// A main version, followed optionally by a pre-release version and
|
|
2027
|
+
// build metadata.
|
|
2028
|
+
|
|
2029
|
+
// Note that the only major, minor, patch, and pre-release sections of
|
|
2030
|
+
// the version string are capturing groups. The build metadata is not a
|
|
2031
|
+
// capturing group, because it should not ever be used in version
|
|
2032
|
+
// comparison.
|
|
2033
|
+
|
|
2034
|
+
createToken('FULLPLAIN', `v?${src[t.MAINVERSION]
|
|
2035
|
+
}${src[t.PRERELEASE]}?${
|
|
2036
|
+
src[t.BUILD]}?`)
|
|
2037
|
+
|
|
2038
|
+
createToken('FULL', `^${src[t.FULLPLAIN]}$`)
|
|
2039
|
+
|
|
2040
|
+
// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
|
|
2041
|
+
// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
|
|
2042
|
+
// common in the npm registry.
|
|
2043
|
+
createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE]
|
|
2044
|
+
}${src[t.PRERELEASELOOSE]}?${
|
|
2045
|
+
src[t.BUILD]}?`)
|
|
2046
|
+
|
|
2047
|
+
createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)
|
|
2048
|
+
|
|
2049
|
+
createToken('GTLT', '((?:<|>)?=?)')
|
|
2050
|
+
|
|
2051
|
+
// Something like "2.*" or "1.2.x".
|
|
2052
|
+
// Note that "x.x" is a valid xRange identifer, meaning "any version"
|
|
2053
|
+
// Only the first item is strictly required.
|
|
2054
|
+
createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`)
|
|
2055
|
+
createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`)
|
|
2056
|
+
|
|
2057
|
+
createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` +
|
|
2058
|
+
`(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
|
|
2059
|
+
`(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
|
|
2060
|
+
`(?:${src[t.PRERELEASE]})?${
|
|
2061
|
+
src[t.BUILD]}?` +
|
|
2062
|
+
`)?)?`)
|
|
2063
|
+
|
|
2064
|
+
createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +
|
|
2065
|
+
`(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
|
|
2066
|
+
`(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
|
|
2067
|
+
`(?:${src[t.PRERELEASELOOSE]})?${
|
|
2068
|
+
src[t.BUILD]}?` +
|
|
2069
|
+
`)?)?`)
|
|
2070
|
+
|
|
2071
|
+
createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`)
|
|
2072
|
+
createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`)
|
|
2073
|
+
|
|
2074
|
+
// Coercion.
|
|
2075
|
+
// Extract anything that could conceivably be a part of a valid semver
|
|
2076
|
+
createToken('COERCEPLAIN', `${'(^|[^\\d])' +
|
|
2077
|
+
'(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
|
|
2078
|
+
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
|
|
2079
|
+
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)
|
|
2080
|
+
createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`)
|
|
2081
|
+
createToken('COERCEFULL', src[t.COERCEPLAIN] +
|
|
2082
|
+
`(?:${src[t.PRERELEASE]})?` +
|
|
2083
|
+
`(?:${src[t.BUILD]})?` +
|
|
2084
|
+
`(?:$|[^\\d])`)
|
|
2085
|
+
createToken('COERCERTL', src[t.COERCE], true)
|
|
2086
|
+
createToken('COERCERTLFULL', src[t.COERCEFULL], true)
|
|
2087
|
+
|
|
2088
|
+
// Tilde ranges.
|
|
2089
|
+
// Meaning is "reasonably at or greater than"
|
|
2090
|
+
createToken('LONETILDE', '(?:~>?)')
|
|
2091
|
+
|
|
2092
|
+
createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true)
|
|
2093
|
+
exports.tildeTrimReplace = '$1~'
|
|
2094
|
+
|
|
2095
|
+
createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)
|
|
2096
|
+
createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)
|
|
2097
|
+
|
|
2098
|
+
// Caret ranges.
|
|
2099
|
+
// Meaning is "at least and backwards compatible with"
|
|
2100
|
+
createToken('LONECARET', '(?:\\^)')
|
|
2101
|
+
|
|
2102
|
+
createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true)
|
|
2103
|
+
exports.caretTrimReplace = '$1^'
|
|
2104
|
+
|
|
2105
|
+
createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)
|
|
2106
|
+
createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)
|
|
2107
|
+
|
|
2108
|
+
// A simple gt/lt/eq thing, or just "" to indicate "any version"
|
|
2109
|
+
createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`)
|
|
2110
|
+
createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`)
|
|
2111
|
+
|
|
2112
|
+
// An expression to strip any whitespace between the gtlt and the thing
|
|
2113
|
+
// it modifies, so that `> 1.2.3` ==> `>1.2.3`
|
|
2114
|
+
createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT]
|
|
2115
|
+
}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)
|
|
2116
|
+
exports.comparatorTrimReplace = '$1$2$3'
|
|
2117
|
+
|
|
2118
|
+
// Something like `1.2.3 - 1.2.4`
|
|
2119
|
+
// Note that these all use the loose form, because they'll be
|
|
2120
|
+
// checked against either the strict or loose comparator form
|
|
2121
|
+
// later.
|
|
2122
|
+
createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` +
|
|
2123
|
+
`\\s+-\\s+` +
|
|
2124
|
+
`(${src[t.XRANGEPLAIN]})` +
|
|
2125
|
+
`\\s*$`)
|
|
2126
|
+
|
|
2127
|
+
createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` +
|
|
2128
|
+
`\\s+-\\s+` +
|
|
2129
|
+
`(${src[t.XRANGEPLAINLOOSE]})` +
|
|
2130
|
+
`\\s*$`)
|
|
2131
|
+
|
|
2132
|
+
// Star ranges basically just allow anything at all.
|
|
2133
|
+
createToken('STAR', '(<|>)?=?\\s*\\*')
|
|
2134
|
+
// >=0.0.0 is like a star
|
|
2135
|
+
createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$')
|
|
2136
|
+
createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$')
|
|
2137
|
+
|
|
2138
|
+
|
|
2139
|
+
/***/ }),
|
|
2140
|
+
|
|
2141
|
+
/***/ "./node_modules/semver/ranges/gtr.js":
|
|
2142
|
+
/*!*******************************************!*\
|
|
2143
|
+
!*** ./node_modules/semver/ranges/gtr.js ***!
|
|
2144
|
+
\*******************************************/
|
|
2145
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2146
|
+
|
|
2147
|
+
|
|
2148
|
+
|
|
2149
|
+
// Determine if version is greater than all the versions possible in the range.
|
|
2150
|
+
const outside = __webpack_require__(/*! ./outside */ "./node_modules/semver/ranges/outside.js")
|
|
2151
|
+
const gtr = (version, range, options) => outside(version, range, '>', options)
|
|
2152
|
+
module.exports = gtr
|
|
2153
|
+
|
|
2154
|
+
|
|
2155
|
+
/***/ }),
|
|
2156
|
+
|
|
2157
|
+
/***/ "./node_modules/semver/ranges/intersects.js":
|
|
2158
|
+
/*!**************************************************!*\
|
|
2159
|
+
!*** ./node_modules/semver/ranges/intersects.js ***!
|
|
2160
|
+
\**************************************************/
|
|
2161
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2162
|
+
|
|
2163
|
+
|
|
2164
|
+
|
|
2165
|
+
const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/semver/classes/range.js")
|
|
2166
|
+
const intersects = (r1, r2, options) => {
|
|
2167
|
+
r1 = new Range(r1, options)
|
|
2168
|
+
r2 = new Range(r2, options)
|
|
2169
|
+
return r1.intersects(r2, options)
|
|
2170
|
+
}
|
|
2171
|
+
module.exports = intersects
|
|
2172
|
+
|
|
2173
|
+
|
|
2174
|
+
/***/ }),
|
|
2175
|
+
|
|
2176
|
+
/***/ "./node_modules/semver/ranges/ltr.js":
|
|
2177
|
+
/*!*******************************************!*\
|
|
2178
|
+
!*** ./node_modules/semver/ranges/ltr.js ***!
|
|
2179
|
+
\*******************************************/
|
|
2180
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2181
|
+
|
|
2182
|
+
|
|
2183
|
+
|
|
2184
|
+
const outside = __webpack_require__(/*! ./outside */ "./node_modules/semver/ranges/outside.js")
|
|
2185
|
+
// Determine if version is less than all the versions possible in the range
|
|
2186
|
+
const ltr = (version, range, options) => outside(version, range, '<', options)
|
|
2187
|
+
module.exports = ltr
|
|
2188
|
+
|
|
2189
|
+
|
|
2190
|
+
/***/ }),
|
|
2191
|
+
|
|
2192
|
+
/***/ "./node_modules/semver/ranges/max-satisfying.js":
|
|
2193
|
+
/*!******************************************************!*\
|
|
2194
|
+
!*** ./node_modules/semver/ranges/max-satisfying.js ***!
|
|
2195
|
+
\******************************************************/
|
|
2196
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2197
|
+
|
|
2198
|
+
|
|
2199
|
+
|
|
2200
|
+
const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/semver/classes/semver.js")
|
|
2201
|
+
const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/semver/classes/range.js")
|
|
2202
|
+
|
|
2203
|
+
const maxSatisfying = (versions, range, options) => {
|
|
2204
|
+
let max = null
|
|
2205
|
+
let maxSV = null
|
|
2206
|
+
let rangeObj = null
|
|
2207
|
+
try {
|
|
2208
|
+
rangeObj = new Range(range, options)
|
|
2209
|
+
} catch (er) {
|
|
2210
|
+
return null
|
|
2211
|
+
}
|
|
2212
|
+
versions.forEach((v) => {
|
|
2213
|
+
if (rangeObj.test(v)) {
|
|
2214
|
+
// satisfies(v, range, options)
|
|
2215
|
+
if (!max || maxSV.compare(v) === -1) {
|
|
2216
|
+
// compare(max, v, true)
|
|
2217
|
+
max = v
|
|
2218
|
+
maxSV = new SemVer(max, options)
|
|
2219
|
+
}
|
|
2220
|
+
}
|
|
2221
|
+
})
|
|
2222
|
+
return max
|
|
2223
|
+
}
|
|
2224
|
+
module.exports = maxSatisfying
|
|
2225
|
+
|
|
2226
|
+
|
|
2227
|
+
/***/ }),
|
|
2228
|
+
|
|
2229
|
+
/***/ "./node_modules/semver/ranges/min-satisfying.js":
|
|
2230
|
+
/*!******************************************************!*\
|
|
2231
|
+
!*** ./node_modules/semver/ranges/min-satisfying.js ***!
|
|
2232
|
+
\******************************************************/
|
|
2233
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2234
|
+
|
|
2235
|
+
|
|
2236
|
+
|
|
2237
|
+
const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/semver/classes/semver.js")
|
|
2238
|
+
const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/semver/classes/range.js")
|
|
2239
|
+
const minSatisfying = (versions, range, options) => {
|
|
2240
|
+
let min = null
|
|
2241
|
+
let minSV = null
|
|
2242
|
+
let rangeObj = null
|
|
2243
|
+
try {
|
|
2244
|
+
rangeObj = new Range(range, options)
|
|
2245
|
+
} catch (er) {
|
|
2246
|
+
return null
|
|
2247
|
+
}
|
|
2248
|
+
versions.forEach((v) => {
|
|
2249
|
+
if (rangeObj.test(v)) {
|
|
2250
|
+
// satisfies(v, range, options)
|
|
2251
|
+
if (!min || minSV.compare(v) === 1) {
|
|
2252
|
+
// compare(min, v, true)
|
|
2253
|
+
min = v
|
|
2254
|
+
minSV = new SemVer(min, options)
|
|
2255
|
+
}
|
|
2256
|
+
}
|
|
2257
|
+
})
|
|
2258
|
+
return min
|
|
2259
|
+
}
|
|
2260
|
+
module.exports = minSatisfying
|
|
2261
|
+
|
|
2262
|
+
|
|
2263
|
+
/***/ }),
|
|
2264
|
+
|
|
2265
|
+
/***/ "./node_modules/semver/ranges/min-version.js":
|
|
2266
|
+
/*!***************************************************!*\
|
|
2267
|
+
!*** ./node_modules/semver/ranges/min-version.js ***!
|
|
2268
|
+
\***************************************************/
|
|
2269
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2270
|
+
|
|
2271
|
+
|
|
2272
|
+
|
|
2273
|
+
const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/semver/classes/semver.js")
|
|
2274
|
+
const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/semver/classes/range.js")
|
|
2275
|
+
const gt = __webpack_require__(/*! ../functions/gt */ "./node_modules/semver/functions/gt.js")
|
|
2276
|
+
|
|
2277
|
+
const minVersion = (range, loose) => {
|
|
2278
|
+
range = new Range(range, loose)
|
|
2279
|
+
|
|
2280
|
+
let minver = new SemVer('0.0.0')
|
|
2281
|
+
if (range.test(minver)) {
|
|
2282
|
+
return minver
|
|
2283
|
+
}
|
|
2284
|
+
|
|
2285
|
+
minver = new SemVer('0.0.0-0')
|
|
2286
|
+
if (range.test(minver)) {
|
|
2287
|
+
return minver
|
|
2288
|
+
}
|
|
2289
|
+
|
|
2290
|
+
minver = null
|
|
2291
|
+
for (let i = 0; i < range.set.length; ++i) {
|
|
2292
|
+
const comparators = range.set[i]
|
|
2293
|
+
|
|
2294
|
+
let setMin = null
|
|
2295
|
+
comparators.forEach((comparator) => {
|
|
2296
|
+
// Clone to avoid manipulating the comparator's semver object.
|
|
2297
|
+
const compver = new SemVer(comparator.semver.version)
|
|
2298
|
+
switch (comparator.operator) {
|
|
2299
|
+
case '>':
|
|
2300
|
+
if (compver.prerelease.length === 0) {
|
|
2301
|
+
compver.patch++
|
|
2302
|
+
} else {
|
|
2303
|
+
compver.prerelease.push(0)
|
|
2304
|
+
}
|
|
2305
|
+
compver.raw = compver.format()
|
|
2306
|
+
/* fallthrough */
|
|
2307
|
+
case '':
|
|
2308
|
+
case '>=':
|
|
2309
|
+
if (!setMin || gt(compver, setMin)) {
|
|
2310
|
+
setMin = compver
|
|
2311
|
+
}
|
|
2312
|
+
break
|
|
2313
|
+
case '<':
|
|
2314
|
+
case '<=':
|
|
2315
|
+
/* Ignore maximum versions */
|
|
2316
|
+
break
|
|
2317
|
+
/* istanbul ignore next */
|
|
2318
|
+
default:
|
|
2319
|
+
throw new Error(`Unexpected operation: ${comparator.operator}`)
|
|
2320
|
+
}
|
|
2321
|
+
})
|
|
2322
|
+
if (setMin && (!minver || gt(minver, setMin))) {
|
|
2323
|
+
minver = setMin
|
|
2324
|
+
}
|
|
2325
|
+
}
|
|
2326
|
+
|
|
2327
|
+
if (minver && range.test(minver)) {
|
|
2328
|
+
return minver
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
return null
|
|
2332
|
+
}
|
|
2333
|
+
module.exports = minVersion
|
|
2334
|
+
|
|
2335
|
+
|
|
2336
|
+
/***/ }),
|
|
2337
|
+
|
|
2338
|
+
/***/ "./node_modules/semver/ranges/outside.js":
|
|
2339
|
+
/*!***********************************************!*\
|
|
2340
|
+
!*** ./node_modules/semver/ranges/outside.js ***!
|
|
2341
|
+
\***********************************************/
|
|
2342
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2343
|
+
|
|
2344
|
+
|
|
2345
|
+
|
|
2346
|
+
const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/semver/classes/semver.js")
|
|
2347
|
+
const Comparator = __webpack_require__(/*! ../classes/comparator */ "./node_modules/semver/classes/comparator.js")
|
|
2348
|
+
const { ANY } = Comparator
|
|
2349
|
+
const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/semver/classes/range.js")
|
|
2350
|
+
const satisfies = __webpack_require__(/*! ../functions/satisfies */ "./node_modules/semver/functions/satisfies.js")
|
|
2351
|
+
const gt = __webpack_require__(/*! ../functions/gt */ "./node_modules/semver/functions/gt.js")
|
|
2352
|
+
const lt = __webpack_require__(/*! ../functions/lt */ "./node_modules/semver/functions/lt.js")
|
|
2353
|
+
const lte = __webpack_require__(/*! ../functions/lte */ "./node_modules/semver/functions/lte.js")
|
|
2354
|
+
const gte = __webpack_require__(/*! ../functions/gte */ "./node_modules/semver/functions/gte.js")
|
|
2355
|
+
|
|
2356
|
+
const outside = (version, range, hilo, options) => {
|
|
2357
|
+
version = new SemVer(version, options)
|
|
2358
|
+
range = new Range(range, options)
|
|
2359
|
+
|
|
2360
|
+
let gtfn, ltefn, ltfn, comp, ecomp
|
|
2361
|
+
switch (hilo) {
|
|
2362
|
+
case '>':
|
|
2363
|
+
gtfn = gt
|
|
2364
|
+
ltefn = lte
|
|
2365
|
+
ltfn = lt
|
|
2366
|
+
comp = '>'
|
|
2367
|
+
ecomp = '>='
|
|
2368
|
+
break
|
|
2369
|
+
case '<':
|
|
2370
|
+
gtfn = lt
|
|
2371
|
+
ltefn = gte
|
|
2372
|
+
ltfn = gt
|
|
2373
|
+
comp = '<'
|
|
2374
|
+
ecomp = '<='
|
|
2375
|
+
break
|
|
2376
|
+
default:
|
|
2377
|
+
throw new TypeError('Must provide a hilo val of "<" or ">"')
|
|
2378
|
+
}
|
|
2379
|
+
|
|
2380
|
+
// If it satisfies the range it is not outside
|
|
2381
|
+
if (satisfies(version, range, options)) {
|
|
2382
|
+
return false
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2385
|
+
// From now on, variable terms are as if we're in "gtr" mode.
|
|
2386
|
+
// but note that everything is flipped for the "ltr" function.
|
|
2387
|
+
|
|
2388
|
+
for (let i = 0; i < range.set.length; ++i) {
|
|
2389
|
+
const comparators = range.set[i]
|
|
2390
|
+
|
|
2391
|
+
let high = null
|
|
2392
|
+
let low = null
|
|
2393
|
+
|
|
2394
|
+
comparators.forEach((comparator) => {
|
|
2395
|
+
if (comparator.semver === ANY) {
|
|
2396
|
+
comparator = new Comparator('>=0.0.0')
|
|
2397
|
+
}
|
|
2398
|
+
high = high || comparator
|
|
2399
|
+
low = low || comparator
|
|
2400
|
+
if (gtfn(comparator.semver, high.semver, options)) {
|
|
2401
|
+
high = comparator
|
|
2402
|
+
} else if (ltfn(comparator.semver, low.semver, options)) {
|
|
2403
|
+
low = comparator
|
|
2404
|
+
}
|
|
2405
|
+
})
|
|
2406
|
+
|
|
2407
|
+
// If the edge version comparator has a operator then our version
|
|
2408
|
+
// isn't outside it
|
|
2409
|
+
if (high.operator === comp || high.operator === ecomp) {
|
|
2410
|
+
return false
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2413
|
+
// If the lowest version comparator has an operator and our version
|
|
2414
|
+
// is less than it then it isn't higher than the range
|
|
2415
|
+
if ((!low.operator || low.operator === comp) &&
|
|
2416
|
+
ltefn(version, low.semver)) {
|
|
2417
|
+
return false
|
|
2418
|
+
} else if (low.operator === ecomp && ltfn(version, low.semver)) {
|
|
2419
|
+
return false
|
|
2420
|
+
}
|
|
2421
|
+
}
|
|
2422
|
+
return true
|
|
2423
|
+
}
|
|
2424
|
+
|
|
2425
|
+
module.exports = outside
|
|
2426
|
+
|
|
2427
|
+
|
|
2428
|
+
/***/ }),
|
|
2429
|
+
|
|
2430
|
+
/***/ "./node_modules/semver/ranges/simplify.js":
|
|
2431
|
+
/*!************************************************!*\
|
|
2432
|
+
!*** ./node_modules/semver/ranges/simplify.js ***!
|
|
2433
|
+
\************************************************/
|
|
2434
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2435
|
+
|
|
2436
|
+
|
|
2437
|
+
|
|
2438
|
+
// given a set of versions and a range, create a "simplified" range
|
|
2439
|
+
// that includes the same versions that the original range does
|
|
2440
|
+
// If the original range is shorter than the simplified one, return that.
|
|
2441
|
+
const satisfies = __webpack_require__(/*! ../functions/satisfies.js */ "./node_modules/semver/functions/satisfies.js")
|
|
2442
|
+
const compare = __webpack_require__(/*! ../functions/compare.js */ "./node_modules/semver/functions/compare.js")
|
|
2443
|
+
module.exports = (versions, range, options) => {
|
|
2444
|
+
const set = []
|
|
2445
|
+
let first = null
|
|
2446
|
+
let prev = null
|
|
2447
|
+
const v = versions.sort((a, b) => compare(a, b, options))
|
|
2448
|
+
for (const version of v) {
|
|
2449
|
+
const included = satisfies(version, range, options)
|
|
2450
|
+
if (included) {
|
|
2451
|
+
prev = version
|
|
2452
|
+
if (!first) {
|
|
2453
|
+
first = version
|
|
2454
|
+
}
|
|
2455
|
+
} else {
|
|
2456
|
+
if (prev) {
|
|
2457
|
+
set.push([first, prev])
|
|
2458
|
+
}
|
|
2459
|
+
prev = null
|
|
2460
|
+
first = null
|
|
2461
|
+
}
|
|
2462
|
+
}
|
|
2463
|
+
if (first) {
|
|
2464
|
+
set.push([first, null])
|
|
2465
|
+
}
|
|
2466
|
+
|
|
2467
|
+
const ranges = []
|
|
2468
|
+
for (const [min, max] of set) {
|
|
2469
|
+
if (min === max) {
|
|
2470
|
+
ranges.push(min)
|
|
2471
|
+
} else if (!max && min === v[0]) {
|
|
2472
|
+
ranges.push('*')
|
|
2473
|
+
} else if (!max) {
|
|
2474
|
+
ranges.push(`>=${min}`)
|
|
2475
|
+
} else if (min === v[0]) {
|
|
2476
|
+
ranges.push(`<=${max}`)
|
|
2477
|
+
} else {
|
|
2478
|
+
ranges.push(`${min} - ${max}`)
|
|
2479
|
+
}
|
|
2480
|
+
}
|
|
2481
|
+
const simplified = ranges.join(' || ')
|
|
2482
|
+
const original = typeof range.raw === 'string' ? range.raw : String(range)
|
|
2483
|
+
return simplified.length < original.length ? simplified : range
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2486
|
+
|
|
2487
|
+
/***/ }),
|
|
2488
|
+
|
|
2489
|
+
/***/ "./node_modules/semver/ranges/subset.js":
|
|
2490
|
+
/*!**********************************************!*\
|
|
2491
|
+
!*** ./node_modules/semver/ranges/subset.js ***!
|
|
2492
|
+
\**********************************************/
|
|
2493
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2494
|
+
|
|
2495
|
+
|
|
2496
|
+
|
|
2497
|
+
const Range = __webpack_require__(/*! ../classes/range.js */ "./node_modules/semver/classes/range.js")
|
|
2498
|
+
const Comparator = __webpack_require__(/*! ../classes/comparator.js */ "./node_modules/semver/classes/comparator.js")
|
|
2499
|
+
const { ANY } = Comparator
|
|
2500
|
+
const satisfies = __webpack_require__(/*! ../functions/satisfies.js */ "./node_modules/semver/functions/satisfies.js")
|
|
2501
|
+
const compare = __webpack_require__(/*! ../functions/compare.js */ "./node_modules/semver/functions/compare.js")
|
|
2502
|
+
|
|
2503
|
+
// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:
|
|
2504
|
+
// - Every simple range `r1, r2, ...` is a null set, OR
|
|
2505
|
+
// - Every simple range `r1, r2, ...` which is not a null set is a subset of
|
|
2506
|
+
// some `R1, R2, ...`
|
|
2507
|
+
//
|
|
2508
|
+
// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:
|
|
2509
|
+
// - If c is only the ANY comparator
|
|
2510
|
+
// - If C is only the ANY comparator, return true
|
|
2511
|
+
// - Else if in prerelease mode, return false
|
|
2512
|
+
// - else replace c with `[>=0.0.0]`
|
|
2513
|
+
// - If C is only the ANY comparator
|
|
2514
|
+
// - if in prerelease mode, return true
|
|
2515
|
+
// - else replace C with `[>=0.0.0]`
|
|
2516
|
+
// - Let EQ be the set of = comparators in c
|
|
2517
|
+
// - If EQ is more than one, return true (null set)
|
|
2518
|
+
// - Let GT be the highest > or >= comparator in c
|
|
2519
|
+
// - Let LT be the lowest < or <= comparator in c
|
|
2520
|
+
// - If GT and LT, and GT.semver > LT.semver, return true (null set)
|
|
2521
|
+
// - If any C is a = range, and GT or LT are set, return false
|
|
2522
|
+
// - If EQ
|
|
2523
|
+
// - If GT, and EQ does not satisfy GT, return true (null set)
|
|
2524
|
+
// - If LT, and EQ does not satisfy LT, return true (null set)
|
|
2525
|
+
// - If EQ satisfies every C, return true
|
|
2526
|
+
// - Else return false
|
|
2527
|
+
// - If GT
|
|
2528
|
+
// - If GT.semver is lower than any > or >= comp in C, return false
|
|
2529
|
+
// - If GT is >=, and GT.semver does not satisfy every C, return false
|
|
2530
|
+
// - If GT.semver has a prerelease, and not in prerelease mode
|
|
2531
|
+
// - If no C has a prerelease and the GT.semver tuple, return false
|
|
2532
|
+
// - If LT
|
|
2533
|
+
// - If LT.semver is greater than any < or <= comp in C, return false
|
|
2534
|
+
// - If LT is <=, and LT.semver does not satisfy every C, return false
|
|
2535
|
+
// - If GT.semver has a prerelease, and not in prerelease mode
|
|
2536
|
+
// - If no C has a prerelease and the LT.semver tuple, return false
|
|
2537
|
+
// - Else return true
|
|
2538
|
+
|
|
2539
|
+
const subset = (sub, dom, options = {}) => {
|
|
2540
|
+
if (sub === dom) {
|
|
2541
|
+
return true
|
|
2542
|
+
}
|
|
2543
|
+
|
|
2544
|
+
sub = new Range(sub, options)
|
|
2545
|
+
dom = new Range(dom, options)
|
|
2546
|
+
let sawNonNull = false
|
|
2547
|
+
|
|
2548
|
+
OUTER: for (const simpleSub of sub.set) {
|
|
2549
|
+
for (const simpleDom of dom.set) {
|
|
2550
|
+
const isSub = simpleSubset(simpleSub, simpleDom, options)
|
|
2551
|
+
sawNonNull = sawNonNull || isSub !== null
|
|
2552
|
+
if (isSub) {
|
|
2553
|
+
continue OUTER
|
|
2554
|
+
}
|
|
2555
|
+
}
|
|
2556
|
+
// the null set is a subset of everything, but null simple ranges in
|
|
2557
|
+
// a complex range should be ignored. so if we saw a non-null range,
|
|
2558
|
+
// then we know this isn't a subset, but if EVERY simple range was null,
|
|
2559
|
+
// then it is a subset.
|
|
2560
|
+
if (sawNonNull) {
|
|
2561
|
+
return false
|
|
2562
|
+
}
|
|
2563
|
+
}
|
|
2564
|
+
return true
|
|
2565
|
+
}
|
|
2566
|
+
|
|
2567
|
+
const minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]
|
|
2568
|
+
const minimumVersion = [new Comparator('>=0.0.0')]
|
|
2569
|
+
|
|
2570
|
+
const simpleSubset = (sub, dom, options) => {
|
|
2571
|
+
if (sub === dom) {
|
|
2572
|
+
return true
|
|
2573
|
+
}
|
|
2574
|
+
|
|
2575
|
+
if (sub.length === 1 && sub[0].semver === ANY) {
|
|
2576
|
+
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
2577
|
+
return true
|
|
2578
|
+
} else if (options.includePrerelease) {
|
|
2579
|
+
sub = minimumVersionWithPreRelease
|
|
2580
|
+
} else {
|
|
2581
|
+
sub = minimumVersion
|
|
2582
|
+
}
|
|
2583
|
+
}
|
|
2584
|
+
|
|
2585
|
+
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
2586
|
+
if (options.includePrerelease) {
|
|
2587
|
+
return true
|
|
2588
|
+
} else {
|
|
2589
|
+
dom = minimumVersion
|
|
2590
|
+
}
|
|
2591
|
+
}
|
|
2592
|
+
|
|
2593
|
+
const eqSet = new Set()
|
|
2594
|
+
let gt, lt
|
|
2595
|
+
for (const c of sub) {
|
|
2596
|
+
if (c.operator === '>' || c.operator === '>=') {
|
|
2597
|
+
gt = higherGT(gt, c, options)
|
|
2598
|
+
} else if (c.operator === '<' || c.operator === '<=') {
|
|
2599
|
+
lt = lowerLT(lt, c, options)
|
|
2600
|
+
} else {
|
|
2601
|
+
eqSet.add(c.semver)
|
|
2602
|
+
}
|
|
2603
|
+
}
|
|
2604
|
+
|
|
2605
|
+
if (eqSet.size > 1) {
|
|
2606
|
+
return null
|
|
2607
|
+
}
|
|
2608
|
+
|
|
2609
|
+
let gtltComp
|
|
2610
|
+
if (gt && lt) {
|
|
2611
|
+
gtltComp = compare(gt.semver, lt.semver, options)
|
|
2612
|
+
if (gtltComp > 0) {
|
|
2613
|
+
return null
|
|
2614
|
+
} else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {
|
|
2615
|
+
return null
|
|
2616
|
+
}
|
|
2617
|
+
}
|
|
2618
|
+
|
|
2619
|
+
// will iterate one or zero times
|
|
2620
|
+
for (const eq of eqSet) {
|
|
2621
|
+
if (gt && !satisfies(eq, String(gt), options)) {
|
|
2622
|
+
return null
|
|
2623
|
+
}
|
|
2624
|
+
|
|
2625
|
+
if (lt && !satisfies(eq, String(lt), options)) {
|
|
2626
|
+
return null
|
|
2627
|
+
}
|
|
2628
|
+
|
|
2629
|
+
for (const c of dom) {
|
|
2630
|
+
if (!satisfies(eq, String(c), options)) {
|
|
2631
|
+
return false
|
|
2632
|
+
}
|
|
2633
|
+
}
|
|
2634
|
+
|
|
2635
|
+
return true
|
|
2636
|
+
}
|
|
2637
|
+
|
|
2638
|
+
let higher, lower
|
|
2639
|
+
let hasDomLT, hasDomGT
|
|
2640
|
+
// if the subset has a prerelease, we need a comparator in the superset
|
|
2641
|
+
// with the same tuple and a prerelease, or it's not a subset
|
|
2642
|
+
let needDomLTPre = lt &&
|
|
2643
|
+
!options.includePrerelease &&
|
|
2644
|
+
lt.semver.prerelease.length ? lt.semver : false
|
|
2645
|
+
let needDomGTPre = gt &&
|
|
2646
|
+
!options.includePrerelease &&
|
|
2647
|
+
gt.semver.prerelease.length ? gt.semver : false
|
|
2648
|
+
// exception: <1.2.3-0 is the same as <1.2.3
|
|
2649
|
+
if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&
|
|
2650
|
+
lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {
|
|
2651
|
+
needDomLTPre = false
|
|
2652
|
+
}
|
|
2653
|
+
|
|
2654
|
+
for (const c of dom) {
|
|
2655
|
+
hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='
|
|
2656
|
+
hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='
|
|
2657
|
+
if (gt) {
|
|
2658
|
+
if (needDomGTPre) {
|
|
2659
|
+
if (c.semver.prerelease && c.semver.prerelease.length &&
|
|
2660
|
+
c.semver.major === needDomGTPre.major &&
|
|
2661
|
+
c.semver.minor === needDomGTPre.minor &&
|
|
2662
|
+
c.semver.patch === needDomGTPre.patch) {
|
|
2663
|
+
needDomGTPre = false
|
|
2664
|
+
}
|
|
2665
|
+
}
|
|
2666
|
+
if (c.operator === '>' || c.operator === '>=') {
|
|
2667
|
+
higher = higherGT(gt, c, options)
|
|
2668
|
+
if (higher === c && higher !== gt) {
|
|
2669
|
+
return false
|
|
2670
|
+
}
|
|
2671
|
+
} else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {
|
|
2672
|
+
return false
|
|
2673
|
+
}
|
|
2674
|
+
}
|
|
2675
|
+
if (lt) {
|
|
2676
|
+
if (needDomLTPre) {
|
|
2677
|
+
if (c.semver.prerelease && c.semver.prerelease.length &&
|
|
2678
|
+
c.semver.major === needDomLTPre.major &&
|
|
2679
|
+
c.semver.minor === needDomLTPre.minor &&
|
|
2680
|
+
c.semver.patch === needDomLTPre.patch) {
|
|
2681
|
+
needDomLTPre = false
|
|
2682
|
+
}
|
|
2683
|
+
}
|
|
2684
|
+
if (c.operator === '<' || c.operator === '<=') {
|
|
2685
|
+
lower = lowerLT(lt, c, options)
|
|
2686
|
+
if (lower === c && lower !== lt) {
|
|
2687
|
+
return false
|
|
2688
|
+
}
|
|
2689
|
+
} else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {
|
|
2690
|
+
return false
|
|
2691
|
+
}
|
|
2692
|
+
}
|
|
2693
|
+
if (!c.operator && (lt || gt) && gtltComp !== 0) {
|
|
2694
|
+
return false
|
|
2695
|
+
}
|
|
2696
|
+
}
|
|
2697
|
+
|
|
2698
|
+
// if there was a < or >, and nothing in the dom, then must be false
|
|
2699
|
+
// UNLESS it was limited by another range in the other direction.
|
|
2700
|
+
// Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0
|
|
2701
|
+
if (gt && hasDomLT && !lt && gtltComp !== 0) {
|
|
2702
|
+
return false
|
|
2703
|
+
}
|
|
2704
|
+
|
|
2705
|
+
if (lt && hasDomGT && !gt && gtltComp !== 0) {
|
|
2706
|
+
return false
|
|
2707
|
+
}
|
|
2708
|
+
|
|
2709
|
+
// we needed a prerelease range in a specific tuple, but didn't get one
|
|
2710
|
+
// then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,
|
|
2711
|
+
// because it includes prereleases in the 1.2.3 tuple
|
|
2712
|
+
if (needDomGTPre || needDomLTPre) {
|
|
2713
|
+
return false
|
|
2714
|
+
}
|
|
2715
|
+
|
|
2716
|
+
return true
|
|
2717
|
+
}
|
|
2718
|
+
|
|
2719
|
+
// >=1.2.3 is lower than >1.2.3
|
|
2720
|
+
const higherGT = (a, b, options) => {
|
|
2721
|
+
if (!a) {
|
|
2722
|
+
return b
|
|
2723
|
+
}
|
|
2724
|
+
const comp = compare(a.semver, b.semver, options)
|
|
2725
|
+
return comp > 0 ? a
|
|
2726
|
+
: comp < 0 ? b
|
|
2727
|
+
: b.operator === '>' && a.operator === '>=' ? b
|
|
2728
|
+
: a
|
|
2729
|
+
}
|
|
2730
|
+
|
|
2731
|
+
// <=1.2.3 is higher than <1.2.3
|
|
2732
|
+
const lowerLT = (a, b, options) => {
|
|
2733
|
+
if (!a) {
|
|
2734
|
+
return b
|
|
2735
|
+
}
|
|
2736
|
+
const comp = compare(a.semver, b.semver, options)
|
|
2737
|
+
return comp < 0 ? a
|
|
2738
|
+
: comp > 0 ? b
|
|
2739
|
+
: b.operator === '<' && a.operator === '<=' ? b
|
|
2740
|
+
: a
|
|
2741
|
+
}
|
|
2742
|
+
|
|
2743
|
+
module.exports = subset
|
|
2744
|
+
|
|
2745
|
+
|
|
2746
|
+
/***/ }),
|
|
2747
|
+
|
|
2748
|
+
/***/ "./node_modules/semver/ranges/to-comparators.js":
|
|
2749
|
+
/*!******************************************************!*\
|
|
2750
|
+
!*** ./node_modules/semver/ranges/to-comparators.js ***!
|
|
2751
|
+
\******************************************************/
|
|
2752
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2753
|
+
|
|
2754
|
+
|
|
2755
|
+
|
|
2756
|
+
const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/semver/classes/range.js")
|
|
2757
|
+
|
|
2758
|
+
// Mostly just for testing and legacy API reasons
|
|
2759
|
+
const toComparators = (range, options) =>
|
|
2760
|
+
new Range(range, options).set
|
|
2761
|
+
.map(comp => comp.map(c => c.value).join(' ').trim().split(' '))
|
|
2762
|
+
|
|
2763
|
+
module.exports = toComparators
|
|
2764
|
+
|
|
2765
|
+
|
|
2766
|
+
/***/ }),
|
|
2767
|
+
|
|
2768
|
+
/***/ "./node_modules/semver/ranges/valid.js":
|
|
2769
|
+
/*!*********************************************!*\
|
|
2770
|
+
!*** ./node_modules/semver/ranges/valid.js ***!
|
|
2771
|
+
\*********************************************/
|
|
2772
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2773
|
+
|
|
2774
|
+
|
|
2775
|
+
|
|
2776
|
+
const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/semver/classes/range.js")
|
|
2777
|
+
const validRange = (range, options) => {
|
|
2778
|
+
try {
|
|
2779
|
+
// Return '*' instead of '' so that truthiness works.
|
|
2780
|
+
// This will throw if it's invalid anyway
|
|
2781
|
+
return new Range(range, options).range || '*'
|
|
2782
|
+
} catch (er) {
|
|
2783
|
+
return null
|
|
2784
|
+
}
|
|
2785
|
+
}
|
|
2786
|
+
module.exports = validRange
|
|
2787
|
+
|
|
2788
|
+
|
|
2789
|
+
/***/ })
|
|
2790
|
+
|
|
2791
|
+
}]);
|
|
2792
|
+
//# sourceMappingURL=vendors-node_modules_semver_index_js.3f6754ac5116d47de76b.js.map
|