mirror of
https://github.com/jaywcjlove/reference.git
synced 2025-06-19 21:51:20 +08:00
feat: add vim.md
regex.md
cheatsheet. 9ff36a3ac3
This commit is contained in:
397
docs/semver.html
397
docs/semver.html
@ -40,32 +40,32 @@
|
||||
</div></div><div class="h2wrap-body"><div class="wrap"><div class="wrap-header h3wrap"><h3 id="介绍"><a aria-hidden="true" tabindex="-1" href="#介绍"><span class="icon icon-link"></span></a>介绍</h3><div class="wrap-body">
|
||||
<p><a href="http://semver.org/">Semver</a> 是一种语义版本控制规范。</p>
|
||||
<ul>
|
||||
<li><a href="http://semver.org/">语义版本控制规范文档</a> <em>(semver.org)</em></li>
|
||||
<li><a href="https://docs.npmjs.com/cli/v6/using-npm/semver">npm 的语义版本器</a> <em>(npmjs.com)</em></li>
|
||||
<li><a href="http://semver.org/">语义版本控制规范文档</a> <em>(semver.org)</em></li>
|
||||
<li><a href="https://docs.npmjs.com/cli/v6/using-npm/semver">npm 的语义版本器</a> <em>(npmjs.com)</em></li>
|
||||
</ul>
|
||||
</div></div></div><div class="wrap"><div class="wrap-header h3wrap"><h3 id="semver"><a aria-hidden="true" tabindex="-1" href="#semver"><span class="icon icon-link"></span></a>Semver</h3><div class="wrap-body">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>-</th>
|
||||
<th>-</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>主版本号(MAJOR)</code></td>
|
||||
<td>当你做了不兼容的 API 修改</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>次版本号(MINOR)</code></td>
|
||||
<td>当你做了向下兼容的功能性新增</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>修订号(PATCH)</code></td>
|
||||
<td>当你做了向下兼容的问题修正</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table><thead><tr><th>-</th><th>-</th></tr></thead><tbody><tr><td><code>主版本号(MAJOR)</code></td><td>当你做了不兼容的 API 修改</td></tr><tr><td><code>次版本号(MINOR)</code></td><td>当你做了向下兼容的功能性新增</td></tr><tr><td><code>修订号(PATCH)</code></td><td>当你做了向下兼容的问题修正</td></tr></tbody></table>
|
||||
</div></div></div><div class="wrap"><div class="wrap-header h3wrap"><h3 id="简单范围"><a aria-hidden="true" tabindex="-1" href="#简单范围"><span class="icon icon-link"></span></a>简单范围</h3><div class="wrap-body">
|
||||
<pre><code class="code-highlight"><span class="code-line line-number" line="1"> 1.2.3
|
||||
</span><span class="code-line line-number" line="2"> =1.2.3
|
||||
@ -74,188 +74,195 @@
|
||||
</span><span class="code-line line-number" line="5">>=1.2.3
|
||||
</span></code></pre>
|
||||
<p>请注意,后缀版本(<code>1.2.3-rc1</code>)不匹配。</p>
|
||||
</div></div></div><div class="wrap row-span-3"><div class="wrap-header h3wrap"><h3 id="范围"><a aria-hidden="true" tabindex="-1" href="#范围"><span class="icon icon-link"></span></a>范围</h3><div class="wrap-body"><!--rehype:wrap-class=row-span-3-->
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>范围</th>
|
||||
<th>描述</th>
|
||||
<th>Notes</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>~1.2.3</code></td>
|
||||
<td>是 <code>>=1.2.3 <1.3.0</code></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^1.2.3</code></td>
|
||||
<td>是 <code>>=1.2.3 <2.0.0</code></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^0.2.3</code></td>
|
||||
<td>是 <code>>=0.2.3 <0.3.0</code></td>
|
||||
<td>(0.x.x 是特殊的)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^0.0.1</code></td>
|
||||
<td>是 <code>=0.0.1</code></td>
|
||||
<td>(0.0.x 是特殊的)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^1.2</code></td>
|
||||
<td>是 <code>>=1.2.0 <2.0.0</code></td>
|
||||
<td>(像 ^1.2.0)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>~1.2</code></td>
|
||||
<td>是 <code>>=1.2.0 <1.3.0</code></td>
|
||||
<td>(像 ~1.2.0)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^1</code></td>
|
||||
<td>是 <code>>=1.0.0 <2.0.0</code></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>~1</code></td>
|
||||
<td>相同的</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>1.x</code></td>
|
||||
<td>相同的</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>1.*</code></td>
|
||||
<td>相同的</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>1</code></td>
|
||||
<td>相同的</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>*</code></td>
|
||||
<td>任何版本</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>x</code></td>
|
||||
<td>相同的</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div></div></div><div class="wrap row-span-3"><div class="wrap-header h3wrap"><h3 id="连字符范围"><a aria-hidden="true" tabindex="-1" href="#连字符范围"><span class="icon icon-link"></span></a>连字符范围</h3><div class="wrap-body"><!--rehype:wrap-class=row-span-3-->
|
||||
<table class="show-header ">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>范围</th>
|
||||
<th>描述</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>1.2.3 - 2.3.4</code></td>
|
||||
<td>是 <code>>=1.2.3 <=2.3.4</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table><!--rehype:className=show-header -->
|
||||
</div></div></div><div class="wrap row-span-3"><div class="wrap-header h3wrap"><h3 id="范围"><a aria-hidden="true" tabindex="-1" href="#范围"><span class="icon icon-link"></span></a>范围</h3><div class="wrap-body">
|
||||
<!--rehype:wrap-class=row-span-3-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table class="shortcuts"><thead><tr><th>范围</th><th>描述</th><th>Notes</th></tr></thead><tbody><tr><td><code>~1.2.3</code></td><td>是 <code>>=1.2.3 <1.3.0</code></td><td></td></tr><tr><td><code>^1.2.3</code></td><td>是 <code>>=1.2.3 <2.0.0</code></td><td></td></tr><tr><td><code>^0.2.3</code></td><td>是 <code>>=0.2.3 <0.3.0</code></td><td>(0.x.x 是特殊的)</td></tr><tr><td><code>^0.0.1</code></td><td>是 <code>=0.0.1</code></td><td>(0.0.x 是特殊的)</td></tr><tr><td><code>^1.2</code></td><td>是 <code>>=1.2.0 <2.0.0</code></td><td>(像 ^1.2.0)</td></tr><tr><td><code>~1.2</code></td><td>是 <code>>=1.2.0 <1.3.0</code></td><td>(像 ~1.2.0)</td></tr><tr><td><code>^1</code></td><td>是 <code>>=1.0.0 <2.0.0</code></td><td></td></tr><tr><td><code>~1</code></td><td>相同的</td><td></td></tr><tr><td><code>1.x</code></td><td>相同的</td><td></td></tr><tr><td><code>1.*</code></td><td>相同的</td><td></td></tr><tr><td><code>1</code></td><td>相同的</td><td></td></tr><tr><td><code>*</code></td><td>任何版本</td><td></td></tr><tr><td><code>x</code></td><td>相同的</td><td></td></tr></tbody></table>
|
||||
<!--rehype:className=shortcuts-->
|
||||
</div></div></div><div class="wrap row-span-3"><div class="wrap-header h3wrap"><h3 id="连字符范围"><a aria-hidden="true" tabindex="-1" href="#连字符范围"><span class="icon icon-link"></span></a>连字符范围</h3><div class="wrap-body">
|
||||
<!--rehype:wrap-class=row-span-3-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table class="shortcuts show-header"><thead><tr><th>范围</th><th>描述</th></tr></thead><tbody><tr><td><code>1.2.3 - 2.3.4</code></td><td>是 <code>>=1.2.3 <=2.3.4</code></td></tr></tbody></table>
|
||||
<!--rehype:className=shortcuts show-header-->
|
||||
</div></div><div class="h3wrap-body"><div class="wrap"><div class="wrap-header h4wrap"><h4 id="部分向右"><a aria-hidden="true" tabindex="-1" href="#部分向右"><span class="icon icon-link"></span></a>部分向右</h4><div class="wrap-body">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>范围</th>
|
||||
<th>描述</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>1.2.3 - 2.3</code></td>
|
||||
<td>是 <code>>=1.2.3 <2.4.0</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>1.2.3 - 2</code></td>
|
||||
<td>是 <code>>=1.2.3 <3.0.0</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table class="shortcuts"><thead><tr><th>范围</th><th>描述</th></tr></thead><tbody><tr><td><code>1.2.3 - 2.3</code></td><td>是 <code>>=1.2.3 <2.4.0</code></td></tr><tr><td><code>1.2.3 - 2</code></td><td>是 <code>>=1.2.3 <3.0.0</code></td></tr></tbody></table>
|
||||
<!--rehype:className=shortcuts-->
|
||||
</div></div></div><div class="wrap"><div class="wrap-header h4wrap"><h4 id="部分向左"><a aria-hidden="true" tabindex="-1" href="#部分向左"><span class="icon icon-link"></span></a>部分向左</h4><div class="wrap-body">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>范围</th>
|
||||
<th>描述</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>1.2 - 2.3.0</code></td>
|
||||
<td>是 <code>1.2.0 - 2.3.0</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table class="shortcuts"><thead><tr><th>范围</th><th>描述</th></tr></thead><tbody><tr><td><code>1.2 - 2.3.0</code></td><td>是 <code>1.2.0 - 2.3.0</code></td></tr></tbody></table>
|
||||
<!--rehype:className=shortcuts-->
|
||||
<p>当右侧为部分(例如,<code>2.3</code>)时,假定缺失的部分为<code>x</code>(例如,<code> 2.3.x</code>)。</p>
|
||||
<p>如果左边是部分的(例如,<code>1.2</code>),则假定缺少的部分为<code>0</code>(例如,<code> 1.2.0</code>)。</p>
|
||||
</div></div></div></div></div><div class="wrap"><div class="wrap-header h3wrap"><h3 id="组合范围"><a aria-hidden="true" tabindex="-1" href="#组合范围"><span class="icon icon-link"></span></a>组合范围</h3><div class="wrap-body">
|
||||
<table class="show-header ">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>范围</th>
|
||||
<th>描述</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>>=0.14 <16</code></td>
|
||||
<td>和 (空格分隔)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>0.14.x || 15.x.x</code></td>
|
||||
<td>或 (双竖线分隔)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table><!--rehype:className=show-header -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table class="shortcuts show-header"><thead><tr><th>范围</th><th>描述</th></tr></thead><tbody><tr><td><code>>=0.14 <16</code></td><td>和 (空格分隔)</td></tr><tr><td><code>0.14.x || 15.x.x</code></td><td>或 (双竖线分隔)</td></tr></tbody></table>
|
||||
<!--rehype:className=shortcuts show-header-->
|
||||
</div></div></div><div class="wrap"><div class="wrap-header h3wrap"><h3 id="预发布"><a aria-hidden="true" tabindex="-1" href="#预发布"><span class="icon icon-link"></span></a>预发布</h3><div class="wrap-body">
|
||||
<pre><code class="code-highlight"><span class="code-line line-number" line="1">1.2.3-prerelease+build
|
||||
</span></code></pre>
|
||||
</div></div></div><div class="wrap"><div class="wrap-header h3wrap"><h3 id="解释"><a aria-hidden="true" tabindex="-1" href="#解释"><span class="icon icon-link"></span></a>解释</h3><div class="wrap-body">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>范围</th>
|
||||
<th>描述</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>^</code></td>
|
||||
<td>意思是“兼容”</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>~</code></td>
|
||||
<td>意思是“相当接近”</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>0.x.x</code></td>
|
||||
<td>用于“初始开发”</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>1.x.x</code></td>
|
||||
<td>表示定义了公共 API</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table class="shortcuts"><thead><tr><th>范围</th><th>描述</th></tr></thead><tbody><tr><td><code>^</code></td><td>意思是“兼容”</td></tr><tr><td><code>~</code></td><td>意思是“相当接近”</td></tr><tr><td><code>0.x.x</code></td><td>用于“初始开发”</td></tr><tr><td><code>1.x.x</code></td><td>表示定义了公共 API</td></tr></tbody></table>
|
||||
<!--rehype:className=shortcuts-->
|
||||
</div></div></div></div></div><div class="wrap"><div class="wrap-header h2wrap"><h2 id="另见"><a aria-hidden="true" tabindex="-1" href="#另见"><span class="icon icon-link"></span></a>另见</h2><div class="wrap-body">
|
||||
<ul>
|
||||
<li><a href="https://regex101.com/r/vkijKf/1/">语义化版本号验证正则表达式,支持按编号提取的语言</a></li>
|
||||
<li><a href="https://regex101.com/r/Ly7O1x/3/">语义化版本号验证正则表达式,支持按组名称提取的语言</a></li>
|
||||
<li><a href="https://regex101.com/r/vkijKf/1/">语义化版本号验证正则表达式,支持按编号提取的语言</a></li>
|
||||
<li><a href="https://regex101.com/r/Ly7O1x/3/">语义化版本号验证正则表达式,支持按组名称提取的语言</a></li>
|
||||
</ul>
|
||||
|
||||
</div></div></div></div></div><footer class="footer-wrap"><footer class="max-container">© 2022 Kenny Wang, All rights reserved.</footer></footer></body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user