npm-update-package 0.22.4 → 0.23.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/README.md CHANGED
@@ -22,12 +22,12 @@ Commit message template
22
22
 
23
23
  - type: string
24
24
  - required: false
25
- - variables:
26
- - `currentVersion`
27
- - `newVersion`
28
- - `packageName`
29
- - `updateType`
30
- - default: `chore(deps): {{updateType}} update {{{packageName}}} to v{{newVersion}}`
25
+ - variables
26
+ - `currentVersion`: current package version
27
+ - `newVersion`: new package version
28
+ - `packageName`: package name
29
+ - `level`: semver level (major/minor/patch)
30
+ - default: `chore(deps): {{level}} update {{{packageName}}} to v{{newVersion}}`
31
31
 
32
32
  ### `--github-token`
33
33
 
@@ -43,7 +43,7 @@ Log level to show
43
43
 
44
44
  - type: string
45
45
  - required: false
46
- - allowed values:
46
+ - allowed values
47
47
  - `off`: Do not output any logs.
48
48
  - `error`: Output error logs.
49
49
  - `info`: Output error/info logs.
@@ -56,7 +56,7 @@ Package manager of your project
56
56
 
57
57
  - type: string
58
58
  - required: false
59
- - allowed values:
59
+ - allowed values
60
60
  - `npm`: npm
61
61
  - `yarn`: Yarn
62
62
  - default: `npm`
@@ -67,12 +67,12 @@ Pull request title template
67
67
 
68
68
  - type: string
69
69
  - required: false
70
- - variables:
71
- - `currentVersion`
72
- - `newVersion`
73
- - `packageName`
74
- - `updateType`
75
- - default: `chore(deps): {{updateType}} update {{{packageName}}} to v{{newVersion}}`
70
+ - variables
71
+ - `currentVersion`: current package version
72
+ - `newVersion`: new package version
73
+ - `packageName`: package name
74
+ - `level`: semver level (major/minor/patch)
75
+ - default: `chore(deps): {{level}} update {{{packageName}}} to v{{newVersion}}`
76
76
 
77
77
  ## GitHub token
78
78
 
package/dist/app.js CHANGED
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.app = void 0;
4
4
  exports.app = {
5
5
  name: 'npm-update-package',
6
- version: '0.22.4',
6
+ version: '0.23.0',
7
7
  web: 'https://github.com/npm-update-package/npm-update-package'
8
8
  };
@@ -10,13 +10,12 @@ class CommitMessageCreator {
10
10
  const packageName = outdatedPackage.name;
11
11
  const currentVersion = outdatedPackage.currentVersion.version;
12
12
  const newVersion = outdatedPackage.newVersion.version;
13
- // TODO: rename to level
14
- const updateType = outdatedPackage.level;
13
+ const level = outdatedPackage.level;
15
14
  return (0, mustache_1.render)(this.template, {
16
15
  packageName,
17
16
  currentVersion,
18
17
  newVersion,
19
- updateType
18
+ level
20
19
  });
21
20
  }
22
21
  }
@@ -10,13 +10,12 @@ class PullRequestTitleCreator {
10
10
  const packageName = outdatedPackage.name;
11
11
  const currentVersion = outdatedPackage.currentVersion.version;
12
12
  const newVersion = outdatedPackage.newVersion.version;
13
- // TODO: rename to level
14
- const updateType = outdatedPackage.level;
13
+ const level = outdatedPackage.level;
15
14
  return (0, mustache_1.render)(this.template, {
16
15
  packageName,
17
16
  currentVersion,
18
17
  newVersion,
19
- updateType
18
+ level
20
19
  });
21
20
  }
22
21
  }
@@ -13,10 +13,9 @@ const createPullRequestBody = (outdatedPackage) => {
13
13
  const packageName = outdatedPackage.name;
14
14
  const level = outdatedPackage.level;
15
15
  const metadata = (0, json_1.toJSON)((0, metadata_1.createPullRequestMetadata)([outdatedPackage]), { pretty: true });
16
- // TODO: rename type to level
17
16
  return `This PR updates these packages:
18
17
 
19
- |package|type|current version|new version|
18
+ |Package|Level|Current version|New version|
20
19
  |---|---|---|---|
21
20
  |[${packageName}](https://www.npmjs.com/package/${packageName})|${level}|\`${currentVersion}\`|\`${newVersion}\`|
22
21
 
@@ -9,8 +9,7 @@ const PullRequestMetadata = (0, io_ts_1.type)({
9
9
  name: io_ts_1.string,
10
10
  currentVersion: io_ts_1.string,
11
11
  newVersion: io_ts_1.string,
12
- // TODO: rename to level
13
- type: (0, io_ts_1.union)([(0, io_ts_1.literal)(semver_1.SemVerLevel.Major), (0, io_ts_1.literal)(semver_1.SemVerLevel.Minor), (0, io_ts_1.literal)(semver_1.SemVerLevel.Patch)])
12
+ level: (0, io_ts_1.union)([(0, io_ts_1.literal)(semver_1.SemVerLevel.Major), (0, io_ts_1.literal)(semver_1.SemVerLevel.Minor), (0, io_ts_1.literal)(semver_1.SemVerLevel.Patch)])
14
13
  }))
15
14
  });
16
15
  exports.isPullRequestMetadata = PullRequestMetadata.is;
@@ -10,7 +10,7 @@ const createPullRequestMetadata = (outdatedPackages) => {
10
10
  name,
11
11
  currentVersion: currentVersion.version,
12
12
  newVersion: newVersion.version,
13
- type: level
13
+ level
14
14
  }))
15
15
  };
16
16
  };
@@ -10,7 +10,7 @@ exports.cliOptions = [
10
10
  description: 'Commit message template',
11
11
  type: OptionType_1.OptionType.String,
12
12
  required: false,
13
- default: 'chore(deps): {{updateType}} update {{{packageName}}} to v{{newVersion}}'
13
+ default: 'chore(deps): {{level}} update {{{packageName}}} to v{{newVersion}}'
14
14
  },
15
15
  {
16
16
  name: 'github-token',
@@ -47,6 +47,6 @@ exports.cliOptions = [
47
47
  description: 'Pull request title template',
48
48
  type: OptionType_1.OptionType.String,
49
49
  required: false,
50
- default: 'chore(deps): {{updateType}} update {{{packageName}}} to v{{newVersion}}'
50
+ default: 'chore(deps): {{level}} update {{{packageName}}} to v{{newVersion}}'
51
51
  }
52
52
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-update-package",
3
- "version": "0.22.4",
3
+ "version": "0.23.0",
4
4
  "description": "CLI tool for creating pull requests to update npm packages",
5
5
  "scripts": {
6
6
  "build": "tsc --project tsconfig.build.json",
@@ -50,7 +50,7 @@
50
50
  "lint-staged": "12.1.7",
51
51
  "npm-run-all": "4.1.5",
52
52
  "rimraf": "3.0.2",
53
- "ts-jest": "27.1.2",
53
+ "ts-jest": "27.1.3",
54
54
  "ts-node": "10.4.0",
55
55
  "typescript": "4.5.4",
56
56
  "utility-types": "3.10.0"