vscode-apollo 2.5.2 → 2.5.4

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.
@@ -6,7 +6,7 @@ orbs:
6
6
  executors:
7
7
  node:
8
8
  docker:
9
- - image: cimg/node:22.9.0
9
+ - image: cimg/node:22.12.0
10
10
  working_directory: ~/vscode-graphql
11
11
 
12
12
  commands:
@@ -61,6 +61,22 @@ jobs:
61
61
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62
62
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
63
63
 
64
+ - name: Attach VSX to GitHub release
65
+ if: steps.changesets.outcome == 'success' && steps.changesets.outputs.published == 'true'
66
+ run: |
67
+ npx -y @vscode/vsce package --out "vscode-apollo-$VERSION.vsix"
68
+ gh release upload "v$VERSION" "vscode-apollo-$VERSION.vsix"
69
+ env:
70
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71
+ VERSION: ${{ fromJson(steps.changesets.outputs.publishedPackages)[0].version }}
72
+
73
+ - name: Publish to Open VSX Registry
74
+ if: steps.changesets.outcome == 'success' && steps.changesets.outputs.published == 'true'
75
+ uses: HaaLeo/publish-vscode-extension@v1
76
+ with:
77
+ pat: ${{ secrets.OPEN_VSX_TOKEN }}
78
+ baseContentUrl: https://raw.githubusercontent.com/apollographql/vscode-graphql
79
+
64
80
  - name: Publish to Visual Studio Marketplace
65
81
  if: steps.changesets.outcome == 'success' && steps.changesets.outputs.published == 'true'
66
82
  uses: HaaLeo/publish-vscode-extension@v1
@@ -0,0 +1,3 @@
1
+ src/language-server/graphqlTypes.ts
2
+ src/language-server/__tests__/fixtures/documents/commentWithTemplate.ts
3
+ README.md
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.5.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#267](https://github.com/apollographql/vscode-graphql/pull/267) [`8706670`](https://github.com/apollographql/vscode-graphql/commit/8706670810493c3574ecc66f9262e8fd025604dc) Thanks [@phryneas](https://github.com/phryneas)! - Adjustments to fix Release process
8
+
9
+ ## 2.5.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [#254](https://github.com/apollographql/vscode-graphql/pull/254) [`2b0dd90`](https://github.com/apollographql/vscode-graphql/commit/2b0dd9092e4e27fb00bb279a837d29ec2f730bdb) Thanks [@phryneas](https://github.com/phryneas)! - remove unused direct dependency on `lodash.merge`
14
+
3
15
  ## 2.5.2
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  </p>
6
6
  <h1>Apollo GraphQL for VS Code</h1>
7
7
 
