Skip to content

Commit

Permalink
feat: upgrade to Node version 20
Browse files Browse the repository at this point in the history
  • Loading branch information
novalex committed Jun 25, 2024
1 parent c9d35f4 commit 99aca1f
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ main_only: &main_only
defaults: &defaults
resource_class: small
docker:
- image: circleci/node:12
- image: cimg/node:20.11.1

jobs:
security-scans:
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12
20
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs 12.22.12
nodejs 20.11.1
3 changes: 0 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@ module.exports = {
testEnvironment: 'node',
collectCoverageFrom: ['lib/**/*.ts'],
coverageReporters: ['text-summary', 'html'],
moduleNameMapper: {
'^axios$': 'axios/dist/node/axios.cjs',
},
};
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"author": "Snyk Tech Services",
"license": "Apache-2.0",
"engines": {
"node": ">=12"
"node": ">=20"
},
"files": [
"bin",
Expand All @@ -42,7 +42,6 @@
"@gitbeaker/node": "35.7.0",
"@octokit/plugin-retry": "4.0.3",
"@octokit/rest": "19.0.5",
"@types/base-64": "^1.0.0",
"base-64": "^1.0.0",
"bottleneck": "2.19.5",
"bunyan": "1.8.15",
Expand All @@ -63,13 +62,14 @@
"devDependencies": {
"@octokit/types": "6.14.2",
"@semantic-release/exec": "5.0.0",
"@types/base-64": "^1.0.0",
"@types/bunyan": "1.8.6",
"@types/debug": "4.1.5",
"@types/jest": "^25.1.1",
"@types/jest": "^29.5.12",
"@types/lodash": "^4.14.149",
"@types/micromatch": "4.0.6",
"@types/needle": "2.0.4",
"@types/node": "14.14.45",
"@types/node": "^20.11.1",
"@types/parse-link-header": "1.0.0",
"@types/rimraf": "3.0.2",
"@types/split": "1.0.0",
Expand All @@ -78,13 +78,13 @@
"eslint": "7.30.0",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-check-file": "1.2.3",
"jest": "27.0.6",
"jest": "^29.7.0",
"nock": "^13.2.1",
"prettier": "2.7.1",
"semantic-release": "17.3.0",
"ts-jest": "27.0.3",
"ts-jest": "^29.1.5",
"tsc-watch": "^4.1.0",
"typescript": "4.3.5",
"typescript": "4.5",
"uuid": "9.0.0"
},
"pkg": {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/source-handlers/github/get-repo-metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { RepoMetaData, Target } from '../../types';
import { getGithubToken } from './get-github-token';
import { getGithubBaseUrl } from './github-base-url';

const githubClient = Octokit.plugin(retry);
const githubClient = Octokit.plugin(retry as any);
const debug = debugLib('snyk:get-github-defaultBranch-script');

export async function getGithubRepoMetaData(
Expand Down
2 changes: 1 addition & 1 deletion src/lib/source-handlers/github/list-repos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { getGithubBaseUrl } from './github-base-url';
import type { GithubRepoData } from './types';

const debug = debugLib('snyk:list-repos-script');
const githubClient = Octokit.plugin(retry);
const githubClient = Octokit.plugin(retry as any);

export async function fetchReposForPage(
octokit: Octokit,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/source-handlers/github/organization-is-empty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { fetchReposForPage } from './list-repos';
import { getGithubToken } from './get-github-token';

const debug = debugLib('snyk:github');
const githubClient = Octokit.plugin(retry);
const githubClient = Octokit.plugin(retry as any);

export async function githubOrganizationIsEmpty(
orgName: string,
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"declaration": true,
"importHelpers": true,
"strict": true,
"skipLibCheck": true
"skipLibCheck": true,
"useUnknownInCatchVariables": false
},
"include": ["./src/**/**/*"]
}

0 comments on commit 99aca1f

Please sign in to comment.