Skip to content

Commit

Permalink
chore: bump dependencices (#172)
Browse files Browse the repository at this point in the history
* - `@actions/tool-cache` v2.0.0 should not have any relevant breaking changes for us:
  - https://github.com/actions/toolkit/blob/main/packages/tool-cache/RELEASES.md
- `@octokit/rest` v19/v20 should also not affect us:
  - https://github.com/octokit/rest.js/releases/tag/v19.0.0
  - https://github.com/octokit/rest.js/releases/tag/v20.0.0
  - Except: https://github.com/octokit/octokit.js/#fetch-missing

Fixes #170

* chore: use Node.js 20 instead
node18 is LTS as of today, but not supported in GitHub Actions, so using node20 instead as per actions/runner#2619 (comment).
  • Loading branch information
mxschmitt authored Sep 9, 2023
1 parent 53a5c23 commit a283f94
Show file tree
Hide file tree
Showing 8 changed files with 14,948 additions and 10,873 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checkin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 20
- name: Install dependencies
run: npm ci
- name: Run tests
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ branding:
icon: terminal
author: 'Max Schmitt'
runs:
using: 'node16'
using: 'node20'
main: 'lib/index.js'
post: 'lib/index.js'
post-if: '!cancelled()'
Expand Down
5 changes: 4 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@ module.exports = {
clearMocks: true,
testEnvironment: 'node',
verbose: true,
collectCoverage: true
collectCoverage: true,
transform: {
"^.+\\.(js)$": "babel-jest",
},
}
17,156 changes: 10,995 additions & 6,161 deletions lib/index.js

Large diffs are not rendered by default.

8,627 changes: 3,930 additions & 4,697 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@
"author": "Max Schmitt <max@schmitt.mx>",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.4.0",
"@actions/github": "^5.0.0",
"@actions/tool-cache": "^1.7.1",
"@octokit/rest": "^18.9.0"
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1",
"@actions/tool-cache": "^2.0.1",
"@octokit/rest": "^20.0.1"
},
"devDependencies": {
"@babel/core": "^7.15.0",
"@babel/preset-env": "^7.15.0",
"@vercel/ncc": "^0.33.3",
"babel-jest": "^27.0.6",
"jest": "^27.0.6",
"jest-circus": "^27.0.6"
"@babel/core": "^7.22.11",
"@babel/preset-env": "^7.22.14",
"@vercel/ncc": "^0.36.1",
"babel-jest": "^29.6.4",
"jest": "^29.6.4",
"jest-circus": "^29.6.4"
}
}
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export async function run() {
if (limitAccessToActor === "true" || limitAccessToActor === "auto") {
const { actor, apiUrl } = github.context
const auth = core.getInput('github-token')
const octokit = new Octokit({ auth, baseUrl: apiUrl })
const octokit = new Octokit({ auth, baseUrl: apiUrl, request: { fetch }});

const keys = await octokit.users.listPublicKeysForUser({
username: actor
Expand Down
7 changes: 6 additions & 1 deletion src/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ jest.mock("fs", () => ({
mkdirSync: () => true,
existsSync: () => true,
unlinkSync: () => true,
writeFileSync: () => true
writeFileSync: () => true,
promises: new Proxy({}, {
get: () => {
return () => true
}
})
}));
jest.mock('./helpers', () => {
const originalModule = jest.requireActual('./helpers');
Expand Down

0 comments on commit a283f94

Please sign in to comment.