8
- [![Visual Studio Marketplace Version (including pre-releases)](https://img.shields.io/visual-studio-marketplace/v/apollographql.vscode-apollo)](https://marketplace.visualstudio.com/items?itemName=apollographql.vscode-apollo) [![Visual Studio Marketplace Installs](https://img.shields.io/visual-studio-marketplace/i/apollographql.vscode-apollo)](https://marketplace.visualstudio.com/items?itemName=apollographql.vscode-apollo) [![Build Status](https://circleci.com/gh/apollographql/vscode-graphql.svg?style=svg)](https://circleci.com/gh/apollographql/vscode-graphql) [![Join the community](https://img.shields.io/discourse/status?label=Join%20the%20community&server=https%3A%2F%2Fcommunity.apollographql.com)](https://community.apollographql.com) [![Join our Discord server](https://img.shields.io/discord/1022972389463687228.svg?color=7389D8&labelColor=6A7EC2&logo=discord&logoColor=ffffff&style=flat-square)](https://discord.gg/graphos)
8
+ [![Visual Studio Marketplace Version (including pre-releases)](https://img.shields.io/visual-studio-marketplace/v/apollographql.vscode-apollo)](https://marketplace.visualstudio.com/items?itemName=apollographql.vscode-apollo) [![Visual Studio Marketplace Installs](https://img.shields.io/visual-studio-marketplace/i/apollographql.vscode-apollo)](https://marketplace.visualstudio.com/items?itemName=apollographql.vscode-apollo) [![Build Status](https://circleci.com/gh/apollographql/vscode-graphql.svg?style=svg)](https://circleci.com/gh/apollographql/vscode-graphql) [![Join the community](https://img.shields.io/discourse/status?label=Join%20the%20community&server=https%3A%2F%2Fcommunity.apollographql.com)](https://community.apollographql.com)
9
9
 
10
10
  </div>
11
11
 
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.2",
5
+ "version": "2.5.4",
6
6
  "referenceID": "87197759-7617-40d0-b32e-46d378e907c7",
7
7
  "author": "Apollo GraphQL <opensource@apollographql.com>",
8
8
  "license": "MIT",
@@ -37,13 +37,13 @@
37
37
  "vscode": "^1.90.0"
38
38
  },
39
39
  "dependencies": {
40
- "@apollo/client": "3.12.2",
40
+ "@apollo/client": "3.12.3",
41
41
  "@apollo/client-devtools-vscode": "4.19.1",
42
- "@apollo/subgraph": "2.9.1",
43
- "@graphql-tools/schema": "10.0.6",
42
+ "@apollo/subgraph": "2.9.3",
43
+ "@graphql-tools/schema": "10.0.13",
44
44
  "@wry/equality": "0.5.7",
45
45
  "cosmiconfig": "9.0.0",
46
- "dotenv": "16.4.5",
46
+ "dotenv": "16.4.7",
47
47
  "fractional-indexing": "2.1.0",
48
48
  "glob": "11.0.0",
49
49
  "graphql": "16.9.0",
@@ -51,56 +51,55 @@
51
51
  "graphql-tag": "2.12.6",
52
52
  "jsonc-parser": "^3.3.1",
53
53
  "lodash.debounce": "4.0.8",
54
- "lodash.merge": "4.6.2",
55
54
  "lodash.throttle": "4.1.1",
56
55
  "lz-string": "1.5.0",
57
56
  "minimatch": "10.0.1",
58
57
  "moment": "2.30.1",
59
58
  "semver": "7.6.3",
60
- "undici": "6.19.8",
59
+ "undici": "6.21.0",
61
60
  "vscode-languageclient": "9.0.1",
62
61
  "vscode-languageserver": "9.0.1",
63
62
  "vscode-languageserver-textdocument": "1.0.12",
64
63
  "vscode-uri": "3.0.8",
65
- "which": "4.0.0",
64
+ "which": "5.0.0",
66
65
  "ws": "8.18.0",
67
- "zod": "3.23.8",
66
+ "zod": "3.24.1",
68
67
  "zod-validation-error": "3.4.0"
69
68
  },
70
69
  "devDependencies": {
71
- "@apollo/rover": "0.27.0-alpha.0",
72
- "@changesets/changelog-github": "0.4.8",
73
- "@changesets/cli": "2.26.2",
74
- "@graphql-codegen/cli": "^5.0.2",
75
- "@graphql-codegen/typescript-operations": "^4.2.3",
76
- "@types/jest": "29.5.13",
70
+ "@apollo/rover": "0.27.0-preview.0",
71
+ "@changesets/changelog-github": "0.5.0",
72
+ "@changesets/cli": "2.27.10",
73
+ "@graphql-codegen/cli": "5.0.2",
74
+ "@graphql-codegen/typescript-operations": "4.2.3",
75
+ "@types/jest": "29.5.14",
77
76
  "@types/lodash.debounce": "4.0.9",
78
77
  "@types/lodash.merge": "4.6.9",
79
- "@types/lodash.throttle": "^4.1.9",
78
+ "@types/lodash.throttle": "4.1.9",
80
79
  "@types/node": "20.14.10",
81
80
  "@types/vscode": "1.90.0",
82
81
  "@typescript-eslint/eslint-plugin": "6.9.1",
83
82
  "@typescript-eslint/parser": "6.9.1",
84
- "@vscode/test-cli": "^0.0.10",
85
- "@vscode/test-electron": "^2.4.1",
86
- "@wry/trie": "^0.5.0",
87
- "esbuild": "^0.23.0",
83
+ "@vscode/test-cli": "0.0.10",
84
+ "@vscode/test-electron": "2.4.1",
85
+ "@wry/trie": "0.5.0",
86
+ "esbuild": "0.23.0",
88
87
  "eslint": "8.52.0",
89
- "eslint-config-prettier": "9.0.0",
90
- "eslint-plugin-prettier": "5.0.1",
91
- "graphql-http": "^1.22.1",
92
- "import-fresh": "^3.3.0",
88
+ "eslint-config-prettier": "9.1.0",
89
+ "eslint-plugin-prettier": "5.2.1",
90
+ "graphql-http": "1.22.1",
91
+ "import-fresh": "3.3.0",
93
92
  "jest": "29.7.0",
94
93
  "jest-environment-node": "29.7.0",
95
- "memfs": "4.11.2",
96
- "npm-run-all": "^4.1.5",
97
- "prettier": "3.0.3",
94
+ "memfs": "4.15.0",
95
+ "npm-run-all": "4.1.5",
96
+ "prettier": "3.4.2",
98
97
  "rimraf": "6.0.1",
99
- "ts-jest": "29.1.2",
100
- "ts-node": "^10.9.2",
101
- "typescript": "^5.5.3",
102
- "vscode-tmgrammar-test": "^0.1.3",
103
- "zod-to-json-schema": "^3.23.3"
98
+ "ts-jest": "29.2.5",
99
+ "ts-node": "10.9.2",
100
+ "typescript": "5.5.3",
101
+ "vscode-tmgrammar-test": "0.1.3",
102
+ "zod-to-json-schema": "3.23.3"
104
103
  },
105
104
  "publisher": "apollographql",
106
105
  "categories": [
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "test",
3
3
  "type": "module"
4
- }
4
+ }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "test",
3
3
  "type": "module"
4
- }
4
+ }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "test",
3
3
  "type": "commonjs"
