@b12k/mvm 0.0.3 → 0.0.4
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/dist/skip.js +17 -9
- package/package.json +4 -2
package/dist/skip.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
(function(global, factory) {
|
|
2
|
-
if (typeof module === "object" && typeof module.exports === "object") factory(exports, require("node:child_process"), require("./utils"));
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") factory(exports, require("node:child_process"), require("semver-sort"), require("./utils"));
|
|
3
3
|
else if (typeof define === "function" && define.amd) define([
|
|
4
4
|
"exports",
|
|
5
5
|
"node:child_process",
|
|
6
|
+
"semver-sort",
|
|
6
7
|
"./utils"
|
|
7
8
|
], factory);
|
|
8
|
-
else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(global.skip = {}, global.nodeChildProcess, global.utils);
|
|
9
|
-
})(this, function(exports, _nodeChildProcess, _utils) {
|
|
9
|
+
else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(global.skip = {}, global.nodeChildProcess, global.semverSort, global.utils);
|
|
10
|
+
})(this, function(exports, _nodeChildProcess, _semverSort, _utils) {
|
|
10
11
|
"use strict";
|
|
11
12
|
Object.defineProperty(exports, "__esModule", {
|
|
12
13
|
value: true
|
|
@@ -15,22 +16,29 @@
|
|
|
15
16
|
enumerable: true,
|
|
16
17
|
get: ()=>skip
|
|
17
18
|
});
|
|
19
|
+
_semverSort = /*#__PURE__*/ _interopRequireDefault(_semverSort);
|
|
20
|
+
function _interopRequireDefault(obj) {
|
|
21
|
+
return obj && obj.__esModule ? obj : {
|
|
22
|
+
default: obj
|
|
23
|
+
};
|
|
24
|
+
}
|
|
18
25
|
const skip = (config)=>{
|
|
19
26
|
const { name , workspace , root , log =_utils.doNothing } = config;
|
|
20
27
|
log({
|
|
21
28
|
config
|
|
22
29
|
});
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
latestTag
|
|
26
|
-
});
|
|
27
|
-
if (!latestTag) {
|
|
30
|
+
const tags = (0, _nodeChildProcess.execSync)('git tag').toString().split('\n').filter((tag)=>tag.includes(name)).map((tag)=>tag.split('v')[1]);
|
|
31
|
+
if (tags.length === 0) {
|
|
28
32
|
log({
|
|
29
|
-
message: '
|
|
33
|
+
message: 'tags not found',
|
|
30
34
|
skip: false
|
|
31
35
|
});
|
|
32
36
|
return false;
|
|
33
37
|
}
|
|
38
|
+
const latestTag = `${name}-v${_semverSort.default.desc(tags)[0]}`;
|
|
39
|
+
log({
|
|
40
|
+
latestTag
|
|
41
|
+
});
|
|
34
42
|
const workspaceName = workspace.toLowerCase().replace(root.toLowerCase(), '').replaceAll('\\', '/').slice(1);
|
|
35
43
|
log({
|
|
36
44
|
workspaceName
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@b12k/mvm",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Monorepo versions manager",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"@types/git-raw-commits": "2.0.1",
|
|
53
53
|
"@types/glob": "8.0.1",
|
|
54
54
|
"@types/node": "18.14.0",
|
|
55
|
+
"@types/semver-sort": "0.0.1",
|
|
55
56
|
"@typescript-eslint/eslint-plugin": "5.53.0",
|
|
56
57
|
"@typescript-eslint/parser": "5.53.0",
|
|
57
58
|
"chokidar": "3.5.3",
|
|
@@ -79,6 +80,7 @@
|
|
|
79
80
|
"dependencies": {
|
|
80
81
|
"commander": "10.0.0",
|
|
81
82
|
"fs-extra": "11.1.0",
|
|
82
|
-
"glob": "8.1.0"
|
|
83
|
+
"glob": "8.1.0",
|
|
84
|
+
"semver-sort": "1.0.0"
|
|
83
85
|
}
|
|
84
86
|
}
|