From 037d2fabb00ac40eade76c48f54f9ed84fe795ef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 Nov 2023 18:12:28 +0530 Subject: [PATCH] chore(deps): bump axios from 0.27.2 to 1.6.0 in /app/client (#28776) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [axios](https://github.com/axios/axios) from 0.27.2 to 1.6.0.
Release notes

Sourced from axios's releases.

Release v1.6.0

Release notes:

Bug Fixes

PRs


⚠️ Critical vulnerability fix. See
https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459

Contributors to this release

Release v1.5.1

Release notes:

Bug Fixes

Contributors to this release

Release v1.5.0

Release notes:

Bug Fixes

Features

... (truncated)

Changelog

Sourced from axios's changelog.

1.6.0 (2023-10-26)

Bug Fixes

PRs


⚠️ Critical vulnerability fix. See
https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459

Contributors to this release

1.5.1 (2023-09-26)

Bug Fixes

Contributors to this release

PRs


⚠️ Critical vulnerability fix. See
https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459

1.5.0 (2023-08-26)

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=axios&package-manager=npm_and_yarn&previous-version=0.27.2&new-version=1.6.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/appsmithorg/appsmith/network/alerts).
--------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Hetu Nandu Co-authored-by: Hetu Nandu --- app/client/jest.config.js | 2 +- app/client/package.json | 2 +- app/client/packages/rts/package.json | 2 +- app/client/src/ce/api/ApiUtils.test.ts | 1 - app/client/src/ce/api/ApplicationApi.tsx | 6 ++--- app/client/src/ce/api/WorkspaceApi.ts | 4 ++-- app/client/src/constants/WidgetValidation.ts | 2 +- app/client/src/pages/workspace/General.tsx | 17 ++++++++------ app/client/yarn.lock | 24 ++++++-------------- 9 files changed, 26 insertions(+), 34 deletions(-) diff --git a/app/client/jest.config.js b/app/client/jest.config.js index 7006556898..956fb7d66d 100644 --- a/app/client/jest.config.js +++ b/app/client/jest.config.js @@ -17,7 +17,7 @@ module.exports = { moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node", "css"], moduleDirectories: ["node_modules", "src", "test"], transformIgnorePatterns: [ - "/node_modules/(?!codemirror|konva|design-system|design-system-old|react-dnd|dnd-core|@babel|(@blueprintjs)|@github|lodash-es|@draft-js-plugins|react-documents|linkedom|assert-never)", + "/node_modules/(?!codemirror|konva|design-system|design-system-old|react-dnd|dnd-core|@babel|(@blueprintjs)|@github|lodash-es|@draft-js-plugins|react-documents|linkedom|assert-never|axios)", ], moduleNameMapper: { "\\.(css|less)$": "/test/__mocks__/styleMock.js", diff --git a/app/client/package.json b/app/client/package.json index a4ba2951e2..7af371cb91 100644 --- a/app/client/package.json +++ b/app/client/package.json @@ -93,7 +93,7 @@ "algoliasearch": "^4.2.0", "assert-never": "^1.2.1", "astring": "^1.7.5", - "axios": "^0.27.2", + "axios": "^1.6.0", "classnames": "^2.3.1", "clsx": "^1.2.1", "codemirror": "^5.65.13", diff --git a/app/client/packages/rts/package.json b/app/client/packages/rts/package.json index 2cd7b4a801..b3da388e40 100644 --- a/app/client/packages/rts/package.json +++ b/app/client/packages/rts/package.json @@ -18,7 +18,7 @@ "@babel/runtime": "^7.21.0", "@shared/ast": "workspace:^", "astravel": "^0.6.1", - "axios": "^1.2.0", + "axios": "^1.6.0", "escodegen": "^2.0.0", "express": "^4.18.2", "express-validator": "^6.14.2", diff --git a/app/client/src/ce/api/ApiUtils.test.ts b/app/client/src/ce/api/ApiUtils.test.ts index 3fe3b5cd4e..8a47b2a81a 100644 --- a/app/client/src/ce/api/ApiUtils.test.ts +++ b/app/client/src/ce/api/ApiUtils.test.ts @@ -30,7 +30,6 @@ describe("axios api interceptors", () => { const response: AxiosResponse = { data: "Test data", headers: { - // @ts-expect-error: content-length should be string "content-length": 123, "content-type": "application/json", }, diff --git a/app/client/src/ce/api/ApplicationApi.tsx b/app/client/src/ce/api/ApplicationApi.tsx index 23aeb001ec..e9b6a0674b 100644 --- a/app/client/src/ce/api/ApplicationApi.tsx +++ b/app/client/src/ce/api/ApplicationApi.tsx @@ -1,6 +1,6 @@ import Api from "api/Api"; import type { ApiResponse } from "api/ApiResponses"; -import type { AxiosPromise } from "axios"; +import type { AxiosProgressEvent, AxiosPromise } from "axios"; import type { AppColorCode } from "constants/DefaultTheme"; import type { IconNames } from "design-system"; import type { AppLayoutConfig } from "reducers/entityReducers/pageListReducer"; @@ -179,7 +179,7 @@ export interface FetchUnconfiguredDatasourceListResponse extends ApiResponse { export interface ImportApplicationRequest { workspaceId: string; applicationFile?: File; - progress?: (progressEvent: ProgressEvent) => void; + progress?: (progressEvent: AxiosProgressEvent) => void; onSuccessCallback?: () => void; appId?: string; } @@ -250,7 +250,7 @@ export interface exportApplicationRequest { export interface ImportPartialApplicationRequest { workspaceId: string; applicationFile: File; - progress?: (progressEvent: ProgressEvent) => void; + progress?: (progressEvent: AxiosProgressEvent) => void; onSuccessCallback?: () => void; applicationId: string; pageId: string; diff --git a/app/client/src/ce/api/WorkspaceApi.ts b/app/client/src/ce/api/WorkspaceApi.ts index c81fa9e032..20a26cb92a 100644 --- a/app/client/src/ce/api/WorkspaceApi.ts +++ b/app/client/src/ce/api/WorkspaceApi.ts @@ -1,4 +1,4 @@ -import type { AxiosPromise } from "axios"; +import type { AxiosProgressEvent, AxiosPromise } from "axios"; import Api from "api/Api"; import type { ApiResponse } from "api/ApiResponses"; import type { @@ -59,7 +59,7 @@ export interface SaveWorkspaceRequest { export interface SaveWorkspaceLogo { id: string; logo: File; - progress: (progressEvent: ProgressEvent) => void; + progress: (progressEvent: AxiosProgressEvent) => void; } export interface CreateWorkspaceRequest { diff --git a/app/client/src/constants/WidgetValidation.ts b/app/client/src/constants/WidgetValidation.ts index 570aef722e..48dc2de442 100644 --- a/app/client/src/constants/WidgetValidation.ts +++ b/app/client/src/constants/WidgetValidation.ts @@ -288,7 +288,7 @@ export const DEDICATED_WORKER_GLOBAL_SCOPE_IDENTIFIERS = { PermissionStatus: "PermissionStatus", Permissions: "Permissions", postMessage: "postMessage", - ProgressEvent: "ProgressEvent", + AxiosProgressEvent: "AxiosProgressEvent", Promise: "Promise", PromiseRejectionEvent: "PromiseRejectionEvent", Proxy: "Proxy", diff --git a/app/client/src/pages/workspace/General.tsx b/app/client/src/pages/workspace/General.tsx index 48f5ac43cf..9a912cd269 100644 --- a/app/client/src/pages/workspace/General.tsx +++ b/app/client/src/pages/workspace/General.tsx @@ -21,6 +21,7 @@ import { FilePickerV2, FileType, Text, TextType } from "design-system-old"; import { Classes } from "@blueprintjs/core"; import { getIsFetchingApplications } from "@appsmith/selectors/applicationSelectors"; import { useMediaQuery } from "react-responsive"; +import type { AxiosProgressEvent } from "axios"; // This wrapper ensures that the scroll behaviour is consistent with the other tabs const ScrollWrapper = styled.div` @@ -147,14 +148,16 @@ export function GeneralSettings() { setProgress: SetProgress, onUpload: UploadCallback, ) => { - const progress = (progressEvent: ProgressEvent) => { - const uploadPercentage = Math.round( - (progressEvent.loaded / progressEvent.total) * 100, - ); - if (uploadPercentage === 100) { - onUpload(currentWorkspace.logoUrl || ""); + const progress = (progressEvent: AxiosProgressEvent) => { + if (progressEvent.total) { + const uploadPercentage = Math.round( + (progressEvent.loaded / progressEvent.total) * 100, + ); + if (uploadPercentage === 100) { + onUpload(currentWorkspace.logoUrl || ""); + } + setProgress(uploadPercentage); } - setProgress(uploadPercentage); }; dispatch( diff --git a/app/client/yarn.lock b/app/client/yarn.lock index 9bc423114d..4a8d2fc426 100644 --- a/app/client/yarn.lock +++ b/app/client/yarn.lock @@ -12224,7 +12224,7 @@ __metadata: "@types/express": ^4.17.14 "@types/jest": ^29.2.3 astravel: ^0.6.1 - axios: ^1.2.0 + axios: ^1.6.0 esbuild: ^0.19.4 escodegen: ^2.0.0 express: ^4.18.2 @@ -12353,7 +12353,7 @@ __metadata: algoliasearch: ^4.2.0 assert-never: ^1.2.1 astring: ^1.7.5 - axios: ^0.27.2 + axios: ^1.6.0 babel-plugin-lodash: ^3.3.4 babel-plugin-module-resolver: ^4.1.0 chalk: ^4.1.1 @@ -13025,24 +13025,14 @@ __metadata: languageName: node linkType: hard -"axios@npm:^0.27.2": - version: 0.27.2 - resolution: "axios@npm:0.27.2" - dependencies: - follow-redirects: ^1.14.9 - form-data: ^4.0.0 - checksum: 38cb7540465fe8c4102850c4368053c21683af85c5fdf0ea619f9628abbcb59415d1e22ebc8a6390d2bbc9b58a9806c874f139767389c862ec9b772235f06854 - languageName: node - linkType: hard - -"axios@npm:^1.2.0": - version: 1.3.4 - resolution: "axios@npm:1.3.4" +"axios@npm:^1.6.0": + version: 1.6.1 + resolution: "axios@npm:1.6.1" dependencies: follow-redirects: ^1.15.0 form-data: ^4.0.0 proxy-from-env: ^1.1.0 - checksum: 7440edefcf8498bc3cdf39de00443e8101f249972c83b739c6e880d9d669fea9486372dbe8739e88b3bf8bb1ad15f6106693f206f078f4516fe8fd47b1c3093c + checksum: 573f03f59b7487d54551b16f5e155d1d130ad4864ed32d1da93d522b78a57123b34e3bde37f822a65ee297e79f1db840f9ad6514addff50d3cbf5caeed39e8dc languageName: node linkType: hard @@ -18937,7 +18927,7 @@ __metadata: languageName: node linkType: hard -"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.14.0, follow-redirects@npm:^1.14.9, follow-redirects@npm:^1.15.0": +"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.14.0, follow-redirects@npm:^1.15.0": version: 1.15.2 resolution: "follow-redirects@npm:1.15.2" peerDependenciesMeta: