npm-update-package 4.0.8 → 4.0.10-alpha.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.
Files changed (88) hide show
  1. package/dist/package.json +73 -0
  2. package/dist/{bin → src/bin}/npm-update-package.js +3 -3
  3. package/dist/{github → src/github}/createOctokit.js +2 -2
  4. package/dist/src/github/pull-request/creator/createFooter.js +4 -0
  5. package/dist/{github → src/github}/pull-request/metadata/createPullRequestMetadata.js +2 -2
  6. package/dist/{options → src/options}/createOptions.js +2 -2
  7. package/package.json +6 -8
  8. package/dist/app.js +0 -3
  9. package/dist/github/pull-request/creator/createFooter.js +0 -4
  10. /package/dist/{core → src/core}/FailedResult.js +0 -0
  11. /package/dist/{core → src/core}/OutdatedPackage.js +0 -0
  12. /package/dist/{core → src/core}/OutdatedPackagesProcessor.js +0 -0
  13. /package/dist/{core → src/core}/PackageUpdater.js +0 -0
  14. /package/dist/{core → src/core}/SucceededResult.js +0 -0
  15. /package/dist/{file → src/file}/canReadWrite.js +0 -0
  16. /package/dist/{git → src/git}/CommitMessageCreator.js +0 -0
  17. /package/dist/{git → src/git}/Git.js +0 -0
  18. /package/dist/{git → src/git}/GitConfigInitializer.js +0 -0
  19. /package/dist/{git → src/git}/GitRepository.js +0 -0
  20. /package/dist/{git → src/git}/GitTransaction.js +0 -0
  21. /package/dist/{git → src/git}/createBranchName.js +0 -0
  22. /package/dist/{github → src/github}/GitHub.js +0 -0
  23. /package/dist/{github → src/github}/branch/finder/BranchFinder.js +0 -0
  24. /package/dist/{github → src/github}/createGitHub.js +0 -0
  25. /package/dist/{github → src/github}/errors/NotFoundError.js +0 -0
  26. /package/dist/{github → src/github}/label/creator/LabelCreator.js +0 -0
  27. /package/dist/{github → src/github}/pull-request/closer/PullRequestCloser.js +0 -0
  28. /package/dist/{github → src/github}/pull-request/closer/PullRequestsCloser.js +0 -0
  29. /package/dist/{github → src/github}/pull-request/creator/AssigneesAdder.js +0 -0
  30. /package/dist/{github → src/github}/pull-request/creator/GitHubUrlOptimizer.js +0 -0
  31. /package/dist/{github → src/github}/pull-request/creator/LabelsAdder.js +0 -0
  32. /package/dist/{github → src/github}/pull-request/creator/PackageDiffsSectionCreator.js +0 -0
  33. /package/dist/{github → src/github}/pull-request/creator/PullRequestBodyCreator.js +0 -0
  34. /package/dist/{github → src/github}/pull-request/creator/PullRequestCreator.js +0 -0
  35. /package/dist/{github → src/github}/pull-request/creator/PullRequestTitleCreator.js +0 -0
  36. /package/dist/{github → src/github}/pull-request/creator/ReleaseNotesSectionCreator.js +0 -0
  37. /package/dist/{github → src/github}/pull-request/creator/ReviewersAdder.js +0 -0
  38. /package/dist/{github → src/github}/pull-request/creator/createMetadataSection.js +0 -0
  39. /package/dist/{github → src/github}/pull-request/creator/createNotesSection.js +0 -0
  40. /package/dist/{github → src/github}/pull-request/creator/createOutdatedPackagesTable.js +0 -0
  41. /package/dist/{github → src/github}/pull-request/finder/PullRequestFinder.js +0 -0
  42. /package/dist/{github → src/github}/pull-request/finder/isPullRequestByNpmUpdatePackage.js +0 -0
  43. /package/dist/{github → src/github}/pull-request/metadata/PullRequestMetadata.js +0 -0
  44. /package/dist/{github → src/github}/pull-request/metadata/extractPullRequestMetadata.js +0 -0
  45. /package/dist/{github → src/github}/releases/Release.js +0 -0
  46. /package/dist/{github → src/github}/releases/fetcher/ReleasesFetcher.js +0 -0
  47. /package/dist/{json → src/json}/toJSON.js +0 -0
  48. /package/dist/{logger → src/logger}/LogLevel.js +0 -0
  49. /package/dist/{logger → src/logger}/logger.js +0 -0
  50. /package/dist/{main.js → src/main.js} +0 -0
  51. /package/dist/{npm-check-updates → src/npm-check-updates}/Dependency.js +0 -0
  52. /package/dist/{npm-check-updates → src/npm-check-updates}/NpmCheckUpdates.js +0 -0
  53. /package/dist/{npm-check-updates → src/npm-check-updates}/NpmCheckUpdatesResult.js +0 -0
  54. /package/dist/{npm-check-updates → src/npm-check-updates}/createDepOptionValue.js +0 -0
  55. /package/dist/{npm-check-updates → src/npm-check-updates}/toDependency.js +0 -0
  56. /package/dist/{options → src/options}/CLIOption.js +0 -0
  57. /package/dist/{options → src/options}/OptionType.js +0 -0
  58. /package/dist/{options → src/options}/Options.js +0 -0
  59. /package/dist/{options → src/options}/cliOptions.js +0 -0
  60. /package/dist/{options → src/options}/initOptions.js +0 -0
  61. /package/dist/{options → src/options}/parseBooleanOption.js +0 -0
  62. /package/dist/{options → src/options}/parseNumberOption.js +0 -0
  63. /package/dist/{options → src/options}/toCommanderOption.js +0 -0
  64. /package/dist/{outdated-package-processor → src/outdated-package-processor}/OutdatedPackageProcessor.js +0 -0
  65. /package/dist/{outdated-package-processor → src/outdated-package-processor}/OutdatedPackageProcessorCreator.js +0 -0
  66. /package/dist/{outdated-package-processor → src/outdated-package-processor}/OutdatedPullRequestStrategy.js +0 -0
  67. /package/dist/{outdated-package-processor → src/outdated-package-processor}/create/Create.js +0 -0
  68. /package/dist/{outdated-package-processor → src/outdated-package-processor}/recreate/Recreate.js +0 -0
  69. /package/dist/{outdated-package-processor → src/outdated-package-processor}/skip/Skip.js +0 -0
  70. /package/dist/{package-json → src/package-json}/DependencyType.js +0 -0
  71. /package/dist/{package-json → src/package-json}/PackageMetadata.js +0 -0
  72. /package/dist/{package-json → src/package-json}/PackageMetadataDependencies.js +0 -0
  73. /package/dist/{package-json → src/package-json}/PackageMetadataRepository.js +0 -0
  74. /package/dist/{package-json → src/package-json}/extractRepository.js +0 -0
  75. /package/dist/{package-json → src/package-json}/parsePackageJson.js +0 -0
  76. /package/dist/{package-json → src/package-json}/readPackageJson.js +0 -0
  77. /package/dist/{package-manager → src/package-manager}/PackageManager.js +0 -0
  78. /package/dist/{package-manager → src/package-manager}/PackageManagerCreator.js +0 -0
  79. /package/dist/{package-manager → src/package-manager}/PackageManagerName.js +0 -0
  80. /package/dist/{package-manager → src/package-manager}/detectPackageManager.js +0 -0
  81. /package/dist/{package-manager → src/package-manager}/npm/Npm.js +0 -0
  82. /package/dist/{package-manager → src/package-manager}/npm/NpmVersions.js +0 -0
  83. /package/dist/{package-manager → src/package-manager}/yarn/Yarn.js +0 -0
  84. /package/dist/{package-manager → src/package-manager}/yarn/YarnVersions.js +0 -0
  85. /package/dist/{semver → src/semver}/SemVer.js +0 -0
  86. /package/dist/{semver → src/semver}/SemVerLevel.js +0 -0
  87. /package/dist/{semver → src/semver}/compareSemVers.js +0 -0
  88. /package/dist/{terminal → src/terminal}/Terminal.js +0 -0
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "npm-update-package",
3
+ "version": "4.0.10-alpha.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": "glob -c 'tsx --test' 'src/**/*.test.ts'"
13
+ },
14
+ "bin": "dist/bin/npm-update-package.js",
15
+ "engines": {
16
+ "node": ">=20"
17
+ },
18
+ "dependencies": {
19
+ "@octokit/rest": "20.1.1",
20
+ "commander": "12.1.0",
21
+ "execa": "9.1.0",
22
+ "fp-ts": "2.16.6",
23
+ "http-status-codes": "2.3.0",
24
+ "io-ts": "2.2.21",
25
+ "lodash": "4.17.21",
26
+ "log4js": "6.9.1",
27
+ "mustache": "4.2.0",
28
+ "npm-check-updates": "16.3.11",
29
+ "parse-github-url": "1.0.2",
30
+ "semver": "7.5.4",
31
+ "type-guards": "0.15.0"
32
+ },
33
+ "devDependencies": {
34
+ "@munierujp/eslint-config-typescript": "46.0.1",
35
+ "@tsconfig/node20": "20.1.4",
36
+ "@types/lodash": "4.17.4",
37
+ "@types/mustache": "4.2.5",
38
+ "@types/node": "20.12.12",
39
+ "@types/parse-github-url": "1.0.3",
40
+ "@types/semver": "7.5.8",
41
+ "eslint": "8.57.0",
42
+ "eslint-config-lodash": "4.0.3",
43
+ "glob": "10.3.15",
44
+ "nock": "14.0.0-beta.6",
45
+ "npm-run-all2": "6.2.0",
46
+ "rimraf": "5.0.7",
47
+ "test-each": "7.0.0",
48
+ "tsx": "4.11.0",
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
+ }
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
- import * as app from '../app.js';
2
+ import pkg from '../../package.json';
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 ${app.name} v${app.version}`);
9
+ logger.info(`Start ${pkg.name} v${pkg.version}`);
10
10
  await main(options);
11
- logger.info(`End ${app.name} v${app.version}`);
11
+ logger.info(`End ${pkg.name} v${pkg.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 * as app from '../app.js';
2
+ import pkg from '../../package.json';
3
3
  export const createOctokit = ({ host, token }) => {
4
- const userAgent = `${app.name}/${app.version}`;
4
+ const userAgent = `${pkg.name}/${pkg.version}`;
5
5
  if (token === undefined) {
6
6
  return new Octokit({
7
7
  userAgent
@@ -0,0 +1,4 @@
1
+ import pkg from '../../../../package.json';
2
+ export const createFooter = () => {
3
+ return `This PR has been generated by [${pkg.name}](${pkg.homepage}) v${pkg.version}`;
4
+ };
@@ -1,7 +1,7 @@
1
- import * as app from '../../../app.js';
1
+ import pkg from '../../../../package.json';
2
2
  export const createPullRequestMetadata = (outdatedPackages) => {
3
3
  return {
4
- version: app.version,
4
+ version: pkg.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 * as app from '../app.js';
2
+ import pkg from '../../package.json';
3
3
  import { isOptions } from './Options.js';
4
4
  import { toCommanderOption } from './toCommanderOption.js';
5
5
  export const createOptions = (cliOptions) => {
6
- program.version(app.version);
6
+ program.version(pkg.version);
7
7
  cliOptions
8
8
  .map(option => toCommanderOption(option))
9
9
  .forEach(option => program.addOption(option));
package/package.json CHANGED
@@ -1,16 +1,14 @@
1
1
  {
2
2
  "name": "npm-update-package",
3
- "version": "4.0.8",
3
+ "version": "4.0.10-alpha.0",
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",
11
10
  "prebuild": "npm run clean",
12
11
  "prepublishOnly": "npm-run-all lint test build",
13
- "syncVersion": "tsx scripts/syncVersion.ts",
14
12
  "test": "glob -c 'tsx --test' 'src/**/*.test.ts'"
15
13
  },
16
14
  "bin": "dist/bin/npm-update-package.js",
@@ -19,9 +17,9 @@
19
17
  },
20
18
  "dependencies": {
21
19
  "@octokit/rest": "20.1.1",
22
- "commander": "12.0.0",
20
+ "commander": "12.1.0",
23
21
  "execa": "9.1.0",
24
- "fp-ts": "2.16.5",
22
+ "fp-ts": "2.16.6",
25
23
  "http-status-codes": "2.3.0",
26
24
  "io-ts": "2.2.21",
27
25
  "lodash": "4.17.21",
@@ -41,13 +39,13 @@
41
39
  "@types/parse-github-url": "1.0.3",
42
40
  "@types/semver": "7.5.8",
43
41
  "eslint": "8.57.0",
44
- "eslint-config-lodash": "4.0.1",
42
+ "eslint-config-lodash": "4.0.3",
45
43
  "glob": "10.3.15",
46
44
  "nock": "14.0.0-beta.6",
47
- "npm-run-all2": "6.1.2",
45
+ "npm-run-all2": "6.2.0",
48
46
  "rimraf": "5.0.7",
49
47
  "test-each": "7.0.0",
50
- "tsx": "4.10.1",
48
+ "tsx": "4.11.0",
51
49
  "typescript": "5.4.5",
52
50
  "utility-types": "3.11.0"
53
51
  },
package/dist/app.js DELETED
@@ -1,3 +0,0 @@
1
- export const name = 'npm-update-package';
2
- export const version = '4.0.8';
3
- export const homepage = 'https://github.com/npm-update-package/npm-update-package';
@@ -1,4 +0,0 @@
1
- import * as app from '../../../app.js';
2
- export const createFooter = () => {
3
- return `This PR has been generated by [${app.name}](${app.homepage}) v${app.version}`;
4
- };
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