npm-update-package 0.46.7 → 0.47.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.
package/dist/package.json
CHANGED
|
@@ -19,6 +19,8 @@ class PullRequestBodyCreator {
|
|
|
19
19
|
const sections = [];
|
|
20
20
|
const outdatedPackagesTable = this.createOutdatedPackagesTable(outdatedPackage);
|
|
21
21
|
sections.push(`This PR updates these packages:\n\n${outdatedPackagesTable}`);
|
|
22
|
+
const diffSection = this.createDiffSection(outdatedPackage);
|
|
23
|
+
sections.push(diffSection);
|
|
22
24
|
const gitRepo = await this.extractRepository(outdatedPackage);
|
|
23
25
|
if ((gitRepo === null || gitRepo === void 0 ? void 0 : gitRepo.isGitHub) === true) {
|
|
24
26
|
const releaseNotesSection = await this.createReleaseNotesSection({
|
|
@@ -39,6 +41,15 @@ class PullRequestBodyCreator {
|
|
|
39
41
|
sections.push(`---\n${footer}`);
|
|
40
42
|
return sections.join('\n\n');
|
|
41
43
|
}
|
|
44
|
+
createDiffSection(outdatedPackage) {
|
|
45
|
+
const packageName = outdatedPackage.name;
|
|
46
|
+
const currentVersion = outdatedPackage.currentVersion.version;
|
|
47
|
+
const newVersion = outdatedPackage.newVersion.version;
|
|
48
|
+
return `## Package diffs
|
|
49
|
+
|
|
50
|
+
- [npmfs](https://npmfs.com/compare/${packageName}/${currentVersion}/${newVersion})
|
|
51
|
+
- [Renovate Bot Package Diff](https://renovatebot.com/diffs/npm/${packageName}/${currentVersion}/${newVersion})`;
|
|
52
|
+
}
|
|
42
53
|
createFooter() {
|
|
43
54
|
return `This PR has been generated by [${package_json_1.default.name}](${package_json_1.default.homepage}) v${package_json_1.default.version}`;
|
|
44
55
|
}
|
|
@@ -51,11 +62,9 @@ class PullRequestBodyCreator {
|
|
|
51
62
|
const currentVersionLink = `[\`${currentVersion}\`](https://www.npmjs.com/package/${packageName}/v/${currentVersion})`;
|
|
52
63
|
const newVersion = outdatedPackage.newVersion.version;
|
|
53
64
|
const newVersionLink = `[\`${newVersion}\`](https://www.npmjs.com/package/${packageName}/v/${newVersion})`;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|---|---|---|---|
|
|
58
|
-
|${packageLink}|${dependencyType}|${level}|${version}|`;
|
|
65
|
+
return `|Package|Dependency type|Level|Current version|New version|
|
|
66
|
+
|---|---|---|---|---|
|
|
67
|
+
|${packageLink}|${dependencyType}|${level}|${currentVersionLink}|${newVersionLink}|`;
|
|
59
68
|
}
|
|
60
69
|
createNotesSection() {
|
|
61
70
|
if (this.options.prBodyNotes === undefined) {
|