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

[v3] update vite to v6 #3828

Draft
wants to merge 4 commits into
base: react-compiler2
Choose a base branch
from
Draft
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
7 changes: 7 additions & 0 deletions .changeset/chatty-birds-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@graphiql/plugin-code-exporter': minor
'@graphiql/plugin-explorer': minor
'@graphiql/react': patch
---

bump vite to v6
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ packages/codemirror-graphql/*.d.ts
packages/codemirror-graphql/*.map
!packages/codemirror-graphql/*.config.js

packages/graphiql/graphiql*.js
packages/graphiql/*.css
packages/graphiql/*.map
packages/graphiql/graphiql*[.js,.css,.map]
packages/graphiql/cypress/screenshots/
packages/graphiql/typedoc/
5 changes: 2 additions & 3 deletions packages/graphiql-plugin-code-exporter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,11 @@
},
"devDependencies": {
"@graphiql/react": "^0.27.0",
"@vitejs/plugin-react": "^4.3.1",
"@vitejs/plugin-react": "^4.3.4",
"graphql": "^16.9.0",
"postcss-nesting": "^10.1.7",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^4.6.3",
"vite": "^5.3.6"
"vite": "^6.0.3"
}
}
3 changes: 0 additions & 3 deletions packages/graphiql-plugin-code-exporter/postcss.config.js

This file was deleted.

2 changes: 2 additions & 0 deletions packages/graphiql-plugin-code-exporter/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export default defineConfig({
fileName: 'index',
name: 'GraphiQLPluginCodeExporter',
formats: IS_UMD ? ['umd'] : ['cjs', 'es'],
// TODO: rename to index.css in next major?
cssFileName: 'style',
},
rollupOptions: {
external: [
Expand Down
6 changes: 3 additions & 3 deletions packages/graphiql-plugin-explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
},
"devDependencies": {
"@graphiql/react": "^0.27.0",
"@vitejs/plugin-react": "^4.3.1",
"@vitejs/plugin-react": "^4.3.3",
"graphql": "^16.9.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^4.6.3",
"vite": "^5.3.6",
"vite-plugin-svgr": "^4.2.0"
"vite": "^6.0.3",
"vite-plugin-svgr": "^4.3.0"
}
}
2 changes: 2 additions & 0 deletions packages/graphiql-plugin-explorer/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export default defineConfig({
fileName: 'index',
name: 'GraphiQLPluginExplorer',
formats: IS_UMD ? ['umd'] : ['cjs', 'es'],
// TODO: rename to index.css in next major?
cssFileName: 'style',
},
rollupOptions: {
external: [
Expand Down
2 changes: 1 addition & 1 deletion packages/graphiql-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ implementation of a GraphQL IDE - Graph*i*QL - in the
There are multiple contexts that own different parts of the state that make up a
complete GraphQL IDE. For each context there is a provider component
(`<name>ContextProvider`) that makes sure the context is initialized and managed
properly. These components contains all the logic related to state management.
properly. These components contain all the logic related to state management.
In addition, for each context there is also a hook (`use<name>Context`) that
allows you to consume its current value.

Expand Down
12 changes: 6 additions & 6 deletions packages/graphiql-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"exports": {
"./package.json": "./package.json",
".": {
"types": "./types/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"types": "./types/index.d.ts"
"require": "./dist/index.js"
},
"./font/roboto.css": "./font/roboto.css",
"./font/fira-code.css": "./font/fira-code.css",
Expand Down Expand Up @@ -75,13 +75,13 @@
"@types/markdown-it": "^14.1.2",
"@types/get-value": "^3.0.5",
"@types/set-value": "^4.0.1",
"@vitejs/plugin-react": "^4.3.1",
"@vitejs/plugin-react": "^4.3.4",
"graphql": "^16.9.0",
"postcss-nesting": "^10.1.7",
"postcss-nesting": "^12.1.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^4.6.3",
"vite": "^5.3.6",
"vite-plugin-svgr": "^4.2.0"
"vite": "^6.0.3",
"vite-plugin-svgr": "^4.3.0"
}
}
3 changes: 0 additions & 3 deletions packages/graphiql-react/postcss.config.js

This file was deleted.

2 changes: 2 additions & 0 deletions packages/graphiql-react/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ export default defineConfig({
entry: 'src/index.ts',
fileName: 'index',
formats: ['cjs', 'es'],
// TODO: rename to index.css in next major?
cssFileName: 'style',
},
rollupOptions: {
external: [
Expand Down
15 changes: 6 additions & 9 deletions packages/graphiql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
],
"exports": {
"./package.json": "./package.json",
"./style.css": "./dist/style.css",
"./graphiql.css": "./dist/style.css",
"./style.css": "./dist/index.css",
"./graphiql.css": "./dist/index.css",
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
"import": "./dist/index.mjs"
}
},
"scripts": {
Expand All @@ -45,7 +45,7 @@
"dev": "concurrently 'cross-env PORT=8080 node test/e2e-server' vite",
"e2e": "yarn e2e-server 'cypress run'",
"e2e-server": "start-server-and-test 'cross-env PORT=8080 node test/e2e-server' 'http-get://localhost:8080/graphql?query={test { id }}'",
"prepublishOnly": "cp dist/index.umd.js graphiql.js && cp dist/index.umd.js.map graphiql.js.map && cp dist/index.umd.js graphiql.min.js && cp dist/index.umd.js.map graphiql.min.js.map && cp dist/style.css graphiql.css && cp dist/style.css graphiql.min.css",
"prepublishOnly": "cp dist/index.umd.js graphiql.js && cp dist/index.umd.js.map graphiql.js.map && cp dist/index.umd.js graphiql.min.js && cp dist/index.umd.js.map graphiql.min.js.map && cp dist/index.css graphiql.css && cp dist/index.css graphiql.min.css",
"test": "vitest"
},
"dependencies": {
Expand All @@ -61,8 +61,7 @@
"babel-plugin-react-compiler": "19.0.0-beta-37ed2a7-20241206",
"vite-plugin-dts": "^4.3.0",
"vite-plugin-commonjs": "^0.10.4",
"vite": "^5.3.6",
"postcss-lightningcss": "^1.0.1",
"vite": "^6.0.3",
"@vitejs/plugin-react": "^4.3.1",
"@graphiql/toolkit": "^0.11.0",
"@testing-library/jest-dom": "^6.6.3",
Expand All @@ -73,8 +72,6 @@
"graphql": "^16.9.0",
"graphql-http": "^1.22.1",
"graphql-subscriptions": "^2.0.0",
"postcss": "8.4.31",
"postcss-import": "15.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"start-server-and-test": "^1.10.11",
Expand Down
9 changes: 0 additions & 9 deletions packages/graphiql/postcss.config.js

This file was deleted.

20 changes: 0 additions & 20 deletions packages/graphiql/resources/build.sh

This file was deleted.

27 changes: 0 additions & 27 deletions packages/graphiql/resources/checkgit.sh

This file was deleted.

3 changes: 0 additions & 3 deletions packages/graphiql/src/cdn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ import { createGraphiQLFetcher, createLocalStorage } from '@graphiql/toolkit';
import * as GraphQL from 'graphql';
import { GraphiQL } from './GraphiQL';

import '@graphiql/react/font/roboto.css';
import '@graphiql/react/font/fira-code.css';
import '@graphiql/react/dist/style.css';
import './style.css';

/**
Expand Down
4 changes: 4 additions & 0 deletions packages/graphiql/src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@import '@graphiql/react/font/roboto.css';
@import '@graphiql/react/font/fira-code.css';
@import '@graphiql/react/dist/style.css';

/* Everything */
.graphiql-container {
background-color: hsl(var(--color-base));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/node_modules/@vitejs/plugin-react/dist/index.mjs b/node_modules/@vitejs/plugin-react/dist/index.mjs
index e61f42b..a6ad925 100644
index 7ca5f23..ce25bc3 100644
--- a/node_modules/@vitejs/plugin-react/dist/index.mjs
+++ b/node_modules/@vitejs/plugin-react/dist/index.mjs
@@ -202,6 +202,19 @@ function viteReact(opts = {}) {
@@ -208,6 +208,19 @@ function viteReact(opts = {}) {
});
if (result) {
let code2 = result.code;
Expand Down
Loading
Loading