Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(gatsby): upgrade gatsby deps #29699

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { Component } from "react"

class ClassComponent extends Component {
// eslint-disable-next-line no-undef
state = {
custom: true,
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"rimraf": "^3.0.2",
"svgo": "1.3.2",
"ts-jest": "^22",
"typescript": "^4.1.5",
"typescript": "^4.2.2",
"unified": "^9.2.0",
"yargs": "^15.4.1"
},
Expand Down Expand Up @@ -159,4 +159,4 @@
"workspaces": [
"packages/*"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ Object {
"es.array.last-index-of",
"es.array.map",
"es.array.of",
"es.array.reduce",
"es.array.reduce-right",
"es.array.reverse",
"es.array.slice",
"es.array.some",
Expand Down Expand Up @@ -216,6 +214,8 @@ Object {
"es.promise",
"es.symbol.description",
"web.*",
"es.array.reduce",
"es.array.reduce-right",
],
"modules": false,
"targets": undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ Object {
"es.array.last-index-of",
"es.array.map",
"es.array.of",
"es.array.reduce",
"es.array.reduce-right",
"es.array.reverse",
"es.array.slice",
"es.array.some",
Expand Down Expand Up @@ -238,6 +236,8 @@ Object {
"es.promise",
"es.symbol.description",
"web.*",
"es.array.reduce",
"es.array.reduce-right",
],
"loose": true,
"modules": false,
Expand Down Expand Up @@ -351,8 +351,6 @@ Object {
"es.array.last-index-of",
"es.array.map",
"es.array.of",
"es.array.reduce",
"es.array.reduce-right",
"es.array.reverse",
"es.array.slice",
"es.array.some",
Expand Down Expand Up @@ -516,6 +514,8 @@ Object {
"es.promise",
"es.symbol.description",
"web.*",
"es.array.reduce",
"es.array.reduce-right",
],
"loose": true,
"modules": false,
Expand Down Expand Up @@ -621,8 +621,6 @@ Object {
"es.array.last-index-of",
"es.array.map",
"es.array.of",
"es.array.reduce",
"es.array.reduce-right",
"es.array.reverse",
"es.array.slice",
"es.array.some",
Expand Down Expand Up @@ -786,6 +784,8 @@ Object {
"es.promise",
"es.symbol.description",
"web.*",
"es.array.reduce",
"es.array.reduce-right",
],
"loose": true,
"modules": false,
Expand Down Expand Up @@ -879,8 +879,6 @@ Object {
"es.array.last-index-of",
"es.array.map",
"es.array.of",
"es.array.reduce",
"es.array.reduce-right",
"es.array.reverse",
"es.array.slice",
"es.array.some",
Expand Down Expand Up @@ -1044,6 +1042,8 @@ Object {
"es.promise",
"es.symbol.description",
"web.*",
"es.array.reduce",
"es.array.reduce-right",
],
"loose": true,
"modules": false,
Expand Down
14 changes: 10 additions & 4 deletions packages/gatsby-cli/src/reporter/redux/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import { createStore, combineReducers } from "redux"
import { createStore, combineReducers, Store, CombinedState } from "redux"
import { reducer } from "./reducer"
import { ActionsUnion, ISetLogs } from "./types"
import { ActionsUnion, ISetLogs, IGatsbyCLIState } from "./types"
import { isInternalAction } from "./utils"
import { createStructuredLoggingDiagnosticsMiddleware } from "./diagnostics"
import { Actions } from "../constants"

let store = createStore(
export type GatsbyCLIStore = Store<
CombinedState<{
logs: IGatsbyCLIState
}>,
ActionsUnion
>

let store: GatsbyCLIStore = createStore(
combineReducers({
logs: reducer,
}),
Expand All @@ -16,7 +23,6 @@ const diagnosticsMiddleware = createStructuredLoggingDiagnosticsMiddleware(
store
)

export type GatsbyCLIStore = typeof store
type StoreListener = (store: GatsbyCLIStore) => void
type ActionLogListener = (action: ActionsUnion) => any
type Thunk = (...args: Array<any>) => ActionsUnion
Expand Down
6 changes: 3 additions & 3 deletions packages/gatsby-legacy-polyfills/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
"watch:polyfills": "microbundle -f iife -i src/polyfills.js --no-sourcemap --external=none --watch"
},
"dependencies": {
"core-js-compat": "^3.6.5"
"core-js-compat": "3.9.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll pin these deps as we don't really need auto updates for these as they could break snapshots which is not ideal. Normally renovatebot should create prs to upgrade.

},
"files": [
"dist/"
],
"devDependencies": {
"chokidar-cli": "^2.1.0",
"codegen.macro": "^4.0.0",
"core-js": "^3.6.5",
"core-js": "3.9.0",
"cpy-cli": "^3.1.1",
"cross-env": "^7.0.3",
"execa": "^4.1.0",
Expand All @@ -44,4 +44,4 @@
"url-polyfill": "^1.1.12",
"whatwg-fetch": "^3.4.1"
}
}
}
4 changes: 4 additions & 0 deletions packages/gatsby-legacy-polyfills/src/exclude.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,9 @@ module.exports = {
`es.promise`,
`es.symbol.description`,
`web.*`,

// core-js@3.7.0 added extra polyfill for reduce & reduce-right because of bug - we don't care about that bug, we're already on chrome 87
`es.array.reduce`,
`es.array.reduce-right`,
],
}
3 changes: 2 additions & 1 deletion packages/gatsby-plugin-sass/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"devDependencies": {
"@babel/cli": "^7.12.1",
"@babel/core": "^7.12.3",
"autoprefixer": "^10.2.4",
"babel-preset-gatsby-package": "^1.0.0-next.0",
"cross-env": "^7.0.3",
"gatsby-plugin-utils": "^1.0.0-next.0"
Expand Down Expand Up @@ -44,4 +45,4 @@
"engines": {
"node": ">=12.13.0"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe(`gatsby-remark-code-repls`, () => {
it(`should warn about an empty examples directory`, async () => {
readdir.mockResolvedValue([])

spyOn(console, `warn`) // eslint-disable-line no-undef
spyOn(console, `warn`)

await createPages(createPagesParams)

Expand Down
Loading