Skip to content

Commit

Permalink
feat: add using keyword support (#1286)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hebilicious committed Mar 28, 2024
1 parent 6820d36 commit f45e912
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/early-masks-compete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'houdini': patch
---

add support for the new 'using' syntax (explicit resource management: https://github.com/tc39/proposal-explicit-resource-management)
7 changes: 6 additions & 1 deletion packages/houdini/src/lib/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ export type ParsedFile = Maybe<{ script: Script; start: number; end: number }>
// overload definitions
export function parseJS(str: string, config?: Partial<ParserOptions>): Script {
const defaultConfig: ParserOptions = {
plugins: ['typescript', 'importAssertions', 'decorators-legacy'],
plugins: [
'typescript',
'importAssertions',
'decorators-legacy',
'explicitResourceManagement',
],
sourceType: 'module',
}
// @ts-ignore: babel doesn't perfectly match recast's types (the comments don't line up)
Expand Down

0 comments on commit f45e912

Please sign in to comment.