diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml index bfcb40d70..8572e1ee4 100644 --- a/.github/actions/setup-node/action.yml +++ b/.github/actions/setup-node/action.yml @@ -18,7 +18,7 @@ runs: shell: bash run: | echo 'CACHE_KEY=node_modules-${{ - hashFiles('.node-version', 'pnpm-lock.yaml') + hashFiles('.node-version', 'pnpm-lock.yaml', 'patches/*.patch') }}' >> "$GITHUB_ENV" - name: ♻️ Restore `node_modules` diff --git a/package.json b/package.json index b7f63df04..9dc3e82d3 100644 --- a/package.json +++ b/package.json @@ -91,6 +91,9 @@ }, "neverBuiltDependencies": [ "dtrace-provider" - ] + ], + "patchedDependencies": { + "@semantic-release/github@9.2.4": "patches/@semantic-release__github@9.2.4.patch" + } } } diff --git a/patches/@semantic-release__github@9.2.4.patch b/patches/@semantic-release__github@9.2.4.patch new file mode 100644 index 000000000..e724eeaff --- /dev/null +++ b/patches/@semantic-release__github@9.2.4.patch @@ -0,0 +1,29 @@ +diff --git a/lib/octokit.js b/lib/octokit.js +index 798b5756c8bd47c7d800fb788bd1ecfe165b1371..12c8cc538e586ab9ffcfd06f095b5a17e443f7f7 100644 +--- a/lib/octokit.js ++++ b/lib/octokit.js +@@ -2,6 +2,7 @@ + // @ts-check + + import { createRequire } from "node:module"; ++import fetch from 'node-fetch'; + + // If maintaining @octokit/core and the separate plugins gets to cumbersome + // then the `octokit` package can be used which has all these plugins included. +@@ -50,7 +51,7 @@ export const SemanticReleaseOctokit = Octokit.plugin( + + /** + * @param {{githubToken: string, proxy: any} | {githubUrl: string, githubApiPathPrefix: string, githubToken: string, proxy: any}} options +- * @returns {{ auth: string, baseUrl?: string, request: { agent?: any } }} ++ * @returns {{ auth: string, baseUrl?: string, request: { agent?: any, fetch?: any } }} + */ + export function toOctokitOptions(options) { + const baseUrl = +@@ -71,6 +72,7 @@ export function toOctokitOptions(options) { + auth: options.githubToken, + request: { + agent, ++ fetch, + }, + }; + } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a4b040e74..03d952f66 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,6 +10,11 @@ neverBuiltDependencies: overrides: tsconfig-paths: 4.2.0 +patchedDependencies: + '@semantic-release/github@9.2.4': + hash: 2ar4pcrynuvweociw4uxycd3oa + path: patches/@semantic-release__github@9.2.4.patch + dependencies: '@actions/core': specifier: 1.10.1 @@ -66,7 +71,7 @@ devDependencies: version: 10.0.1(semantic-release@22.0.8) '@semantic-release/github': specifier: 9.2.4 - version: 9.2.4(semantic-release@22.0.8) + version: 9.2.4(patch_hash=2ar4pcrynuvweociw4uxycd3oa)(semantic-release@22.0.8) '@semantic-release/npm': specifier: 11.0.1 version: 11.0.1(semantic-release@22.0.8) @@ -2652,7 +2657,7 @@ packages: - supports-color dev: true - /@semantic-release/github@9.2.4(semantic-release@22.0.8): + /@semantic-release/github@9.2.4(patch_hash=2ar4pcrynuvweociw4uxycd3oa)(semantic-release@22.0.8): resolution: {integrity: sha512-VMzqiuSLhHc0/1Q8M/FmWnOaclh5aXL2pQWceldWBYSWLNzQu8GOR4bkGl57ciUtvm+MCMi4FaStZxSDJGEfUg==} engines: {node: '>=18'} peerDependencies: @@ -2678,6 +2683,7 @@ packages: transitivePeerDependencies: - supports-color dev: true + patched: true /@semantic-release/npm@11.0.1(semantic-release@22.0.8): resolution: {integrity: sha512-nFcT0pgVwpXsPkzjqP3ObH+pILeN1AbYscCDuYwgZEPZukL+RsGhrtdT4HA1Gjb/y1bVbE90JNtMIcgRi5z/Fg==} @@ -8909,7 +8915,7 @@ packages: dependencies: '@semantic-release/commit-analyzer': 11.1.0(semantic-release@22.0.8) '@semantic-release/error': 4.0.0 - '@semantic-release/github': 9.2.4(semantic-release@22.0.8) + '@semantic-release/github': 9.2.4(patch_hash=2ar4pcrynuvweociw4uxycd3oa)(semantic-release@22.0.8) '@semantic-release/npm': 11.0.1(semantic-release@22.0.8) '@semantic-release/release-notes-generator': 12.1.0(semantic-release@22.0.8) aggregate-error: 5.0.0