Skip to content

Commit

Permalink
chore: upgrade axios (#38698)
Browse files Browse the repository at this point in the history
* Update to non vulnerable version of axios

* bump in other packages and regen lock file

* ts adjustment

* bump axios to latest

---------

Co-authored-by: Michal Piechowiak <[email protected]>
  • Loading branch information
larowlan and pieh authored Jan 5, 2024
1 parent 196618a commit e2b3ea3
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 17 deletions.
2 changes: 1 addition & 1 deletion packages/gatsby-remark-images-contentful/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-remark-images-contentful#readme",
"dependencies": {
"@babel/runtime": "^7.20.13",
"axios": "^0.21.1",
"axios": "^1.6.4",
"chalk": "^4.1.2",
"cheerio": "^1.0.0-rc.10",
"is-relative-url": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-source-hacker-news/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"axios": "^0.21.1",
"axios": "^1.6.2",
"lodash": "^4.17.21"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-source-lever/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"bundledDependencies": [],
"dependencies": {
"@babel/runtime": "^7.20.13",
"axios": "^0.21.1",
"axios": "^1.6.2",
"bluebird": "^3.7.2",
"deep-map": "^1.5.0",
"deep-map-keys": "^1.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-source-medium/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"axios": "^0.21.1"
"axios": "^1.6.2"
},
"devDependencies": {
"@babel/cli": "^7.20.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-source-wordpress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@rematch/immer": "^2.1.3",
"async-retry": "^1.3.3",
"atob": "^2.1.2",
"axios": "^0.21.1",
"axios": "^1.6.4",
"axios-rate-limit": "^1.3.0",
"better-queue": "^3.8.12",
"cache-manager": "^3.6.3",
Expand Down
8 changes: 6 additions & 2 deletions packages/gatsby-source-wordpress/src/utils/fetch-graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
import { IPluginOptions } from "~/models/gatsby-api"
import { GatsbyReporter } from "./gatsby-types"
import prettier from "prettier"
import axios, { AxiosRequestConfig, AxiosResponse } from "axios"
import axios, {
AxiosRequestConfig,
AxiosResponse,
RawAxiosRequestHeaders,
} from "axios"
import rateLimit, { RateLimitedAxiosInstance } from "axios-rate-limit"
import { bold } from "chalk"
import retry from "async-retry"
Expand Down Expand Up @@ -655,7 +659,7 @@ export interface IJSON {
[key: string]: any
}

interface IFetchGraphQLHeaders {
interface IFetchGraphQLHeaders extends RawAxiosRequestHeaders {
WPGatsbyPreview?: string
Authorization?: string
WPGatsbyPreviewUser?: number
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-transformer-screenshot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"axios": "^0.21.1",
"axios": "^1.6.2",
"fastq": "^1.15.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"address": "1.2.2",
"anser": "^2.1.1",
"autoprefixer": "^10.4.14",
"axios": "^0.21.1",
"axios": "^1.6.4",
"babel-jsx-utils": "^1.1.0",
"babel-loader": "^8.3.0",
"babel-plugin-add-module-exports": "^1.0.4",
Expand Down
23 changes: 15 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6586,13 +6586,6 @@ axios-rate-limit@^1.3.0:
resolved "https://registry.yarnpkg.com/axios-rate-limit/-/axios-rate-limit-1.3.0.tgz#03241d24c231c47432dab6e8234cfde819253c2e"
integrity sha512-cKR5wTbU/CeeyF1xVl5hl6FlYsmzDVqxlN4rGtfO5x7J83UxKDckudsW0yW21/ZJRcO0Qrfm3fUFbhEbWTLayw==

axios@^0.21.1:
version "0.21.1"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8"
integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==
dependencies:
follow-redirects "^1.10.0"

axios@^0.27.0:
version "0.27.2"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972"
Expand All @@ -6601,6 +6594,15 @@ axios@^0.27.0:
follow-redirects "^1.14.9"
form-data "^4.0.0"

axios@^1.6.2, axios@^1.6.4:
version "1.6.4"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.4.tgz#184ee1f63d412caffcf30d2c50982253c3ee86e0"
integrity sha512-heJnIs6N4aa1eSthhN9M5ioILu8Wi8vmQW9iHQ9NUvfkJb0lEEDUiIdQNAuBtfUt3FxReaKdpQA5DbmMOqzF/A==
dependencies:
follow-redirects "^1.15.4"
form-data "^4.0.0"
proxy-from-env "^1.1.0"

axobject-query@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-3.2.1.tgz#39c378a6e3b06ca679f29138151e45b2b32da62a"
Expand Down Expand Up @@ -11827,11 +11829,16 @@ flush-write-stream@^1.0.0, flush-write-stream@^1.0.2:
inherits "^2.0.1"
readable-stream "^2.0.4"

follow-redirects@^1.10.0, follow-redirects@^1.14.9:
follow-redirects@^1.14.9:
version "1.14.9"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7"
integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==

follow-redirects@^1.15.4:
version "1.15.4"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.4.tgz#cdc7d308bf6493126b17ea2191ea0ccf3e535adf"
integrity sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==

font-family-papandreou@^0.2.0-patch1, font-family-papandreou@^0.2.0-patch2:
version "0.2.0-patch2"
resolved "https://registry.yarnpkg.com/font-family-papandreou/-/font-family-papandreou-0.2.0-patch2.tgz#c75b659e96ffbc7ab2af651cf7b4910b334e8dd2"
Expand Down

0 comments on commit e2b3ea3

Please sign in to comment.