npm-update-package 0.45.11 → 0.45.14
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/README.md +4 -0
- package/dist/package.json +2 -2
- package/dist/src/package-manager/Npm.js +5 -2
- package/dist/src/package-manager/NpmVersions.js +6 -0
- package/dist/src/package-manager/Yarn.js +6 -3
- package/dist/src/package-manager/YarnVersions.js +9 -0
- package/package.json +2 -2
- package/dist/src/package-manager/Versions.js +0 -6
package/README.md
CHANGED
|
@@ -391,3 +391,7 @@ npm-update-package can be used in environments where Renovate cannot be used for
|
|
|
391
391
|
### What should I do if conflicts occurred in the pull request?
|
|
392
392
|
|
|
393
393
|
If you have difficulty resolving it manually, close the pull request and run npm-update-package again.
|
|
394
|
+
|
|
395
|
+
## How to development
|
|
396
|
+
|
|
397
|
+
See [Wiki](https://github.com/npm-update-package/npm-update-package/wiki).
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "npm-update-package",
|
|
3
|
-
"version": "0.45.
|
|
3
|
+
"version": "0.45.14",
|
|
4
4
|
"description": "CLI tool for creating pull requests to update npm packages",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"badges": "jest-coverage-badges output docs",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@octokit/rest": "18.12.0",
|
|
20
20
|
"commander": "8.3.0",
|
|
21
21
|
"execa": "5.1.1",
|
|
22
|
-
"fp-ts": "2.11.
|
|
22
|
+
"fp-ts": "2.11.9",
|
|
23
23
|
"http-status-codes": "2.2.0",
|
|
24
24
|
"io-ts": "2.2.16",
|
|
25
25
|
"lodash": "4.14.2",
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Npm = void 0;
|
|
4
|
-
const
|
|
4
|
+
const NpmVersions_1 = require("./NpmVersions");
|
|
5
5
|
class Npm {
|
|
6
6
|
constructor(terminal) {
|
|
7
7
|
this.terminal = terminal;
|
|
8
8
|
this.packageFile = 'package.json';
|
|
9
9
|
this.lockFile = 'package-lock.json';
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* @see https://docs.npmjs.com/cli/v8/commands/npm-view
|
|
13
|
+
*/
|
|
11
14
|
async getVersions(packageName) {
|
|
12
15
|
const { stdout } = await this.terminal.run('npm', 'info', packageName, 'versions', '--json');
|
|
13
16
|
const versions = JSON.parse(stdout);
|
|
14
|
-
if (!(0,
|
|
17
|
+
if (!(0, NpmVersions_1.isNpmVersions)(versions)) {
|
|
15
18
|
throw new Error(`Failed to parse versions. versions=${JSON.stringify(versions)}`);
|
|
16
19
|
}
|
|
17
20
|
return versions;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isNpmVersions = exports.NpmVersions = void 0;
|
|
4
|
+
const io_ts_1 = require("io-ts");
|
|
5
|
+
exports.NpmVersions = (0, io_ts_1.array)(io_ts_1.string);
|
|
6
|
+
exports.isNpmVersions = exports.NpmVersions.is;
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Yarn = void 0;
|
|
4
|
-
const
|
|
4
|
+
const YarnVersions_1 = require("./YarnVersions");
|
|
5
5
|
class Yarn {
|
|
6
6
|
constructor(terminal) {
|
|
7
7
|
this.terminal = terminal;
|
|
8
8
|
this.packageFile = 'package.json';
|
|
9
9
|
this.lockFile = 'yarn.lock';
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* @see https://classic.yarnpkg.com/en/docs/cli/info
|
|
13
|
+
*/
|
|
11
14
|
async getVersions(packageName) {
|
|
12
15
|
const { stdout } = await this.terminal.run('yarn', 'info', packageName, 'versions', '--json');
|
|
13
16
|
const versions = JSON.parse(stdout);
|
|
14
|
-
if (!(0,
|
|
17
|
+
if (!(0, YarnVersions_1.isYarnVersions)(versions)) {
|
|
15
18
|
throw new Error(`Failed to parse versions. versions=${JSON.stringify(versions)}`);
|
|
16
19
|
}
|
|
17
|
-
return versions;
|
|
20
|
+
return versions.data;
|
|
18
21
|
}
|
|
19
22
|
/**
|
|
20
23
|
* @see https://classic.yarnpkg.com/en/docs/cli/install
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isYarnVersions = exports.YarnVersions = void 0;
|
|
4
|
+
const io_ts_1 = require("io-ts");
|
|
5
|
+
exports.YarnVersions = (0, io_ts_1.type)({
|
|
6
|
+
type: io_ts_1.string,
|
|
7
|
+
data: (0, io_ts_1.array)(io_ts_1.string)
|
|
8
|
+
});
|
|
9
|
+
exports.isYarnVersions = exports.YarnVersions.is;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "npm-update-package",
|
|
3
|
-
"version": "0.45.
|
|
3
|
+
"version": "0.45.14",
|
|
4
4
|
"description": "CLI tool for creating pull requests to update npm packages",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"badges": "jest-coverage-badges output docs",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@octokit/rest": "18.12.0",
|
|
20
20
|
"commander": "8.3.0",
|
|
21
21
|
"execa": "5.1.1",
|
|
22
|
-
"fp-ts": "2.11.
|
|
22
|
+
"fp-ts": "2.11.9",
|
|
23
23
|
"http-status-codes": "2.2.0",
|
|
24
24
|
"io-ts": "2.2.16",
|
|
25
25
|
"lodash": "4.14.2",
|