node-package-release-action 2.1.16 → 2.1.18

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
@@ -1,10 +1,9 @@
1
1
  # node-package-release-action
2
2
 
3
- [![Build](https://github.com/CatChen/node-package-release-action/actions/workflows/build.yml/badge.svg)](https://github.com/CatChen/node-package-release-action/actions/workflows/build.yml)
4
- [![Test](https://github.com/CatChen/node-package-release-action/actions/workflows/test.yml/badge.svg)](https://github.com/CatChen/node-package-release-action/actions/workflows/test.yml)
5
- [![ESLint](https://github.com/CatChen/node-package-release-action/actions/workflows/eslint.yml/badge.svg)](https://github.com/CatChen/node-package-release-action/actions/workflows/eslint.yml)
6
- [![CodeQL](https://github.com/CatChen/node-package-release-action/actions/workflows/codeql.yml/badge.svg)](https://github.com/CatChen/node-package-release-action/actions/workflows/codeql.yml)
7
- [![Ship](https://github.com/CatChen/node-package-release-action/actions/workflows/ship.yml/badge.svg)](https://github.com/CatChen/node-package-release-action/actions/workflows/ship.yml)
3
+ [![Build](https://github.com/CatChen/node-package-release-action/actions/workflows/build.yml/badge.svg?branch=main&event=push)](https://github.com/CatChen/node-package-release-action/actions/workflows/build.yml)
4
+ [![Test](https://github.com/CatChen/node-package-release-action/actions/workflows/test.yml/badge.svg?branch=main&event=push)](https://github.com/CatChen/node-package-release-action/actions/workflows/test.yml)
5
+ [![ESLint](https://github.com/CatChen/node-package-release-action/actions/workflows/eslint.yml/badge.svg?branch=main&event=push)](https://github.com/CatChen/node-package-release-action/actions/workflows/eslint.yml)
6
+ [![CodeQL](https://github.com/CatChen/node-package-release-action/actions/workflows/codeql.yml/badge.svg?branch=main&event=schedule)](https://github.com/CatChen/node-package-release-action/actions/workflows/codeql.yml)
8
7
 
9
8
  Stop running `npm version patch` manually to release a new version of your NPM package. Let this Action automate for you. Trigger it on GitHub or schedule a weekly or monthly release.
10
9
 
@@ -25,7 +24,7 @@ jobs:
25
24
  - uses: actions/checkout@v3
26
25
 
27
26
  - id: release
28
- uses: CatChen/node-package-release-action@v1
27
+ uses: CatChen/node-package-release-action@v2
29
28
  with:
30
29
  github-token: ${{ secrets.GITHUB_TOKEN }} # optional
31
30
  directory: './' #optional
@@ -150,7 +149,7 @@ on:
150
149
  with:
151
150
  ref: 'main'
152
151
 
153
- - uses: CatChen/node-package-release-action@v1
152
+ - uses: CatChen/node-package-release-action@v2
154
153
  with:
155
154
  release-type: ${{ inputs.release-type || 'patch' }}
156
155
  prerelease: ${{ inputs.prerelease || false }}
@@ -1,7 +1,6 @@
1
- export declare function getOctokit(): import("@octokit/core").Octokit & import("@octokit/plugin-rest-endpoint-methods/dist-types/types").Api & {
2
- paginate: import("@octokit/plugin-paginate-rest").PaginateInterface;
3
- } & {
4
- retry: {
5
- retryRequest: (error: import("@octokit/request-error").RequestError, retries: number, retryAfter: number) => import("@octokit/request-error").RequestError;
6
- };
1
+ import { type Octokit } from '@octokit/core/dist-types/index.js';
2
+ import { type PaginateInterface } from '@octokit/plugin-paginate-rest';
3
+ import { type Api } from '@octokit/plugin-rest-endpoint-methods/dist-types/types.js';
4
+ export declare function getOctokit(githubToken: string): Octokit & Api & {
5
+ paginate: PaginateInterface;
7
6
  };
@@ -1,14 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getOctokit = getOctokit;
4
- const core_1 = require("@actions/core");
5
- const utils_1 = require("@actions/github/lib/utils");
4
+ const utils_js_1 = require("@actions/github/lib/utils.js");
6
5
  const plugin_retry_1 = require("@octokit/plugin-retry");
7
6
  const plugin_throttling_1 = require("@octokit/plugin-throttling");
8
- function getOctokit() {
9
- const githubToken = (0, core_1.getInput)('github-token');
10
- const Octokit = utils_1.GitHub.plugin(plugin_throttling_1.throttling, plugin_retry_1.retry);
11
- const octokit = new Octokit((0, utils_1.getOctokitOptions)(githubToken, {
7
+ function getOctokit(githubToken) {
8
+ const Octokit = utils_js_1.GitHub.plugin(plugin_throttling_1.throttling, plugin_retry_1.retry);
9
+ const octokit = new Octokit((0, utils_js_1.getOctokitOptions)(githubToken, {
12
10
  throttle: {
13
11
  onRateLimit: (retryAfter, options, _, retryCount) => {
14
12
  if (retryCount === 0) {
@@ -35,5 +33,10 @@ function getOctokit() {
35
33
  doNotRetry: ['429'],
36
34
  },
37
35
  }));
36
+ octokit.graphql = octokit.graphql.defaults({
37
+ headers: {
38
+ 'X-GitHub-Next-Global-ID': 1,
39
+ },
40
+ });
38
41
  return octokit;
39
42
  }
package/dist/index.js CHANGED
@@ -19,7 +19,8 @@ const setVersion_1 = require("./setVersion");
19
19
  const updateTags_1 = require("./updateTags");
20
20
  const DEFAULT_VERSION = '0.1.0';
21
21
  async function run() {
22
- const octokit = (0, getOctokit_1.getOctokit)();
22
+ const githubToken = (0, core_1.getInput)('github-token');
23
+ const octokit = (0, getOctokit_1.getOctokit)(githubToken);
23
24
  await (0, configGit_1.configGit)(octokit);
24
25
  (0, core_1.startGroup)('Fetch every git tag');
25
26
  await (0, fetchEverything_1.fetchEverything)();
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "node-package-release-action",
3
- "version": "2.1.16",
3
+ "version": "2.1.18",
4
4
  "description": "A template to create custom GitHub Action with TypeScript/JavaScript.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.js",
7
7
  "type": "module",
8
8
  "scripts": {
9
9
  "build": "rm -rf dist && yarn tsc",
10
- "bundle": "rm -rf bundle && yarn ncc build src/index.ts --external eslint --source-map --license licenses.txt --out bundle",
10
+ "bundle": "rm -rf bundle && yarn ncc build src/index.ts --source-map --license licenses.txt --out bundle",
11
11
  "test": "echo \"Error: no test specified\" && exit 1",
12
12
  "lint": "eslint -c eslint.config.js",
13
- "_postinstall": "is-ci || husky install",
14
13
  "prepublishOnly": "pinst --disable && yarn build",
15
14
  "postpublish": "pinst --enable",
16
- "preversion": "yarn && yarn build && yarn bundle"
15
+ "preversion": "yarn && yarn build && yarn bundle",
16
+ "prepare": "is-ci || husky"
17
17
  },
18
18
  "repository": {
19
19
  "type": "git",
@@ -33,10 +33,10 @@
33
33
  "@octokit/webhooks-definitions": "^3.67.3",
34
34
  "@serverless-guru/prettier-plugin-import-order": "^0.4.1",
35
35
  "@types/glob": "^8.0.0",
36
- "@types/node": "^20.1.3",
36
+ "@types/node": "^22.0.0",
37
37
  "@types/semver": "^7.3.13",
38
- "@typescript-eslint/eslint-plugin": "^7.1.1",
39
- "@typescript-eslint/parser": "^7.1.1",
38
+ "@typescript-eslint/eslint-plugin": "^8.0.0",
39
+ "@typescript-eslint/parser": "^8.0.0",
40
40
  "@vercel/ncc": "^0.38.0",
41
41
  "eslint": "^9.1.1",
42
42
  "eslint-config-prettier": "^9.0.0",
@@ -46,8 +46,8 @@
46
46
  "lint-staged": "^15.0.2",
47
47
  "pinst": "^3.0.0",
48
48
  "prettier": "^3.0.2",
49
- "typescript": "^5.0.2",
50
- "typescript-eslint": "^7.8.0"
49
+ "typescript": "^5.6.3",
50
+ "typescript-eslint": "^8.0.0"
51
51
  },
52
52
  "dependencies": {
53
53
  "@actions/core": "^1.10.0",
@@ -55,12 +55,11 @@
55
55
  "@actions/github": "^6.0.0",
56
56
  "@octokit/plugin-retry": "^7.1.1",
57
57
  "@octokit/plugin-throttling": "^9.3.0",
58
- "glob": "^10.2.3",
58
+ "glob": "^11.0.0",
59
59
  "semver": "^7.3.8"
60
60
  },
61
61
  "resolutions": {
62
- "strip-ansi": "6.0.1",
63
- "@octokit/core": "^6.0.0"
62
+ "strip-ansi": "6.0.1"
64
63
  },
65
64
  "lint-staged": {
66
65
  "*.(ts,js)": "yarn lint --fix",