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(deps): update [dev] minor and patch dependencies for gatsby-graphiql-explorer #38279

Merged
merged 9 commits into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
16 changes: 8 additions & 8 deletions packages/gatsby-graphiql-explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,25 @@
"@babel/plugin-transform-runtime": "^7.19.6",
"@babel/preset-env": "^7.20.2",
"@babel/preset-react": "^7.18.6",
"@graphiql/plugin-code-exporter": "^0.1.2",
"@graphiql/plugin-explorer": "^0.1.20",
"@graphiql/react": "^0.17.6",
"@graphiql/plugin-code-exporter": "^0.2.0",
"@graphiql/plugin-explorer": "^0.2.0",
"@graphiql/react": "^0.18.0",
"@graphiql/toolkit": "^0.8.4",
"babel-loader": "^8.3.0",
"babel-loader": "^9.1.2",
"babel-preset-gatsby-package": "^3.12.0-next.0",
"core-js": "^3.30.2",
"cross-env": "^7.0.3",
"css-loader": "^6.8.1",
"del-cli": "^5.0.0",
"graphiql": "^2.4.7",
"html-webpack-plugin": "^5.5.1",
"graphiql": "^3.0.0",
"html-webpack-plugin": "^5.5.3",
"npm-run-all": "4.1.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"regenerator-runtime": "^0.13.11",
"style-loader": "^3.3.3",
"webpack": "^5.85.0",
"webpack-cli": "^4.10.0"
"webpack": "^5.88.1",
"webpack-cli": "^5.1.4"
},
"engines": {
"node": ">=18.0.0"
Expand Down
10 changes: 5 additions & 5 deletions packages/gatsby-graphiql-explorer/src/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import regeneratorRuntime from "regenerator-runtime"

import * as React from "react"
import ReactDOM from "react-dom"
import { createRoot } from "react-dom/client"
import { GraphiQL } from "graphiql"
import { getIntrospectionQuery } from "graphql"
import { useExplorerPlugin } from "@graphiql/plugin-explorer"
Expand Down Expand Up @@ -179,12 +179,12 @@ const App = ({ initialExternalFragments }) => {
)
}

const container = document.getElementById(`root`)
const root = createRoot(container)

// crude way to fetch fragments on boot time
// it won't hot reload fragments (refresh required)
// but good enough for initial integration
fetchFragments().then(initialExternalFragments => {
ReactDOM.render(
<App initialExternalFragments={initialExternalFragments} />,
document.getElementById(`root`)
)
root.render(<App initialExternalFragments={initialExternalFragments} />)
})
1 change: 1 addition & 0 deletions packages/gatsby-graphiql-explorer/src/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const webpack = require(`webpack`)

const mode = `production`

/** @type { import('webpack').Configuration } */
module.exports = {
entry: path.join(__dirname, `app.jsx`),
mode,
Expand Down
15 changes: 10 additions & 5 deletions packages/gatsby/src/utils/webpack/plugins/partial-hydration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,16 @@ export class PartialHydrationPlugin {
}
}

for (const cssModule of modulesToInsertIntoApp.sort(
(a, b) =>
compilation.moduleGraph.getPostOrderIndex(a) -
compilation.moduleGraph.getPostOrderIndex(b)
)) {
for (const cssModule of modulesToInsertIntoApp.sort((a, b) => {
const _a = compilation.moduleGraph.getPostOrderIndex(a)
const _b = compilation.moduleGraph.getPostOrderIndex(b)

if (!_a || !_b) {
return 0
} else {
return _a - _b
}
})) {
compilation.chunkGraph.connectChunkAndModule(appChunk, cssModule)

for (const group of appChunk.groupsIterable) {
Expand Down
Loading