vscode-apollo 2.3.6 → 2.4.0
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.
- package/.github/workflows/E2E.yml +41 -4
- package/CHANGELOG.md +10 -0
- package/package.json +1 -1
- package/src/language-server/__e2e__/rover.e2e.ts +5 -0
- package/src/language-server/__e2e__/studioGraph.e2e.ts +2 -2
- package/src/language-server/fileSet.ts +3 -3
- package/src/language-server/project/internal.ts +1 -0
- package/src/language-server/server.ts +5 -6
- package/src/language-server/utilities/uri.ts +1 -1
- package/src/tools/utilities/languageInformation.ts +1 -1
|
@@ -7,26 +7,63 @@ on:
|
|
|
7
7
|
jobs:
|
|
8
8
|
test:
|
|
9
9
|
name: Run E2E tests
|
|
10
|
-
runs-on:
|
|
10
|
+
runs-on: "${{ matrix.os }}"
|
|
11
11
|
strategy:
|
|
12
12
|
matrix:
|
|
13
13
|
version: ["1.90.0", "stable", "insiders"]
|
|
14
|
+
os: [ubuntu-latest]
|
|
15
|
+
include:
|
|
16
|
+
- version: "stable"
|
|
17
|
+
os: "windows-latest"
|
|
14
18
|
steps:
|
|
15
19
|
- run: sudo apt update && sudo apt install -y libasound2 libgbm1 libgtk-3-0 libnss3 xvfb expect
|
|
20
|
+
if: runner.os == 'Linux'
|
|
16
21
|
- uses: actions/checkout@v4
|
|
17
22
|
- uses: actions/setup-node@v4
|
|
18
23
|
with:
|
|
19
24
|
cache: "npm"
|
|
20
25
|
- run: npm install
|
|
21
|
-
- run: npm run build:production
|
|
22
26
|
- run: echo 'APOLLO_KEY="service:bob-123:489fhseo4"' > ./sampleWorkspace/spotifyGraph/.env
|
|
23
|
-
|
|
27
|
+
shell: bash
|
|
28
|
+
- name: Install & Configure Rover (Linux)
|
|
29
|
+
run: |
|
|
24
30
|
expect <<EOF
|
|
25
31
|
spawn ./node_modules/.bin/rover config auth --profile VSCode-E2E
|
|
26
32
|
expect "Copy the key and paste it into the prompt below."
|
|
27
33
|
send -- "test\n"
|
|
28
34
|
expect eof
|
|
29
35
|
EOF
|
|
30
|
-
|
|
36
|
+
if: runner.os == 'Linux'
|
|
37
|
+
- name: Install Rover (Windows)
|
|
38
|
+
run: ./node_modules/.bin/rover.cmd --version
|
|
39
|
+
if: runner.os == 'Windows'
|
|
40
|
+
- name: Configure Rover (Windows)
|
|
41
|
+
run: |
|
|
42
|
+
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
|
|
43
|
+
Start-Process -FilePath ./node_modules/.bin/rover.cmd -ArgumentList "config","auth","--profile","VSCode-E2E"
|
|
44
|
+
|
|
45
|
+
Start-Sleep -m 1000
|
|
46
|
+
|
|
47
|
+
[System.Windows.Forms.SendKeys]::SendWait("test")
|
|
48
|
+
[System.Windows.Forms.SendKeys]::SendWait("{ENTER}")
|
|
49
|
+
if: runner.os == 'Windows'
|
|
50
|
+
shell: powershell
|
|
51
|
+
- name: Adjust configuration (Windows)
|
|
52
|
+
run: |
|
|
53
|
+
sed -i -e 's/\(bin:.*\)/\1.exe/' sampleWorkspace/rover/apollo.config.yaml
|
|
54
|
+
cat sampleWorkspace/rover/apollo.config.yaml
|
|
55
|
+
# for some reason, windows seems to ignore the jest.e2e.config.js file
|
|
56
|
+
echo "module.exports = require('./jest.e2e.config')" > jest.config.ts
|
|
57
|
+
shell: bash
|
|
58
|
+
if: runner.os == 'Windows'
|
|
59
|
+
- run: npm run build:production
|
|
60
|
+
- name: "Run Extension E2E tests (Linux)"
|
|
61
|
+
run: xvfb-run -a npm run test:extension
|
|
62
|
+
env:
|
|
63
|
+
VSCODE_VERSION: "${{ matrix.version }}"
|
|
64
|
+
if: runner.os == 'Linux'
|
|
65
|
+
- name: "Run Extension E2E tests (Windows)"
|
|
66
|
+
run: npm run test:extension
|
|
31
67
|
env:
|
|
32
68
|
VSCODE_VERSION: "${{ matrix.version }}"
|
|
69
|
+
if: runner.os == 'Windows'
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 2.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#236](https://github.com/apollographql/vscode-graphql/pull/236) [`9a4403db`](https://github.com/apollographql/vscode-graphql/commit/9a4403db7b8f9cb03638d83a7e3c29dd3c3077b7) Thanks [@pubmodmatt](https://github.com/pubmodmatt)! - Add support for GraphQL in Notebook cells
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [#240](https://github.com/apollographql/vscode-graphql/pull/240) [`3dfd9ac0`](https://github.com/apollographql/vscode-graphql/commit/3dfd9ac08a20ff92cafb398f1a8c71e5f7d03519) Thanks [@phryneas](https://github.com/phryneas)! - Fix a bug handling windows path separators in `FileSet` instances.
|
|
12
|
+
|
|
3
13
|
## 2.3.6
|
|
4
14
|
|
|
5
15
|
### 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
|
+
"version": "2.4.0",
|
|
6
6
|
"referenceID": "87197759-7617-40d0-b32e-46d378e907c7",
|
|
7
7
|
"author": "Apollo GraphQL <opensource@apollographql.com>",
|
|
8
8
|
"license": "MIT",
|
|
@@ -41,6 +41,11 @@ if (test === origTest.skip) {
|
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
if (process.platform === "win32") {
|
|
45
|
+
console.info("Skipping rover E2E tests in Windows");
|
|
46
|
+
test = origTest.skip;
|
|
47
|
+
}
|
|
48
|
+
|
|
44
49
|
let editor: TextEditor;
|
|
45
50
|
let getPosition: GetPositionFn;
|
|
46
51
|
beforeAll(async () => {
|
|
@@ -63,13 +63,13 @@ test("wrong token", async () => {
|
|
|
63
63
|
|
|
64
64
|
// currently, this logs twice, along with a full stracktrace, but no indication of where it came from
|
|
65
65
|
// this should be improved on.
|
|
66
|
-
expect(output).toContain(
|
|
66
|
+
expect(output.replace(/\s/g, "")).toContain(
|
|
67
67
|
`
|
|
68
68
|
[GraphQL error]: HTTP fetch failed from 'kotlin': 406: Not Acceptable
|
|
69
69
|
[GraphQL error]: Invalid credentials provided
|
|
70
70
|
ApolloError: HTTP fetch failed from 'kotlin': 406: Not Acceptable
|
|
71
71
|
Invalid credentials provided
|
|
72
|
-
at new ApolloError`.
|
|
72
|
+
at new ApolloError`.replace(/\s/g, ""),
|
|
73
73
|
);
|
|
74
74
|
} finally {
|
|
75
75
|
await mocks.loadDefaultMocks(baseUri);
|
|
@@ -2,7 +2,7 @@ import { minimatch } from "minimatch";
|
|
|
2
2
|
import { globSync } from "glob";
|
|
3
3
|
import { invariant } from "../tools";
|
|
4
4
|
import { URI } from "vscode-uri";
|
|
5
|
-
import { normalizeURI } from "./utilities";
|
|
5
|
+
import { normalizeURI, withUnixSeparator } from "./utilities";
|
|
6
6
|
import { resolve } from "path";
|
|
7
7
|
|
|
8
8
|
export class FileSet {
|
|
@@ -35,13 +35,13 @@ export class FileSet {
|
|
|
35
35
|
this.includes.some((include) => {
|
|
36
36
|
return minimatch(
|
|
37
37
|
normalizedFilePath,
|
|
38
|
-
resolve(this.rootURI.fsPath, include),
|
|
38
|
+
withUnixSeparator(resolve(this.rootURI.fsPath, include)),
|
|
39
39
|
);
|
|
40
40
|
}) &&
|
|
41
41
|
!this.excludes.some((exclude) => {
|
|
42
42
|
return minimatch(
|
|
43
43
|
normalizedFilePath,
|
|
44
|
-
resolve(this.rootURI.fsPath, exclude),
|
|
44
|
+
withUnixSeparator(resolve(this.rootURI.fsPath, exclude)),
|
|
45
45
|
);
|
|
46
46
|
})
|
|
47
47
|
);
|
|
@@ -157,13 +157,14 @@ connection.onInitialized(async () => {
|
|
|
157
157
|
});
|
|
158
158
|
|
|
159
159
|
const documents = new TextDocuments(TextDocument);
|
|
160
|
+
const schemes = ["file", "vscode-notebook-cell"];
|
|
160
161
|
|
|
161
162
|
// Make the text document manager listen on the connection
|
|
162
163
|
// for open, change and close text document events
|
|
163
164
|
documents.listen(connection);
|
|
164
165
|
|
|
165
|
-
function
|
|
166
|
-
return URI.parse(uri).scheme
|
|
166
|
+
function isEnabledDocument(uri: string) {
|
|
167
|
+
return schemes.includes(URI.parse(uri).scheme);
|
|
167
168
|
}
|
|
168
169
|
|
|
169
170
|
documents.onDidChangeContent((params) => {
|
|
@@ -173,8 +174,7 @@ documents.onDidChangeContent((params) => {
|
|
|
173
174
|
);
|
|
174
175
|
if (!project) return;
|
|
175
176
|
|
|
176
|
-
|
|
177
|
-
if (!isFile(params.document.uri)) {
|
|
177
|
+
if (!isEnabledDocument(params.document.uri)) {
|
|
178
178
|
return;
|
|
179
179
|
}
|
|
180
180
|
|
|
@@ -213,8 +213,7 @@ connection.onDidChangeWatchedFiles((params) => {
|
|
|
213
213
|
continue;
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
-
|
|
217
|
-
if (!isFile(uri)) {
|
|
216
|
+
if (!isEnabledDocument(uri)) {
|
|
218
217
|
continue;
|
|
219
218
|
}
|
|
220
219
|
|