Skip to content

Commit d80f98c

Browse files
Merge pull request #2168 from cylc/renovate/major-graphiql-packages
fix(deps): update dependency graphiql to v4
2 parents 98b1e20 + e2cbf48 commit d80f98c

File tree

5 files changed

+921
-542
lines changed

5 files changed

+921
-542
lines changed

eslintrc-dist.cjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,10 @@ module.exports = {
3333
},
3434
noInlineConfig: true,
3535
reportUnusedDisableDirectives: false, // doesn't seem to work
36+
settings: {
37+
polyfills: [
38+
// Used by GraphiQL, shouldn't be a problem:
39+
'navigator.userAgentData',
40+
],
41+
},
3642
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"axios": "1.9.0",
3535
"dedent": "1.6.0",
3636
"enumify": "2.0.0",
37-
"graphiql": "3.8.3",
37+
"graphiql": "4.0.5",
3838
"graphql": "16.11.0",
3939
"graphql-tag": "2.12.6",
4040
"lodash-es": "4.17.21",
@@ -55,6 +55,7 @@
5555
},
5656
"devDependencies": {
5757
"@cypress/code-coverage": "3.14.3",
58+
"@vitejs/plugin-react": "4.4.1",
5859
"@vitejs/plugin-vue": "5.2.4",
5960
"@vitest/coverage-istanbul": "3.1.4",
6061
"@vue/test-utils": "2.4.6",

src/views/GraphiQL.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2020
</template>
2121

2222
<script>
23-
import 'graphiql/graphiql.min.css'
23+
import 'graphiql/graphiql.css'
2424
import { render, createElement } from 'preact/compat'
25-
import GraphiQL from 'graphiql'
25+
import { GraphiQL } from 'graphiql'
2626
import { fallbackGraphQLFetcher, graphQLFetcher } from '@/graphql/graphiql'
2727
2828
export default {

vite.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import { defineConfig } from 'vite'
1919
import vue from '@vitejs/plugin-vue'
2020
import vuetify from 'vite-plugin-vuetify'
21+
import react from '@vitejs/plugin-react'
2122
import eslint from 'vite-plugin-eslint'
2223
import IstanbulPlugin from 'vite-plugin-istanbul'
2324
import dns from 'dns'
@@ -33,6 +34,8 @@ export default defineConfig(({ mode }) => {
3334
eslint({
3435
failOnError: mode === 'production'
3536
}),
37+
// GraphiQL is a React app:
38+
react(),
3639
]
3740

3841
if (mode !== 'production' && process.env.COVERAGE) {
@@ -56,6 +59,7 @@ export default defineConfig(({ mode }) => {
5659
'@': path.resolve(__dirname, './src'),
5760
$tests: path.resolve(__dirname, './tests'),
5861
lodash: 'lodash-es',
62+
// GraphiQL is a React app (use Preact as it's smaller):
5963
react: 'preact/compat',
6064
'react-dom': 'preact/compat',
6165
}

0 commit comments

Comments
 (0)