npm-update-package 4.0.0-0 → 4.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/dist/app.js +3 -0
- package/dist/{src/bin → bin}/npm-update-package.js +3 -3
- package/dist/{src/github → github}/createOctokit.js +2 -2
- package/dist/{src/github → github}/pull-request/creator/createFooter.js +1 -1
- package/dist/{src/github → github}/pull-request/metadata/createPullRequestMetadata.js +2 -2
- package/dist/{src/options → options}/createOptions.js +2 -2
- package/package.json +3 -1
- package/dist/package.json +0 -73
- /package/dist/{src/core → core}/FailedResult.js +0 -0
- /package/dist/{src/core → core}/OutdatedPackage.js +0 -0
- /package/dist/{src/core → core}/OutdatedPackagesProcessor.js +0 -0
- /package/dist/{src/core → core}/PackageUpdater.js +0 -0
- /package/dist/{src/core → core}/SucceededResult.js +0 -0
- /package/dist/{src/file → file}/canReadWrite.js +0 -0
- /package/dist/{src/file → file}/readFile.js +0 -0
- /package/dist/{src/git → git}/CommitMessageCreator.js +0 -0
- /package/dist/{src/git → git}/Git.js +0 -0
- /package/dist/{src/git → git}/GitConfigInitializer.js +0 -0
- /package/dist/{src/git → git}/GitRepository.js +0 -0
- /package/dist/{src/git → git}/GitTransaction.js +0 -0
- /package/dist/{src/git → git}/createBranchName.js +0 -0
- /package/dist/{src/github → github}/GitHub.js +0 -0
- /package/dist/{src/github → github}/branch/finder/BranchFinder.js +0 -0
- /package/dist/{src/github → github}/createGitHub.js +0 -0
- /package/dist/{src/github → github}/errors/NotFoundError.js +0 -0
- /package/dist/{src/github → github}/label/creator/LabelCreator.js +0 -0
- /package/dist/{src/github → github}/pull-request/closer/PullRequestCloser.js +0 -0
- /package/dist/{src/github → github}/pull-request/closer/PullRequestsCloser.js +0 -0
- /package/dist/{src/github → github}/pull-request/creator/AssigneesAdder.js +0 -0
- /package/dist/{src/github → github}/pull-request/creator/GitHubUrlOptimizer.js +0 -0
- /package/dist/{src/github → github}/pull-request/creator/LabelsAdder.js +0 -0
- /package/dist/{src/github → github}/pull-request/creator/PackageDiffsSectionCreator.js +0 -0
- /package/dist/{src/github → github}/pull-request/creator/PullRequestBodyCreator.js +0 -0
- /package/dist/{src/github → github}/pull-request/creator/PullRequestCreator.js +0 -0
- /package/dist/{src/github → github}/pull-request/creator/PullRequestTitleCreator.js +0 -0
- /package/dist/{src/github → github}/pull-request/creator/ReleaseNotesSectionCreator.js +0 -0
- /package/dist/{src/github → github}/pull-request/creator/ReviewersAdder.js +0 -0
- /package/dist/{src/github → github}/pull-request/creator/createMetadataSection.js +0 -0
- /package/dist/{src/github → github}/pull-request/creator/createNotesSection.js +0 -0
- /package/dist/{src/github → github}/pull-request/creator/createOutdatedPackagesTable.js +0 -0
- /package/dist/{src/github → github}/pull-request/finder/PullRequestFinder.js +0 -0
- /package/dist/{src/github → github}/pull-request/finder/isPullRequestByNpmUpdatePackage.js +0 -0
- /package/dist/{src/github → github}/pull-request/metadata/PullRequestMetadata.js +0 -0
- /package/dist/{src/github → github}/pull-request/metadata/extractPullRequestMetadata.js +0 -0
- /package/dist/{src/github → github}/releases/Release.js +0 -0
- /package/dist/{src/github → github}/releases/fetcher/ReleasesFetcher.js +0 -0
- /package/dist/{src/json → json}/toJSON.js +0 -0
- /package/dist/{src/logger → logger}/LogLevel.js +0 -0
- /package/dist/{src/logger → logger}/logger.js +0 -0
- /package/dist/{src/main.js → main.js} +0 -0
- /package/dist/{src/npm-check-updates → npm-check-updates}/Dependency.js +0 -0
- /package/dist/{src/npm-check-updates → npm-check-updates}/NpmCheckUpdates.js +0 -0
- /package/dist/{src/npm-check-updates → npm-check-updates}/NpmCheckUpdatesResult.js +0 -0
- /package/dist/{src/npm-check-updates → npm-check-updates}/createDepOptionValue.js +0 -0
- /package/dist/{src/npm-check-updates → npm-check-updates}/toDependency.js +0 -0
- /package/dist/{src/options → options}/CLIOption.js +0 -0
- /package/dist/{src/options → options}/OptionType.js +0 -0
- /package/dist/{src/options → options}/Options.js +0 -0
- /package/dist/{src/options → options}/cliOptions.js +0 -0
- /package/dist/{src/options → options}/initOptions.js +0 -0
- /package/dist/{src/options → options}/parseBooleanOption.js +0 -0
- /package/dist/{src/options → options}/parseNumberOption.js +0 -0
- /package/dist/{src/options → options}/toCommanderOption.js +0 -0
- /package/dist/{src/outdated-package-processor → outdated-package-processor}/OutdatedPackageProcessor.js +0 -0
- /package/dist/{src/outdated-package-processor → outdated-package-processor}/OutdatedPackageProcessorCreator.js +0 -0
- /package/dist/{src/outdated-package-processor → outdated-package-processor}/OutdatedPullRequestStrategy.js +0 -0
- /package/dist/{src/outdated-package-processor → outdated-package-processor}/create/Create.js +0 -0
- /package/dist/{src/outdated-package-processor → outdated-package-processor}/recreate/Recreate.js +0 -0
- /package/dist/{src/outdated-package-processor → outdated-package-processor}/skip/Skip.js +0 -0
- /package/dist/{src/package-json → package-json}/DependencyType.js +0 -0
- /package/dist/{src/package-json → package-json}/PackageMetadata.js +0 -0
- /package/dist/{src/package-json → package-json}/PackageMetadataDependencies.js +0 -0
- /package/dist/{src/package-json → package-json}/PackageMetadataRepository.js +0 -0
- /package/dist/{src/package-json → package-json}/extractRepository.js +0 -0
- /package/dist/{src/package-json → package-json}/parsePackageJson.js +0 -0
- /package/dist/{src/package-json → package-json}/readPackageJson.js +0 -0
- /package/dist/{src/package-manager → package-manager}/PackageManager.js +0 -0
- /package/dist/{src/package-manager → package-manager}/PackageManagerCreator.js +0 -0
- /package/dist/{src/package-manager → package-manager}/PackageManagerName.js +0 -0
- /package/dist/{src/package-manager → package-manager}/detectPackageManager.js +0 -0
- /package/dist/{src/package-manager → package-manager}/npm/Npm.js +0 -0
- /package/dist/{src/package-manager → package-manager}/npm/NpmVersions.js +0 -0
- /package/dist/{src/package-manager → package-manager}/yarn/Yarn.js +0 -0
- /package/dist/{src/package-manager → package-manager}/yarn/YarnVersions.js +0 -0
- /package/dist/{src/semver → semver}/SemVer.js +0 -0
- /package/dist/{src/semver → semver}/SemVerLevel.js +0 -0
- /package/dist/{src/semver → semver}/compareSemVers.js +0 -0
- /package/dist/{src/terminal → terminal}/Terminal.js +0 -0
- /package/dist/{src/util → util}/range.js +0 -0
- /package/dist/{src/util → util}/sampleSize.js +0 -0
- /package/dist/{src/util → util}/sleep.js +0 -0
package/dist/app.js
ADDED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
2
|
+
import * as app from '../app.js';
|
|
3
3
|
import { logger } from '../logger/logger.js';
|
|
4
4
|
import { main } from '../main.js';
|
|
5
5
|
import { initOptions } from '../options/initOptions.js';
|
|
6
6
|
try {
|
|
7
7
|
const options = initOptions();
|
|
8
8
|
logger.level = options.logLevel;
|
|
9
|
-
logger.info(`Start ${
|
|
9
|
+
logger.info(`Start ${app.name} v${app.version}`);
|
|
10
10
|
await main(options);
|
|
11
|
-
logger.info(`End ${
|
|
11
|
+
logger.info(`End ${app.name} v${app.version}`);
|
|
12
12
|
}
|
|
13
13
|
catch (error) {
|
|
14
14
|
logger.fatal(error);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Octokit } from '@octokit/rest';
|
|
2
|
-
import
|
|
2
|
+
import * as app from '../app.js';
|
|
3
3
|
export const createOctokit = ({ host, token }) => {
|
|
4
|
-
const userAgent = `${
|
|
4
|
+
const userAgent = `${app.name}/${app.version}`;
|
|
5
5
|
if (token === undefined) {
|
|
6
6
|
return new Octokit({
|
|
7
7
|
userAgent
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as app from '../../../app.js';
|
|
2
2
|
export const createPullRequestMetadata = (outdatedPackages) => {
|
|
3
3
|
return {
|
|
4
|
-
version:
|
|
4
|
+
version: app.version,
|
|
5
5
|
packages: outdatedPackages.map(({ name, currentVersion, newVersion, level }) => ({
|
|
6
6
|
name,
|
|
7
7
|
currentVersion: currentVersion.version,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { program } from 'commander';
|
|
2
|
-
import
|
|
2
|
+
import * as app from '../app.js';
|
|
3
3
|
import { isOptions } from './Options.js';
|
|
4
4
|
import { toCommanderOption } from './toCommanderOption.js';
|
|
5
5
|
export const createOptions = (cliOptions) => {
|
|
6
|
-
program.version(
|
|
6
|
+
program.version(app.version);
|
|
7
7
|
cliOptions
|
|
8
8
|
.map(option => toCommanderOption(option))
|
|
9
9
|
.forEach(option => program.addOption(option));
|
package/package.json
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "npm-update-package",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-1",
|
|
4
4
|
"description": "CLI tool for creating pull requests to update npm packages",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "tsc --project tsconfig.build.json",
|
|
8
8
|
"clean": "rimraf dist",
|
|
9
9
|
"lint": "eslint '**/*.{js,mjs,cjs,ts,mts,cts}'",
|
|
10
|
+
"postversion": "npm run syncVersion",
|
|
10
11
|
"prebuild": "npm run clean",
|
|
11
12
|
"prepublishOnly": "npm-run-all lint test build",
|
|
13
|
+
"syncVersion": "tsx scripts/syncVersion.ts",
|
|
12
14
|
"test": "jest"
|
|
13
15
|
},
|
|
14
16
|
"bin": "dist/src/bin/npm-update-package.js",
|
package/dist/package.json
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "npm-update-package",
|
|
3
|
-
"version": "4.0.0-0",
|
|
4
|
-
"description": "CLI tool for creating pull requests to update npm packages",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"build": "tsc --project tsconfig.build.json",
|
|
8
|
-
"clean": "rimraf dist",
|
|
9
|
-
"lint": "eslint '**/*.{js,mjs,cjs,ts,mts,cts}'",
|
|
10
|
-
"prebuild": "npm run clean",
|
|
11
|
-
"prepublishOnly": "npm-run-all lint test build",
|
|
12
|
-
"test": "jest"
|
|
13
|
-
},
|
|
14
|
-
"bin": "dist/src/bin/npm-update-package.js",
|
|
15
|
-
"engines": {
|
|
16
|
-
"node": ">=18"
|
|
17
|
-
},
|
|
18
|
-
"dependencies": {
|
|
19
|
-
"@octokit/rest": "20.1.0",
|
|
20
|
-
"array-shuffle": "2.0.0",
|
|
21
|
-
"commander": "12.0.0",
|
|
22
|
-
"execa": "5.1.1",
|
|
23
|
-
"fp-ts": "2.16.5",
|
|
24
|
-
"http-status-codes": "2.3.0",
|
|
25
|
-
"io-ts": "2.2.21",
|
|
26
|
-
"log4js": "6.9.1",
|
|
27
|
-
"mustache": "4.2.0",
|
|
28
|
-
"node-fetch": "2.6.13",
|
|
29
|
-
"npm-check-updates": "16.3.11",
|
|
30
|
-
"parse-github-url": "1.0.2",
|
|
31
|
-
"semver": "7.5.4",
|
|
32
|
-
"type-guards": "0.15.0"
|
|
33
|
-
},
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"@munierujp/eslint-config-typescript": "43.0.0",
|
|
36
|
-
"@tsconfig/node18": "18.2.4",
|
|
37
|
-
"@types/mustache": "4.2.5",
|
|
38
|
-
"@types/node": "18.17.15",
|
|
39
|
-
"@types/node-fetch": "2.6.11",
|
|
40
|
-
"@types/parse-github-url": "1.0.3",
|
|
41
|
-
"@types/semver": "7.5.8",
|
|
42
|
-
"eslint": "8.57.0",
|
|
43
|
-
"eslint-plugin-jest": "28.3.0",
|
|
44
|
-
"jest": "29.7.0",
|
|
45
|
-
"npm-run-all": "4.1.5",
|
|
46
|
-
"rimraf": "5.0.5",
|
|
47
|
-
"ts-jest": "29.1.2",
|
|
48
|
-
"tsx": "4.9.3",
|
|
49
|
-
"typescript": "5.4.5",
|
|
50
|
-
"utility-types": "3.11.0"
|
|
51
|
-
},
|
|
52
|
-
"repository": {
|
|
53
|
-
"type": "git",
|
|
54
|
-
"url": "https://github.com/npm-update-package/npm-update-package.git"
|
|
55
|
-
},
|
|
56
|
-
"bugs": {
|
|
57
|
-
"url": "https://github.com/npm-update-package/npm-update-package/issues"
|
|
58
|
-
},
|
|
59
|
-
"homepage": "https://github.com/npm-update-package/npm-update-package",
|
|
60
|
-
"license": "MIT",
|
|
61
|
-
"keywords": [
|
|
62
|
-
"dependencies",
|
|
63
|
-
"dependency",
|
|
64
|
-
"github enterprise",
|
|
65
|
-
"github",
|
|
66
|
-
"node",
|
|
67
|
-
"npm",
|
|
68
|
-
"outdated",
|
|
69
|
-
"package",
|
|
70
|
-
"update",
|
|
71
|
-
"yarn"
|
|
72
|
-
]
|
|
73
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{src/outdated-package-processor → outdated-package-processor}/create/Create.js
RENAMED
|
File without changes
|
/package/dist/{src/outdated-package-processor → outdated-package-processor}/recreate/Recreate.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|