Skip to content

Commit 64c4dae

Browse files
committed
all in one
1 parent 537a8f9 commit 64c4dae

File tree

208 files changed

+3999
-3278
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+3999
-3278
lines changed

.changeset/soft-cars-notice.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'graphiql': major
3+
'@graphiql/react': minor
4+
'monaco-graphql': minor
5+
---
6+
7+
replace Codemirror editor with Monaco editor and Monaco GraphQL

.eslintrc.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ module.exports = {
393393
'@typescript-eslint/consistent-type-assertions': 'error',
394394
'@typescript-eslint/no-duplicate-type-constituents': 'error',
395395
'@typescript-eslint/no-unnecessary-type-conversion': 'error',
396+
// '@typescript-eslint/await-thenable': 'error', // TODO
396397
// TODO: Fix all errors for the following rules included in recommended config
397398
'@typescript-eslint/no-deprecated': 'off',
398399
'@typescript-eslint/no-unsafe-function-type': 'off',
@@ -409,11 +410,10 @@ module.exports = {
409410
projectService: {
410411
allowDefaultProject: [
411412
'examples/monaco-graphql-react-vite/vite.config.ts',
412-
'packages/graphiql/vite.config.mts',
413-
'packages/{codemirror-graphql,graphiql-toolkit,graphql-language-service-cli,graphql-language-service,monaco-graphql,vscode-graphql-syntax,graphiql}/vitest.config.mts',
413+
'packages/{codemirror-graphql,graphiql-toolkit,graphql-language-service-cli,graphql-language-service,monaco-graphql,vscode-graphql-syntax}/vitest.config.mts',
414414

415415
'packages/cm6-graphql/__tests__/test.spec.ts',
416-
'packages/graphiql/src/GraphiQL.spec.tsx',
416+
'packages/graphiql/cypress.config.ts',
417417
'packages/vscode-graphql-syntax/tests/*.spec.ts',
418418
'packages/graphql-language-service-cli/src/__tests__/*.test.ts',
419419
'packages/monaco-graphql/test/monaco-editor.test.ts',
@@ -515,7 +515,9 @@ module.exports = {
515515
rules: {
516516
'@typescript-eslint/no-restricted-imports': [
517517
'error',
518-
...RESTRICTED_IMPORTS,
518+
...RESTRICTED_IMPORTS
519+
// TODO: enable when monaco-editor will be migrated over codemirror
520+
.filter(({ name }) => name !== 'monaco-editor'),
519521
{
520522
name: 'react',
521523
importNames: ['memo', 'useCallback', 'useMemo'],

.github/workflows/pr.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,9 @@ jobs:
3636
name: Build
3737
runs-on: ubuntu-latest
3838
needs: [install]
39-
4039
steps:
4140
- uses: actions/checkout@v4
4241
- uses: actions/setup-node@v4
43-
4442
- id: cache-modules
4543
uses: actions/cache@v4
4644
with:
@@ -109,18 +107,15 @@ jobs:
109107
name: Vitest Unit Tests
110108
runs-on: ubuntu-latest
111109
needs: [build]
112-
113110
steps:
114111
- uses: actions/checkout@v4
115112
- uses: actions/setup-node@v4
116-
117113
- id: cache-modules
118114
uses: actions/cache@v4
119115
with:
120116
path: |
121117
**/node_modules
122118
key: modules-${{ github.sha }}
123-
124119
- uses: actions/cache@v4
125120
with:
126121
key: build-${{ github.sha }}
@@ -131,11 +126,9 @@ jobs:
131126
name: ESLint
132127
runs-on: ubuntu-latest
133128
needs: [build]
134-
135129
steps:
136130
- uses: actions/checkout@v4
137131
- uses: actions/setup-node@v4
138-
139132
- id: cache-modules
140133
uses: actions/cache@v4
141134
with:
@@ -148,11 +141,29 @@ jobs:
148141
path: ${{ env.BUILD-CACHE-LIST }}
149142
- run: yarn eslint
150143

144+
types-check:
145+
name: Types Check
146+
runs-on: ubuntu-latest
147+
needs: [build]
148+
steps:
149+
- uses: actions/checkout@v4
150+
- uses: actions/setup-node@v4
151+
- id: cache-modules
152+
uses: actions/cache@v4
153+
with:
154+
path: |
155+
**/node_modules
156+
key: modules-${{ github.sha }}
157+
- uses: actions/cache@v4
158+
with:
159+
key: build-${{ github.sha }}
160+
path: ${{ env.BUILD-CACHE-LIST }}
161+
- run: yarn types:check
162+
151163
e2e:
152164
name: Cypress
153165
runs-on: ubuntu-latest
154166
needs: [build]
155-
156167
steps:
157168
- uses: actions/checkout@v4
158169
- id: cache-modules

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
"coverage.xml",
1212
"jacoco.xml",
1313
"coverage.cobertura.xml"
14-
]
14+
],
15+
"typescript.tsdk": "node_modules/typescript/lib"
1516
}

cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"**/esbuild.js",
2020
".eslintrc.js",
2121
".vscode/extensions.json",
22+
"packages/monaco-graphql/test/monaco-editor.test.ts",
2223
"working-group"
2324
],
2425
"files": ["**/*.{js,cjs,mjs,ts,jsx,tsx,md,mdx,html,json,css,toml,yaml,yml}"]

examples/graphiql-cdn/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
<style>
1515
body {
1616
margin: 0;
17-
overflow: hidden; /* in Firefox */
1817
}
1918

2019
#graphiql {
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# GraphiQL `create-react-app` Example
22

3-
This example demonstrates how to transpile your own custom ES6 and typescript GraphiQL implementation bootstrapped with `create-react-app`, no config needed.
4-
5-
## Setup
6-
7-
1. `yarn` and `yarn start` from this folder to start `react-scripts` dev server.
8-
1. `yarn build` from this folder to build production ready transpiled files using `react-scripts`. Find the output in `build` folder.
3+
> [!WARNING]
4+
>
5+
> This example has been removed. You can find its last version [here](https://github.com/graphql/graphiql/tree/3b93d27f7568d93db5cd146157220b127eeea737/examples/graphiql-create-react-app).
6+
> We recommend using the [GraphiQL Vite](../graphiql-vite) or [GraphiQL Next.js](../graphiql-nextjs) examples instead.

examples/graphiql-create-react-app/package.json

Lines changed: 0 additions & 31 deletions
This file was deleted.

examples/graphiql-create-react-app/public/index.html

Lines changed: 0 additions & 30 deletions
This file was deleted.

examples/graphiql-create-react-app/src/App.jsx

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)