4
- }
4
+ }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "test",
3
3
  "type": "commonjs"
4
- }
4
+ }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "test",
3
3
  "type": "module"
4
- }
4
+ }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "test",
3
3
  "type": "commonjs"
4
- }
4
+ }
@@ -6,4 +6,4 @@
6
6
  "localSchemaFile": ["./starwarsSchema.graphql", "./planets.graphql"]
7
7
  }
8
8
  }
9
- }
9
+ }
@@ -1,32 +1,32 @@
1
1
  {
2
2
  "folders": [
3
3
  {
4
- "path": "localSchema"
4
+ "path": "localSchema",
5
5
  },
6
6
  {
7
- "path": "clientSchema"
7
+ "path": "clientSchema",
8
8
  },
9
9
  {
10
- "path": "spotifyGraph"
10
+ "path": "spotifyGraph",
11
11
  },
12
12
  {
13
- "path": "httpSchema"
13
+ "path": "httpSchema",
14
14
  },
15
15
  {
16
- "path": "localSchemaArray"
16
+ "path": "localSchemaArray",
17
17
  },
18
18
  {
19
- "path": "rover"
19
+ "path": "rover",
20
20
  },
21
21
  {
22
- "path": "configFileTypes"
22
+ "path": "configFileTypes",
23
23
  },
24
24
  {
25
- "path": "../src/language-server/__tests__/fixtures/documents"
26
- }
25
+ "path": "../src/language-server/__tests__/fixtures/documents",
26
+ },
27
27
  ],
28
28
  "settings": {
29
29
  "apollographql.devTools.showPanel": "detect",
30
- "apollographql.devTools.serverPort": 7095
31
- }
30
+ "apollographql.devTools.serverPort": 7095,
31
+ },
32
32
  }
@@ -3,9 +3,7 @@
3
3
  "title": "SupergraphConfig",
4
4
  "description": "The configuration for a single supergraph composed of multiple subgraphs.",
5
5
  "type": "object",
