@semantic-release/github 12.0.1 → 12.0.3

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
@@ -116,13 +116,15 @@ Can be `false`, a proxy URL or an `Object` with the following properties:
116
116
  | `secureProxy` | If `true`, then use TLS to connect to the proxy. | `false` |
117
117
  | `headers` | Additional HTTP headers to be sent on the HTTP CONNECT method. | - |
118
118
 
119
- See [node-https-proxy-agent](https://github.com/TooTallNate/node-https-proxy-agent#new-httpsproxyagentobject-options) and [node-http-proxy-agent](https://github.com/TooTallNate/node-http-proxy-agent) for additional details.
119
+ This plugin uses [undici's ProxyAgent](https://github.com/nodejs/undici#proxyagent) for modern proxy support, with backwards compatibility maintained through [node-https-proxy-agent](https://github.com/TooTallNate/node-https-proxy-agent#new-httpsproxyagentobject-options) and [node-http-proxy-agent](https://github.com/TooTallNate/node-http-proxy-agent). This ensures proxy functionality works with GitHub Enterprise Server environments behind corporate proxies.
120
120
 
121
121
  ##### proxy examples
122
122
 
123
123
  `'http://168.63.76.32:3128'`: use the proxy running on host `168.63.76.32` and port `3128` for each GitHub API request.
124
124
  `{host: '168.63.76.32', port: 3128, headers: {Foo: 'bar'}}`: use the proxy running on host `168.63.76.32` and port `3128` for each GitHub API request, setting the `Foo` header value to `bar`.
125
125
 
126
+ **Note**: This plugin now uses undici's ProxyAgent internally for enhanced proxy support, particularly beneficial for GitHub Enterprise Server environments behind corporate proxies. All existing proxy configurations remain fully compatible.
127
+
126
128
  #### assets
127
129
 
128
130
  Can be a [glob](https://github.com/isaacs/node-glob#glob-primer) or and `Array` of
package/lib/octokit.js CHANGED
@@ -14,6 +14,7 @@ import { throttling } from "@octokit/plugin-throttling";
14
14
  import urljoin from "url-join";
15
15
  import { HttpProxyAgent } from "http-proxy-agent";
16
16
  import { HttpsProxyAgent } from "https-proxy-agent";
17
+ import { ProxyAgent, fetch as undiciFetch } from "undici";
17
18
 
18
19
  import { RETRY_CONF } from "./definitions/retry.js";
19
20
  import { THROTTLE_CONF } from "./definitions/throttle.js";
@@ -50,7 +51,7 @@ export const SemanticReleaseOctokit = Octokit.plugin(
50
51
 
51
52
  /**
52
53
  * @param {{githubToken: string, proxy: any} | {githubUrl: string, githubApiPathPrefix: string, githubApiUrl: string,githubToken: string, proxy: any}} options
53
- * @returns {{ auth: string, baseUrl?: string, request: { agent?: any } }}
54
+ * @returns {{ auth: string, baseUrl?: string, request: { agent?: any, fetch?: any } }}
54
55
  */
55
56
  export function toOctokitOptions(options) {
56
57
  const baseUrl =
@@ -69,11 +70,17 @@ export function toOctokitOptions(options) {
69
70
  : new HttpsProxyAgent(options.proxy, options.proxy)
70
71
  : undefined;
71
72
 
73
+ const fetchWithDispatcher = (url, opts) =>
74
+ undiciFetch(url, {
75
+ ...opts,
76
+ dispatcher: options.proxy
77
+ ? new ProxyAgent({ uri: options.proxy })
78
+ : undefined,
79
+ });
80
+
72
81
  return {
73
82
  ...(baseUrl ? { baseUrl } : {}),
74
83
  auth: options.githubToken,
75
- request: {
76
- agent,
77
- },
84
+ request: { agent, fetch: fetchWithDispatcher },
78
85
  };
79
86
  }
package/lib/success.js CHANGED
@@ -457,7 +457,7 @@ function buildAssociatedPRsQuery(shas) {
457
457
  repository(owner: $owner, name: $repo) {
458
458
  ${shas
459
459
  .map((sha) => {
460
- return `commit${sha.slice(0, 6)}: object(oid: "${sha}") {
460
+ return `commit${sha.slice(0, 12)}: object(oid: "${sha}") {
461
461
  ...on Commit {
462
462
  oid
463
463
  associatedPullRequests(first: 100) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semantic-release/github",
3
3
  "description": "semantic-release plugin to publish a GitHub release and comment on released Pull Requests/Issues",
4
- "version": "12.0.1",
4
+ "version": "12.0.3",
5
5
  "type": "module",
6
6
  "author": "Pierre Vanduynslager (https://twitter.com/@pvdlg_)",
7
7
  "ava": {
@@ -37,6 +37,7 @@
37
37
  "mime": "^4.0.0",
38
38
  "p-filter": "^4.0.0",
39
39
  "tinyglobby": "^0.2.14",
40
+ "undici": "^7.0.0",
40
41
  "url-join": "^5.0.0"
41
42
  },
42
43
  "devDependencies": {
@@ -45,14 +46,14 @@
45
46
  "cpy": "12.1.0",
46
47
  "cz-conventional-changelog": "3.3.0",
47
48
  "fetch-mock": "npm:@gr2m/fetch-mock@9.11.0-pull-request-644.1",
48
- "lockfile-lint": "4.14.1",
49
- "ls-engines": "0.9.3",
49
+ "lockfile-lint": "5.0.0",
50
+ "ls-engines": "0.10.0",
50
51
  "npm-run-all2": "8.0.4",
51
- "prettier": "3.6.2",
52
- "publint": "0.3.15",
53
- "semantic-release": "25.0.1",
54
- "sinon": "21.0.0",
55
- "tempy": "3.1.0"
52
+ "prettier": "3.8.1",
53
+ "publint": "0.3.17",
54
+ "semantic-release": "25.0.2",
55
+ "sinon": "21.0.1",
56
+ "tempy": "3.1.2"
56
57
  },
57
58
  "engines": {
58
59
  "node": "^22.14.0 || >= 24.10.0"
@@ -127,5 +128,5 @@
127
128
  "github>semantic-release/.github:renovate-config"
128
129
  ]
129
130
  },
130
- "packageManager": "npm@11.4.1"
131
+ "packageManager": "npm@11.8.0"
131
132
  }