Skip to content

Commit ed0f86f

Browse files
chore(deps): resolve open Dependabot alerts (#139)
* chore(deps): resolve open Dependabot alerts Bumps top-level dependencies to pull in patched transitive packages (undici, @octokit/request, @octokit/plugin-paginate-rest, @octokit/request-error): - @actions/core ^1.10.0 -> ^2.0.0 - @electron/github-app-auth ^2.0.0 -> ^3.0.0 - @octokit/rest ^19.0.11 -> ^20.0.2 - @octokit/graphql ^5.0.6 -> ^7.0.0 (dev) * chore(deps): align @octokit/rest to ^22 and use dynamic import for ESM-only packages
1 parent 5cd5d17 commit ed0f86f

4 files changed

Lines changed: 207 additions & 426 deletions

File tree

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@
2929
},
3030
"homepage": "https://github.com/electron/unreleased#readme",
3131
"dependencies": {
32-
"@actions/core": "^1.10.0",
33-
"@electron/github-app-auth": "^2.0.0",
34-
"@octokit/rest": "^19.0.11",
32+
"@actions/core": "^2.0.0",
33+
"@electron/github-app-auth": "^3.0.0",
34+
"@octokit/rest": "^22.0.0",
3535
"@slack/web-api": "^6.10.0",
3636
"body-parser": "^2.2.1",
3737
"express": "^5.0.1"
3838
},
3939
"devDependencies": {
40-
"@octokit/graphql": "^5.0.6",
40+
"@octokit/graphql": "^9.0.0",
4141
"eslint": "^9.12.0",
4242
"globals": "^15.11.0",
4343
"husky": "^9.1.6",

utils/octokit.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
const {
2-
appCredentialsFromString,
3-
getAuthOptionsForRepo,
4-
} = require('@electron/github-app-auth');
51
const {
62
ORGANIZATION_NAME,
73
REPO_NAME,
84
UNRELEASED_GITHUB_APP_CREDS,
95
} = require('../constants');
10-
const { Octokit } = require('@octokit/rest');
116

127
let octokit;
138
const getOctokit = async () => {
149
if (octokit) return octokit;
1510

11+
const { Octokit } = await import('@octokit/rest');
12+
1613
if (UNRELEASED_GITHUB_APP_CREDS) {
14+
const { appCredentialsFromString, getAuthOptionsForRepo } = await import(
15+
'@electron/github-app-auth'
16+
);
1717
const creds = appCredentialsFromString(UNRELEASED_GITHUB_APP_CREDS);
1818
const authOpts = await getAuthOptionsForRepo(
1919
{

utils/unreleased-commits.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
const { linkifyPRs, releaseIsDraft } = require('./helpers');
22
const { getOctokit } = require('./octokit');
3-
const { graphql } = require('@octokit/graphql');
4-
const {
5-
appCredentialsFromString,
6-
getTokenForRepo,
7-
} = require('@electron/github-app-auth');
83

94
const {
105
EXCLUDED_COMMIT_PATTERN,
@@ -14,9 +9,14 @@ const {
149
} = require('../constants');
1510

1611
async function fetchTags() {
12+
const { graphql } = await import('@octokit/graphql');
13+
1714
let authorization;
1815

1916
if (UNRELEASED_GITHUB_APP_CREDS) {
17+
const { appCredentialsFromString, getTokenForRepo } = await import(
18+
'@electron/github-app-auth'
19+
);
2020
const creds = appCredentialsFromString(UNRELEASED_GITHUB_APP_CREDS);
2121
authorization = `token ${await getTokenForRepo(
2222
{

0 commit comments

Comments
 (0)