Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/loud-pandas-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@0no-co/graphqlsp': patch
---

Update dependencies. The bundled `graphql-language-service` has been updated to 5.5, which adds `label`, `detail`, `type`, `documentation`, and deprecation metadata to GraphQL completion entries, and the bundled `lru-cache` has been updated to v11, which requires Node.js 20 or higher.
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm lint-staged
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
test/e2e/fixture-project/fixtures/**/*
./**/*.generated.ts
test/e2e/**/introspection.d.ts
50 changes: 23 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
"module": "./dist/index.module.js",
"scripts": {
"build": "pnpm --filter @0no-co/graphqlsp build",
"prepare": "husky install",
"prepare": "husky",
"dev": "pnpm --filter @0no-co/graphqlsp dev",
"launch-debug": "./scripts/launch-debug.sh",
"test:e2e": "vitest run --single-thread"
"test:e2e": "vitest run --no-file-parallelism"
},
"prettier": {
"singleQuote": true,
Expand All @@ -20,34 +20,30 @@
"lint-staged": {
"*.{js,ts,json,md}": "prettier --write"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"packageManager": "pnpm@11.3.0",
"devDependencies": {
"@0no-co/graphql.web": "^1.3.2",
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1",
"@babel/plugin-transform-block-scoping": "^7.23.4",
"@babel/plugin-transform-typescript": "^7.23.6",
"@changesets/cli": "^2.29.6",
"@changesets/get-github-info": "^0.5.2",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.5",
"@types/node": "^18.15.11",
"dotenv": "^16.0.3",
"husky": "^8.0.3",
"lint-staged": "^15.0.0",
"prettier": "^2.8.7",
"rollup": "^4.9.5",
"@actions/core": "^3.0.1",
"@actions/github": "^9.1.1",
"@babel/plugin-transform-block-scoping": "^7.29.7",
"@babel/plugin-transform-typescript": "^7.29.7",
"@changesets/cli": "^2.31.0",
"@changesets/get-github-info": "^0.8.0",
"@rollup/plugin-babel": "^7.1.0",
"@rollup/plugin-commonjs": "^29.0.3",
"@rollup/plugin-node-resolve": "^16.0.3",
"@rollup/plugin-terser": "^1.0.0",
"@rollup/plugin-typescript": "^12.3.0",
"@types/node": "^22.20.0",
"dotenv": "^17.4.2",
"husky": "^9.1.7",
"lint-staged": "^17.0.8",
"prettier": "^3.9.4",
"rollup": "^4.62.2",
"rollup-plugin-cjs-check": "^1.0.3",
"rollup-plugin-dts": "^6.1.0",
"typescript": "^5.3.3",
"vitest": "^0.34.6"
"rollup-plugin-dts": "^6.4.1",
"typescript": "^5.9.3",
"vite": "^8.1.3",
"vitest": "^4.1.9"
}
}
12 changes: 6 additions & 6 deletions packages/graphqlsp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@
"homepage": "https://github.com/0no-co/GraphQLSP#readme",
"devDependencies": {
"@0no-co/graphql.web": "^1.3.2",
"@sindresorhus/fnv1a": "^2.0.0",
"@types/node": "^18.15.11",
"graphql-language-service": "^5.2.0",
"lru-cache": "^10.0.1",
"typescript": "^5.3.3"
"@sindresorhus/fnv1a": "^3.1.0",
"@types/node": "^22.20.0",
"graphql-language-service": "^5.5.2",
"lru-cache": "^11.5.1",
"typescript": "^5.9.3"
},
"dependencies": {
"@gql.tada/internal": "^1.2.0",
"@gql.tada/internal": "^1.2.1",
"graphql": "^15.5.0 || ^16.0.0 || ^17.0.0"
},
"peerDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions packages/graphqlsp/src/diagnostics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ const getModeMismatchDiagnostic = (
};
};

const cache = new LRUCache<number, ts.Diagnostic[]>({
const cache = new LRUCache<bigint, ts.Diagnostic[]>({
// how long to live in ms
ttl: 1000 * 60 * 15,
max: 5000,
Expand Down Expand Up @@ -798,10 +798,10 @@ const runDiagnostics = (
typeof diag.code === 'number'
? diag.code
: diag.severity === 2
? USING_DEPRECATED_FIELD_CODE
: SEMANTIC_DIAGNOSTIC_CODE,
? USING_DEPRECATED_FIELD_CODE
: SEMANTIC_DIAGNOSTIC_CODE,
messageText: diag.message.split('\n')[0],
} as ts.Diagnostic)
}) as ts.Diagnostic
);

if (isCallExpression) {
Expand Down
Loading