vscode-apollo 2.5.5 → 2.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,7 +25,17 @@ jobs:
25
25
  - run: npm install
26
26
  - run: echo 'APOLLO_KEY="service:bob-123:489fhseo4"' > ./sampleWorkspace/spotifyGraph/.env
27
27
  shell: bash
28
+
29
+ # Print rover version per OS
28
30
  - name: Install & Configure Rover (Linux)
31
+ run: ./node_modules/.bin/rover --version
32
+ if: runner.os == 'Linux'
33
+ - name: Install Rover (Windows)
34
+ run: ./node_modules/.bin/rover.cmd --version
35
+ if: runner.os == 'Windows'
36
+
37
+ # auth rover per OS
38
+ - name: Configure Rover (Linux)
29
39
  run: |
30
40
  expect <<EOF
31
41
  spawn ./node_modules/.bin/rover config auth --profile VSCode-E2E
@@ -34,9 +44,6 @@ jobs:
34
44
  expect eof
35
45
  EOF
36
46
  if: runner.os == 'Linux'
37
- - name: Install Rover (Windows)
38
- run: ./node_modules/.bin/rover.cmd --version
39
- if: runner.os == 'Windows'
40
47
  - name: Configure Rover (Windows)
41
48
  run: |
42
49
  [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
@@ -48,6 +55,15 @@ jobs:
48
55
  [System.Windows.Forms.SendKeys]::SendWait("{ENTER}")
49
56
  if: runner.os == 'Windows'
50
57
  shell: powershell
58
+
59
+ # Print profiles per OS
60
+ - name: Print Rover profiles (Linux)
61
+ run: ./node_modules/.bin/rover config list
62
+ if: runner.os == 'Linux'
63
+ - name: Print Rover profiles (Windows)
64
+ run: ./node_modules/.bin/rover.cmd config list
65
+ if: runner.os == 'Windows'
66
+
51
67
  - name: Adjust configuration (Windows)
52
68
  run: |
53
69
  sed -i -e 's/\(bin:.*\)/\1.exe/' sampleWorkspace/rover/apollo.config.yaml
@@ -56,7 +72,10 @@ jobs:
56
72
  echo "module.exports = require('./jest.e2e.config')" > jest.config.ts
57
73
  shell: bash
58
74
  if: runner.os == 'Windows'
75
+
59
76
  - run: npm run build:production
77
+
78
+ # Run test per OS
60
79
  - name: "Run Extension E2E tests (Linux)"
61
80
  run: xvfb-run -a npm run test:extension
62
81
  env:
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.5.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#290](https://github.com/apollographql/vscode-graphql/pull/290) [`84d0503`](https://github.com/apollographql/vscode-graphql/commit/84d05030c253c0b8c3c26dc273527a33ac5e7129) Thanks [@Jephuff](https://github.com/Jephuff)! - Fix subgraph detection on windows
8
+
9
+ - [#282](https://github.com/apollographql/vscode-graphql/pull/282) [`52017e3`](https://github.com/apollographql/vscode-graphql/commit/52017e3479cfe8c07d19fa52c2ebe10f65de766c) Thanks [@pubmodmatt](https://github.com/pubmodmatt)! - Improve syntax highlighting for GraphQL block strings
10
+
3
11
  ## 2.5.5
4
12
 
5
13
  ### Patch Changes
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "vscode-apollo",
3
3
  "displayName": "Apollo GraphQL",
4
4
  "description": "Rich editor support for GraphQL client and server development that seamlessly integrates with the Apollo platform",
5
- "version": "2.5.5",
5
+ "version": "2.5.6",
6
6
  "referenceID": "87197759-7617-40d0-b32e-46d378e907c7",
7
7
  "author": "Apollo GraphQL <opensource@apollographql.com>",
8
8
  "license": "MIT",
@@ -67,7 +67,7 @@
67
67
  "zod-validation-error": "3.4.0"
68
68
  },
69
69
  "devDependencies": {
70
- "@apollo/rover": "0.27.0-preview.0",
70
+ "@apollo/rover": "0.27.0",
71
71
  "@changesets/changelog-github": "0.5.0",
72
72
  "@changesets/cli": "2.27.10",
73
73
  "@graphql-codegen/cli": "5.0.2",
@@ -83,7 +83,7 @@
83
83
  "@vscode/test-cli": "0.0.10",
84
84
  "@vscode/test-electron": "2.4.1",
85
85
  "@wry/trie": "0.5.0",
86
- "esbuild": "0.23.0",
86
+ "esbuild": "0.25.0",
87
87
  "eslint": "8.52.0",
88
88
  "eslint-config-prettier": "9.1.0",
89
89
  "eslint-plugin-prettier": "5.2.1",
@@ -1,3 +1,3 @@
1
1
  rover:
2
2
  profile: VSCode-E2E
3
- bin: ../../node_modules/@apollo/rover/binary/rover-0.27.0-alpha.0
3
+ bin: ../../node_modules/@apollo/rover/binary/rover-0.27.0
@@ -0,0 +1,4 @@
1
+ subgraphs:
2
+ subgraph:
3
+ schema:
4
+ file: src/test.graphql
@@ -21,14 +21,14 @@ test.each([
21
21
  ] as const)("%s with `type: '%s'`", async (project, moduleType) => {
22
22
  await writeFile(
23
23
  resolveRelativeToSampleWorkspace(`configFileTypes/${project}/package.json`),
24
- JSON.stringify(
24
+ `${JSON.stringify(
25
25
  {
26
26
  name: "test",
27
27
  type: moduleType,
28
28
  },
29
29
  undefined,
30
30
  2,
31
- ),
31
+ )}\n`,
32
32
  "utf-8",
33
33
  );
34
34
  await reloadService();
@@ -1,9 +1,3 @@
1
- import { test as origTest } from "@jest/globals";
2
- import { load } from "js-yaml";
3
- import { readFileSync } from "node:fs";
4
- import { execFileSync } from "node:child_process";
5
- import { join } from "node:path";
6
- import { ParsedApolloConfigFormat } from "../config";
7
1
  import { TextEditor } from "vscode";
8
2
  import {
9
3
  closeAllEditors,
@@ -16,36 +10,6 @@ import {
16
10
  getDefinitions,
17
11
  } from "./utils";
18
12
 
19
- // we want to skip these tests unless the user running them has a rover config profile named "VSCode-E2E"
20
- let test = origTest.skip;
21
- try {
22
- const roverProjectDir = join(__dirname, "../../../sampleWorkspace/rover");
23
- const config = load(
24
- readFileSync(join(roverProjectDir, "apollo.config.yaml"), "utf-8"),
25
- ) as ParsedApolloConfigFormat;
26
- const roverBin = join(roverProjectDir, config.rover!.bin);
27
- const result = execFileSync(roverBin, [
28
- "config",
29
- "list",
30
- "--format=json",
31
- ]).toString("utf8");
32
- const parsed = JSON.parse(result);
33
- if (parsed.data.profiles.includes("VSCode-E2E")) {
34
- test = origTest;
35
- }
36
- } catch (e) {}
37
- if (test === origTest.skip) {
38
- console.info(
39
- "Skipping rover E2E tests: no profile with the name 'VSCode-E2E'\n" +
40
- "You can create one by running `rover config auth --profile VSCode-E2E`",
41
- );
42
- }
43
-
44
- if (process.platform === "win32") {
45
- console.info("Skipping rover E2E tests in Windows");
46
- test = origTest.skip;
47
- }
48
-
49
13
  let editor: TextEditor;
50
14
  let getPosition: GetPositionFn;
51
15
  beforeAll(async () => {
@@ -73,47 +37,71 @@ test("completion", async () => {
73
37
  [
74
38
  {
75
39
  "detail": undefined,
40
+ "label": "@authenticated",
41
+ },
42
+ {
43
+ "detail": "",
76
44
  "label": "@deprecated",
77
45
  },
78
46
  {
79
- "detail": undefined,
47
+ "detail": "",
80
48
  "label": "@external",
81
49
  },
82
50
  {
83
51
  "detail": undefined,
84
- "label": "@federation__authenticated",
52
+ "label": "@inaccessible",
85
53
  },
86
54
  {
87
- "detail": undefined,
88
- "label": "@federation__inaccessible",
55
+ "detail": "",
56
+ "label": "@override(…)",
89
57
  },
90
58
  {
91
59
  "detail": undefined,
92
- "label": "@federation__policy(…)",
60
+ "label": "@policy(…)",
93
61
  },
94
62
  {
95
63
  "detail": undefined,
96
- "label": "@federation__provides(…)",
64
+ "label": "@provides(…)",
97
65
  },
98
66
  {
99
- "detail": undefined,
100
- "label": "@federation__requiresScopes(…)",
67
+ "detail": "",
68
+ "label": "@requires(…)",
101
69
  },
102
70
  {
103
71
  "detail": undefined,
104
- "label": "@federation__tag(…)",
72
+ "label": "@requiresScopes(…)",
105
73
  },
106
74
  {
107
- "detail": undefined,
108
- "label": "@override(…)",
75
+ "detail": "",
76
+ "label": "@shareable",
109
77
  },
110
78
  {
111
79
  "detail": undefined,
112
- "label": "@requires(…)",
80
+ "label": "@tag(…)",
81
+ },
82
+ {
83
+ "detail": "",
84
+ "label": "@federation__authenticated",
85
+ },
86
+ {
87
+ "detail": "",
88
+ "label": "@federation__inaccessible",
89
+ },
90
+ {
91
+ "detail": "",
92
+ "label": "@federation__policy(…)",
93
+ },
94
+ {
95
+ "detail": "",
96
+ "label": "@federation__provides(…)",
97
+ },
98
+ {
99
+ "detail": "",
100
+ "label": "@federation__requiresScopes(…)",
113
101
  },
114
102
  {
115
103
  "detail": undefined,
116
- "label": "@shareable",
104
+ "label": "@federation__tag(…)",
117
105
  },
118
106
  ]
119
107
  `);
@@ -322,8 +322,10 @@ export abstract class ApolloConfig {
322
322
  get configDirURI() {
323
323
  // if the filepath has a _file_ in it, then we get its dir
324
324
  return this.configURI &&
325
- this.configURI.fsPath.match(/\.(ts|js|cjs|mjs|yaml|yml|json)$/i)
326
- ? URI.parse(dirname(this.configURI.fsPath))
325
+ this.configURI.path.match(/\.(ts|js|cjs|mjs|yaml|yml|json)$/i)
326
+ ? URI.from(this.configURI).with({
327
+ path: dirname(this.configURI.path),
328
+ })
327
329
  : this.configURI;
328
330
  }
329
331
 
@@ -485,6 +485,19 @@
485
485
  "1": { "name": "constant.language.null.graphql" }
486
486
  }
487
487
  },
488
+ "graphql-block-string-value": {
489
+ "contentName": "string.quoted.triple.block.graphql",
490
+ "begin": "\\s*+((\"\"\"))",
491
+ "end": "\\s*+((\"\"\"))",
492
+ "beginCaptures": {
493
+ "1": { "name": "string.quoted.triple.block.graphql" },
494
+ "2": { "name": "punctuation.definition.string.begin.graphql" }
495
+ },
496
+ "endCaptures": {
497
+ "1": { "name": "string.quoted.triple.block.graphql" },
498
+ "2": { "name": "punctuation.definition.string.end.graphql" }
499
+ }
500
+ },
488
501
  "graphql-string-value": {
489
502
  "contentName": "string.quoted.double.graphql",
490
503
  "begin": "\\s*+((\"))",
@@ -553,6 +566,7 @@
553
566
  "patterns": [
554
567
  { "include": "#graphql-variable-name" },
555
568
  { "include": "#graphql-float-value" },
569
+ { "include": "#graphql-block-string-value" },
556
570
  { "include": "#graphql-string-value" },
557
571
  { "include": "#graphql-boolean-value" },
558
572
  { "include": "#graphql-null-value" },