vscode-apollo 1.19.3 → 1.20.1
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/.changeset/README.md +8 -0
- package/.changeset/config.json +14 -0
- package/.circleci/config.yml +82 -0
- package/.eslintrc.js +10 -0
- package/.gitattributes +1 -0
- package/.github/workflows/build-prs.yml +57 -0
- package/.github/workflows/release.yml +114 -0
- package/.gitleaks.toml +26 -0
- package/.nvmrc +1 -0
- package/.prettierrc +5 -0
- package/.vscode/launch.json +61 -0
- package/.vscode/settings.json +16 -0
- package/.vscode/tasks.json +18 -0
- package/.vscodeignore +17 -1
- package/CHANGELOG.md +178 -1
- package/LICENSE +2 -2
- package/README.md +9 -9
- package/codegen.yml +12 -0
- package/images/IconRun.svg +8 -0
- package/jest.config.ts +11 -0
- package/package.json +102 -22
- package/renovate.json +23 -0
- package/src/__mocks__/fs.js +3 -0
- package/src/__tests__/statusBar.test.ts +8 -7
- package/src/debug.ts +2 -5
- package/src/env/fetch/fetch.ts +32 -0
- package/src/env/fetch/global.ts +30 -0
- package/src/env/fetch/index.d.ts +2 -0
- package/src/env/fetch/index.ts +2 -0
- package/src/env/fetch/url.ts +9 -0
- package/src/env/index.ts +4 -0
- package/src/env/polyfills/array.ts +17 -0
- package/src/env/polyfills/index.ts +2 -0
- package/src/env/polyfills/object.ts +7 -0
- package/src/env/typescript-utility-types.ts +2 -0
- package/src/extension.ts +106 -37
- package/src/language-server/__tests__/diagnostics.test.ts +86 -0
- package/src/language-server/__tests__/document.test.ts +187 -0
- package/src/language-server/__tests__/fileSet.test.ts +46 -0
- package/src/language-server/__tests__/fixtures/starwarsSchema.ts +1917 -0
- package/src/language-server/config/__tests__/config.ts +128 -0
- package/src/language-server/config/__tests__/loadConfig.ts +508 -0
- package/src/language-server/config/__tests__/utils.ts +106 -0
- package/src/language-server/config/config.ts +219 -0
- package/src/language-server/config/index.ts +3 -0
- package/src/language-server/config/loadConfig.ts +228 -0
- package/src/language-server/config/utils.ts +56 -0
- package/src/language-server/diagnostics.ts +109 -0
- package/src/language-server/document.ts +277 -0
- package/src/language-server/engine/GraphQLDataSource.ts +124 -0
- package/src/language-server/engine/index.ts +105 -0
- package/src/language-server/engine/operations/frontendUrlRoot.ts +7 -0
- package/src/language-server/engine/operations/schemaTagsAndFieldStats.ts +24 -0
- package/src/language-server/errors/__tests__/NoMissingClientDirectives.test.ts +220 -0
- package/src/language-server/errors/logger.ts +58 -0
- package/src/language-server/errors/validation.ts +277 -0
- package/src/language-server/fileSet.ts +65 -0
- package/src/language-server/format.ts +48 -0
- package/src/language-server/graphqlTypes.ts +7176 -0
- package/src/language-server/index.ts +29 -0
- package/src/language-server/languageProvider.ts +798 -0
- package/src/language-server/loadingHandler.ts +64 -0
- package/src/language-server/project/base.ts +399 -0
- package/src/language-server/project/client.ts +602 -0
- package/src/language-server/project/defaultClientSchema.ts +45 -0
- package/src/language-server/project/service.ts +48 -0
- package/src/language-server/providers/schema/__tests__/file.ts +150 -0
- package/src/language-server/providers/schema/base.ts +15 -0
- package/src/language-server/providers/schema/endpoint.ts +157 -0
- package/src/language-server/providers/schema/engine.ts +197 -0
- package/src/language-server/providers/schema/file.ts +167 -0
- package/src/language-server/providers/schema/index.ts +75 -0
- package/src/language-server/server.ts +252 -0
- package/src/language-server/typings/codemirror.d.ts +4 -0
- package/src/language-server/typings/graphql.d.ts +27 -0
- package/src/language-server/utilities/__tests__/graphql.test.ts +411 -0
- package/src/language-server/utilities/__tests__/uri.ts +55 -0
- package/src/language-server/utilities/debouncer.ts +8 -0
- package/src/language-server/utilities/debug.ts +89 -0
- package/src/language-server/utilities/graphql.ts +432 -0
- package/src/language-server/utilities/index.ts +3 -0
- package/src/language-server/utilities/source.ts +182 -0
- package/src/language-server/utilities/uri.ts +19 -0
- package/src/language-server/workspace.ts +262 -0
- package/src/languageServerClient.ts +19 -12
- package/src/messages.ts +84 -0
- package/src/statusBar.ts +5 -5
- package/src/tools/__tests__/buildServiceDefinition.test.ts +491 -0
- package/src/tools/__tests__/snapshotSerializers/astSerializer.ts +19 -0
- package/src/tools/__tests__/snapshotSerializers/graphQLTypeSerializer.ts +14 -0
- package/src/tools/buildServiceDefinition.ts +241 -0
- package/src/tools/index.ts +6 -0
- package/src/tools/schema/index.ts +2 -0
- package/src/tools/schema/resolveObject.ts +18 -0
- package/src/tools/schema/resolverMap.ts +23 -0
- package/src/tools/utilities/graphql.ts +22 -0
- package/src/tools/utilities/index.ts +3 -0
- package/src/tools/utilities/invariant.ts +5 -0
- package/src/tools/utilities/predicates.ts +5 -0
- package/src/utils.ts +1 -16
- package/syntaxes/graphql.js.json +3 -3
- package/syntaxes/graphql.json +13 -9
- package/syntaxes/graphql.lua.json +51 -0
- package/syntaxes/graphql.rb.json +1 -1
- package/tsconfig.build.json +4 -0
- package/tsconfig.json +20 -7
- package/create-server-symlink.js +0 -8
- package/lib/debug.d.ts +0 -11
- package/lib/debug.d.ts.map +0 -1
- package/lib/debug.js +0 -48
- package/lib/debug.js.map +0 -1
- package/lib/extension.d.ts +0 -4
- package/lib/extension.d.ts.map +0 -1
- package/lib/extension.js +0 -187
- package/lib/extension.js.map +0 -1
- package/lib/languageServerClient.d.ts +0 -4
- package/lib/languageServerClient.d.ts.map +0 -1
- package/lib/languageServerClient.js +0 -57
- package/lib/languageServerClient.js.map +0 -1
- package/lib/statusBar.d.ts +0 -24
- package/lib/statusBar.d.ts.map +0 -1
- package/lib/statusBar.js +0 -46
- package/lib/statusBar.js.map +0 -1
- package/lib/testRunner/index.d.ts +0 -3
- package/lib/testRunner/index.d.ts.map +0 -1
- package/lib/testRunner/index.js +0 -49
- package/lib/testRunner/index.js.map +0 -1
- package/lib/testRunner/jest-config.d.ts +0 -14
- package/lib/testRunner/jest-config.d.ts.map +0 -1
- package/lib/testRunner/jest-config.js +0 -18
- package/lib/testRunner/jest-config.js.map +0 -1
- package/lib/testRunner/jest-vscode-environment.d.ts +0 -2
- package/lib/testRunner/jest-vscode-environment.d.ts.map +0 -1
- package/lib/testRunner/jest-vscode-environment.js +0 -19
- package/lib/testRunner/jest-vscode-environment.js.map +0 -1
- package/lib/testRunner/jest-vscode-framework-setup.d.ts +0 -1
- package/lib/testRunner/jest-vscode-framework-setup.d.ts.map +0 -1
- package/lib/testRunner/jest-vscode-framework-setup.js +0 -3
- package/lib/testRunner/jest-vscode-framework-setup.js.map +0 -1
- package/lib/testRunner/vscode-test-script.d.ts +0 -2
- package/lib/testRunner/vscode-test-script.d.ts.map +0 -1
- package/lib/testRunner/vscode-test-script.js +0 -23
- package/lib/testRunner/vscode-test-script.js.map +0 -1
- package/lib/utils.d.ts +0 -18
- package/lib/utils.d.ts.map +0 -1
- package/lib/utils.js +0 -52
- package/lib/utils.js.map +0 -1
- package/src/testRunner/README.md +0 -23
- package/src/testRunner/index.ts +0 -72
- package/src/testRunner/jest-config.ts +0 -17
- package/src/testRunner/jest-vscode-environment.ts +0 -25
- package/src/testRunner/jest-vscode-framework-setup.ts +0 -10
- package/src/testRunner/jest.d.ts +0 -37
- package/src/testRunner/vscode-test-script.ts +0 -38
- package/tsconfig.test.json +0 -4
- package/tsconfig.tsbuildinfo +0 -2486
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Changesets
|
|
2
|
+
|
|
3
|
+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
|
|
4
|
+
with multi-package repos, or single-package repos to help you version and publish your code. You can
|
|
5
|
+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
|
|
6
|
+
|
|
7
|
+
We have a quick list of common questions to get you started engaging with this project in
|
|
8
|
+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
|
|
3
|
+
"changelog": [
|
|
4
|
+
"@changesets/changelog-github",
|
|
5
|
+
{ "repo": "apollographql/vscode-graphql" }
|
|
6
|
+
],
|
|
7
|
+
"commit": false,
|
|
8
|
+
"fixed": [],
|
|
9
|
+
"linked": [],
|
|
10
|
+
"access": "public",
|
|
11
|
+
"baseBranch": "main",
|
|
12
|
+
"updateInternalDependencies": "patch",
|
|
13
|
+
"ignore": []
|
|
14
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
version: 2.1
|
|
2
|
+
|
|
3
|
+
orbs:
|
|
4
|
+
secops: apollo/circleci-secops-orb@2.0.0
|
|
5
|
+
|
|
6
|
+
executors:
|
|
7
|
+
node:
|
|
8
|
+
docker:
|
|
9
|
+
- image: circleci/node:12.16.1-browsers
|
|
10
|
+
working_directory: ~/vscode-graphql
|
|
11
|
+
|
|
12
|
+
commands:
|
|
13
|
+
npm-install:
|
|
14
|
+
steps:
|
|
15
|
+
- restore_cache:
|
|
16
|
+
name: Restore npm cache
|
|
17
|
+
keys:
|
|
18
|
+
- npm-packages-{{ checksum "package-lock.json" }}--{{ checksum ".circleci/config.yml" }}
|
|
19
|
+
- run:
|
|
20
|
+
name: Install dependencies
|
|
21
|
+
command: npm ci --prefer-offline
|
|
22
|
+
- save_cache:
|
|
23
|
+
name: Save npm cache
|
|
24
|
+
key: npm-packages-{{ checksum "package-lock.json" }}--{{ checksum ".circleci/config.yml" }}
|
|
25
|
+
paths:
|
|
26
|
+
- ~/.npm
|
|
27
|
+
|
|
28
|
+
jobs:
|
|
29
|
+
lint:
|
|
30
|
+
executor: node
|
|
31
|
+
steps:
|
|
32
|
+
- checkout
|
|
33
|
+
- npm-install
|
|
34
|
+
- run:
|
|
35
|
+
name: Ensure test reports output dir exists
|
|
36
|
+
command: mkdir -p /tmp/test-reports/lint
|
|
37
|
+
- run:
|
|
38
|
+
name: Run lint (currenty prettier)
|
|
39
|
+
command: npm run lint -- --format junit --output-file /tmp/test-reports/lint/results.xml
|
|
40
|
+
- store_test_results:
|
|
41
|
+
path: /tmp/test-reports
|
|
42
|
+
|
|
43
|
+
typescript:
|
|
44
|
+
executor: node
|
|
45
|
+
steps:
|
|
46
|
+
- checkout
|
|
47
|
+
- npm-install
|
|
48
|
+
- run:
|
|
49
|
+
name: TypeScript Check
|
|
50
|
+
command: npm run typecheck
|
|
51
|
+
|
|
52
|
+
test-unit:
|
|
53
|
+
executor: node
|
|
54
|
+
steps:
|
|
55
|
+
- checkout
|
|
56
|
+
- npm-install
|
|
57
|
+
- run:
|
|
58
|
+
name: Ensure test reports output dir exists
|
|
59
|
+
command: mkdir -p /tmp/test-reports/test-unit
|
|
60
|
+
- run:
|
|
61
|
+
name: Test Unit
|
|
62
|
+
command: npm run test-unit -- --ci --reporters=jest-junit
|
|
63
|
+
environment:
|
|
64
|
+
JEST_JUNIT_OUTPUT_DIR: "/tmp/test-reports/test-unit"
|
|
65
|
+
- store_test_results:
|
|
66
|
+
path: /tmp/test-reports
|
|
67
|
+
|
|
68
|
+
workflows:
|
|
69
|
+
build-test-deploy:
|
|
70
|
+
jobs:
|
|
71
|
+
- lint
|
|
72
|
+
- typescript
|
|
73
|
+
- test-unit
|
|
74
|
+
security-scans:
|
|
75
|
+
jobs:
|
|
76
|
+
- secops/gitleaks:
|
|
77
|
+
context:
|
|
78
|
+
- platform-docker-ro
|
|
79
|
+
- github-orb
|
|
80
|
+
- secops-oidc
|
|
81
|
+
git-base-revision: <<#pipeline.git.base_revision>><<pipeline.git.base_revision>><</pipeline.git.base_revision >>
|
|
82
|
+
git-revision: << pipeline.git.revision >>
|
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
parser: "@typescript-eslint/parser",
|
|
3
|
+
plugins: ["prettier", "@typescript-eslint"],
|
|
4
|
+
// Skip generated file.
|
|
5
|
+
ignorePatterns: ["src/language-server/graphqlTypes.ts"],
|
|
6
|
+
rules: {
|
|
7
|
+
"prettier/prettier": "error",
|
|
8
|
+
},
|
|
9
|
+
extends: ["prettier"],
|
|
10
|
+
};
|
package/.gitattributes
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
package-lock.json -diff
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: Bundle Extension as Artifact Download
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
jobs:
|
|
5
|
+
test:
|
|
6
|
+
name: Bundle Extension as Artifact Download
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- uses: actions/checkout@v4
|
|
10
|
+
- uses: actions/setup-node@v4
|
|
11
|
+
with:
|
|
12
|
+
cache: "npm"
|
|
13
|
+
- run: npm config set engine-strict=false
|
|
14
|
+
- run: npm install
|
|
15
|
+
- run: echo PKG_VERSION="$(git show --no-patch --format=0.0.0-build-%ct.pr-${{ github.event.pull_request.number }}.commit-%h)" >> $GITHUB_ENV
|
|
16
|
+
- run: npm pkg set "version=${{ env.PKG_VERSION }}"
|
|
17
|
+
- run: npm run build
|
|
18
|
+
- run: npx -y @vscode/vsce package --out vscode-apollo-${{ env.PKG_VERSION }}.vsix
|
|
19
|
+
|
|
20
|
+
- uses: actions/upload-artifact@v4
|
|
21
|
+
id: artifact-upload-step
|
|
22
|
+
with:
|
|
23
|
+
name: vscode-apollo-${{ env.PKG_VERSION }}
|
|
24
|
+
path: vscode-apollo-${{ env.PKG_VERSION }}.vsix
|
|
25
|
+
retention-days: 14
|
|
26
|
+
|
|
27
|
+
- name: Output artifact URL
|
|
28
|
+
run: echo 'Artifact URL is ${{ steps.artifact-upload-step.outputs.artifact-url }}'
|
|
29
|
+
|
|
30
|
+
- name: Find Comment
|
|
31
|
+
uses: peter-evans/find-comment@v3
|
|
32
|
+
id: fc
|
|
33
|
+
with:
|
|
34
|
+
issue-number: ${{ github.event.pull_request.number }}
|
|
35
|
+
comment-author: "github-actions[bot]"
|
|
36
|
+
body-includes: <!-- ARTIFACT-DOWNLOAD -->
|
|
37
|
+
|
|
38
|
+
- name: Create comment
|
|
39
|
+
uses: peter-evans/create-or-update-comment@v4
|
|
40
|
+
with:
|
|
41
|
+
issue-number: ${{ github.event.pull_request.number }}
|
|
42
|
+
comment-id: ${{ steps.fc.outputs.comment-id }}
|
|
43
|
+
edit-mode: replace
|
|
44
|
+
body: |
|
|
45
|
+
<!-- ARTIFACT-DOWNLOAD -->
|
|
46
|
+
You can download the latest build of the extension for this PR here:
|
|
47
|
+
[vscode-apollo-${{ env.PKG_VERSION }}.zip](${{ steps.artifact-upload-step.outputs.artifact-url }}).
|
|
48
|
+
|
|
49
|
+
To install the extension, download the file, unzip it and install it in VS Code by selecting "Install from VSIX..." in the Extensions view.
|
|
50
|
+
|
|
51
|
+
Alternatively, run
|
|
52
|
+
```sh
|
|
53
|
+
code --install-extension vscode-apollo-${{ env.PKG_VERSION }}.vsix --force
|
|
54
|
+
```
|
|
55
|
+
from the command line.
|
|
56
|
+
|
|
57
|
+
For older builds, please see the edit history of this comment.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- v1.x
|
|
8
|
+
|
|
9
|
+
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
release:
|
|
13
|
+
name: Changesets Release
|
|
14
|
+
# Prevents action from creating a PR on forks
|
|
15
|
+
if: github.repository == 'apollographql/vscode-graphql'
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
# Permissions necessary for Changesets to push a new branch and open PRs
|
|
18
|
+
# (for automated Version Packages PRs), and request the JWT for provenance.
|
|
19
|
+
# More info: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#adding-permissions-settings
|
|
20
|
+
permissions:
|
|
21
|
+
contents: write
|
|
22
|
+
pull-requests: write
|
|
23
|
+
id-token: write
|
|
24
|
+
steps:
|
|
25
|
+
- name: Checkout repo
|
|
26
|
+
uses: actions/checkout@v4
|
|
27
|
+
with:
|
|
28
|
+
# Fetch entire git history so Changesets can generate changelogs
|
|
29
|
+
# with the correct commits
|
|
30
|
+
fetch-depth: 0
|
|
31
|
+
|
|
32
|
+
- name: Check for pre.json file existence
|
|
33
|
+
id: check_files
|
|
34
|
+
uses: andstor/file-existence-action@v2.0.0
|
|
35
|
+
with:
|
|
36
|
+
files: ".changeset/pre.json"
|
|
37
|
+
|
|
38
|
+
- name: Append NPM token to .npmrc
|
|
39
|
+
run: |
|
|
40
|
+
cat << EOF > "$HOME/.npmrc"
|
|
41
|
+
//registry.npmjs.org/:_authToken=$NPM_TOKEN
|
|
42
|
+
EOF
|
|
43
|
+
env:
|
|
44
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
45
|
+
|
|
46
|
+
- name: Setup Node.js 18.x
|
|
47
|
+
uses: actions/setup-node@v3
|
|
48
|
+
with:
|
|
49
|
+
node-version: 18.x
|
|
50
|
+
|
|
51
|
+
- run: npm config set engine-strict=false
|
|
52
|
+
|
|
53
|
+
- name: Install dependencies
|
|
54
|
+
run: npm ci
|
|
55
|
+
|
|
56
|
+
- name: Create release PR or publish to npm + GitHub
|
|
57
|
+
id: changesets
|
|
58
|
+
if: steps.check_files.outputs.files_exists == 'false'
|
|
59
|
+
uses: changesets/action@v1
|
|
60
|
+
with:
|
|
61
|
+
version: npm run changeset-version
|
|
62
|
+
publish: npm run changeset-publish
|
|
63
|
+
env:
|
|
64
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
65
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
66
|
+
|
|
67
|
+
- name: Attach VSX to GitHub release
|
|
68
|
+
if: steps.changesets.outcome == 'success' && steps.changesets.outputs.published == 'true'
|
|
69
|
+
run: |
|
|
70
|
+
npx -y @vscode/vsce package --out "vscode-apollo-$VERSION.vsix"
|
|
71
|
+
gh release upload "v$VERSION" "vscode-apollo-$VERSION.vsix"
|
|
72
|
+
env:
|
|
73
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
74
|
+
VERSION: ${{steps.changesets.outputs.publishedPackages[0].version}}
|
|
75
|
+
|
|
76
|
+
- name: Publish to Open VSX Registry
|
|
77
|
+
if: steps.changesets.outcome == 'success' && steps.changesets.outputs.published == 'true'
|
|
78
|
+
uses: HaaLeo/publish-vscode-extension@v1
|
|
79
|
+
with:
|
|
80
|
+
pat: ${{ secrets.OPEN_VSX_TOKEN }}
|
|
81
|
+
baseContentUrl: https://raw.githubusercontent.com/apollographql/vscode-graphql
|
|
82
|
+
|
|
83
|
+
- name: Publish to Visual Studio Marketplace
|
|
84
|
+
if: steps.changesets.outcome == 'success' && steps.changesets.outputs.published == 'true'
|
|
85
|
+
uses: HaaLeo/publish-vscode-extension@v1
|
|
86
|
+
with:
|
|
87
|
+
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
|
|
88
|
+
registryUrl: https://marketplace.visualstudio.com
|
|
89
|
+
baseContentUrl: https://raw.githubusercontent.com/apollographql/vscode-graphql
|
|
90
|
+
|
|
91
|
+
- name: Send a Slack notification on publish
|
|
92
|
+
if: steps.changesets.outcome == 'success' && steps.changesets.outputs.published == 'true'
|
|
93
|
+
id: slack
|
|
94
|
+
uses: slackapi/slack-github-action@v1.24.0
|
|
95
|
+
with:
|
|
96
|
+
# Slack channel id, channel name, or user id to post message
|
|
97
|
+
# See also: https://api.slack.com/methods/chat.postMessage#channels
|
|
98
|
+
# You can pass in multiple channels to post to by providing
|
|
99
|
+
# a comma-delimited list of channel IDs
|
|
100
|
+
channel-id: "C02J316U84V"
|
|
101
|
+
payload: |
|
|
102
|
+
{
|
|
103
|
+
"blocks": [
|
|
104
|
+
{
|
|
105
|
+
"type": "section",
|
|
106
|
+
"text": {
|
|
107
|
+
"type": "mrkdwn",
|
|
108
|
+
"text": "A new version of `vscode-apollo` was released: <https://github.com/apollographql/vscode-graphql/releases/tag/v${{ fromJson(steps.changesets.outputs.publishedPackages)[0].version }}|v${{ fromJson(steps.changesets.outputs.publishedPackages)[0].version }}> :rocket:"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
env:
|
|
114
|
+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
|
package/.gitleaks.toml
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# This file exists primarily to influence scheduled scans that Apollo runs of all repos in Apollo-managed orgs.
|
|
2
|
+
# This is an Apollo-Internal link, but more information about these scans is available here:
|
|
3
|
+
# https://apollographql.atlassian.net/wiki/spaces/SecOps/pages/81330213/Everything+Static+Application+Security+Testing#Scheduled-Scans.1
|
|
4
|
+
#
|
|
5
|
+
# Apollo is using Gitleaks (https://github.com/gitleaks/gitleaks) to run these scans.
|
|
6
|
+
# However, this file is not something that Gitleaks natively consumes. This file is an
|
|
7
|
+
# Apollo-convention. Prior to scanning a repo, Apollo merges
|
|
8
|
+
# our standard Gitleaks configuration (which is largely just the Gitleaks-default config) with
|
|
9
|
+
# this file if it exists in a repo. The combined config is then used to scan a repo.
|
|
10
|
+
#
|
|
11
|
+
# We did this because the natively-supported allowlisting functionality in Gitleaks didn't do everything we wanted
|
|
12
|
+
# or wasn't as robust as we needed. For example, one of the allowlisting options offered by Gitleaks depends on the line number
|
|
13
|
+
# on which a false positive secret exists to allowlist it. (https://github.com/gitleaks/gitleaks#gitleaksignore).
|
|
14
|
+
# This creates a fairly fragile allowlisting mechanism. This file allows us to leverage the full capabilities of the Gitleaks rule syntax
|
|
15
|
+
# to create allowlisting functionality.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
[[ rules ]]
|
|
19
|
+
id = "generic-api-key"
|
|
20
|
+
[ rules.allowlist ]
|
|
21
|
+
commits = [
|
|
22
|
+
# This creates an allowlist for a UUID that was
|
|
23
|
+
# used as an identifier, but is not secret
|
|
24
|
+
# See https://github.com/apollographql/vscode-graphql/blob/a905280c143991b3fd675f8b4c3a7da277ccf095/packages/apollo-language-server/src/engine/index.ts#L86
|
|
25
|
+
"a905280c143991b3fd675f8b4c3a7da277ccf095"
|
|
26
|
+
]
|
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
v18
|
package/.prettierrc
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.2.0",
|
|
3
|
+
// List of configurations. Add new configurations or edit existing ones.
|
|
4
|
+
"configurations": [
|
|
5
|
+
{
|
|
6
|
+
"name": "Launch VS Code Extension",
|
|
7
|
+
"type": "extensionHost",
|
|
8
|
+
"request": "launch",
|
|
9
|
+
"preLaunchTask": "npm: watch",
|
|
10
|
+
"runtimeExecutable": "${execPath}",
|
|
11
|
+
"args": [
|
|
12
|
+
"--extensionDevelopmentPath=${workspaceRoot}"
|
|
13
|
+
],
|
|
14
|
+
"stopOnEntry": false,
|
|
15
|
+
"sourceMaps": true,
|
|
16
|
+
"outFiles": ["${workspaceRoot}/lib/**/*.js"]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "Attach to TS Server",
|
|
20
|
+
"type": "node",
|
|
21
|
+
"request": "attach",
|
|
22
|
+
"protocol": "inspector",
|
|
23
|
+
"port": 6009,
|
|
24
|
+
"sourceMaps": true
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "Extension Tests",
|
|
28
|
+
"type": "extensionHost",
|
|
29
|
+
"request": "launch",
|
|
30
|
+
"runtimeExecutable": "${execPath}",
|
|
31
|
+
"args": [
|
|
32
|
+
"--disable-extensions",
|
|
33
|
+
"--extensionDevelopmentPath=${workspaceFolder}",
|
|
34
|
+
],
|
|
35
|
+
"outFiles": ["${workspaceFolder}/lib/**/*.js"],
|
|
36
|
+
"preLaunchTask": "npm: watch"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "Attach to Test Debugger",
|
|
40
|
+
"type": "node",
|
|
41
|
+
"request": "attach",
|
|
42
|
+
"protocol": "inspector",
|
|
43
|
+
"port": 9001,
|
|
44
|
+
"sourceMaps": true
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "Attach to CLI Debugger",
|
|
48
|
+
"type": "node",
|
|
49
|
+
"request": "attach",
|
|
50
|
+
"protocol": "inspector",
|
|
51
|
+
"port": 9002,
|
|
52
|
+
"sourceMaps": true
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"compounds": [
|
|
56
|
+
{
|
|
57
|
+
"name": "Extension + Server",
|
|
58
|
+
"configurations": ["Launch VS Code Extension", "Attach to TS Server"]
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Place your settings in this file to overwrite default and user settings.
|
|
2
|
+
{
|
|
3
|
+
"editor.tabSize": 2,
|
|
4
|
+
"editor.insertSpaces": true,
|
|
5
|
+
"editor.rulers": [110],
|
|
6
|
+
"editor.wordWrapColumn": 110,
|
|
7
|
+
"files.trimTrailingWhitespace": true,
|
|
8
|
+
"files.insertFinalNewline": true,
|
|
9
|
+
"files.exclude": {
|
|
10
|
+
"**/.git": true,
|
|
11
|
+
"**/.DS_Store": true,
|
|
12
|
+
"node_modules": false
|
|
13
|
+
},
|
|
14
|
+
"typescript.tsdk": "node_modules/typescript/lib",
|
|
15
|
+
"debug.node.autoAttach": "on"
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "2.0.0",
|
|
3
|
+
"tasks": [
|
|
4
|
+
{
|
|
5
|
+
"type": "npm",
|
|
6
|
+
"script": "watch",
|
|
7
|
+
"problemMatcher": "$tsc-watch",
|
|
8
|
+
"isBackground": true,
|
|
9
|
+
"presentation": {
|
|
10
|
+
"reveal": "never"
|
|
11
|
+
},
|
|
12
|
+
"group": {
|
|
13
|
+
"kind": "build",
|
|
14
|
+
"isDefault": true
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
package/.vscodeignore
CHANGED
|
@@ -1 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
.circleci
|
|
2
|
+
.vscode
|
|
3
|
+
.vscode-test
|
|
4
|
+
src
|
|
5
|
+
.env
|
|
6
|
+
.eslintrc.js
|
|
7
|
+
.git
|
|
8
|
+
.gitignore
|
|
9
|
+
.nvmrc
|
|
10
|
+
.prettierrc
|
|
11
|
+
.gitattributes
|
|
12
|
+
codegen.yml
|
|
13
|
+
graphql.configuration.json
|
|
14
|
+
jest.config.ts
|
|
15
|
+
package-lock.json
|
|
16
|
+
tsconfig.build.json
|
|
17
|
+
tsconfig.json
|
package/CHANGELOG.md
CHANGED
|
@@ -1 +1,178 @@
|
|
|
1
|
-
|
|
1
|
+
# CHANGELOG
|
|
2
|
+
|
|
3
|
+
## 1.20.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#270](https://github.com/apollographql/vscode-graphql/pull/270) [`efdbe28a`](https://github.com/apollographql/vscode-graphql/commit/efdbe28a22fd9f309ebea34df9c7bb0716f9e729) Thanks [@github-actions](https://github.com/apps/github-actions)! - Republish 1.20 to Marketplace
|
|
8
|
+
|
|
9
|
+
## 1.20.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#105](https://github.com/apollographql/vscode-graphql/pull/105) [`43879da4`](https://github.com/apollographql/vscode-graphql/commit/43879da40f3a3b7c6327cf165fca9980e04b4bc7) Thanks [@zovits](https://github.com/zovits)! - Add inline syntax highlighting support for Lua
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#99](https://github.com/apollographql/vscode-graphql/pull/99) [`2a3fc1bb`](https://github.com/apollographql/vscode-graphql/commit/2a3fc1bb3c38245f09a5e5e0a19900ea0cfc58b3) Thanks [@pvinis](https://github.com/pvinis)! - Support tagging inside of parentheses
|
|
18
|
+
|
|
19
|
+
- [#73](https://github.com/apollographql/vscode-graphql/pull/73) [`d07b303d`](https://github.com/apollographql/vscode-graphql/commit/d07b303d31fdf0810f8be163bb3973c564cf0754) Thanks [@rachsmithcodes](https://github.com/rachsmithcodes)! - Return early instead of erroring on missing fields
|
|
20
|
+
|
|
21
|
+
- [#97](https://github.com/apollographql/vscode-graphql/pull/97) [`2b57a1af`](https://github.com/apollographql/vscode-graphql/commit/2b57a1afd9882a139a47af9b55496b7aa62fde2b) Thanks [@clf17222592](https://github.com/clf17222592)! - Support configuration files with .cjs file extension
|
|
22
|
+
|
|
23
|
+
- [#78](https://github.com/apollographql/vscode-graphql/pull/78) [`8b02374a`](https://github.com/apollographql/vscode-graphql/commit/8b02374a355ef9304e1fe9b0d89bcf559e618428) Thanks [@jtgrenz](https://github.com/jtgrenz)! - Fix regex for ruby heredoc
|
|
24
|
+
|
|
25
|
+
### 1.19.11
|
|
26
|
+
|
|
27
|
+
- Fix directive highlighting on enums and arguments [#6716](https://github.com/apollographql/vscode-graphql/pull/71)
|
|
28
|
+
|
|
29
|
+
### 1.19.10
|
|
30
|
+
|
|
31
|
+
- Fix highlighting on schema extension directives [#66](https://github.com/apollographql/vscode-graphql/pull/66)
|
|
32
|
+
|
|
33
|
+
### 1.19.9
|
|
34
|
+
|
|
35
|
+
- Add validation/completion for #graphql annotated strings in js [#47](https://github.com/apollographql/vscode-graphql/pull/47)
|
|
36
|
+
- Add config option for disabling 'Run in Studio' button [#46](https://github.com/apollographql/vscode-graphql/pull/46)
|
|
37
|
+
- Add config option to disable switching to output tab on error [#44](https://github.com/apollographql/vscode-graphql/pull/44)
|
|
38
|
+
|
|
39
|
+
### 1.19.8
|
|
40
|
+
|
|
41
|
+
- Move 'Run in Studio' icon to end of line [#42](https://github.com/apollographql/vscode-graphql/pull/42)
|
|
42
|
+
- Fix syntax highlighting for directives on types [#36](https://github.com/apollographql/vscode-graphql/pull/36)
|
|
43
|
+
|
|
44
|
+
### 1.19.7
|
|
45
|
+
|
|
46
|
+
- Specify files with conflicting documents for the 'There are multiple definitions' message. [#29](https://github.com/apollographql/vscode-graphql/pull/29)
|
|
47
|
+
- Dont watch non file documents. Diff view will no longer crash extension. [#28](https://github.com/apollographql/vscode-graphql/pull/28)
|
|
48
|
+
- Upgrade graphql version to 15.5 [#34](https://github.com/apollographql/vscode-graphql/pull/34)
|
|
49
|
+
|
|
50
|
+
### 1.19.6
|
|
51
|
+
|
|
52
|
+
- Fix 'Run in explorer' link. [#25](https://github.com/apollographql/vscode-graphql/pull/25)
|
|
53
|
+
|
|
54
|
+
### 1.19.5
|
|
55
|
+
|
|
56
|
+
- Add a 'Run in explorer' gutter action. [#20](https://github.com/apollographql/vscode-graphql/pull/20)
|
|
57
|
+
- Switch Studio query that fetches timing hints to use a newer field. This should have no user-observable impact, though we may eventually remove the old field once most users have upgraded their extensions. [#22](https://github.com/apollographql/vscode-graphql/pull/22)
|
|
58
|
+
- Add support for highlighting Svelte files [#17](https://github.com/apollographql/vscode-graphql/pull/17)
|
|
59
|
+
- Add support for `.cjs` files [#4](https://github.com/apollographql/vscode-graphql/pull/4)
|
|
60
|
+
- Exclude localSchemaFile when looking for graphql documents. This should fix the common case for hitting `VSCode Plugin: Loading Schema Twice` errors. [#8](https://github.com/apollographql/vscode-graphql/pull/8)
|
|
61
|
+
|
|
62
|
+
### 1.19.4
|
|
63
|
+
|
|
64
|
+
- Fix VS Code extension performance issues for larger projects [#1938](https://github.com/apollographql/apollo-tooling/pull/1938)
|
|
65
|
+
|
|
66
|
+
-> _Note:_ This project used to live in the [apollo-tooling](https://github.com/apollographql/apollo-tooling) repo. Refer to the [apollo-tooling CHANGELOG](https://github.com/apollographql/apollo-tooling/blob/master/CHANGELOG.md) for full list of changes before April 25, 2021. See below for filtered changelog from apollo-tooling.
|
|
67
|
+
|
|
68
|
+
## Legacy apollo-tooling Changelog
|
|
69
|
+
|
|
70
|
+
### apollo-tools@0.5.1
|
|
71
|
+
|
|
72
|
+
- Remove dependency on `apollo-env`, so using this package no longer installs polyfills.
|
|
73
|
+
|
|
74
|
+
### apollo-env@0.10.0
|
|
75
|
+
|
|
76
|
+
- deps: Updated `node-fetch` to v2.6.1
|
|
77
|
+
|
|
78
|
+
### apollo-env@0.9.0
|
|
79
|
+
|
|
80
|
+
- The following utility functions are no longer exported from `apollo-env` and can now be found in the `apollo-graphql` library:
|
|
81
|
+
- `createHash`
|
|
82
|
+
- `isNodeLike`
|
|
83
|
+
- `mapValues`
|
|
84
|
+
- `isNotNullOrDefined`
|
|
85
|
+
|
|
86
|
+
### `apollo-language-server@1.14.3`
|
|
87
|
+
|
|
88
|
+
- `apollo-language-server@1.14.3`
|
|
89
|
+
- Fix issue where fragment definitions only included in `@client` fields would not be stripped ((AP-682)(https://golinks.io/AP-682), [#1454](https://github.com/apollographql/apollo-tooling/pull/1454))
|
|
90
|
+
|
|
91
|
+
### `apollo-language-server@1.14.2`
|
|
92
|
+
|
|
93
|
+
- `apollo-language-server@1.14.2`
|
|
94
|
+
- Fix #735 caused #928 error implement [#1461](https://github.com/apollographql/apollo-tooling/pull/1461)
|
|
95
|
+
- Fix dirname parsing for ts config files [#1463](https://github.com/apollographql/apollo-tooling/pull/1463)
|
|
96
|
+
|
|
97
|
+
### `vscode-apollo@1.9.1`, `apollo-language-server@1.14.1`
|
|
98
|
+
|
|
99
|
+
- `apollo-language-server@1.14.1`
|
|
100
|
+
- Fix cache invalidation bug for reload schema which caused outdated results in autocomplete [#1446](https://github.com/apollographql/apollo-tooling/pull/1446)
|
|
101
|
+
|
|
102
|
+
### `vscode-apollo@1.9.0`, `apollo-language-server@1.14.0`, `apollo-codegen-swift@0.34.2`
|
|
103
|
+
|
|
104
|
+
- `vscode-apollo@1.9.0`
|
|
105
|
+
- Add Dart support for vscode [#1385](https://github.com/apollographql/apollo-tooling/pull/1385)
|
|
106
|
+
- `apollo-language-server@1.14.0`
|
|
107
|
+
- Add Dart operation extraction [#1385](https://github.com/apollographql/apollo-tooling/pull/1385)
|
|
108
|
+
- `apollo-codegen-swift@0.34.2`
|
|
109
|
+
- Prevent compiler warnings for redundant access-level modifiers when using `--namespace` [1241](https://github.com/apollographql/apollo-tooling/pull/1241)
|
|
110
|
+
|
|
111
|
+
### `apollo-language-server@1.5.2`, `vscode-apollo@1.5.2`
|
|
112
|
+
|
|
113
|
+
- `apollo-language-server@1.5.2`
|
|
114
|
+
- fix single apollo.config breaking others loaded at the same time [#1055](https://github.com/apollographql/apollo-tooling/pull/1055)
|
|
115
|
+
- Fix broken fileSet.includesFile to use full filepath [#1055](https://github.com/apollographql/apollo-tooling/pull/1055)
|
|
116
|
+
- `vscode-apollo@1.5.2`
|
|
117
|
+
|
|
118
|
+
### `apollo-env@0.3.1`
|
|
119
|
+
|
|
120
|
+
- `apollo-env@0.3.1`
|
|
121
|
+
- Fix core-js dependency by pinning to `3.0.0-beta.3` [#961](https://github.com/apollographql/apollo-tooling/pull/961)
|
|
122
|
+
|
|
123
|
+
### `apollo-language-server@1.4.1`
|
|
124
|
+
|
|
125
|
+
- `apollo-language-server` 1.4.1
|
|
126
|
+
- Fix edge case for empty operations [#959](https://github.com/apollographql/apollo-tooling/pull/959)
|
|
127
|
+
|
|
128
|
+
### `apollo-language-server@1.0.0`
|
|
129
|
+
|
|
130
|
+
> NOTE: Many of the updates and changes in this release came from a complete rebuild of the Apollo CLI in preparation for GraphQL summit. Many of these changes can be traced to [this commit](https://github.com/apollographql/apollo-tooling/commit/d2d73f9c597845355b7ee267e411d80d1c493043) but aren't tied to a specific pull request, and won't be linked.
|
|
131
|
+
|
|
132
|
+
- `apollo-language-server@1.0.0`
|
|
133
|
+
- Initial release of `apollo-language-server` to support `vscode-apollo`, and `apollo`
|
|
134
|
+
- Supports editor features for...
|
|
135
|
+
- Autocompletion of GraphQL documents
|
|
136
|
+
- Hover information for fields anr arguments
|
|
137
|
+
- Type definitions and references
|
|
138
|
+
- Code lenses for open files
|
|
139
|
+
- `vscode-apollo@1.0.0`
|
|
140
|
+
- Initial Release of `vscode-apollo`
|
|
141
|
+
- Switching of schema tags [#632](https://github.com/apollographql/apollo-tooling/pull/632)
|
|
142
|
+
- Supports all of the editor features exposed by `apollo-language-server`
|
|
143
|
+
|
|
144
|
+
#### :rocket: Feature
|
|
145
|
+
|
|
146
|
+
- `apollo-language-server`, `apollo-vscode`
|
|
147
|
+
- [#536](https://github.com/apollographql/apollo-tooling/pull/536) Display status of loading tasks for config and Engine stats ([@shadaj](https://github.com/shadaj))
|
|
148
|
+
|
|
149
|
+
#### :bug: Bug Fix
|
|
150
|
+
|
|
151
|
+
- `apollo-cli`, `apollo-language-server`, `apollo-vscode`
|
|
152
|
+
- [#519](https://github.com/apollographql/apollo-tooling/pull/519) [VSCode] Fix detection of projects inside folders ([@shadaj](https://github.com/shadaj))
|
|
153
|
+
|
|
154
|
+
#### :memo: Documentation
|
|
155
|
+
|
|
156
|
+
- `apollo-cli`, `apollo-vscode`
|
|
157
|
+
- [#521](https://github.com/apollographql/apollo-tooling/pull/521) Add README for the VS Code extension ([@shadaj](https://github.com/shadaj))
|
|
158
|
+
|
|
159
|
+
#### :rocket: Feature
|
|
160
|
+
|
|
161
|
+
- `apollo-language-server`
|
|
162
|
+
- [#516](https://github.com/apollographql/apollo-tooling/pull/516) Code complete default query variables ([@shadaj](https://github.com/shadaj))
|
|
163
|
+
- `apollo-language-server`, `apollo-vscode`
|
|
164
|
+
- [#515](https://github.com/apollographql/apollo-tooling/pull/515) Fix missing descriptions and add more hover information for arguments ([@shadaj](https://github.com/shadaj))
|
|
165
|
+
- `apollo-cli`, `apollo-codegen-core`, `apollo-language-server`, `apollo-vscode-webview`, `apollo-vscode`
|
|
166
|
+
- [#512](https://github.com/apollographql/apollo-tooling/pull/512) React UI for webviews, fix file tracking and fragment spreads ([@shadaj](https://github.com/shadaj))
|
|
167
|
+
- `apollo-cli`, `apollo-language-server`, `apollo-vscode`
|
|
168
|
+
- [#508](https://github.com/apollographql/apollo-tooling/pull/508) Support jumping to definitions in schema ([@shadaj](https://github.com/shadaj))
|
|
169
|
+
|
|
170
|
+
#### :house: Internal
|
|
171
|
+
|
|
172
|
+
- `apollo-cli`, `apollo-language-server`
|
|
173
|
+
- [#506](https://github.com/apollographql/apollo-tooling/pull/506) Share validation logic between CLI and language server ([@shadaj](https://github.com/shadaj))
|
|
174
|
+
|
|
175
|
+
#### :rocket: Feature
|
|
176
|
+
|
|
177
|
+
- `apollo-language-server`, `apollo-vscode`
|
|
178
|
+
- [#504](https://github.com/apollographql/apollo-tooling/pull/504) Add Apollo VS Code extension ([@shadaj](https://github.com/shadaj))
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2021 Apollo GraphQL
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|