mazey 4.0.6 → 4.0.7

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.
package/lib/index.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Mazey v4.0.6 https://github.com/mazeyqian/mazey
2
+ * Mazey v4.0.7 https://github.com/mazeyqian/mazey
3
3
  * (c) 2018-2024 Cheng
4
4
  * Released under the MIT License.
5
5
  */
package/lib/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Mazey v4.0.6 https://github.com/mazeyqian/mazey
2
+ * Mazey v4.0.7 https://github.com/mazeyqian/mazey
3
3
  * (c) 2018-2024 Cheng
4
4
  * Released under the MIT License.
5
5
  */
package/lib/mazey.min.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Mazey v4.0.6 https://github.com/mazeyqian/mazey
2
+ * Mazey v4.0.7 https://github.com/mazeyqian/mazey
3
3
  * (c) 2018-2024 Cheng
4
4
  * Released under the MIT License.
5
5
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mazey",
3
- "version": "4.0.6",
3
+ "version": "4.0.7",
4
4
  "description": "A functional library for daily front-end work.",
5
5
  "main": "lib/index.cjs.js",
6
6
  "module": "lib/index.esm.js",
@@ -50,7 +50,7 @@ async function release (ver, { canGenerateToc = false, defaultBranch = 'main' }
50
50
  // Commit
51
51
  await gitCommit(`${releaseVersion} stage`);
52
52
  // Marge
53
- await gitMergeMaster2Release(defaultBranch);
53
+ await gitMergeMain2Release(defaultBranch);
54
54
  // Build
55
55
  await execa('npm', [ 'run', 'preview' ]);
56
56
  await execa('npm', [ 'publish' ]);
@@ -105,9 +105,9 @@ async function gitPush () {
105
105
  }
106
106
 
107
107
  /**
108
- * Merge master to current branch.
108
+ * Merge main to current branch.
109
109
  */
110
- async function gitMergeMaster2Release (defaultBranch = 'main') {
110
+ async function gitMergeMain2Release (defaultBranch = 'main') {
111
111
  const currentBranch = await getGitCurrentBranch();
112
112
  await execa('git', [ 'checkout', defaultBranch ]);
113
113
  await execa('git', [ 'pull' ]);
@@ -116,6 +116,13 @@ async function gitMergeMaster2Release (defaultBranch = 'main') {
116
116
  return true;
117
117
  }
118
118
 
119
+ /**
120
+ * Alias of `gitMergeMain2Release`.
121
+ */
122
+ async function gitMergeMaster2Release (defaultBranch = 'main') {
123
+ return await gitMergeMain2Release(defaultBranch);
124
+ }
125
+
119
126
  /**
120
127
  * Get git current branch.
121
128
  */
@@ -148,7 +155,8 @@ async function gitCommit (releaseVersion = 0) {
148
155
  module.exports = {
149
156
  release,
150
157
  gitPush,
151
- gitMergeMaster2Release,
158
+ gitMergeMaster2Release, // Deprecated
159
+ gitMergeMain2Release,
152
160
  getGitCurrentBranch,
153
161
  gitCommit,
154
162
  gitTagPush,