Skip to content

Commit

Permalink
feat: expose the internal methods for the tada check command (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock authored Apr 4, 2024
1 parent d791cf5 commit e696b3a
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/honest-donkeys-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@0no-co/graphqlsp': minor
---

Expose the `init` and `getGraphQLDiagnostics` methods
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,6 @@ dist

# TernJS port file
.tern-port

packages/graphqlsp/api/*
packages/graphqlsp/api
6 changes: 6 additions & 0 deletions packages/graphqlsp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
"require": "./dist/graphqlsp.js",
"source": "./src/index.ts"
},
"./api": {
"types": "./dist/api.d.ts",
"import": "./dist/api.mjs",
"require": "./dist/api.js",
"source": "./src/api.ts"
},
"./package.json": "./package.json"
},
"scripts": {
Expand Down
2 changes: 2 additions & 0 deletions packages/graphqlsp/src/api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { getGraphQLDiagnostics } from './diagnostics';
export { init } from './ts';
2 changes: 1 addition & 1 deletion packages/graphqlsp/src/diagnostics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ const runDiagnostics = (
source,
nodes as ts.NoSubstitutionTemplateLiteral[],
info
);
) || [];

return [...tsDiagnostics, ...usageDiagnostics];
} else {
Expand Down
1 change: 1 addition & 0 deletions packages/graphqlsp/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"lib": ["ESNext"],
"target": "es2019",
"module": "es2015",
"moduleResolution": "node",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e696b3a

Please sign in to comment.