@b12k/mvm 0.0.1
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/LICENSE +21 -0
- package/README.md +6 -0
- package/dist/cli-lock.d.ts +2 -0
- package/dist/cli-lock.js +15 -0
- package/dist/cli-skip.d.ts +2 -0
- package/dist/cli-skip.js +35 -0
- package/dist/cli-update.d.ts +2 -0
- package/dist/cli-update.js +25 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +29 -0
- package/dist/lock.d.ts +1 -0
- package/dist/lock.js +19 -0
- package/dist/skip.d.ts +8 -0
- package/dist/skip.js +53 -0
- package/dist/update.d.ts +8 -0
- package/dist/update.js +64 -0
- package/dist/utils/do-nothing.d.ts +1 -0
- package/dist/utils/do-nothing.js +18 -0
- package/dist/utils/get-dependency-type.d.ts +1 -0
- package/dist/utils/get-dependency-type.js +25 -0
- package/dist/utils/get-repo-root-path.d.ts +1 -0
- package/dist/utils/get-repo-root-path.js +19 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.js +35 -0
- package/dist/utils/log-json.d.ts +2 -0
- package/dist/utils/log-json.js +18 -0
- package/dist/utils/read-local-package-json.d.ts +2 -0
- package/dist/utils/read-local-package-json.js +19 -0
- package/dist/utils/types.d.ts +11 -0
- package/dist/utils/types.js +12 -0
- package/package.json +85 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Bogdan Kolesnyk
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
package/dist/cli-lock.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
(function(global, factory) {
|
|
3
|
+
if (typeof module === "object" && typeof module.exports === "object") factory(exports, require("./lock"));
|
|
4
|
+
else if (typeof define === "function" && define.amd) define([
|
|
5
|
+
"exports",
|
|
6
|
+
"./lock"
|
|
7
|
+
], factory);
|
|
8
|
+
else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(global.cliLock = {}, global.lock);
|
|
9
|
+
})(this, function(exports, _lock) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", {
|
|
12
|
+
value: true
|
|
13
|
+
});
|
|
14
|
+
(0, _lock.lock)();
|
|
15
|
+
});
|
package/dist/cli-skip.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
(function(global, factory) {
|
|
3
|
+
if (typeof module === "object" && typeof module.exports === "object") factory(exports, require("node:process"), require("node:path"), require("commander"), require("./skip"), require("./utils"));
|
|
4
|
+
else if (typeof define === "function" && define.amd) define([
|
|
5
|
+
"exports",
|
|
6
|
+
"node:process",
|
|
7
|
+
"node:path",
|
|
8
|
+
"commander",
|
|
9
|
+
"./skip",
|
|
10
|
+
"./utils"
|
|
11
|
+
], factory);
|
|
12
|
+
else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(global.cliSkip = {}, global.nodeProcess, global.nodePath, global.commander, global.skip, global.utils);
|
|
13
|
+
})(this, function(exports, _nodeProcess, _nodePath, _commander, _skip, _utils) {
|
|
14
|
+
"use strict";
|
|
15
|
+
Object.defineProperty(exports, "__esModule", {
|
|
16
|
+
value: true
|
|
17
|
+
});
|
|
18
|
+
const args = _commander.program.option('-n, --name <name>', 'dependency / package name (like in package.json)').option('-w, --workspace <path>', 'absolute path to the monorepo root directory').option('-r, --root <path>', 'absolute path to the monorepo workspace directory').option('-s, --silent', 'mute output to console').option('-v, --verbose', 'enable debug output').helpOption('-h, --help', 'display this help').parse().opts();
|
|
19
|
+
const config = {
|
|
20
|
+
name: args.name || (0, _utils.readLocalPackageJson)().name,
|
|
21
|
+
root: args.root && (0, _nodePath.resolve)(args.root) || (0, _utils.getRepoRootPath)(),
|
|
22
|
+
workspace: (0, _nodePath.resolve)(args.workspace || (0, _nodeProcess.cwd)()),
|
|
23
|
+
log: args.verbose ? _utils.logJson : undefined
|
|
24
|
+
};
|
|
25
|
+
const isSilent = args.silent || args.verbose;
|
|
26
|
+
if ((0, _skip.skip)(config)) {
|
|
27
|
+
// eslint-disable-next-line no-console
|
|
28
|
+
if (!isSilent) console.log('[mvm-skip] skip');
|
|
29
|
+
(0, _nodeProcess.exit)();
|
|
30
|
+
} else {
|
|
31
|
+
// eslint-disable-next-line no-console
|
|
32
|
+
if (!isSilent) console.log('[mvm-skip] continue');
|
|
33
|
+
(0, _nodeProcess.exit)(1);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
(function(global, factory) {
|
|
3
|
+
if (typeof module === "object" && typeof module.exports === "object") factory(exports, require("commander"), require("node:path"), require("./utils"), require("./update"));
|
|
4
|
+
else if (typeof define === "function" && define.amd) define([
|
|
5
|
+
"exports",
|
|
6
|
+
"commander",
|
|
7
|
+
"node:path",
|
|
8
|
+
"./utils",
|
|
9
|
+
"./update"
|
|
10
|
+
], factory);
|
|
11
|
+
else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(global.cliUpdate = {}, global.commander, global.nodePath, global.utils, global.update);
|
|
12
|
+
})(this, function(exports, _commander, _nodePath, _utils, _update) {
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
const args = _commander.program.option('-n, --name <name>', 'dependency / package name (like in package.json)').option('-v, --version <version>', 'dependency / package version (like in package.json)').option('-r, --root <path>', 'absolute path to the monorepo root directory').option('-v, --verbose', 'enable debug output').helpOption('-h, --help', 'display this help').parse().opts();
|
|
18
|
+
const config = {
|
|
19
|
+
name: args.name || (0, _utils.readLocalPackageJson)().name,
|
|
20
|
+
root: args.root && (0, _nodePath.resolve)(args.root) || (0, _utils.getRepoRootPath)(),
|
|
21
|
+
version: args.version || (0, _utils.readLocalPackageJson)().version,
|
|
22
|
+
log: args.verbose ? _utils.logJson : undefined
|
|
23
|
+
};
|
|
24
|
+
(0, _update.update)(config);
|
|
25
|
+
});
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
(function(global, factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") factory(exports, require("./update"), require("./lock"), require("./skip"));
|
|
3
|
+
else if (typeof define === "function" && define.amd) define([
|
|
4
|
+
"exports",
|
|
5
|
+
"./update",
|
|
6
|
+
"./lock",
|
|
7
|
+
"./skip"
|
|
8
|
+
], factory);
|
|
9
|
+
else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(global.index = {}, global.update, global.lock, global.skip);
|
|
10
|
+
})(this, function(exports, _update, _lock, _skip) {
|
|
11
|
+
"use strict";
|
|
12
|
+
Object.defineProperty(exports, "__esModule", {
|
|
13
|
+
value: true
|
|
14
|
+
});
|
|
15
|
+
_exportStar(_update, exports);
|
|
16
|
+
_exportStar(_lock, exports);
|
|
17
|
+
_exportStar(_skip, exports);
|
|
18
|
+
function _exportStar(from, to) {
|
|
19
|
+
Object.keys(from).forEach(function(k) {
|
|
20
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function() {
|
|
23
|
+
return from[k];
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
return from;
|
|
28
|
+
}
|
|
29
|
+
});
|
package/dist/lock.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const lock: () => void;
|
package/dist/lock.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
(function(global, factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") factory(exports);
|
|
3
|
+
else if (typeof define === "function" && define.amd) define([
|
|
4
|
+
"exports"
|
|
5
|
+
], factory);
|
|
6
|
+
else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(global.lock = {});
|
|
7
|
+
})(this, function(exports) {
|
|
8
|
+
"use strict";
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: true
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "lock", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: ()=>lock
|
|
15
|
+
});
|
|
16
|
+
const lock = ()=>{
|
|
17
|
+
// To be implemented
|
|
18
|
+
};
|
|
19
|
+
});
|
package/dist/skip.d.ts
ADDED
package/dist/skip.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
(function(global, factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") factory(exports, require("node:child_process"), require("./utils"));
|
|
3
|
+
else if (typeof define === "function" && define.amd) define([
|
|
4
|
+
"exports",
|
|
5
|
+
"node:child_process",
|
|
6
|
+
"./utils"
|
|
7
|
+
], factory);
|
|
8
|
+
else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(global.skip = {}, global.nodeChildProcess, global.utils);
|
|
9
|
+
})(this, function(exports, _nodeChildProcess, _utils) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", {
|
|
12
|
+
value: true
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "skip", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: ()=>skip
|
|
17
|
+
});
|
|
18
|
+
const skip = (config)=>{
|
|
19
|
+
const { name , workspace , root , log =_utils.doNothing } = config;
|
|
20
|
+
log({
|
|
21
|
+
config
|
|
22
|
+
});
|
|
23
|
+
const latestTag = (0, _nodeChildProcess.execSync)('git tag').toString().split('\n').reverse().find((tag)=>tag.includes(name));
|
|
24
|
+
log({
|
|
25
|
+
latestTag
|
|
26
|
+
});
|
|
27
|
+
if (!latestTag) {
|
|
28
|
+
log({
|
|
29
|
+
message: 'latest tag no found',
|
|
30
|
+
skip: false
|
|
31
|
+
});
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
const workspaceName = workspace.toLowerCase().replace(root.toLowerCase(), '').replaceAll('\\', '/').slice(1);
|
|
35
|
+
log({
|
|
36
|
+
workspaceName
|
|
37
|
+
});
|
|
38
|
+
const touchedFiles = (0, _nodeChildProcess.execSync)(`git diff --name-only ${latestTag}..HEAD`).toString().split('\n').filter((file)=>Boolean(file) && file.includes(workspaceName));
|
|
39
|
+
if (touchedFiles.length > 0) {
|
|
40
|
+
log({
|
|
41
|
+
message: 'files touched since last release',
|
|
42
|
+
touchedFiles,
|
|
43
|
+
skip: false
|
|
44
|
+
});
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
log({
|
|
48
|
+
message: 'no files touched since last release',
|
|
49
|
+
skip: true
|
|
50
|
+
});
|
|
51
|
+
return true;
|
|
52
|
+
};
|
|
53
|
+
});
|
package/dist/update.d.ts
ADDED
package/dist/update.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
(function(global, factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") factory(exports, require("glob"), require("node:path"), require("fs-extra"), require("./utils"));
|
|
3
|
+
else if (typeof define === "function" && define.amd) define([
|
|
4
|
+
"exports",
|
|
5
|
+
"glob",
|
|
6
|
+
"node:path",
|
|
7
|
+
"fs-extra",
|
|
8
|
+
"./utils"
|
|
9
|
+
], factory);
|
|
10
|
+
else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(global.update = {}, global.glob, global.nodePath, global.fsExtra, global.utils);
|
|
11
|
+
})(this, function(exports, _glob, _nodePath, _fsExtra, _utils) {
|
|
12
|
+
"use strict";
|
|
13
|
+
Object.defineProperty(exports, "__esModule", {
|
|
14
|
+
value: true
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "update", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: ()=>update
|
|
19
|
+
});
|
|
20
|
+
_glob = /*#__PURE__*/ _interopRequireDefault(_glob);
|
|
21
|
+
function _interopRequireDefault(obj) {
|
|
22
|
+
return obj && obj.__esModule ? obj : {
|
|
23
|
+
default: obj
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
const update = (config)=>{
|
|
27
|
+
const { root , name , version , log =_utils.doNothing } = config;
|
|
28
|
+
log({
|
|
29
|
+
config
|
|
30
|
+
});
|
|
31
|
+
const packageJsonFilesPaths = _glob.default.sync('**/package.json', {
|
|
32
|
+
ignore: [
|
|
33
|
+
'**/node_modules/**'
|
|
34
|
+
],
|
|
35
|
+
cwd: root
|
|
36
|
+
}).map((file)=>(0, _nodePath.join)(root, file));
|
|
37
|
+
log({
|
|
38
|
+
packageJsonFilesPaths
|
|
39
|
+
});
|
|
40
|
+
const lockFilesPaths = packageJsonFilesPaths.map((filePath)=>{
|
|
41
|
+
const { dependencies , devDependencies } = (0, _fsExtra.readJsonSync)(filePath);
|
|
42
|
+
return {
|
|
43
|
+
lockFilePath: filePath.replace('package.json', 'mvm.lock'),
|
|
44
|
+
dependency: (0, _utils.getDependencyType)(name, dependencies, devDependencies)
|
|
45
|
+
};
|
|
46
|
+
}).filter(({ dependency })=>dependency);
|
|
47
|
+
log({
|
|
48
|
+
lockFilesPaths
|
|
49
|
+
});
|
|
50
|
+
lockFilesPaths.forEach(({ lockFilePath , dependency })=>{
|
|
51
|
+
if (!dependency) return;
|
|
52
|
+
(0, _fsExtra.ensureFileSync)(lockFilePath);
|
|
53
|
+
const lockFile = JSON.parse((0, _fsExtra.readFileSync)(lockFilePath, 'utf8') || '{}');
|
|
54
|
+
const updatedLockFile = {
|
|
55
|
+
...lockFile,
|
|
56
|
+
[dependency]: {
|
|
57
|
+
...lockFile[dependency],
|
|
58
|
+
[name]: version
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
(0, _fsExtra.writeJsonSync)(lockFilePath, updatedLockFile);
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const doNothing: (...args: Array<unknown>) => void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
(function(global, factory) {
|
|
3
|
+
if (typeof module === "object" && typeof module.exports === "object") factory(exports);
|
|
4
|
+
else if (typeof define === "function" && define.amd) define([
|
|
5
|
+
"exports"
|
|
6
|
+
], factory);
|
|
7
|
+
else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(global.doNothing = {});
|
|
8
|
+
})(this, function(exports) {
|
|
9
|
+
"use strict";
|
|
10
|
+
Object.defineProperty(exports, "__esModule", {
|
|
11
|
+
value: true
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "doNothing", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: ()=>doNothing
|
|
16
|
+
});
|
|
17
|
+
const doNothing = (...args)=>undefined;
|
|
18
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getDependencyType: (name: string, dependencies?: Record<string, string>, devDependencies?: Record<string, string>) => 'dependencies' | 'devDependencies' | undefined;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
(function(global, factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") factory(exports);
|
|
3
|
+
else if (typeof define === "function" && define.amd) define([
|
|
4
|
+
"exports"
|
|
5
|
+
], factory);
|
|
6
|
+
else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(global.getDependencyType = {});
|
|
7
|
+
})(this, function(exports) {
|
|
8
|
+
"use strict";
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: true
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "getDependencyType", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: ()=>getDependencyType
|
|
15
|
+
});
|
|
16
|
+
const getDependencyType = (name, dependencies = {}, devDependencies = {})=>{
|
|
17
|
+
if (name in dependencies && dependencies[name] === '*') {
|
|
18
|
+
return 'dependencies';
|
|
19
|
+
}
|
|
20
|
+
if (name in devDependencies && devDependencies[name] === '*') {
|
|
21
|
+
return 'devDependencies';
|
|
22
|
+
}
|
|
23
|
+
return undefined;
|
|
24
|
+
};
|
|
25
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getRepoRootPath: () => string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
(function(global, factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") factory(exports, require("node:child_process"), require("node:path"));
|
|
3
|
+
else if (typeof define === "function" && define.amd) define([
|
|
4
|
+
"exports",
|
|
5
|
+
"node:child_process",
|
|
6
|
+
"node:path"
|
|
7
|
+
], factory);
|
|
8
|
+
else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(global.getRepoRootPath = {}, global.nodeChildProcess, global.nodePath);
|
|
9
|
+
})(this, function(exports, _nodeChildProcess, _nodePath) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", {
|
|
12
|
+
value: true
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "getRepoRootPath", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: ()=>getRepoRootPath
|
|
17
|
+
});
|
|
18
|
+
const getRepoRootPath = ()=>(0, _nodePath.resolve)((0, _nodeChildProcess.execSync)('git rev-parse --show-toplevel').toString().trim());
|
|
19
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
(function(global, factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") factory(exports, require("./get-repo-root-path"), require("./get-dependency-type"), require("./read-local-package-json"), require("./do-nothing"), require("./types"), require("./log-json"));
|
|
3
|
+
else if (typeof define === "function" && define.amd) define([
|
|
4
|
+
"exports",
|
|
5
|
+
"./get-repo-root-path",
|
|
6
|
+
"./get-dependency-type",
|
|
7
|
+
"./read-local-package-json",
|
|
8
|
+
"./do-nothing",
|
|
9
|
+
"./types",
|
|
10
|
+
"./log-json"
|
|
11
|
+
], factory);
|
|
12
|
+
else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(global.index = {}, global.getRepoRootPath, global.getDependencyType, global.readLocalPackageJson, global.doNothing, global.types, global.logJson);
|
|
13
|
+
})(this, function(exports, _getRepoRootPath, _getDependencyType, _readLocalPackageJson, _doNothing, _types, _logJson) {
|
|
14
|
+
"use strict";
|
|
15
|
+
Object.defineProperty(exports, "__esModule", {
|
|
16
|
+
value: true
|
|
17
|
+
});
|
|
18
|
+
_exportStar(_getRepoRootPath, exports);
|
|
19
|
+
_exportStar(_getDependencyType, exports);
|
|
20
|
+
_exportStar(_readLocalPackageJson, exports);
|
|
21
|
+
_exportStar(_doNothing, exports);
|
|
22
|
+
_exportStar(_types, exports);
|
|
23
|
+
_exportStar(_logJson, exports);
|
|
24
|
+
function _exportStar(from, to) {
|
|
25
|
+
Object.keys(from).forEach(function(k) {
|
|
26
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function() {
|
|
29
|
+
return from[k];
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
return from;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
(function(global, factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") factory(exports);
|
|
3
|
+
else if (typeof define === "function" && define.amd) define([
|
|
4
|
+
"exports"
|
|
5
|
+
], factory);
|
|
6
|
+
else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(global.logJson = {});
|
|
7
|
+
})(this, function(exports) {
|
|
8
|
+
"use strict";
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: true
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "logJson", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: ()=>logJson
|
|
15
|
+
});
|
|
16
|
+
const logJson = (entry)=>// eslint-disable-next-line no-console
|
|
17
|
+
console.log(JSON.stringify(entry, undefined, 2));
|
|
18
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
(function(global, factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") factory(exports, require("node:path"), require("fs-extra"));
|
|
3
|
+
else if (typeof define === "function" && define.amd) define([
|
|
4
|
+
"exports",
|
|
5
|
+
"node:path",
|
|
6
|
+
"fs-extra"
|
|
7
|
+
], factory);
|
|
8
|
+
else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(global.readLocalPackageJson = {}, global.nodePath, global.fsExtra);
|
|
9
|
+
})(this, function(exports, _nodePath, _fsExtra) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", {
|
|
12
|
+
value: true
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "readLocalPackageJson", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: ()=>readLocalPackageJson
|
|
17
|
+
});
|
|
18
|
+
const readLocalPackageJson = ()=>(0, _fsExtra.readJsonSync)((0, _nodePath.join)(process.cwd(), 'package.json'));
|
|
19
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type Logger = (entry: Record<string, unknown>) => void;
|
|
2
|
+
export interface LockFile {
|
|
3
|
+
dependencies?: Record<string, string>;
|
|
4
|
+
devDependencies?: Record<string, string>;
|
|
5
|
+
}
|
|
6
|
+
export interface PackageJson {
|
|
7
|
+
name: string;
|
|
8
|
+
version: string;
|
|
9
|
+
dependencies?: Record<string, string>;
|
|
10
|
+
devDependencies?: Record<string, string>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
(function(global, factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") factory(exports);
|
|
3
|
+
else if (typeof define === "function" && define.amd) define([
|
|
4
|
+
"exports"
|
|
5
|
+
], factory);
|
|
6
|
+
else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(global.types = {});
|
|
7
|
+
})(this, function(exports) {
|
|
8
|
+
"use strict";
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: true
|
|
11
|
+
});
|
|
12
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@b12k/mvm",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Monorepo versions manager",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"bin": {
|
|
9
|
+
"mvm-lock": "dist/cli-lock.js",
|
|
10
|
+
"mvm-skip": "dist/cli-skip.js",
|
|
11
|
+
"mvm-update": "dist/cli-update.js"
|
|
12
|
+
},
|
|
13
|
+
"main": "dist/mvm.js",
|
|
14
|
+
"types": "dist/mvm.d.ts",
|
|
15
|
+
"keywords": [],
|
|
16
|
+
"author": "Bogdan Kolesnyk",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git://github.com/b12k/mvm.git"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://github.com/b12k/mvm",
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/b12k/mvm/issues"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"dev": "pnpm clean && run-p _dev:*",
|
|
28
|
+
"_dev:types": "pnpm _build:types && chokidar \"./dist/**/*.js\" -c \"pnpm _build:types\"",
|
|
29
|
+
"_dev:scripts": "pnpm _build:scripts --watch",
|
|
30
|
+
"lint": "run-p _lint:*",
|
|
31
|
+
"_lint:types": "tsc --noEmit",
|
|
32
|
+
"_lint:scripts": "eslint ./src/**/*.ts",
|
|
33
|
+
"_lint:codestyle": "pnpm prettier . --check",
|
|
34
|
+
"build": "pnpm clean && run-p _build:*",
|
|
35
|
+
"_build:types": "tsc --emitDeclarationOnly",
|
|
36
|
+
"_build:scripts": "swc ./src -d ./dist",
|
|
37
|
+
"clean": "shx rm -rf ./dist",
|
|
38
|
+
"prepare": "husky install",
|
|
39
|
+
"release": "release-it --ci",
|
|
40
|
+
"husky:pre-commit": "run-p _husky:pre-commit:*",
|
|
41
|
+
"_husky:pre-commit:typecheck": "pnpm _lint:types",
|
|
42
|
+
"_husky:pre-commit:lintstaged": "lint-staged"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@commitlint/cli": "17.4.4",
|
|
46
|
+
"@commitlint/config-conventional": "17.4.4",
|
|
47
|
+
"@release-it/conventional-changelog": "5.1.1",
|
|
48
|
+
"@swc/cli": "0.1.62",
|
|
49
|
+
"@swc/core": "1.3.36",
|
|
50
|
+
"@swc/helpers": "0.4.14",
|
|
51
|
+
"@types/fs-extra": "11.0.1",
|
|
52
|
+
"@types/git-raw-commits": "2.0.1",
|
|
53
|
+
"@types/glob": "8.0.1",
|
|
54
|
+
"@types/node": "18.14.0",
|
|
55
|
+
"@typescript-eslint/eslint-plugin": "5.53.0",
|
|
56
|
+
"@typescript-eslint/parser": "5.53.0",
|
|
57
|
+
"chokidar": "3.5.3",
|
|
58
|
+
"chokidar-cli": "3.0.0",
|
|
59
|
+
"eslint": "8.34.0",
|
|
60
|
+
"eslint-config-airbnb-base": "15.0.0",
|
|
61
|
+
"eslint-config-airbnb-typescript": "17.0.0",
|
|
62
|
+
"eslint-config-prettier": "8.6.0",
|
|
63
|
+
"eslint-import-resolver-typescript": "3.5.3",
|
|
64
|
+
"eslint-plugin-eslint-comments": "3.2.0",
|
|
65
|
+
"eslint-plugin-import": "2.27.5",
|
|
66
|
+
"eslint-plugin-prettier": "4.2.1",
|
|
67
|
+
"eslint-plugin-promise": "6.1.1",
|
|
68
|
+
"eslint-plugin-simple-import-sort": "10.0.0",
|
|
69
|
+
"eslint-plugin-unicorn": "45.0.2",
|
|
70
|
+
"eslint-plugin-unused-imports": "2.0.0",
|
|
71
|
+
"husky": "8.0.3",
|
|
72
|
+
"lint-staged": "13.1.2",
|
|
73
|
+
"npm-run-all": "4.1.5",
|
|
74
|
+
"prettier": "2.8.4",
|
|
75
|
+
"release-it": "15.6.0",
|
|
76
|
+
"shx": "0.3.4",
|
|
77
|
+
"typescript": "4.9.5"
|
|
78
|
+
},
|
|
79
|
+
"dependencies": {
|
|
80
|
+
"commander": "10.0.0",
|
|
81
|
+
"fs-extra": "11.1.0",
|
|
82
|
+
"git-raw-commits": "2.0.11",
|
|
83
|
+
"glob": "8.1.0"
|
|
84
|
+
}
|
|
85
|
+
}
|