From 79115916e8df3dad9779b171efb38ae37ef4b4dc Mon Sep 17 00:00:00 2001 From: rxliuli Date: Fri, 22 Apr 2022 13:42:24 +0800 Subject: [PATCH 1/4] feat: merge webpack to vite --- packages/graphiql/.gitignore | 1 + packages/graphiql/index.html | 41 ++ packages/graphiql/package.json | 11 +- .../graphiql/src/components/QueryEditor.tsx | 10 +- .../graphiql/src/components/ResultViewer.tsx | 4 +- .../src/components/VariableEditor.tsx | 6 +- packages/graphiql/src/main.tsx | 159 ++++++++ packages/graphiql/tsconfig.json | 2 +- packages/graphiql/vite.config.ts | 48 +++ yarn.lock | 375 +++++++++++++++++- 10 files changed, 639 insertions(+), 18 deletions(-) create mode 100644 packages/graphiql/index.html create mode 100644 packages/graphiql/src/main.tsx create mode 100644 packages/graphiql/vite.config.ts diff --git a/packages/graphiql/.gitignore b/packages/graphiql/.gitignore index d2294d14e7c..1ce1f4f57b9 100644 --- a/packages/graphiql/.gitignore +++ b/packages/graphiql/.gitignore @@ -14,6 +14,7 @@ example/graphiql.js example/graphiql.css test/pid /*.html +!index.html renderGraphiql.js cypress/screenshots .awcache diff --git a/packages/graphiql/index.html b/packages/graphiql/index.html new file mode 100644 index 00000000000..78c0ef93d50 --- /dev/null +++ b/packages/graphiql/index.html @@ -0,0 +1,41 @@ + + + + + + + + + + + +
Loading...
+ + + diff --git a/packages/graphiql/package.json b/packages/graphiql/package.json index 1103e813e92..1ceb7231443 100644 --- a/packages/graphiql/package.json +++ b/packages/graphiql/package.json @@ -28,11 +28,11 @@ ], "scripts": { "analyze-bundle": "cross-env NODE_ENV=production CDN=1 ANALYZE=1 yarn webpack -p", - "build": "yarn build-clean && yarn build-cjs && yarn build-esm", + "build": "yarn build-cjs && yarn build-esm", "build-bundles": "yarn build-bundles-clean && yarn build-bundles-dev && yarn build-bundles-min", "build-bundles-clean": "rimraf 'graphiql.*{js,css}' *.html", - "build-bundles-dev": "cross-env NODE_ENV=development CDN=1 yarn webpack -d --bail", - "build-bundles-min": "cross-env ANALYZE=1 NODE_ENV=production CDN=1 yarn webpack -p --bail", + "build-bundles-dev": "cross-env NODE_ENV=development CDN=1 yarn vite build --mode dev", + "build-bundles-min": "cross-env ANALYZE=1 NODE_ENV=production CDN=1 vite build", "build-cjs": "tsc", "build-clean": "rimraf esm dist webpack *.html", "build-demo": "build-storybook -o ./storybook", @@ -40,6 +40,7 @@ "check": "tsc --noEmit", "cypress-open": "yarn e2e-server 'cypress open'", "dev": "cross-env NODE_ENV=development webpack-dev-server --config resources/webpack.config.js", + "dev-vite": "cross-env NODE_ENV=development 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 }}'", "storybook": "start-storybook", @@ -62,6 +63,10 @@ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" }, "devDependencies": { + "router": "^1.3.6", + "vite": "^2.9.5", + "@vitejs/plugin-react-refresh": "^1.3.6", + "rollup-plugin-visualizer": "^5.6.0", "@testing-library/jest-dom": "^5.4.0", "@testing-library/react": "9.4.1", "@types/codemirror": "^5.58.2", diff --git a/packages/graphiql/src/components/QueryEditor.tsx b/packages/graphiql/src/components/QueryEditor.tsx index f26ac35f1a5..e915b1f1c1e 100644 --- a/packages/graphiql/src/components/QueryEditor.tsx +++ b/packages/graphiql/src/components/QueryEditor.tsx @@ -143,11 +143,11 @@ export class QueryEditor extends React.Component addonModules = () => [ import('codemirror/addon/comment/comment'), import('codemirror/addon/search/search'), - import('codemirror-graphql/hint'), - import('codemirror-graphql/lint'), - import('codemirror-graphql/info'), - import('codemirror-graphql/jump'), - import('codemirror-graphql/mode'), + import('codemirror-graphql/esm/hint'), + import('codemirror-graphql/esm/lint'), + import('codemirror-graphql/esm/info'), + import('codemirror-graphql/esm/jump'), + import('codemirror-graphql/esm/mode'), ]; async initializeEditor() { diff --git a/packages/graphiql/src/components/ResultViewer.tsx b/packages/graphiql/src/components/ResultViewer.tsx index c302a9c64e8..f63e833b8a2 100644 --- a/packages/graphiql/src/components/ResultViewer.tsx +++ b/packages/graphiql/src/components/ResultViewer.tsx @@ -81,7 +81,7 @@ export class ResultViewer extends React.Component import('codemirror/addon/search/jump-to-line'), // @ts-expect-error import('codemirror/keymap/sublime'), - import('codemirror-graphql/results/mode'), + import('codemirror-graphql/esm/results/mode'), ]; async initializeEditor() { @@ -94,7 +94,7 @@ export class ResultViewer extends React.Component const ImagePreview = this.props.ImagePreview; if (Tooltip || ImagePreview) { - await import('codemirror-graphql/utils/info-addon'); + await import('codemirror-graphql/esm/utils/info-addon'); const tooltipDiv = document.createElement('div'); CodeMirror.registerHelper( 'info', diff --git a/packages/graphiql/src/components/VariableEditor.tsx b/packages/graphiql/src/components/VariableEditor.tsx index 29644130c03..41d269a826b 100644 --- a/packages/graphiql/src/components/VariableEditor.tsx +++ b/packages/graphiql/src/components/VariableEditor.tsx @@ -134,9 +134,9 @@ export class VariableEditor extends React.Component { } addonModules = () => [ - import('codemirror-graphql/variables/hint'), - import('codemirror-graphql/variables/lint'), - import('codemirror-graphql/variables/mode'), + import('codemirror-graphql/esm/variables/hint'), + import('codemirror-graphql/esm/variables/lint'), + import('codemirror-graphql/esm/variables/mode'), ]; async initializeEditor() { diff --git a/packages/graphiql/src/main.tsx b/packages/graphiql/src/main.tsx new file mode 100644 index 00000000000..97f95f39916 --- /dev/null +++ b/packages/graphiql/src/main.tsx @@ -0,0 +1,159 @@ +/** + * UMD GraphiQL Example + * + * This is a simple example that provides a primitive query string parser on top of GraphiQL props + * It assumes a global umd GraphiQL, which would be provided by an index.html in the default example + * + * It is used by: + * - the netlify demo + * - end to end tests + * - webpack dev server + */ + +import React from 'react'; +import ReactDOM from 'react-dom'; +import GraphiQL from './cdn'; +import './css/app.css'; +import './css/codemirror.css'; +import './css/foldgutter.css'; +import './css/info.css'; +import './css/jump.css'; +import './css/lint.css'; +import './css/loading.css'; +import './css/show-hint.css'; + +import './css/doc-explorer.css'; +import './css/history.css'; + +// Parse the search string to get url parameters. +var search = window.location.search; +var parameters = {}; +search + .substr(1) + .split('&') + .forEach(function (entry) { + var eq = entry.indexOf('='); + if (eq >= 0) { + parameters[decodeURIComponent(entry.slice(0, eq))] = decodeURIComponent( + entry.slice(eq + 1), + ); + } + }); + +// If variables was provided, try to format it. +if (parameters.variables) { + try { + parameters.variables = JSON.stringify( + JSON.parse(parameters.variables), + null, + 2, + ); + } catch (e) { + // Do nothing, we want to display the invalid JSON as a string, rather + // than present an error. + } +} + +// If headers was provided, try to format it. +if (parameters.headers) { + try { + parameters.headers = JSON.stringify( + JSON.parse(parameters.headers), + null, + 2, + ); + } catch (e) { + // Do nothing, we want to display the invalid JSON as a string, rather + // than present an error. + } +} + +// When the query and variables string is edited, update the URL bar so +// that it can be easily shared. +function onEditQuery(newQuery) { + parameters.query = newQuery; + updateURL(); +} + +function onEditVariables(newVariables) { + parameters.variables = newVariables; + updateURL(); +} + +function onEditHeaders(newHeaders) { + parameters.headers = newHeaders; + updateURL(); +} + +function onEditOperationName(newOperationName) { + parameters.operationName = newOperationName; + updateURL(); +} + +function onTabChange(tabsState) { + const activeTab = tabsState.tabs[tabsState.activeTabIndex]; + parameters.query = activeTab.query; + parameters.variables = activeTab.variables; + parameters.headers = activeTab.headers; + parameters.operationName = activeTab.operationName; + updateURL(); +} + +function updateURL() { + var newSearch = + '?' + + Object.keys(parameters) + .filter(function (key) { + return Boolean(parameters[key]); + }) + .map(function (key) { + return ( + encodeURIComponent(key) + '=' + encodeURIComponent(parameters[key]) + ); + }) + .join('&'); + history.replaceState(null, null, newSearch); +} + +function getSchemaUrl() { + const isDev = window.location.hostname.match(/localhost$/); + + if (isDev) { + // This supports an e2e test which ensures that invalid schemas do not load. + if (parameters.bad && parameters.bad === 'true') { + return '/bad/graphql'; + } else { + return '/graphql'; + } + } + return '/.netlify/functions/schema-demo'; +} + +// Render into the body. +// See the README in the top level of this module to learn more about +// how you can customize GraphiQL by providing different values or +// additional child elements. +ReactDOM.render( + React.createElement(GraphiQL, { + fetcher: GraphiQL.createFetcher({ + url: getSchemaUrl(), + subscriptionUrl: 'ws://localhost:8081/subscriptions', + }), + query: parameters.query, + variables: parameters.variables, + headers: parameters.headers, + operationName: parameters.operationName, + onEditQuery: onEditQuery, + onEditVariables: onEditVariables, + onEditHeaders: onEditHeaders, + defaultSecondaryEditorOpen: true, + onEditOperationName: onEditOperationName, + headerEditorEnabled: true, + shouldPersistHeaders: true, + inputValueDeprecation: true, + tabs: { + onTabChange: onTabChange, + }, + }), + document.getElementById('graphiql'), +); diff --git a/packages/graphiql/tsconfig.json b/packages/graphiql/tsconfig.json index cd9e2da1ff5..1d49cef495d 100644 --- a/packages/graphiql/tsconfig.json +++ b/packages/graphiql/tsconfig.json @@ -5,7 +5,7 @@ "outDir": "./dist", "composite": true, "jsx": "react", - "target": "es5", + "target": "ESNext", "strictPropertyInitialization": false }, "include": ["src"], diff --git a/packages/graphiql/vite.config.ts b/packages/graphiql/vite.config.ts new file mode 100644 index 00000000000..a6e13c0c4cc --- /dev/null +++ b/packages/graphiql/vite.config.ts @@ -0,0 +1,48 @@ +import { defineConfig } from 'vite'; +import reactRefresh from '@vitejs/plugin-react-refresh'; +import visualizer from 'rollup-plugin-visualizer'; +import path from 'path'; +import express from 'express'; +const { graphqlHTTP } = require('express-graphql'); +const schema = require('./test/schema'); +const { schema: badSchema } = require('./test/bad-schema'); +const Router = require('router'); + +export default defineConfig({ + plugins: [ + // reactRefresh(), + // visualizer() + { + name: 'vite-plugin-test-server', + configureServer(server) { + const app = new Router(); + app.post('/graphql', graphqlHTTP({ schema })); + + app.post('/bad/graphql', (_req, res, next) => { + res.json({ data: badSchema }); + next(); + }); + + app.get( + '/graphql', + graphqlHTTP({ + schema, + }), + ); + + app.use('/images', express.static(path.join(__dirname, 'images'))); + + app.use( + '/renderExample.js', + express.static(path.join(__dirname, '../resources/renderExample.js')), + ); + server.middlewares.use(app); + }, + }, + ], + css: { + postcss: { + file: path.resolve(__dirname, 'src/css'), + } as any, + }, +}); diff --git a/yarn.lock b/yarn.lock index 85b14ee10a5..901e0063709 100644 --- a/yarn.lock +++ b/yarn.lock @@ -156,6 +156,27 @@ json5 "^2.1.2" semver "^6.3.0" +"@babel/core@^7.14.8": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.9.tgz#6bae81a06d95f4d0dec5bb9d74bbc1f58babdcfe" + integrity sha512-5ug+SfZCpDAkVp9SFIZAzlW18rlzsOcJGaetCjkySnrXXDUw9AR8cDUm1iByTmdWM6yxX6/zycaV76w3YTF2gw== + dependencies: + "@ampproject/remapping" "^2.1.0" + "@babel/code-frame" "^7.16.7" + "@babel/generator" "^7.17.9" + "@babel/helper-compilation-targets" "^7.17.7" + "@babel/helper-module-transforms" "^7.17.7" + "@babel/helpers" "^7.17.9" + "@babel/parser" "^7.17.9" + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.17.9" + "@babel/types" "^7.17.0" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.1" + semver "^6.3.0" + "@babel/core@^7.16.0", "@babel/core@^7.7.2": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.16.0.tgz#c4ff44046f5fe310525cc9eb4ef5147f0c5374d4" @@ -244,6 +265,15 @@ jsesc "^2.5.1" source-map "^0.5.0" +"@babel/generator@^7.17.9": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.9.tgz#f4af9fd38fa8de143c29fce3f71852406fc1e2fc" + integrity sha512-rAdDousTwxbIxbz5I7GEQ3lUip+xVCXooZNbsydCWs3xA7ZsYOv+CFRdzGxRX78BmQHu9B1Eso59AOZQOJDEdQ== + dependencies: + "@babel/types" "^7.17.0" + jsesc "^2.5.1" + source-map "^0.5.0" + "@babel/helper-annotate-as-pure@^7.10.4", "@babel/helper-annotate-as-pure@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.13.tgz#0f58e86dfc4bb3b1fcd7db806570e177d439b6ab" @@ -559,6 +589,14 @@ "@babel/template" "^7.16.7" "@babel/types" "^7.16.7" +"@babel/helper-function-name@^7.17.9": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz#136fcd54bc1da82fcb47565cf16fd8e444b1ff12" + integrity sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg== + dependencies: + "@babel/template" "^7.16.7" + "@babel/types" "^7.17.0" + "@babel/helper-get-function-arity@^7.10.4", "@babel/helper-get-function-arity@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz#bc63451d403a3b3082b97e1d8b3fe5bd4091e583" @@ -1088,6 +1126,15 @@ "@babel/traverse" "^7.17.3" "@babel/types" "^7.17.0" +"@babel/helpers@^7.17.9": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.17.9.tgz#b2af120821bfbe44f9907b1826e168e819375a1a" + integrity sha512-cPCt915ShDWUEzEp3+UNRktO2n6v49l5RSnG9M5pS24hA+2FAc5si+Pn1i4VVbQQ+jh+bIZhPFQOJOzbrOYY1Q== + dependencies: + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.17.9" + "@babel/types" "^7.17.0" + "@babel/highlight@^7.0.0", "@babel/highlight@^7.10.4", "@babel/highlight@^7.12.13": version "7.13.10" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.13.10.tgz#a8b2a66148f5b27d666b15d81774347a731d52d1" @@ -1173,6 +1220,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.3.tgz#b07702b982990bf6fdc1da5049a23fece4c5c3d0" integrity sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA== +"@babel/parser@^7.17.9": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.9.tgz#9c94189a6062f0291418ca021077983058e171ef" + integrity sha512-vqUSBLP8dQHFPdPi9bc5GK9vRkYHJ49fsZdtoJ8EQ8ibpwk5rPKfvNIwChB0KVXcIjcepEBBd2VHC5r9Gy8ueg== + "@babel/parser@^7.4.3": version "7.11.5" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.11.5.tgz#c7ff6303df71080ec7a4f5b8c003c58f1cf51037" @@ -2708,6 +2760,13 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-jsx" "^7.10.4" +"@babel/plugin-transform-react-jsx-self@^7.14.5": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.16.7.tgz#f432ad0cba14c4a1faf44f0076c69e42a4d4479e" + integrity sha512-oe5VuWs7J9ilH3BCCApGoYjHoSO48vkjX2CbA5bFVhIuO2HKxA3vyF7rleA4o6/4rTDbk6r8hBW7Ul8E+UZrpA== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-transform-react-jsx-self@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.16.0.tgz#09202158abbc716a08330f392bfb98d6b9acfa0c" @@ -2723,6 +2782,13 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-jsx" "^7.10.4" +"@babel/plugin-transform-react-jsx-source@^7.14.5": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.16.7.tgz#1879c3f23629d287cc6186a6c683154509ec70c0" + integrity sha512-rONFiQz9vgbsnaMtQlZCjIRwhJvlrPET8TabIUK2hzlXw9B9s2Ieaxte1SCOOXMbWRHodbKixNf3BLcWVOQ8Bw== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-transform-react-jsx-source@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.16.0.tgz#d40c959d7803aae38224594585748693e84c0a22" @@ -3688,6 +3754,22 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.17.9": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.17.9.tgz#1f9b207435d9ae4a8ed6998b2b82300d83c37a0d" + integrity sha512-PQO8sDIJ8SIwipTPiR71kJQCKQYB5NGImbOviK8K+kg5xkNSYXLBupuX9QhatFowrsvo9Hj8WgArg3W7ijNAQw== + dependencies: + "@babel/code-frame" "^7.16.7" + "@babel/generator" "^7.17.9" + "@babel/helper-environment-visitor" "^7.16.7" + "@babel/helper-function-name" "^7.17.9" + "@babel/helper-hoist-variables" "^7.16.7" + "@babel/helper-split-export-declaration" "^7.16.7" + "@babel/parser" "^7.17.9" + "@babel/types" "^7.17.0" + debug "^4.1.0" + globals "^11.1.0" + "@babel/traverse@^7.7.0": version "7.9.5" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.9.5.tgz#6e7c56b44e2ac7011a948c21e283ddd9d9db97a2" @@ -6646,6 +6728,17 @@ binary-case "^1.0.0" type-is "^1.6.16" +"@vitejs/plugin-react-refresh@^1.3.6": + version "1.3.6" + resolved "https://registry.yarnpkg.com/@vitejs/plugin-react-refresh/-/plugin-react-refresh-1.3.6.tgz#19818392db01e81746cfeb04e096ab3010e79fe3" + integrity sha512-iNR/UqhUOmFFxiezt0em9CgmiJBdWR+5jGxB2FihaoJfqGt76kiwaKoVOJVU5NYcDWMdN06LbyN2VIGIoYdsEA== + dependencies: + "@babel/core" "^7.14.8" + "@babel/plugin-transform-react-jsx-self" "^7.14.5" + "@babel/plugin-transform-react-jsx-source" "^7.14.5" + "@rollup/pluginutils" "^4.1.1" + react-refresh "^0.10.0" + "@vitejs/plugin-react@^1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@vitejs/plugin-react/-/plugin-react-1.1.1.tgz#5a242c64fa0a588e5b203938e5bd6d05fa25edf2" @@ -7225,6 +7318,11 @@ array-flatten@1.1.1: resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= +array-flatten@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-3.0.0.tgz#6428ca2ee52c7b823192ec600fa3ed2f157cd541" + integrity sha512-zPMVc3ZYlGLNk4mpK1NzP2wg0ml9t7fUgDsayR5Y5rSzxQilzR9FGu/EH2jQOcKSAeAfWeylyW8juy3OkWRvNA== + array-flatten@^2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.2.tgz#24ef80a28c1a893617e2149b0c6d0d788293b099" @@ -10025,6 +10123,11 @@ defer-to-connect@^1.0.1: resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== +define-lazy-prop@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" + integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== + define-properties@^1.1.2, define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -10705,91 +10808,191 @@ es6-shim@^0.35.5: resolved "https://registry.yarnpkg.com/es6-shim/-/es6-shim-0.35.5.tgz#46f59dc0a84a1c5029e8ff1166ca0a902077a9ab" integrity sha512-E9kK/bjtCQRpN1K28Xh4BlmP8egvZBGJJ+9GtnzOwt7mdqtrjHFuVGr7QJfdjBIKqrlU5duPf3pCBoDrkjVYFg== +esbuild-android-64@0.14.37: + version "0.14.37" + resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.37.tgz#da0dd1f4bf7ee03ba3cc7f735222a12cef9d3e94" + integrity sha512-Jb61ihbS3iSj3+PhURe7sEuBg4h16CeT4CiT3W4Aop6rr5p/N6IvNXNWFX0gzUaRWtGoAFfCXFBEIn6zWUU3hQ== + esbuild-android-arm64@0.13.15: version "0.13.15" resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.13.15.tgz#3fc3ff0bab76fe35dd237476b5d2b32bb20a3d44" integrity sha512-m602nft/XXeO8YQPUDVoHfjyRVPdPgjyyXOxZ44MK/agewFFkPa8tUo6lAzSWh5Ui5PB4KR9UIFTSBKh/RrCmg== +esbuild-android-arm64@0.14.37: + version "0.14.37" + resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.37.tgz#b9502b0ccecf5e6cb7aa75a1607cae516580f6f8" + integrity sha512-wwcI+EUHWe1LlxBE7vjdqZ53DEiCllD6XsYOIiGxzL8KaG7eOLXNS7tNhdK0QIR4wwMNTPLDB40ZKuAXZ8zv6Q== + esbuild-darwin-64@0.13.15: version "0.13.15" resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.13.15.tgz#8e9169c16baf444eacec60d09b24d11b255a8e72" integrity sha512-ihOQRGs2yyp7t5bArCwnvn2Atr6X4axqPpEdCFPVp7iUj4cVSdisgvEKdNR7yH3JDjW6aQDw40iQFoTqejqxvQ== +esbuild-darwin-64@0.14.37: + version "0.14.37" + resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.37.tgz#4ef30c559fa4281790575bd029a3d0f56fa56aa4" + integrity sha512-gg/UZ/FZrRzPq+tAOiMwyBoa6eNxX6bcjuivZ8v2Tny83RhIyeDhvC84dgVcPinqK39u8pOYw6a7nffotUrjKQ== + esbuild-darwin-arm64@0.13.15: version "0.13.15" resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.13.15.tgz#1b07f893b632114f805e188ddfca41b2b778229a" integrity sha512-i1FZssTVxUqNlJ6cBTj5YQj4imWy3m49RZRnHhLpefFIh0To05ow9DTrXROTE1urGTQCloFUXTX8QfGJy1P8dQ== +esbuild-darwin-arm64@0.14.37: + version "0.14.37" + resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.37.tgz#2d4ffb4f0e65567290b69c4e9a0f7b4a8d4ec5ce" + integrity sha512-eFwy5il5yvIHAVau97kWoNYfxuCd1X7hfgKc4Ns5ymlYXhyRzRywwJfknHax5rDyZxfDXtnFaT/nftUiYwsHIQ== + esbuild-freebsd-64@0.13.15: version "0.13.15" resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.13.15.tgz#0b8b7eca1690c8ec94c75680c38c07269c1f4a85" integrity sha512-G3dLBXUI6lC6Z09/x+WtXBXbOYQZ0E8TDBqvn7aMaOCzryJs8LyVXKY4CPnHFXZAbSwkCbqiPuSQ1+HhrNk7EA== +esbuild-freebsd-64@0.14.37: + version "0.14.37" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.37.tgz#e70c6f3c600fa52faf135aeeb6a5e6bfd90dd8dc" + integrity sha512-4iFbdmohve6wyPwsVPe/1j5rVwg5uPTopmgIUiJBbnPKMmo8NecUSbz3HwddsDHLrvGoIs5aOiETPWo9rg3wyg== + esbuild-freebsd-arm64@0.13.15: version "0.13.15" resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.13.15.tgz#2e1a6c696bfdcd20a99578b76350b41db1934e52" integrity sha512-KJx0fzEDf1uhNOZQStV4ujg30WlnwqUASaGSFPhznLM/bbheu9HhqZ6mJJZM32lkyfGJikw0jg7v3S0oAvtvQQ== +esbuild-freebsd-arm64@0.14.37: + version "0.14.37" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.37.tgz#2379edb519847d2bb1703033ffe9fb6a4627bfc5" + integrity sha512-MGmZ9akBdqcIH7FcWhUrVTmTW18Xz/EVrvBcV6BHSFDQci0YnOhPAGCrV54t1JNG/5poHNBnaG3R2zNxnmJT5Q== + esbuild-linux-32@0.13.15: version "0.13.15" resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.13.15.tgz#6fd39f36fc66dd45b6b5f515728c7bbebc342a69" integrity sha512-ZvTBPk0YWCLMCXiFmD5EUtB30zIPvC5Itxz0mdTu/xZBbbHJftQgLWY49wEPSn2T/TxahYCRDWun5smRa0Tu+g== +esbuild-linux-32@0.14.37: + version "0.14.37" + resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.37.tgz#727907c90b1863a908cadfa56261005663f47ee5" + integrity sha512-UCyQrn3n3dHXHDQTPO3gWxfoqtEpGObBdAgevuUtw0//TSyNftnaLcQYyBiGC6J85sM8f/c+Minz5jUFOKrmOA== + esbuild-linux-64@0.13.15: version "0.13.15" resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.13.15.tgz#9cb8e4bcd7574e67946e4ee5f1f1e12386bb6dd3" integrity sha512-eCKzkNSLywNeQTRBxJRQ0jxRCl2YWdMB3+PkWFo2BBQYC5mISLIVIjThNtn6HUNqua1pnvgP5xX0nHbZbPj5oA== +esbuild-linux-64@0.14.37: + version "0.14.37" + resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.37.tgz#068deed6b0bf09f6f7eaad371cadde4085945ca7" + integrity sha512-UURL6k1Ffr6K4faFgdP6lKVvMKYwq8JmAh+odCukzIWN4EpjIzgmhBUzyFVU+VQLh1+K3tlE1SPJ057PNpayUQ== + esbuild-linux-arm64@0.13.15: version "0.13.15" resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.13.15.tgz#3891aa3704ec579a1b92d2a586122e5b6a2bfba1" integrity sha512-bYpuUlN6qYU9slzr/ltyLTR9YTBS7qUDymO8SV7kjeNext61OdmqFAzuVZom+OLW1HPHseBfJ/JfdSlx8oTUoA== +esbuild-linux-arm64@0.14.37: + version "0.14.37" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.37.tgz#f433ae4902003d8b499c05ab3b48b99a6e79c8f6" + integrity sha512-vDHyuFsDpz6nquJO7CAxU2CBj+PB+BJhGawzBrHtcM249fXK4GfVNVArgWFKkSGMZW1ZpKSeef7FeOvM6juhPg== + esbuild-linux-arm@0.13.15: version "0.13.15" resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.13.15.tgz#8a00e99e6a0c6c9a6b7f334841364d8a2b4aecfe" integrity sha512-wUHttDi/ol0tD8ZgUMDH8Ef7IbDX+/UsWJOXaAyTdkT7Yy9ZBqPg8bgB/Dn3CZ9SBpNieozrPRHm0BGww7W/jA== +esbuild-linux-arm@0.14.37: + version "0.14.37" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.37.tgz#7789d3fc96c2edc2ebf96cc0fadc3708668de399" + integrity sha512-SgWcdAivyK2z2kcYAGwLTBSTECXXj/lC0S/BiayyHLYJHA6C3aEGexB6ZDMgffj4Quy/l3Tyr9ktZh8bgcmJrA== + esbuild-linux-mips64le@0.13.15: version "0.13.15" resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.13.15.tgz#36b07cc47c3d21e48db3bb1f4d9ef8f46aead4f7" integrity sha512-KlVjIG828uFPyJkO/8gKwy9RbXhCEUeFsCGOJBepUlpa7G8/SeZgncUEz/tOOUJTcWMTmFMtdd3GElGyAtbSWg== +esbuild-linux-mips64le@0.14.37: + version "0.14.37" + resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.37.tgz#7f100a9b0ea6d60bd1585bdd75d5d7d3ea432bf4" + integrity sha512-azRAGYGKg3dxbYE7C+L35/2Oyg1RCuXvT3Z8M76JZF2N1ZNEA9g01zbuw3GtXWLyI6mhhoHxQL0H1SQUL0At1w== + esbuild-linux-ppc64le@0.13.15: version "0.13.15" resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.13.15.tgz#f7e6bba40b9a11eb9dcae5b01550ea04670edad2" integrity sha512-h6gYF+OsaqEuBjeesTBtUPw0bmiDu7eAeuc2OEH9S6mV9/jPhPdhOWzdeshb0BskRZxPhxPOjqZ+/OqLcxQwEQ== +esbuild-linux-ppc64le@0.14.37: + version "0.14.37" + resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.37.tgz#11d839accb1b97398959c9c64644aed2a7757f5e" + integrity sha512-SyNitGH/h7Hti7A+a5rkRDHhjra1TM1JnJJymRndOzw5Vd+AkWpoSQxxTfvmRw62g42zoeHBgcyrvGfT053l5w== + +esbuild-linux-riscv64@0.14.37: + version "0.14.37" + resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.37.tgz#467cdea5fbd3c26bd7a342bfaf07b131be6738af" + integrity sha512-IgEwVXYGC3HpCmZ1nl+vZw1h72i9WEf4mx+JBZ1s+Z0QVGww/8LI6oYZVboPtr7Lok1gKdg5tUZdFukGn5Fr/A== + +esbuild-linux-s390x@0.14.37: + version "0.14.37" + resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.37.tgz#e4fcb6cabf13baa2f8699f30c9668b9383945ee4" + integrity sha512-X105T1x7PV9pZ/rDpOeNiTWGBd1A0BGUbi6hK9BW7X8IxzQZNwAsaahLOlAFf+OKezoSQrhHfNdBwIu9UZMmtw== + esbuild-netbsd-64@0.13.15: version "0.13.15" resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.13.15.tgz#a2fedc549c2b629d580a732d840712b08d440038" integrity sha512-3+yE9emwoevLMyvu+iR3rsa+Xwhie7ZEHMGDQ6dkqP/ndFzRHkobHUKTe+NCApSqG5ce2z4rFu+NX/UHnxlh3w== +esbuild-netbsd-64@0.14.37: + version "0.14.37" + resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.37.tgz#ec06cfbec53fd5331fecfcc11d752b8aff840c53" + integrity sha512-93mHLGTTFWAemDNGxlx0RJyNQ4E2OnnUGNHpNhKu/zzYw/Imf6dWGB6h7e9axtce8yOg5rOnx8BMhRu0NwQnKA== + esbuild-openbsd-64@0.13.15: version "0.13.15" resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.13.15.tgz#b22c0e5806d3a1fbf0325872037f885306b05cd7" integrity sha512-wTfvtwYJYAFL1fSs8yHIdf5GEE4NkbtbXtjLWjM3Cw8mmQKqsg8kTiqJ9NJQe5NX/5Qlo7Xd9r1yKMMkHllp5g== +esbuild-openbsd-64@0.14.37: + version "0.14.37" + resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.37.tgz#4c8f6640a2a961ad28e74638731512f204be2a3a" + integrity sha512-jdhv2koRbF69artwD4aaSS72b+syfcdVHKs1SqjyfPvi/MsL7OC+jWGOSCZ329RmnECAwCOaL4dO7ZaJiLLj3Q== + esbuild-sunos-64@0.13.15: version "0.13.15" resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.13.15.tgz#d0b6454a88375ee8d3964daeff55c85c91c7cef4" integrity sha512-lbivT9Bx3t1iWWrSnGyBP9ODriEvWDRiweAs69vI+miJoeKwHWOComSRukttbuzjZ8r1q0mQJ8Z7yUsDJ3hKdw== +esbuild-sunos-64@0.14.37: + version "0.14.37" + resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.37.tgz#c529c3838c0a8c797b2cf94bb6b8edf761cdc126" + integrity sha512-YvQsr++g0ZBHJUjPeR1Ui81eFcZTH5qJp8s5GP8jur0BwBM+2wCTNutXSh/ZKYp+4ejOo54PFTy3tGo36q7D6g== + esbuild-windows-32@0.13.15: version "0.13.15" resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.13.15.tgz#c96d0b9bbb52f3303322582ef8e4847c5ad375a7" integrity sha512-fDMEf2g3SsJ599MBr50cY5ve5lP1wyVwTe6aLJsM01KtxyKkB4UT+fc5MXQFn3RLrAIAZOG+tHC+yXObpSn7Nw== +esbuild-windows-32@0.14.37: + version "0.14.37" + resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.37.tgz#719e02307545bda14b3b74cf2652884c5ea42725" + integrity sha512-aQlHyME09dWo2FVAniTXLurr/xYZre5bJrnW8yALPUu09ExCC7LzlFQFoJuuSyCdMDHcxYLc6HcrJLwRdR3b/Q== + esbuild-windows-64@0.13.15: version "0.13.15" resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.13.15.tgz#1f79cb9b1e1bb02fb25cd414cb90d4ea2892c294" integrity sha512-9aMsPRGDWCd3bGjUIKG/ZOJPKsiztlxl/Q3C1XDswO6eNX/Jtwu4M+jb6YDH9hRSUflQWX0XKAfWzgy5Wk54JQ== +esbuild-windows-64@0.14.37: + version "0.14.37" + resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.37.tgz#a1481bda1e9d963b6c4fed37d5f6dbe483b1035b" + integrity sha512-4mJjpS71AV4rj5PXrOn19uQwiASiyziJwyZT+qQ3M/hc/fIWS2Pgv5gbgytC1O8jptMB6NIpgrauCw56lKgckA== + esbuild-windows-arm64@0.13.15: version "0.13.15" resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.13.15.tgz#482173070810df22a752c686509c370c3be3b3c3" integrity sha512-zzvyCVVpbwQQATaf3IG8mu1IwGEiDxKkYUdA4FpoCHi1KtPa13jeScYDjlW0Qh+ebWzpKfR2ZwvqAQkSWNcKjA== +esbuild-windows-arm64@0.14.37: + version "0.14.37" + resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.37.tgz#eb1b1b848dcedf0b57fdf207df9879fe3aaaf3cd" + integrity sha512-wQy+sAKD7/d6vDrgH+i+ZdbRLVHGG5BjBpBRStvGgLiuIo46/QEQCaHbBy2LOtXu/o1JYchxilzeQ+ExZdYkeA== + esbuild@0.12.15: version "0.12.15" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.12.15.tgz#9d99cf39aeb2188265c5983e983e236829f08af0" @@ -10818,6 +11021,32 @@ esbuild@^0.13.12: esbuild-windows-64 "0.13.15" esbuild-windows-arm64 "0.13.15" +esbuild@^0.14.27: + version "0.14.37" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.37.tgz#24a73ed0ded0b582dd184101427df94897e88fac" + integrity sha512-sPlTpEkjzgFjWjYdve5xM1A3fpKXWNc+0yh0u9tqdER992OEpvde1c/+5rbRFsaSEEjQM9qXRcYn3EvNwgLF9w== + optionalDependencies: + esbuild-android-64 "0.14.37" + esbuild-android-arm64 "0.14.37" + esbuild-darwin-64 "0.14.37" + esbuild-darwin-arm64 "0.14.37" + esbuild-freebsd-64 "0.14.37" + esbuild-freebsd-arm64 "0.14.37" + esbuild-linux-32 "0.14.37" + esbuild-linux-64 "0.14.37" + esbuild-linux-arm "0.14.37" + esbuild-linux-arm64 "0.14.37" + esbuild-linux-mips64le "0.14.37" + esbuild-linux-ppc64le "0.14.37" + esbuild-linux-riscv64 "0.14.37" + esbuild-linux-s390x "0.14.37" + esbuild-netbsd-64 "0.14.37" + esbuild-openbsd-64 "0.14.37" + esbuild-sunos-64 "0.14.37" + esbuild-windows-32 "0.14.37" + esbuild-windows-64 "0.14.37" + esbuild-windows-arm64 "0.14.37" + escalade@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.0.2.tgz#6a580d70edb87880f22b4c91d0d56078df6962c4" @@ -12537,15 +12766,15 @@ grapheme-splitter@^1.0.4: integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== "graphiql@file:packages/graphiql": - version "1.8.5" + version "1.8.7" dependencies: "@graphiql/toolkit" "^0.4.3" codemirror "^5.58.2" - codemirror-graphql "^1.2.16" + codemirror-graphql "^1.2.17" copy-to-clipboard "^3.2.0" entities "^2.0.0" escape-html "^1.0.3" - graphql-language-service "^5.0.2" + graphql-language-service "^5.0.3" markdown-it "^12.2.0" set-value "^4.1.0" @@ -13515,6 +13744,13 @@ is-core-module@^2.2.0: dependencies: has "^1.0.3" +is-core-module@^2.8.1: + version "2.9.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" + integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A== + dependencies: + has "^1.0.3" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -13567,6 +13803,11 @@ is-docker@^2.0.0: resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.1.1.tgz#4125a88e44e450d384e09047ede71adc2d144156" integrity sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw== +is-docker@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + is-dotfile@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" @@ -13916,7 +14157,7 @@ is-wsl@^1.1.0: resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= -is-wsl@^2.1.1: +is-wsl@^2.1.1, is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== @@ -15313,6 +15554,11 @@ json5@^2.1.1: dependencies: minimist "^1.2.5" +json5@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" + integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== + jsonc-parser@3.0.0, jsonc-parser@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.0.0.tgz#abdd785701c7e7eaca8a9ec8cf070ca51a745a22" @@ -16456,6 +16702,11 @@ nanoid@^3.1.30: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.30.tgz#63f93cc548d2a113dc5dfbc63bfa09e2b9b64362" integrity sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ== +nanoid@^3.1.32, nanoid@^3.3.1: + version "3.3.3" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" + integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -16984,6 +17235,15 @@ open@^7.0.2: is-docker "^2.0.0" is-wsl "^2.1.1" +open@^8.4.0: + version "8.4.0" + resolved "https://registry.yarnpkg.com/open/-/open-8.4.0.tgz#345321ae18f8138f82565a910fdc6b39e8c244f8" + integrity sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q== + dependencies: + define-lazy-prop "^2.0.0" + is-docker "^2.1.1" + is-wsl "^2.2.0" + opencollective-postinstall@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259" @@ -17361,6 +17621,11 @@ path-parse@^1.0.6: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" @@ -18230,6 +18495,15 @@ postcss@^8.3.11: picocolors "^1.0.0" source-map-js "^1.0.1" +postcss@^8.4.12: + version "8.4.12" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.12.tgz#1e7de78733b28970fa4743f7da6f3763648b1905" + integrity sha512-lg6eITwYe9v6Hr5CncVbK70SoioNQIq81nsaG86ev5hAidQvmOeETBqs7jm43K2F5/Ley3ytDtriImV6TpNiSg== + dependencies: + nanoid "^3.3.1" + picocolors "^1.0.0" + source-map-js "^1.0.2" + prebuild-install@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-7.0.1.tgz#c10075727c318efe72412f333e0ef625beaf3870" @@ -18888,6 +19162,11 @@ react-popper@^1.3.7: typed-styles "^0.0.7" warning "^4.0.2" +react-refresh@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.10.0.tgz#2f536c9660c0b9b1d500684d9e52a65e7404f7e3" + integrity sha512-PgidR3wST3dDYKr6b4pJoqQFpPGNKDSCDx4cZoshjXipw3LzO7mG1My2pwEzz2JVkF+inx3xRpDeQLFQGH/hsQ== + react-refresh@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.11.0.tgz#77198b944733f0f1f1a90e791de4541f9f074046" @@ -19484,6 +19763,15 @@ resolve@^1.12.0: dependencies: path-parse "^1.0.6" +resolve@^1.22.0: + version "1.22.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" + integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== + dependencies: + is-core-module "^2.8.1" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + responselike@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" @@ -19569,6 +19857,16 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" +rollup-plugin-visualizer@^5.6.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-visualizer/-/rollup-plugin-visualizer-5.6.0.tgz#06aa7cf3fd504a29d404335700f2a3f28ebb33f3" + integrity sha512-CKcc8GTUZjC+LsMytU8ocRr/cGZIfMR7+mdy4YnlyetlmIl/dM8BMnOEpD4JPIGt+ZVW7Db9ZtSsbgyeBH3uTA== + dependencies: + nanoid "^3.1.32" + open "^8.4.0" + source-map "^0.7.3" + yargs "^17.3.1" + rollup@^2.59.0: version "2.60.2" resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.60.2.tgz#3f45ace36a9b10b4297181831ea0719922513463" @@ -19576,6 +19874,19 @@ rollup@^2.59.0: optionalDependencies: fsevents "~2.3.2" +router@^1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/router/-/router-1.3.6.tgz#35302dc8d69f75b00797d618d92d6c9fb35604bf" + integrity sha512-gsjhou+LFApzkIP8VDrouG6Z4pqkeF11n3o5orlwPPvPTl0x7c+dbF71itKOhDoFHygmc3N3uqm55Uq/gIDUwg== + dependencies: + array-flatten "3.0.0" + debug "2.6.9" + methods "~1.1.2" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + setprototypeof "1.2.0" + utils-merge "1.0.1" + rsvp@^4.8.4: version "4.8.5" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" @@ -20234,6 +20545,11 @@ source-map-js@^1.0.1: resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.1.tgz#a1741c131e3c77d048252adfa24e23b908670caf" integrity sha512-4+TN2b3tqOCd/kaGRJ/sTYA0tR0mdXx26ipdolxcwtJVqEnqNYvlCAt1q3ypy4QMlYus+Zh34RNtYLoq2oQ4IA== +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== + source-map-resolve@^0.5.0: version "0.5.3" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" @@ -20603,6 +20919,15 @@ string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" +string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + "string.prototype.matchall@^4.0.0 || ^3.0.1", string.prototype.matchall@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.2.tgz#48bb510326fb9fdeb6a33ceaa81a6ea04ef7648e" @@ -20732,6 +21057,13 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" +strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-bom-buffer@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/strip-bom-buffer/-/strip-bom-buffer-0.1.1.tgz#ca3ddc4919c13f9fddf30b1dff100a9835248b4d" @@ -20901,6 +21233,11 @@ supports-hyperlinks@^2.0.0: has-flag "^4.0.0" supports-color "^7.0.0" +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + svg-parser@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/svg-parser/-/svg-parser-2.0.4.tgz#fdc2e29e13951736140b76cb122c8ee6630eb6b5" @@ -21942,6 +22279,18 @@ vite@^2.7.0: optionalDependencies: fsevents "~2.3.2" +vite@^2.9.5: + version "2.9.5" + resolved "https://registry.yarnpkg.com/vite/-/vite-2.9.5.tgz#08ef37ac7a6d879c96f328b791732c9a00ea25ea" + integrity sha512-dvMN64X2YEQgSXF1lYabKXw3BbN6e+BL67+P3Vy4MacnY+UzT1AfkHiioFSi9+uiDUiaDy7Ax/LQqivk6orilg== + dependencies: + esbuild "^0.14.27" + postcss "^8.4.12" + resolve "^1.22.0" + rollup "^2.59.0" + optionalDependencies: + fsevents "~2.3.2" + vm-browserify@^1.0.1: version "1.1.2" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" @@ -22735,6 +23084,11 @@ yargs-parser@^20.2.2, yargs-parser@^20.2.3: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.7.tgz#61df85c113edfb5a7a4e36eb8aa60ef423cbc90a" integrity sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw== +yargs-parser@^21.0.0: + version "21.0.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.0.1.tgz#0267f286c877a4f0f728fceb6f8a3e4cb95c6e35" + integrity sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg== + yargs@^13.0.0, yargs@^13.3.0, yargs@^13.3.2: version "13.3.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" @@ -22781,6 +23135,19 @@ yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" +yargs@^17.3.1: + version "17.4.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.4.1.tgz#ebe23284207bb75cee7c408c33e722bfb27b5284" + integrity sha512-WSZD9jgobAg3ZKuCQZSa3g9QOJeCCqLoLAykiWgmXnDo9EPnn4RPf5qVTtzgOx66o6/oqhcA5tHtJXpG8pMt3g== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.0.0" + yauzl@^2.10.0, yauzl@^2.3.1: version "2.10.0" resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" From 1c0b7026bb3e5671b6bf136a41ba49211cf59433 Mon Sep 17 00:00:00 2001 From: rxliuli Date: Fri, 22 Apr 2022 14:16:43 +0800 Subject: [PATCH 2/4] fix: Fix unit test --- jest.config.base.js | 1 + packages/graphiql/package.json | 2 +- packages/graphiql/src/main.tsx | 47 +++++++++++++++++++++++++------ packages/graphiql/tsconfig.json | 2 ++ resources/tsconfig.build.esm.json | 4 +-- 5 files changed, 44 insertions(+), 12 deletions(-) diff --git a/jest.config.base.js b/jest.config.base.js index b29e8d4ee53..9c66e3ddc6a 100644 --- a/jest.config.base.js +++ b/jest.config.base.js @@ -22,6 +22,7 @@ module.exports = (dir, env = 'dom') => { '\\.(css|less)$': 'identity-obj-proxy', '^graphql-language-([^/]+)': `${__dirname}/packages/graphql-language-$1/src`, '^@graphiql-plugins\\/([^/]+)': `${__dirname}/plugins/$1/src`, + '^codemirror-graphql\\/esm\\/([^]+)': `${__dirname}/packages/codemirror-graphql/src/$1`, '^codemirror-graphql\\/([^]+)': `${__dirname}/packages/codemirror-graphql/src/$1`, '^example-([^/]+)': `${__dirname}/examples/$1/src`, }, diff --git a/packages/graphiql/package.json b/packages/graphiql/package.json index 1ceb7231443..7e00e3ccc5b 100644 --- a/packages/graphiql/package.json +++ b/packages/graphiql/package.json @@ -30,7 +30,7 @@ "analyze-bundle": "cross-env NODE_ENV=production CDN=1 ANALYZE=1 yarn webpack -p", "build": "yarn build-cjs && yarn build-esm", "build-bundles": "yarn build-bundles-clean && yarn build-bundles-dev && yarn build-bundles-min", - "build-bundles-clean": "rimraf 'graphiql.*{js,css}' *.html", + "build-bundles-clean": "rimraf 'graphiql.*{js,css}'", "build-bundles-dev": "cross-env NODE_ENV=development CDN=1 yarn vite build --mode dev", "build-bundles-min": "cross-env ANALYZE=1 NODE_ENV=production CDN=1 vite build", "build-cjs": "tsc", diff --git a/packages/graphiql/src/main.tsx b/packages/graphiql/src/main.tsx index 97f95f39916..3a944e77d72 100644 --- a/packages/graphiql/src/main.tsx +++ b/packages/graphiql/src/main.tsx @@ -26,14 +26,15 @@ import './css/doc-explorer.css'; import './css/history.css'; // Parse the search string to get url parameters. -var search = window.location.search; -var parameters = {}; +const search = window.location.search; +const parameters = {}; search .substr(1) .split('&') .forEach(function (entry) { - var eq = entry.indexOf('='); + const eq = entry.indexOf('='); if (eq >= 0) { + // @ts-expect-error parameters[decodeURIComponent(entry.slice(0, eq))] = decodeURIComponent( entry.slice(eq + 1), ); @@ -41,9 +42,12 @@ search }); // If variables was provided, try to format it. +// @ts-expect-error if (parameters.variables) { try { + // @ts-expect-error parameters.variables = JSON.stringify( + // @ts-expect-error JSON.parse(parameters.variables), null, 2, @@ -55,9 +59,12 @@ if (parameters.variables) { } // If headers was provided, try to format it. +// @ts-expect-error if (parameters.headers) { try { + // @ts-expect-error parameters.headers = JSON.stringify( + // @ts-expect-error JSON.parse(parameters.headers), null, 2, @@ -70,48 +77,64 @@ if (parameters.headers) { // When the query and variables string is edited, update the URL bar so // that it can be easily shared. +// @ts-expect-error function onEditQuery(newQuery) { + // @ts-expect-error parameters.query = newQuery; updateURL(); } +// @ts-expect-error function onEditVariables(newVariables) { + // @ts-expect-error parameters.variables = newVariables; updateURL(); } +// @ts-expect-error function onEditHeaders(newHeaders) { + // @ts-expect-error parameters.headers = newHeaders; updateURL(); } +// @ts-expect-error function onEditOperationName(newOperationName) { + // @ts-expect-error parameters.operationName = newOperationName; updateURL(); } +// @ts-expect-error function onTabChange(tabsState) { const activeTab = tabsState.tabs[tabsState.activeTabIndex]; + // @ts-expect-error parameters.query = activeTab.query; + // @ts-expect-error parameters.variables = activeTab.variables; + // @ts-expect-error parameters.headers = activeTab.headers; + // @ts-expect-error parameters.operationName = activeTab.operationName; updateURL(); } function updateURL() { - var newSearch = + const newSearch = '?' + Object.keys(parameters) .filter(function (key) { + // @ts-expect-error return Boolean(parameters[key]); }) .map(function (key) { return ( + // @ts-expect-error encodeURIComponent(key) + '=' + encodeURIComponent(parameters[key]) ); }) .join('&'); + // @ts-expect-error history.replaceState(null, null, newSearch); } @@ -120,6 +143,7 @@ function getSchemaUrl() { if (isDev) { // This supports an e2e test which ensures that invalid schemas do not load. + // @ts-expect-error if (parameters.bad && parameters.bad === 'true') { return '/bad/graphql'; } else { @@ -135,24 +159,29 @@ function getSchemaUrl() { // additional child elements. ReactDOM.render( React.createElement(GraphiQL, { + // @ts-expect-error fetcher: GraphiQL.createFetcher({ url: getSchemaUrl(), subscriptionUrl: 'ws://localhost:8081/subscriptions', }), + // @ts-expect-error query: parameters.query, + // @ts-expect-error variables: parameters.variables, + // @ts-expect-error headers: parameters.headers, + // @ts-expect-error operationName: parameters.operationName, - onEditQuery: onEditQuery, - onEditVariables: onEditVariables, - onEditHeaders: onEditHeaders, + onEditQuery, + onEditVariables, + onEditHeaders, defaultSecondaryEditorOpen: true, - onEditOperationName: onEditOperationName, + onEditOperationName, headerEditorEnabled: true, shouldPersistHeaders: true, inputValueDeprecation: true, tabs: { - onTabChange: onTabChange, + onTabChange, }, }), document.getElementById('graphiql'), diff --git a/packages/graphiql/tsconfig.json b/packages/graphiql/tsconfig.json index 1d49cef495d..40e5a0c9bbd 100644 --- a/packages/graphiql/tsconfig.json +++ b/packages/graphiql/tsconfig.json @@ -6,6 +6,8 @@ "composite": true, "jsx": "react", "target": "ESNext", + "skipDefaultLibCheck": true, + "skipLibCheck": true, "strictPropertyInitialization": false }, "include": ["src"], diff --git a/resources/tsconfig.build.esm.json b/resources/tsconfig.build.esm.json index 97890a08c7c..7bfb98cf0ae 100644 --- a/resources/tsconfig.build.esm.json +++ b/resources/tsconfig.build.esm.json @@ -9,10 +9,10 @@ "path": "../packages/graphiql-toolkit/tsconfig.esm.json" }, { - "path": "../packages/graphiql/tsconfig.esm.json" + "path": "../packages/codemirror-graphql/tsconfig.esm.json" }, { - "path": "../packages/codemirror-graphql/tsconfig.esm.json" + "path": "../packages/graphiql/tsconfig.esm.json" }, { "path": "../packages/monaco-graphql/tsconfig.esm.json" From 1a0a3efad699dab9e78d70b0350490b8a0202e1e Mon Sep 17 00:00:00 2001 From: rxliuli Date: Fri, 22 Apr 2022 14:45:27 +0800 Subject: [PATCH 3/4] fix: Fixed erroneously compiling main.tsx also as lib --- packages/graphiql/tsconfig.esm.json | 1 + packages/graphiql/tsconfig.json | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/graphiql/tsconfig.esm.json b/packages/graphiql/tsconfig.esm.json index 41006f1ef51..26c8e1b95fa 100644 --- a/packages/graphiql/tsconfig.esm.json +++ b/packages/graphiql/tsconfig.esm.json @@ -10,6 +10,7 @@ }, "include": ["src"], "exclude": [ + "src/main.tsx", "**/__tests__/**", "**/dist/**.*", "**/*.spec.ts", diff --git a/packages/graphiql/tsconfig.json b/packages/graphiql/tsconfig.json index 40e5a0c9bbd..a5a5cc06317 100644 --- a/packages/graphiql/tsconfig.json +++ b/packages/graphiql/tsconfig.json @@ -12,6 +12,7 @@ }, "include": ["src"], "exclude": [ + "src/main.tsx", "**/__tests__/**", "**/dist/**.*", "**/*.spec.ts", From 33fa0f1b0854b613dffd26d20b96cf4386899bc4 Mon Sep 17 00:00:00 2001 From: Shabab Karim Date: Sun, 7 Aug 2022 09:11:29 +0200 Subject: [PATCH 4/4] Resolved comments --- packages/graphiql/index.html | 8 +- packages/graphiql/src/main.tsx | 188 ------------------------------- packages/graphiql/tsconfig.json | 1 - packages/graphiql/vite.config.ts | 13 +++ 4 files changed, 18 insertions(+), 192 deletions(-) delete mode 100644 packages/graphiql/src/main.tsx diff --git a/packages/graphiql/index.html b/packages/graphiql/index.html index 78c0ef93d50..132e9cf49c4 100644 --- a/packages/graphiql/index.html +++ b/packages/graphiql/index.html @@ -1,5 +1,5 @@ + +