6
- "required": [
7
- "subgraphs"
8
- ],
6
+ "required": ["subgraphs"],
9
7
  "properties": {
10
8
  "federation_version": {
11
9
  "anyOf": [
@@ -33,9 +31,7 @@
33
31
  "anyOf": [
34
32
  {
35
33
  "type": "object",
36
- "required": [
37
- "file"
38
- ],
34
+ "required": ["file"],
39
35
  "properties": {
40
36
  "file": {
41
37
  "type": "string"
@@ -44,15 +40,10 @@
44
40
  },
45
41
  {
46
42
  "type": "object",
47
- "required": [
48
- "subgraph_url"
49
- ],
43
+ "required": ["subgraph_url"],
50
44
  "properties": {
51
45
  "introspection_headers": {
52
- "type": [
53
- "object",
54
- "null"
55
- ],
46
+ "type": ["object", "null"],
56
47
  "additionalProperties": {
57
48
  "type": "string"
58
49
  }
@@ -65,10 +56,7 @@
65
56
  },
66
57
  {
67
58
  "type": "object",
68
- "required": [
69
- "graphref",
70
- "subgraph"
71
- ],
59
+ "required": ["graphref", "subgraph"],
72
60
  "properties": {
73
61
  "graphref": {
74
62
  "type": "string"
@@ -80,9 +68,7 @@
80
68
  },
81
69
  {
82
70
  "type": "object",
83
- "required": [
84
- "sdl"
85
- ],
71
+ "required": ["sdl"],
86
72
  "properties": {
87
73
  "sdl": {
88
74
  "type": "string"
@@ -94,16 +80,11 @@
94
80
  "SubgraphConfig": {
95
81
  "description": "Config for a single [subgraph](https://www.apollographql.com/docs/federation/subgraphs/)",
96
82
  "type": "object",
97
- "required": [
98
- "schema"
99
- ],
83
+ "required": ["schema"],
100
84
  "properties": {
101
85
  "routing_url": {
102
86
  "description": "The routing URL for the subgraph. This will appear in supergraph SDL and instructs the graph router to send all requests for this subgraph to this URL.",
103
- "type": [
104
- "string",
105
- "null"
106
- ]
87
+ "type": ["string", "null"]
107
88
  },
108
89
  "schema": {
109
90
  "description": "The location of the subgraph's SDL",
@@ -252,8 +252,8 @@ export abstract class GraphQLInternalProject
252
252
  localSchemaFile === undefined
253
253
  ? []
254
254
  : Array.isArray(localSchemaFile)
255
- ? localSchemaFile
256
- : [localSchemaFile]
255
+ ? localSchemaFile
256
+ : [localSchemaFile]
257
257
  ).map((filePath) =>
258
258
  path.relative(this.rootURI.fsPath, path.join(process.cwd(), filePath)),
259
259
  );
@@ -39,8 +39,8 @@ export class FileSchemaProvider implements GraphQLSchemaProvider {
39
39
  const documents = path
40
40
  ? [this.loadFileAndGetDocument(path)]
41
41
  : paths
42
- ? paths.map(this.loadFileAndGetDocument, this)
43
- : undefined;
42
+ ? paths.map(this.loadFileAndGetDocument, this)
43
+ : undefined;
44
44
 
45
45
  if (!documents)
46
46
  throw new Error(
@@ -73,8 +73,8 @@ export class FileSchemaProvider implements GraphQLSchemaProvider {
73
73
  const __schema = parsed.data
74
74
  ? parsed.data.__schema
75
75
  : parsed.__schema
76
- ? parsed.__schema
77
- : parsed;
76
+ ? parsed.__schema
77
+ : parsed;
78
78
 
79
79
  const schema = buildClientSchema({ __schema });
80
80
  return parse(printSchema(schema));
@@ -105,8 +105,8 @@ export class FileSchemaProvider implements GraphQLSchemaProvider {
105
105
  const SDLs = path
106
106
  ? [this.loadFileAndGetSDL(path)]
107
107
  : paths
108
- ? paths.map(this.loadFileAndGetSDL, this)
109
- : undefined;
108
+ ? paths.map(this.loadFileAndGetSDL, this)
109
+ : undefined;
110
110
 
111
111
  if (!SDLs || SDLs.filter((s) => !Boolean(s)).length > 0)
112
112
  return Debug.error(
@@ -87,8 +87,8 @@ workspace.onConfigFilesFound(async (params) => {
87
87
  !value
88
88
  ? value
89
89
  : value instanceof Error || isValidationError(value)
90
- ? { message: value.message, stack: value.stack }
91
- : value,
90
+ ? { message: value.message, stack: value.stack }
91
+ : value,
92
92
  ),
93
93
  );
94
94
  });
@@ -181,18 +181,16 @@ documents.onDidChangeContent((params) => {
181
181
  project.documentDidChange(params.document);
182
182
  });
183
183
 
184
- documents.onDidOpen(
185
- (params) =>
186
- workspace
187
- .projectForFile(params.document.uri, params.document.languageId)
188
- ?.onDidOpen?.(params),
184
+ documents.onDidOpen((params) =>
185
+ workspace
186
+ .projectForFile(params.document.uri, params.document.languageId)
187
+ ?.onDidOpen?.(params),
189
188
  );
190
189
 
191
- documents.onDidClose(
192
- (params) =>
193
- workspace
194
- .projectForFile(params.document.uri, params.document.languageId)
195
- ?.onDidClose?.(params),
190
+ documents.onDidClose((params) =>
191
+ workspace
192
+ .projectForFile(params.document.uri, params.document.languageId)
193
+ ?.onDidClose?.(params),
196
194
  );
197
195
 
198
196
  connection.onDidChangeWatchedFiles((params) => {
@@ -71,15 +71,15 @@ export class GraphQLWorkspace {
71
71
  clientIdentity,
72
72
  })
73
73
  : isRoverConfig(config)
74
- ? new RoverProject({
75
- config,
76
- loadingHandler: this.LanguageServerLoadingHandler,
77
- configFolderURI: URI.parse(folder.uri),
78
- capabilities: this.capabilities!, // TODO?
79
- })
80
- : (() => {
81
- throw new Error("Impossible config!");
82
- })();
74
+ ? new RoverProject({
75
+ config,
76
+ loadingHandler: this.LanguageServerLoadingHandler,
77
+ configFolderURI: URI.parse(folder.uri),
78
+ capabilities: this.capabilities!, // TODO?
79
+ })
80
+ : (() => {
81
+ throw new Error("Impossible config!");
82
+ })();
83
83
 
84
84
  project.onDiagnostics((params) => {
85
85
  this._onDiagnostics && this._onDiagnostics(params);