Skip to content

Commit 6be4ea6

Browse files
chore(deps-dev): bump the dev-dependencies group across 1 directory with 3 updates (#117)
* chore(deps-dev): bump the dev-dependencies group across 1 directory with 3 updates Bumps the dev-dependencies group with 3 updates in the / directory: [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js), [eslint](https://github.com/eslint/eslint) and [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest). Updates `@eslint/js` from 9.39.2 to 10.0.1 - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](https://github.com/eslint/eslint/commits/HEAD/packages/js) Updates `eslint` from 9.39.2 to 10.0.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](eslint/eslint@v9.39.2...v10.0.0) Updates `eslint-plugin-jest` from 29.12.2 to 29.13.0 - [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases) - [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md) - [Commits](jest-community/eslint-plugin-jest@v29.12.2...v29.13.0) --- updated-dependencies: - dependency-name: "@eslint/js" dependency-version: 10.0.1 dependency-type: direct:development update-type: version-update:semver-major dependency-group: dev-dependencies - dependency-name: eslint dependency-version: 10.0.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: dev-dependencies - dependency-name: eslint-plugin-jest dependency-version: 29.13.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> * Propagate error causes; fix changelog pagination Add original error as the Error.cause when rethrowing in pinact and changelog actions, preserving underlying exceptions for better diagnostics. Fix release fetch pagination in release_changelog by replacing the do/while with a while loop and a hasMorePages flag (using perPage to detect more pages). Also adjust releasesToDelete initialization in release_create/cleanup.js to defer assignment. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
1 parent b8d2490 commit 6be4ea6

4 files changed

Lines changed: 15 additions & 15 deletions

File tree

actions/pinact/pinact.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ function execCommand(command, options = {}) {
123123
try {
124124
return execSync(command, { encoding: 'utf-8', ...options });
125125
} catch (error) {
126-
throw new Error(`Command failed: ${command}\n${error.message}`);
126+
throw new Error(`Command failed: ${command}\n${error.message}`, { cause: error });
127127
}
128128
}
129129

@@ -153,7 +153,7 @@ function findExecutable(executable) {
153153
executablePaths[executable] = execPath;
154154
return execPath;
155155
} catch (error) {
156-
throw new Error(`Could not find ${executable} executable in PATH: ${error.message}`);
156+
throw new Error(`Could not find ${executable} executable in PATH: ${error.message}`, { cause: error });
157157
}
158158
}
159159

@@ -274,7 +274,7 @@ async function installPinact(pinactRepo, pinactVersion) {
274274
Logger.log('');
275275
return pinactPath;
276276
} catch (error) {
277-
throw new Error('Failed to install pinact: ' + error.message);
277+
throw new Error('Failed to install pinact: ' + error.message, { cause: error });
278278
}
279279
}
280280

@@ -322,7 +322,7 @@ function runPinact(pinactPath, repoPath, pinactConfigPath = '') {
322322
return false;
323323
}
324324
} catch (error) {
325-
throw new Error('Failed to run pinact: ' + error.message);
325+
throw new Error('Failed to run pinact: ' + error.message, { cause: error });
326326
}
327327
}
328328

@@ -464,7 +464,7 @@ Please review the changes before merging.`;
464464
Logger.log('');
465465
return pr;
466466
} catch (error) {
467-
throw new Error('Failed to create pull request: ' + error.message);
467+
throw new Error('Failed to create pull request: ' + error.message, { cause: error });
468468
}
469469
}
470470

actions/release_changelog/changelog.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,19 +100,19 @@ async function fetchAllReleases(github, context) {
100100
let releases = [];
101101
let page = 1;
102102
const perPage = 100;
103-
let total = 0;
104103

105-
do {
104+
let hasMorePages = true;
105+
while (hasMorePages) {
106106
const response = await github.rest.repos.listReleases({
107107
owner: context.repo.owner,
108108
repo: context.repo.repo,
109109
per_page: perPage,
110110
page: page
111111
});
112112
releases = releases.concat(response.data);
113-
total = response.data.length;
113+
hasMorePages = response.data.length === perPage;
114114
page++;
115-
} while (total === perPage);
115+
}
116116

117117
// Sort releases by date created (oldest first)
118118
releases.sort((a, b) => {
@@ -195,7 +195,7 @@ async function updateChangelogFile(github, context, changelogContent, changelogB
195195
currentContent = Buffer.from(fileData.data.content, 'base64').toString('utf-8');
196196
} catch (getFileError) {
197197
if (getFileError.status !== 404) {
198-
throw new Error(`Failed to fetch the file: ${getFileError.message}`);
198+
throw new Error(`Failed to fetch the file: ${getFileError.message}`, { cause: getFileError });
199199
}
200200
// If 404, sha remains null and we'll create a new file
201201
}
@@ -258,7 +258,7 @@ async function generateReleaseChangelog({ github, context, core }) {
258258
console.log(`No changes detected, ${changelogFile} not updated`);
259259
}
260260
} else {
261-
throw new Error(`Failed to create or update changelog: ${e.message}`);
261+
throw new Error(`Failed to create or update changelog: ${e.message}`, { cause: e });
262262
}
263263
}
264264

actions/release_create/cleanup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function matchesVersionPattern(tagName) {
5050
* @returns {Array} Releases to delete
5151
*/
5252
function filterReleasesToDelete(allReleases, isDraft, currentTag, keepLatest) {
53-
let releasesToDelete = [];
53+
let releasesToDelete;
5454

5555
if (isDraft) {
5656
// When creating a draft, delete all other draft releases

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
"devDependencies": {
2020
"@babel/core": "7.29.0",
2121
"@babel/preset-env": "7.29.0",
22-
"@eslint/js": "9.39.2",
22+
"@eslint/js": "10.0.1",
2323
"@jest/globals": "30.2.0",
24-
"eslint": "9.39.2",
25-
"eslint-plugin-jest": "29.12.2",
24+
"eslint": "10.0.0",
25+
"eslint-plugin-jest": "29.14.0",
2626
"globals": "^17.0.0",
2727
"jest": "30.2.0",
2828
"jest-junit": "16.0.0",

0 commit comments

Comments
 (0)