Skip to content

Commit

Permalink
fix(#813): update tough-cookie to remove punycode deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
AnWeber committed Oct 27, 2024
1 parent b39a474 commit e457ab5
Show file tree
Hide file tree
Showing 12 changed files with 706 additions and 956 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## [unreleased]
### Features
- support client certificates on OAuth2 Requests (#802)
- update tough-cookie to remove punycode deprecation warning (#813)

## [6.15.1] ( 2024-08-22)
### Features
Expand Down
1,612 changes: 679 additions & 933 deletions package-lock.json

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,27 +70,27 @@
"@types/encodeurl": "^1.0.2",
"@types/eventsource": "^1.1.15",
"@types/inquirer": "^9.0.7",
"@types/jest": "^29.5.12",
"@types/jest": "^29.5.14",
"@types/lodash": "^4.17.7",
"@types/node": "^22.5.0",
"@types/node": "^22.8.1",
"@types/tough-cookie": "^4.0.5",
"@types/uuid": "^10.0.0",
"@types/ws": "^8.5.12",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"concurrently": "^8.2.2",
"esbuild": "^0.23.1",
"eslint": "^8.57.0",
"@typescript-eslint/eslint-plugin": "^8.11.0",
"@typescript-eslint/parser": "^8.11.0",
"concurrently": "^9.0.1",
"esbuild": "^0.24.0",
"eslint": "^8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"husky": "^9.1.5",
"husky": "^9.1.6",
"jest": "^29.7.0",
"lint-staged": "^15.2.9",
"lint-staged": "^15.2.10",
"lockfile-lint": "^4.14.0",
"mockttp": "^3.15.1",
"prettier": "^3.2.5",
"typescript": "^5.5.4"
"mockttp": "^3.15.3",
"prettier": "^3.3.3",
"typescript": "^5.6.3"
},
"dependencies": {
"@cloudamqp/amqp-client": "^2.1.1",
Expand Down Expand Up @@ -120,7 +120,7 @@
"mqtt": "^5.10.0",
"open": "^8.4.2",
"socks-proxy-agent": "^8.0.4",
"tough-cookie": "^4.1.4",
"tough-cookie": "^5.0.0",
"uuid": "^10.0.0",
"ws": "^8.18.0",
"xmldom-format": "^1.1.1",
Expand Down
2 changes: 1 addition & 1 deletion src/cli/initCliProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function initFileProvider(): void {
fileProvider.exists = async (path: models.PathLike): Promise<boolean> => {
try {
return !!(await fs.stat(fileProvider.toString(path)));
} catch (err) {
} catch {
return false;
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/dotenv/dotenvVariableProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ async function getEnvVariables(searchFiles: string[], dir: PathLike) {
const variables = parse(content);
vars.push(variables);
} catch (err) {
log.trace(`${fileProvider.toString(envFileName)} not found`);
log.trace(`${fileProvider.toString(envFileName)} not found`, err);
}
}
return vars;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/grpc/createGrpcService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface ServiceData {

export interface GrpcClient extends grpc.Client {
close(): void;
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
[key: string]: Function;
}

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/http/clientCertVariableReplacer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export async function addClientCertificateForUrl(
function createUrl(url: string): URL | undefined {
try {
return new URL(url);
} catch (err) {
} catch {
return undefined;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/http/cookieJarInterceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class CookieJarInterceptor implements HookInterceptor<[models.ProcessorCo
if (memoryStore && memoryStore instanceof MemoryCookieStore) {
memoryStore.getAllCookies((err, cookies) => {
if (!err) {
for (const cookie of cookies) {
for (const cookie of cookies || []) {
const cookieSession: CookieSession = {
id: `${this.getCookieStorePrefix(hookContext.args[0])}_${cookie.toString()}`,
title: `${cookie.domain} ${cookie.path} ${cookie.key}`,
Expand Down
5 changes: 3 additions & 2 deletions src/plugins/javascript/moduleUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function resolveModule(request: string, context: string): string | undefined {
try {
try {
resolvedPath = Module.createRequire(path.resolve(context, 'package.json')).resolve(request);
} catch (e) {
} catch {
resolvedPath = require.resolve(request, { paths: [context] });
}
} catch (e) {
Expand All @@ -30,12 +30,13 @@ export function loadModule<T>(request: string, context: string, force = false):
clearModule(request, context);
}
return Module.createRequire(path.resolve(context, 'package.json'))(request);
} catch (e) {
} catch {
const resolvedPath = resolveModule(request, context);
if (resolvedPath) {
if (force) {
clearRequireCache(resolvedPath);
}
// eslint-disable-next-line @typescript-eslint/no-require-imports
return require(resolvedPath);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/store/httpFileStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export class HttpFileStore implements models.HttpFileStore {
const envPluginLocation = process.env.HTTPYAC_PLUGIN;
if (envPluginLocation) {
try {
// eslint-disable-next-line @typescript-eslint/no-var-requires
// eslint-disable-next-line @typescript-eslint/no-require-imports
const envHook = require(envPluginLocation);
if (envHook.configureHooks) {
hooks.HTTPYAC_PLUGIN = envHook.configureHooks;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/configUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export async function parseJson<T>(fileName: PathLike): Promise<T | undefined> {
return JSON.parse(text);
}
} catch (err) {
io.log.debug(`json parse of ${fileName} failed`);
io.log.debug(`json parse of ${fileName} failed`, err);
}
return undefined;
}
Expand Down
4 changes: 3 additions & 1 deletion src/utils/requestClientUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ function toResponses(...responses: Array<models.HttpResponse | void | undefined>

function registerCancellation<T extends models.RequestClient>(client: T, context: models.ProcessorContext) {
if (context.progress?.register) {
return context.progress?.register(() => client.disconnect(new Error('user cancellation')));
return context.progress?.register(() => {
client.disconnect(new Error('user cancellation'));
});
}
return undefined;
}
Expand Down

0 comments on commit e457ab5

Please sign in to comment.