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
7 changes: 7 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ jobs:
strategy:
matrix:
node-version: *node-versions
typescript-version:
- "5.5.4"
- "5.7.3"
- "5.9.3"
- "6.0.2"
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
Expand All @@ -68,6 +73,8 @@ jobs:
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Install TypeScript ${{ matrix.typescript-version }}
run: pnpm add -wD typescript@${{ matrix.typescript-version }}
- name: Build # Integration tests depend upon having .js versions created by tsc
run: pnpm run build
- name: Unit Tests
Expand Down
4 changes: 4 additions & 0 deletions llm-docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Changes in this section are not yet released. If you need access to these change

- **Features**
- Added support for deriving `@gqlEnum` from const arrays (`(typeof X)[number]`) and const objects (`(typeof X)[keyof typeof X]`). This allows defining enums with runtime-accessible values without using TypeScript's `enum` syntax. The const declaration must immediately precede the type alias. See [enum docs](./docblock-tags/enums.md#runtime-accessible-enums) for details.
- **Improvements**
- `typescript` is now a peer dependency (`>=5.5`) instead of a direct dependency, allowing you to use your own TypeScript version. ([PR](https://github.com/captbaritone/grats/pull/228))
- Added support for TypeScript 6.0. ([PR](https://github.com/captbaritone/grats/pull/228))
- CI now tests against TypeScript 5.5, 5.7, 5.9, and 6.0.

## 0.0.36

Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
"dependencies": {
"commander": "^14.0.1",
"graphql": "^16.11.0",
"semver": "^7.7.2",
"typescript": "5.9.2"
"semver": "^7.7.2"
},
"peerDependencies": {
"typescript": ">=5.5"
},
"devDependencies": {
"@eslint/eslintrc": "^3.3.1",
Expand All @@ -39,7 +41,8 @@
"path-browserify": "^1.0.1",
"prettier": "^3.6.2",
"process": "^0.11.10",
"tsx": "^4.19.0"
"tsx": "^4.19.0",
"typescript": "5.9.2"
},
"prettier": {
"trailingComma": "all"
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion src/Extractor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3046,7 +3046,7 @@ function graphQLNameValidationMessage(name: string): string | null {
try {
assertName(name);
return null;
} catch (e) {
} catch (e: any) {
return e.message;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/tests/TestRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export default class TestRunner {
async transform(code: string, filename: string): Promise<TransformerResult> {
try {
return await this._transformer(code, filename);
} catch (e) {
} catch (e: any) {
console.error(e);
return { kind: "ERROR", err: e.message };
}
Expand Down
4 changes: 2 additions & 2 deletions src/tests/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const testDirs: TestDir[] = [
);
}
parsed = parsedResult.value;
} catch (e) {
} catch (e: any) {
return err(e.message);
}
console.warn = consoleWarn;
Expand Down Expand Up @@ -191,7 +191,7 @@ const testDirs: TestDir[] = [
);
}
parsedOptions = parsedOptionsResult.value;
} catch (e) {
} catch (e: any) {
return err(e.message);
}

Expand Down
2 changes: 1 addition & 1 deletion src/utils/visitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function visitDefinitions(doc: DocumentNode, visitors: Visitor) {
});
}

const emptyArray = [];
const emptyArray: never[] = [];

/**
* Simplified, more performant, version of graphql-js's visit function that only
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
},
"compilerOptions": {
"skipLibCheck": true,
"types": ["node"],
"lib": ["es2020"],
"experimentalDecorators": true,
"outDir": "dist",
"downlevelIteration": true,
"strictNullChecks": true,
"declaration": true,
"resolveJsonModule": true,
Expand Down
4 changes: 4 additions & 0 deletions website/docs/07-changelog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Changes in this section are not yet released. If you need access to these change

- **Features**
- Added support for deriving `@gqlEnum` from const arrays (`(typeof X)[number]`) and const objects (`(typeof X)[keyof typeof X]`). This allows defining enums with runtime-accessible values without using TypeScript's `enum` syntax. The const declaration must immediately precede the type alias. See [enum docs](../04-docblock-tags/07-enums.mdx#runtime-accessible-enums) for details.
- **Improvements**
- `typescript` is now a peer dependency (`>=5.5`) instead of a direct dependency, allowing you to use your own TypeScript version. ([PR](https://github.com/captbaritone/grats/pull/228))
- Added support for TypeScript 6.0. ([PR](https://github.com/captbaritone/grats/pull/228))
- CI now tests against TypeScript 5.5, 5.7, 5.9, and 6.0.

## 0.0.36

Expand Down
Loading