rman 0.8.0 → 0.9.0
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.
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.PublishCommand = void 0;
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const package_json_1 = __importDefault(require("package-json"));
|
|
8
9
|
const npmlog_1 = __importDefault(require("npmlog"));
|
|
9
10
|
const command_1 = require("../core/command");
|
|
10
11
|
const run_command_1 = require("./run-command");
|
|
@@ -20,16 +21,11 @@ class PublishCommand extends run_command_1.RunCommand {
|
|
|
20
21
|
for (const p of packages) {
|
|
21
22
|
const logPkgName = chalk_1.default.yellow(p.name);
|
|
22
23
|
npmlog_1.default.verbose(this.commandName, logPkgName, npmlog_1.default.separator, `Fetching package information from repository`);
|
|
23
|
-
|
|
24
|
-
const r = await fetchPackageInfo(p.json.name);
|
|
24
|
+
const r = await (0, package_json_1.default)(p.json.name);
|
|
25
25
|
if (r.version === p.version) {
|
|
26
|
-
|
|
27
|
-
this.commandName,
|
|
28
|
-
logPkgName,
|
|
29
|
-
logger.separator,
|
|
30
|
-
`Ignored. Same version (${p.version}) in repository`);
|
|
26
|
+
npmlog_1.default.info(this.commandName, logPkgName, npmlog_1.default.separator, `Ignored. Same version (${p.version}) in repository`);
|
|
31
27
|
continue;
|
|
32
|
-
}
|
|
28
|
+
}
|
|
33
29
|
selectedPackages.push(p);
|
|
34
30
|
}
|
|
35
31
|
return super._prepareTasks(selectedPackages, { newVersions });
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
|
+
import fetchPackageInfo from 'package-json';
|
|
2
3
|
import logger from 'npmlog';
|
|
3
4
|
import { Command } from './../core/command.mjs';
|
|
4
5
|
import { RunCommand } from './run-command.mjs';
|
|
@@ -14,16 +15,11 @@ export class PublishCommand extends RunCommand {
|
|
|
14
15
|
for (const p of packages) {
|
|
15
16
|
const logPkgName = chalk.yellow(p.name);
|
|
16
17
|
logger.verbose(this.commandName, logPkgName, logger.separator, `Fetching package information from repository`);
|
|
17
|
-
/*
|
|
18
18
|
const r = await fetchPackageInfo(p.json.name);
|
|
19
19
|
if (r.version === p.version) {
|
|
20
|
-
logger.info(
|
|
21
|
-
this.commandName,
|
|
22
|
-
logPkgName,
|
|
23
|
-
logger.separator,
|
|
24
|
-
`Ignored. Same version (${p.version}) in repository`);
|
|
20
|
+
logger.info(this.commandName, logPkgName, logger.separator, `Ignored. Same version (${p.version}) in repository`);
|
|
25
21
|
continue;
|
|
26
|
-
}
|
|
22
|
+
}
|
|
27
23
|
selectedPackages.push(p);
|
|
28
24
|
}
|
|
29
25
|
return super._prepareTasks(selectedPackages, { newVersions });
|