Skip to content

Commit f74277d

Browse files
authored
Merge pull request #175 from CleverCloud/chore/upgrade-dependencies
2 parents 6e570e6 + 8e7be42 commit f74277d

File tree

10 files changed

+554
-533
lines changed

10 files changed

+554
-533
lines changed

package-lock.json

Lines changed: 514 additions & 501 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -99,47 +99,47 @@
9999
"eventsource": "^4.0.0"
100100
},
101101
"devDependencies": {
102-
"@babel/parser": "^7.28.0",
103-
"@babel/traverse": "^7.28.0",
104-
"@babel/types": "^7.28.0",
102+
"@babel/parser": "^7.28.5",
103+
"@babel/traverse": "^7.28.5",
104+
"@babel/types": "^7.28.5",
105105
"@clevercloud/eslint-config": "^1.1.0",
106-
"@commitlint/cli": "^19.8.1",
107-
"@commitlint/config-conventional": "^19.8.1",
108-
"@eslint/compat": "^1.3.1",
109-
"@fastify/cors": "^11.0.1",
110-
"@inquirer/prompts": "^7.6.0",
106+
"@commitlint/cli": "^20.1.0",
107+
"@commitlint/config-conventional": "^20.0.0",
108+
"@eslint/compat": "^1.4.1",
109+
"@fastify/cors": "^11.1.0",
110+
"@inquirer/prompts": "^7.10.1",
111111
"@rollup-extras/plugin-clean": "^1.3.9",
112112
"@rollup/plugin-terser": "^0.4.4",
113-
"@scalar/openapi-parser": "^0.18.1",
114-
"@scalar/openapi-types": "^0.3.5",
115-
"@scalar/types": "^0.2.7",
116-
"@types/babel__traverse": "^7.20.7",
117-
"@types/chai": "^5.2.2",
113+
"@scalar/openapi-parser": "^0.23.2",
114+
"@scalar/openapi-types": "^0.5.1",
115+
"@scalar/types": "^0.4.0",
116+
"@types/babel__traverse": "^7.28.0",
117+
"@types/chai": "^5.2.3",
118118
"@types/component-emitter": "^1.2.14",
119119
"@types/eventsource": "^1.1.15",
120120
"@types/fs-extra": "^11.0.4",
121121
"@types/mocha": "^10.0.10",
122122
"@web/test-runner": "^0.20.2",
123123
"babel-plugin-dynamic-import-node": "^2.3.3",
124-
"chai": "^5.2.0",
124+
"chai": "^6.2.1",
125125
"change-case": "^5.4.4",
126126
"cheerio": "^1.1.2",
127127
"cookie": "^1.0.2",
128-
"eslint": "^9.30.1",
129-
"fastify": "^5.4.0",
128+
"eslint": "^9.39.1",
129+
"fastify": "^5.6.2",
130130
"find-free-ports": "^3.1.1",
131-
"fs-extra": "^11.3.0",
132-
"globals": "^16.3.0",
131+
"fs-extra": "^11.3.2",
132+
"globals": "^16.5.0",
133133
"hanbi": "^2.0.0",
134134
"koa-proxies": "^0.12.4",
135-
"mocha": "^11.7.1",
135+
"mocha": "^11.7.5",
136136
"prettier": "^3.6.2",
137-
"prettier-plugin-organize-imports": "^4.1.0",
138-
"rollup-plugin-dts": "^6.2.1",
137+
"prettier-plugin-organize-imports": "^4.3.0",
138+
"rollup-plugin-dts": "^6.2.3",
139139
"safe-stringify": "^1.2.0",
140-
"tinyglobby": "^0.2.14",
141-
"totp-generator": "^1.0.0",
142-
"typescript": "^5.8.3"
140+
"tinyglobby": "^0.2.15",
141+
"totp-generator": "^2.0.0",
142+
"typescript": "^5.9.3"
143143
},
144144
"volta": {
145145
"node": "22.7.0"

tasks/api-usage-analyze.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import path from 'node:path';
2+
// todo: remove that when we use a version of Node.js >= 23.5.0 (we can ignore because the feature was backported to version 22.13.0)
3+
// eslint-disable-next-line n/no-unsupported-features/node-builtins
24
import { styleText } from 'node:util';
35
import { globSync } from 'tinyglobby';
46
import { getApiCalls, sortAndGroupByCall } from './lib/api-analyze.js';

tasks/endpoints-analyze.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
*/
44
import fs from 'fs-extra';
55
import path from 'node:path';
6+
// todo: remove that when we use a version of Node.js >= 23.5.0 (we can ignore because the feature was backported to version 22.13.0)
7+
// eslint-disable-next-line n/no-unsupported-features/node-builtins
68
import { styleText } from 'node:util';
79
import { SOURCES, WORKING_DIR } from './lib/config.js';
810
import { compareEndpoints, generateJsonReport, generateMarkdownReport } from './lib/endpoint-compare.js';

tasks/endpoints-generate.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
*/
44
import fs from 'node:fs';
55
import path from 'node:path';
6+
// todo: remove that when we use a version of Node.js >= 23.5.0 (we can ignore because the feature was backported to version 22.13.0)
7+
// eslint-disable-next-line n/no-unsupported-features/node-builtins
68
import { styleText } from 'node:util';
79
import { SOURCES, SRC_DIR, WORKING_DIR } from './lib/config.js';
810
import { generateCommand } from './lib/endpoint-generate.js';

tasks/endpoints-list.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
*/
44
import fs from 'fs-extra';
55
import path from 'node:path';
6+
// todo: remove that when we use a version of Node.js >= 23.5.0 (we can ignore because the feature was backported to version 22.13.0)
7+
// eslint-disable-next-line n/no-unsupported-features/node-builtins
68
import { styleText } from 'node:util';
79
import { SOURCES, WORKING_DIR } from './lib/config.js';
810
import { flattenEndpointsBySourceTarget, parseCommandsList, storeCommandsList } from './lib/endpoint-list.js';

test/e2e/clients/cc-api/commands/auth-commands.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ describe('auth commands', function () {
4747

4848
it('should confirm mfa', async () => {
4949
const response = await support.client.send(new CreateAuthMfaCommand({ kind: 'TOTP', password: support.password }));
50-
const mfaCode = TOTP.generate(new URL(response.url).searchParams.get('secret')).otp;
50+
const mfaCode = (await TOTP.generate(new URL(response.url).searchParams.get('secret'))).otp;
5151

5252
// confirm MFA
5353
const confirmResponse = await support.client.send(
@@ -92,7 +92,7 @@ describe('auth commands', function () {
9292
const response = await support.client.send(new CreateAuthMfaCommand({ kind: 'TOTP', password: support.password }));
9393

9494
// generate OTP
95-
const mfaCode = TOTP.generate(new URL(response.url).searchParams.get('secret')).otp;
95+
const mfaCode = (await TOTP.generate(new URL(response.url).searchParams.get('secret'))).otp;
9696

9797
// confirm MFA
9898
await support.client.send(

test/e2e/clients/cc-api/commands/invoice-commands.spec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ describe('invoice commands', function () {
5454
it('should get invoice as PDF', async () => {
5555
const data = await support.client.send(new GetInvoicePdfCommand({ ownerId: support.userId, invoiceNumber }));
5656
const arrayBuffer = await data.arrayBuffer();
57-
const buffer = Buffer.from(arrayBuffer);
58-
(await import('node:fs')).writeFileSync('/tmp/test.pdf', buffer);
57+
(await import('node:fs')).writeFileSync('/tmp/test.pdf', new DataView(arrayBuffer));
5958
});
6059
}
6160

test/lib/login.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ async function loginUser(user) {
4545
let mfaCode;
4646
const requiresMfa = await oauthDance.postSessionsLogin(user.email, user.password);
4747
if (requiresMfa) {
48-
mfaCode = TOTP.generate(user.totpSecret).otp;
48+
mfaCode = (await TOTP.generate(user.totpSecret)).otp;
4949
await oauthDance.postSessionsMfaLogin(mfaCode);
5050
}
5151
await timers.setTimeout(1000);

test/lib/mock-api/mock-server.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ export async function startServer() {
5050
});
5151
adminServer.setErrorHandler((error, request, reply) => {
5252
request.log.error(error);
53-
const statusCode = error.statusCode ?? 500;
54-
const code = error.code ?? 'unknown';
55-
const message = error.message ?? 'Unknown error';
53+
const err = /** @type {any} */ (error);
54+
const statusCode = err.statusCode ?? 500;
55+
const code = err.code ?? 'unknown';
56+
const message = err.message ?? 'Unknown error';
5657
reply.status(statusCode).send({ code, message });
5758
});
5859

0 commit comments

Comments
 (0)