Skip to content

Commit 2936a79

Browse files
authored
Merge branch 'main' into sse
2 parents c35884d + a929862 commit 2936a79

File tree

18 files changed

+61
-31
lines changed

18 files changed

+61
-31
lines changed

examples/graphiql-webpack/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"@graphiql/plugin-code-exporter": "^3.1.2",
1313
"@graphiql/plugin-explorer": "^3.2.2",
1414
"@graphiql/toolkit": "^0.11.0",
15-
"@graphiql/react": "^0.26.1",
16-
"graphiql": "^3.7.0",
15+
"@graphiql/react": "^0.26.2",
16+
"graphiql": "^3.7.1",
1717
"graphql": "^16.8.1",
1818
"graphql-ws": "^5.5.5",
1919
"react": "^18.2.0",

packages/cm6-graphql/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# cm6-graphql
22

3+
## 0.1.1
4+
5+
### Patch Changes
6+
7+
- [#3751](https://github.com/graphql/graphiql/pull/3751) [`b8538d8`](https://github.com/graphql/graphiql/commit/b8538d87421edb086b32d4eb2e30a3f7d9d9e893) Thanks [@dimaMachina](https://github.com/dimaMachina)! - replace deprecated `navigator.platform` with `navigator.userAgent`
8+
9+
fix placeholder `⌘ K` in doc explorer search input for non mac devices, replace by `Ctrl K`
10+
311
## 0.1.0
412

513
### Minor Changes

packages/cm6-graphql/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cm6-graphql",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "GraphQL language support for CodeMirror 6",
55
"scripts": {
66
"build": "cm-buildhelper src/index.ts",

packages/cm6-graphql/src/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ export class Position implements IPosition {
3838
}
3939
}
4040

41-
const isMac = () => /mac/i.test(navigator.platform);
41+
const isMac = () => navigator.userAgent.includes('Mac');
4242
export const isMetaKeyPressed = (e: MouseEvent) =>
4343
isMac() ? e.metaKey : e.ctrlKey;

packages/codemirror-graphql/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Change Log
22

3+
## 2.1.1
4+
5+
### Patch Changes
6+
7+
- [#3751](https://github.com/graphql/graphiql/pull/3751) [`b8538d8`](https://github.com/graphql/graphiql/commit/b8538d87421edb086b32d4eb2e30a3f7d9d9e893) Thanks [@dimaMachina](https://github.com/dimaMachina)! - replace deprecated `navigator.platform` with `navigator.userAgent`
8+
9+
fix placeholder `⌘ K` in doc explorer search input for non mac devices, replace by `Ctrl K`
10+
311
## 2.1.0
412

513
### Minor Changes

packages/codemirror-graphql/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codemirror-graphql",
3-
"version": "2.1.0",
3+
"version": "2.1.1",
44
"description": "GraphQL mode and helpers for CodeMirror.",
55
"contributors": [
66
"Hyohyeon Jeong <[email protected]>",

packages/codemirror-graphql/src/utils/jump-addon.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function onKeyDown(cm: CodeMirror.Editor, event: KeyboardEvent) {
121121
}
122122

123123
const isMac =
124-
typeof navigator !== 'undefined' && navigator?.appVersion.includes('Mac');
124+
typeof navigator !== 'undefined' && navigator.userAgent.includes('Mac');
125125

126126
function isJumpModifier(key: string) {
127127
return key === (isMac ? 'Meta' : 'Control');

packages/graphiql-react/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# @graphiql/react
22

3+
## 0.26.2
4+
5+
### Patch Changes
6+
7+
- [#3751](https://github.com/graphql/graphiql/pull/3751) [`b8538d8`](https://github.com/graphql/graphiql/commit/b8538d87421edb086b32d4eb2e30a3f7d9d9e893) Thanks [@dimaMachina](https://github.com/dimaMachina)! - replace deprecated `navigator.platform` with `navigator.userAgent`
8+
9+
fix placeholder `⌘ K` in doc explorer search input for non mac devices, replace by `Ctrl K`
10+
11+
- Updated dependencies [[`b8538d8`](https://github.com/graphql/graphiql/commit/b8538d87421edb086b32d4eb2e30a3f7d9d9e893)]:
12+
13+
314
## 0.26.1
415

516
### Patch Changes

packages/graphiql-react/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@graphiql/react",
3-
"version": "0.26.1",
3+
"version": "0.26.2",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/graphql/graphiql",
@@ -57,7 +57,7 @@
5757
"@types/codemirror": "^5.60.8",
5858
"clsx": "^1.2.1",
5959
"codemirror": "^5.65.3",
60-
"codemirror-graphql": "^2.1.0",
60+
"codemirror-graphql": "^2.1.1",
6161
"copy-to-clipboard": "^3.2.0",
6262
"framer-motion": "^6.5.1",
6363
"get-value": "^3.0.1",

packages/graphiql-react/src/editor/common.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
import { KeyMap } from './types';
2+
import { isMacOs } from '../utility/is-macos';
23

34
export const DEFAULT_EDITOR_THEME = 'graphiql';
45
export const DEFAULT_KEY_MAP: KeyMap = 'sublime';
56

6-
let isMacOs = false;
7-
8-
if (typeof window === 'object') {
9-
isMacOs = window.navigator.platform.toLowerCase().indexOf('mac') === 0;
10-
}
11-
127
export const commonKeys = {
138
// Persistent search box in Query Editor
149
[isMacOs ? 'Cmd-F' : 'Ctrl-F']: 'findPersistent',

0 commit comments

Comments
 (0)