mirror of
https://github.com/jdalrymple/gitbeaker.git
synced 2026-01-18 15:55:30 +00:00
Update dependencies to address security alerts (#3799)
This commit is contained in:
parent
8e9bcd9f70
commit
6b7e85e4e9
@ -5,7 +5,7 @@ plugins:
|
||||
- released
|
||||
- first-time-contributor
|
||||
- all-contributors
|
||||
- ./scripts/auto-before-commit-changelog-plugin.js
|
||||
- ./scripts/auto-before-commit-changelog-plugin.cjs
|
||||
- - omit-release-notes
|
||||
- username:
|
||||
- coqbot
|
||||
|
||||
@ -29,7 +29,7 @@ executors:
|
||||
|
||||
playwright-executor:
|
||||
docker:
|
||||
- image: mcr.microsoft.com/playwright:v1.55.1-noble
|
||||
- image: mcr.microsoft.com/playwright:v1.56.1-noble
|
||||
resource_class: medium
|
||||
working_directory: ~/project
|
||||
|
||||
@ -467,7 +467,10 @@ jobs:
|
||||
|
||||
labels=$(yarn auto label --pr $PR_NUMBER)
|
||||
if [[ "$labels" =~ "release:canary" ]]; then
|
||||
echo "Found release:canary label - proceeding with canary release"
|
||||
yarn release:canary
|
||||
else
|
||||
echo "No release:canary label found - skipping canary release"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
node_modules
|
||||
npm-debug.log
|
||||
dist
|
||||
coverage
|
||||
reports
|
||||
.rpt2_cache
|
||||
.idea
|
||||
.DS_Store
|
||||
yarn-error.log
|
||||
.env
|
||||
.npmrc
|
||||
scripts
|
||||
.yarn
|
||||
.nx
|
||||
.husky
|
||||
102
.eslintrc.yml
102
.eslintrc.yml
@ -1,102 +0,0 @@
|
||||
root: true
|
||||
|
||||
env:
|
||||
browser: true
|
||||
jest/globals: true
|
||||
|
||||
globals:
|
||||
page: true
|
||||
browser: true
|
||||
context: true
|
||||
|
||||
extends:
|
||||
- airbnb-base
|
||||
- plugin:@typescript-eslint/recommended
|
||||
- plugin:@typescript-eslint/recommended-requiring-type-checking
|
||||
- plugin:prettier/recommended
|
||||
- plugin:jest/recommended
|
||||
|
||||
parser: '@typescript-eslint/parser'
|
||||
|
||||
parserOptions:
|
||||
project:
|
||||
- './tsconfig.json'
|
||||
|
||||
plugins:
|
||||
- '@typescript-eslint'
|
||||
- prettier
|
||||
- import
|
||||
- jest
|
||||
- jest-extended
|
||||
|
||||
rules:
|
||||
import/no-default-export: off
|
||||
import/prefer-default-export: off
|
||||
import/no-extraneous-dependencies:
|
||||
- error
|
||||
- devDependencies:
|
||||
- '**/*.config.ts'
|
||||
- '**/scripts/*.[tj]s'
|
||||
- '**/test/**/*.ts'
|
||||
import/extensions:
|
||||
- error
|
||||
- ignorePackages
|
||||
- js: never
|
||||
ts: never
|
||||
json: always
|
||||
|
||||
no-shadow: off
|
||||
'@typescript-eslint/no-shadow': error
|
||||
'@typescript-eslint/dot-notation': error
|
||||
'@typescript-eslint/no-unsafe-member-access': off
|
||||
'@typescript-eslint/no-unsafe-return': off
|
||||
'@typescript-eslint/no-unsafe-assignment': off
|
||||
'@typescript-eslint/no-unsafe-call': off
|
||||
'@typescript-eslint/no-explicit-any': off
|
||||
'@typescript-eslint/no-unsafe-declaration-merging': off # For all the template extensions
|
||||
'@typescript-eslint/no-unused-vars':
|
||||
- error
|
||||
- ignoreRestSiblings: true
|
||||
|
||||
camelcase:
|
||||
- error
|
||||
|
||||
sort-imports:
|
||||
- error
|
||||
- ignoreCase: false
|
||||
ignoreDeclarationSort: true
|
||||
ignoreMemberSort: false
|
||||
memberSyntaxSortOrder:
|
||||
- none
|
||||
- all
|
||||
- multiple
|
||||
- single
|
||||
allowSeparatedGroups: true
|
||||
|
||||
overrides:
|
||||
- files:
|
||||
- '**/*.ts'
|
||||
rules:
|
||||
camelcase: off
|
||||
|
||||
- files:
|
||||
- '**/test/**/*.ts'
|
||||
plugins:
|
||||
- jest
|
||||
|
||||
rules:
|
||||
'@typescript-eslint/unbound-method': off
|
||||
'@typescript-eslint/no-var-requires': off
|
||||
global-require: off
|
||||
jest/no-mocks-import: off
|
||||
jest/unbound-method: error
|
||||
max-classes-per-file: off
|
||||
|
||||
- files:
|
||||
- '**/__mocks__/**/*.ts'
|
||||
rules:
|
||||
import/no-default-export: 'off'
|
||||
|
||||
settings:
|
||||
import/resolver:
|
||||
typescript:
|
||||
File diff suppressed because one or more lines are too long
@ -1,3 +1,3 @@
|
||||
nodeLinker: node-modules
|
||||
|
||||
yarnPath: .yarn/releases/yarn-4.10.3.cjs
|
||||
yarnPath: .yarn/releases/yarn-4.11.0.cjs
|
||||
|
||||
142
eslint.config.mjs
Normal file
142
eslint.config.mjs
Normal file
@ -0,0 +1,142 @@
|
||||
import js from '@eslint/js';
|
||||
import typescript from '@typescript-eslint/eslint-plugin';
|
||||
import tsParser from '@typescript-eslint/parser';
|
||||
import importPlugin from 'eslint-plugin-import';
|
||||
import jest from 'eslint-plugin-jest';
|
||||
import jestExtended from 'eslint-plugin-jest-extended';
|
||||
import prettierConfig from 'eslint-config-prettier';
|
||||
import globals from 'globals';
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: [
|
||||
'node_modules/**',
|
||||
'dist/**',
|
||||
'coverage/**',
|
||||
'reports/**',
|
||||
'.rpt2_cache/**',
|
||||
'.idea/**',
|
||||
'.DS_Store',
|
||||
'yarn-error.log',
|
||||
'.env',
|
||||
'.npmrc',
|
||||
'scripts/**',
|
||||
'.yarn/**',
|
||||
'.nx/**',
|
||||
'.husky/**',
|
||||
],
|
||||
},
|
||||
js.configs.recommended,
|
||||
{
|
||||
files: ['**/*.{js,mjs,cjs,ts}'],
|
||||
languageOptions: {
|
||||
parser: tsParser,
|
||||
parserOptions: {
|
||||
project: ['./packages/*/tsconfig.json'],
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
},
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node,
|
||||
NodeJS: 'readonly',
|
||||
page: true,
|
||||
context: true,
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
'@typescript-eslint': typescript,
|
||||
import: importPlugin,
|
||||
'jest-extended': jestExtended,
|
||||
},
|
||||
rules: {
|
||||
...typescript.configs.recommended.rules,
|
||||
...typescript.configs['recommended-requiring-type-checking'].rules,
|
||||
...prettierConfig.rules,
|
||||
|
||||
// Import rules
|
||||
'import/no-default-export': 'off',
|
||||
'import/prefer-default-export': 'off',
|
||||
'import/no-extraneous-dependencies': [
|
||||
'error',
|
||||
{
|
||||
devDependencies: ['**/*.config.ts', '**/scripts/*.[tj]s', '**/test/**/*.ts'],
|
||||
},
|
||||
],
|
||||
'import/extensions': [
|
||||
'error',
|
||||
'ignorePackages',
|
||||
{
|
||||
js: 'never',
|
||||
ts: 'never',
|
||||
json: 'always',
|
||||
},
|
||||
],
|
||||
|
||||
// TypeScript rules
|
||||
'no-shadow': 'off',
|
||||
'@typescript-eslint/no-shadow': 'error',
|
||||
'@typescript-eslint/dot-notation': 'error',
|
||||
'@typescript-eslint/no-unsafe-member-access': 'off',
|
||||
'@typescript-eslint/no-unsafe-return': 'off',
|
||||
'@typescript-eslint/no-unsafe-assignment': 'off',
|
||||
'@typescript-eslint/no-unsafe-call': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'@typescript-eslint/no-unsafe-declaration-merging': 'off',
|
||||
'@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }],
|
||||
|
||||
// General rules
|
||||
camelcase: 'error',
|
||||
'no-redeclare': 'off',
|
||||
'@typescript-eslint/no-redeclare': 'off',
|
||||
'sort-imports': [
|
||||
'error',
|
||||
{
|
||||
ignoreCase: false,
|
||||
ignoreDeclarationSort: true,
|
||||
ignoreMemberSort: false,
|
||||
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
|
||||
allowSeparatedGroups: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
settings: {
|
||||
'import/resolver': {
|
||||
typescript: {},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['**/*.ts'],
|
||||
rules: {
|
||||
camelcase: 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['**/test/**/*.ts'],
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.jest,
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
jest,
|
||||
},
|
||||
rules: {
|
||||
...jest.configs.recommended.rules,
|
||||
'@typescript-eslint/unbound-method': 'off',
|
||||
'@typescript-eslint/no-var-requires': 'off',
|
||||
'global-require': 'off',
|
||||
'jest/no-mocks-import': 'off',
|
||||
'jest/unbound-method': 'error',
|
||||
'max-classes-per-file': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['**/__mocks__/**/*.ts'],
|
||||
rules: {
|
||||
'import/no-default-export': 'off',
|
||||
},
|
||||
},
|
||||
];
|
||||
49
package.json
49
package.json
@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "gitbeaker",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"repository": "github:jdalrymple/gitbeaker",
|
||||
"bugs": {
|
||||
@ -11,7 +12,8 @@
|
||||
],
|
||||
"resolutions": {
|
||||
"all-contributors-cli": "6.26.1",
|
||||
"socks-proxy-agent": "8.0.5"
|
||||
"socks-proxy-agent": "8.0.5",
|
||||
"tar": "^7.5.2"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "nx run-many --target=build",
|
||||
@ -38,37 +40,38 @@
|
||||
"types": "^0.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@auto-it/all-contributors": "^11.3.0",
|
||||
"@auto-it/core": "^11.3.0",
|
||||
"@auto-it/first-time-contributor": "^11.3.0",
|
||||
"@auto-it/omit-commits": "^11.3.0",
|
||||
"@auto-it/omit-release-notes": "^11.3.0",
|
||||
"@auto-it/released": "^11.3.0",
|
||||
"@codecov/bundle-analyzer": "^1.0.0",
|
||||
"@swc/core": "^1.13.5",
|
||||
"@auto-it/all-contributors": "^11.3.6",
|
||||
"@auto-it/core": "^11.3.6",
|
||||
"@auto-it/first-time-contributor": "^11.3.6",
|
||||
"@auto-it/omit-commits": "^11.3.6",
|
||||
"@auto-it/omit-release-notes": "^11.3.6",
|
||||
"@auto-it/released": "^11.3.6",
|
||||
"@codecov/bundle-analyzer": "^1.9.1",
|
||||
"@swc/core": "^1.15.2",
|
||||
"@swc/jest": "^0.2.39",
|
||||
"@types/jest": "^30.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.41.0",
|
||||
"@typescript-eslint/parser": "^8.41.0",
|
||||
"auto": "^11.3.0",
|
||||
"eslint": "^8.57.1",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.4",
|
||||
"@typescript-eslint/parser": "^8.46.4",
|
||||
"auto": "^11.3.6",
|
||||
"eslint": "^9.39.1",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-config-prettier": "^9.1.2",
|
||||
"eslint-import-resolver-typescript": "^4.4.4",
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
"eslint-plugin-jest": "^29.0.1",
|
||||
"eslint-plugin-jest-extended": "^3.0.0",
|
||||
"eslint-plugin-jest": "^29.1.0",
|
||||
"eslint-plugin-jest-extended": "^3.0.1",
|
||||
"eslint-plugin-prettier": "^5.5.4",
|
||||
"globals": "^16.5.0",
|
||||
"husky": "^9.1.7",
|
||||
"jest": "^30.1.2",
|
||||
"jest-extended": "^6.0.0",
|
||||
"jest": "^30.2.0",
|
||||
"jest-extended": "^7.0.0",
|
||||
"jest-junit": "^16.0.0",
|
||||
"lerna": "^8.2.3",
|
||||
"lint-staged": "^16.1.6",
|
||||
"nx": "^21.4.1",
|
||||
"lerna": "^9.0.1",
|
||||
"lint-staged": "^16.2.6",
|
||||
"nx": "^22.0.3",
|
||||
"prettier": "^3.6.2",
|
||||
"tsup": "^8.5.0",
|
||||
"typescript": "^5.9.2"
|
||||
"tsup": "^8.5.1",
|
||||
"typescript": "^5.9.3"
|
||||
},
|
||||
"packageManager": "yarn@4.10.3"
|
||||
"packageManager": "yarn@4.11.0"
|
||||
}
|
||||
|
||||
@ -41,12 +41,12 @@
|
||||
"dependencies": {
|
||||
"@gitbeaker/core": "^43.8.0",
|
||||
"@gitbeaker/rest": "^43.8.0",
|
||||
"chalk": "^5.6.0",
|
||||
"chalk": "^5.6.2",
|
||||
"sywac": "^1.3.0",
|
||||
"xcase": "^2.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"tsup": "^8.5.0",
|
||||
"typescript": "^5.9.2"
|
||||
"tsup": "^8.5.1",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import Chalk from 'chalk';
|
||||
import Sywac from 'sywac';
|
||||
import * as Gitbeaker from '@gitbeaker/rest';
|
||||
import API_MAP from '@gitbeaker/core/map.json' with { type: 'json' }; // eslint-disable-line import/no-unresolved
|
||||
import API_MAP from '@gitbeaker/core/map.json' with { type: 'json' };
|
||||
import {
|
||||
buildArgumentObjects,
|
||||
getCLISafeNormalizedTerm,
|
||||
|
||||
@ -57,9 +57,9 @@
|
||||
"xcase": "^2.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^24.3.0",
|
||||
"tsup": "^8.5.0",
|
||||
"tsx": "^4.20.5",
|
||||
"typescript": "^5.9.2"
|
||||
"@types/node": "^24.10.1",
|
||||
"tsup": "^8.5.1",
|
||||
"tsx": "^4.20.6",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,7 +85,6 @@ export function parseLinkHeader(linkString: string): { next?: string; prev?: str
|
||||
const regex = /<([^>]+)>; rel="([^"]+)"/g;
|
||||
let m: RegExpExecArray | null;
|
||||
|
||||
// eslint-disable-next-line
|
||||
while ((m = regex.exec(linkString))) {
|
||||
const [, v, k] = m;
|
||||
output[k] = v;
|
||||
|
||||
@ -186,7 +186,7 @@ describe('API Map', () => {
|
||||
'Users',
|
||||
'UserSSHKeys',
|
||||
];
|
||||
// eslint-disable-next-line
|
||||
|
||||
const map: Record<string, unknown> = await import('../../dist/map.json');
|
||||
|
||||
expect(map).toBeObject();
|
||||
|
||||
@ -356,8 +356,8 @@ describe('RequestHelper.get()', () => {
|
||||
Promise.resolve({
|
||||
status: 200,
|
||||
body: [
|
||||
{ id: 3, gravatar_enable: true }, // eslint-disable-line
|
||||
{ id: 4, gravatar_enable: false }, // eslint-disable-line
|
||||
{ id: 3, gravatar_enable: true },
|
||||
{ id: 4, gravatar_enable: false },
|
||||
],
|
||||
headers: {},
|
||||
}),
|
||||
@ -394,7 +394,7 @@ describe('RequestHelper.get()', () => {
|
||||
|
||||
const results = await specialService.show();
|
||||
|
||||
expect(results).toMatchObject({ id: 3, gravatar_enable: true }); // eslint-disable-line
|
||||
expect(results).toMatchObject({ id: 3, gravatar_enable: true });
|
||||
});
|
||||
|
||||
it('should return a stream if asStream is passed', async () => {
|
||||
|
||||
@ -49,13 +49,13 @@
|
||||
"dependencies": {
|
||||
"picomatch-browser": "^2.2.6",
|
||||
"qs": "^6.14.0",
|
||||
"rate-limiter-flexible": "^8.0.1",
|
||||
"rate-limiter-flexible": "^8.2.1",
|
||||
"xcase": "^2.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^24.3.0",
|
||||
"@types/node": "^24.10.1",
|
||||
"@types/qs": "^6.14.0",
|
||||
"tsup": "^8.5.0",
|
||||
"typescript": "^5.9.2"
|
||||
"tsup": "^8.5.1",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
/* eslint-disable max-classes-per-file */
|
||||
export class GitbeakerRequestError extends Error {
|
||||
readonly cause?: {
|
||||
description: string;
|
||||
|
||||
@ -179,13 +179,13 @@ describe('Creation of BaseResource instance', () => {
|
||||
expect(() => {
|
||||
// eslint-disable-next-line
|
||||
// @ts-ignore
|
||||
new BaseResource(); // eslint-disable-line
|
||||
new BaseResource();
|
||||
}).toThrow();
|
||||
|
||||
expect(() => {
|
||||
// eslint-disable-next-line
|
||||
// @ts-ignore
|
||||
new BaseResource({}); // eslint-disable-line
|
||||
new BaseResource({});
|
||||
}).toThrow();
|
||||
});
|
||||
|
||||
|
||||
@ -140,9 +140,7 @@ describe('createInstance', () => {
|
||||
const testEndpoint = 'test endpoint';
|
||||
const requester = createRequesterFn(optionsHandler, requestHandler)(serviceOptions);
|
||||
|
||||
// eslint-disable-next-line
|
||||
for (const m of methods) {
|
||||
// eslint-disable-next-line
|
||||
await requester[m](testEndpoint, {});
|
||||
|
||||
expect(optionsHandler).toHaveBeenCalledWith(
|
||||
|
||||
@ -58,9 +58,9 @@
|
||||
"@gitbeaker/requester-utils": "^43.8.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.55.0",
|
||||
"@types/node": "^24.3.0",
|
||||
"tsup": "^8.5.0",
|
||||
"typescript": "^5.9.2"
|
||||
"@playwright/test": "^1.56.1",
|
||||
"@types/node": "^24.10.1",
|
||||
"tsup": "^8.5.1",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ async function parseResponse(response: Response, asStream = false) {
|
||||
if (asStream) {
|
||||
body = response.body;
|
||||
} else {
|
||||
body = status === 204 ? null : await processBody(response); // eslint-disable-line
|
||||
body = status === 204 ? null : await processBody(response);
|
||||
}
|
||||
|
||||
return { body, headers, status };
|
||||
@ -95,7 +95,6 @@ export async function defaultRequestHandler(endpoint: string, options?: RequestO
|
||||
// CHECKME: https://github.com/nodejs/undici/issues/1305
|
||||
const mode = getConditionalMode(endpoint);
|
||||
|
||||
/* eslint-disable no-await-in-loop */
|
||||
for (let i = 0; i < maxRetries; i += 1) {
|
||||
const request = new Request(url, { ...opts, method, mode });
|
||||
const fetchArgs: [Request, RequestInit?] = [request];
|
||||
@ -120,10 +119,8 @@ export async function defaultRequestHandler(endpoint: string, options?: RequestO
|
||||
lastStatus = response.status;
|
||||
await delay(2 ** i * 0.25);
|
||||
|
||||
// eslint-disable-next-line
|
||||
continue;
|
||||
}
|
||||
/* eslint-enable */
|
||||
|
||||
throw new GitbeakerRetryError(
|
||||
`Could not successfully complete this request after ${maxRetries} retries, last status code: ${lastStatus}. ${lastStatus === 429 ? 'Check the applicable rate limits for this endpoint' : 'Verify the status of the endpoint'}.`,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user