-
-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate type definitions for route functions (variables, hooks, etc) #470
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🦋 Changeset detectedLatest commit: 3ac571b The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
AlecAivazis
added a commit
that referenced
this pull request
Aug 25, 2022
* fix import order with multiple inline queries * make text friendlier * update store integration tests to use new embedded api * update preprocess tests * invert fragment argument order * added changesets * comment tweak * add loadAll * add test for loadAll * add infrastructure to inject context into query store * add plugin to inject houdini context everywhere * tweak readme * remove context from integration tests and moved ctx arg to back of pagination methods * context error in pagination methods * injectContext is now a list * dont lint site * docs - hooks dont return props * fixed highlighting colors * more doc fixes * docs * document pull-schema cmd * remove mentions of sapper * invert fragment order * endpoint * remove references to houdiniContext * store loading api * more updates and release notes section * fix incorrect header in release notes guide * version change release notes guide link * fix build errors * redo working-with-graphql guide * fix transformation css class * typo * order section * working-with-graphql recommendation first * more working with graphql tweaks * SSR -> server side rendering * so many tweaks * conclusion to working with graphql * english * add plugin docs * clean up hook docs * dry up subscription config * fix syntax highlighting * fix session tracking * supress context logs in store factory * error msg tweak * rename svelte-preprocess to preprocess * added integration tests * avoid duplicate tag bug in asyncWalk * fix watch and run bugs * sync on postinstall * start moving to typescript * move to vitest * 🚧 UPDATE: integration prj * Generate type definitions for route functions (#470) * start variable typedefs * unify load import behavior * start building variable definition file * battery about to die * keep on keeping on * tests pass * build errors * integration builds * formatting * add changeset * tests pass * add missing Prism import * add route typdefs to release notes * flesh out typescript guide (finally) * trim fluff * ♻️ UPDATE: sync * tentative * fix test name * plugin resolves * 🚧 ADD: routDir, FIX: some paths, TODO: svelte only * use artifact name in generated load prop * update snapshot * 🚧 UPDATE: init with vite config for kit & svelte * 🚧 FIX: init in layout.tjs file * 🚧 IMPROVE: svelte init with main.js * 🚧 IMPROVE: init in layout.svelte * 🚧 IMPROVE: rmv defaults * manual load ssr works 🎉 * add kit plugin back * fix build errors * ✨ NEW: add graphql in devDep * ✨ IMPROVE: init cmd with client * fix config and client imports * add ? to components * inline documents use $$props references * update snapshot * attempt to migrate to pnpm * better attempt at pnpm cached install * i hate yaml * add minimatch types * missing deps * bump node version * import BaseNode from estree-walker * more deps * remove estree dep * no need to generate runtime with integration linter * more deps! * use pnpm --filter to run workspace command * try without --filter * maybe its the pnpm cache? * gotta run install now * missed on * build houdini before integration linter * no need for generate before preview in integration tests * tweak test flow * cd integration && * dont generate in playwright server * does that move the error? * build before sync * more ci tweaks * add indexFile generator back * aaaand we're back * fix yaml * fix import * fix indexFile tests * update test file and watch and run bug * indexFile tests need to use mock fs * fix type errors in integration tests * add warning about missing client file * remove flaky test (integration tests cover it) * formatting * delete yarn files * ✨ IMPROVE: logs. Show the end if starting... (if not we could not show starting...) 👀 * 🚸 REMOVE: some yarn things * query, mutation, and subscription store classes * first pass at type checking class-based stores * mark type exports explicitly * update snapshots * rename houdini/kit to houdini/vite * linter * update mutation, fragment, and subscription stores to use classes * added changeset * document stores as classes * missing punctuation * fix typedefinitions for paginated queries * fix bug preventing initial page info from loading * offset query pagination * clean up logs * disable eslint for one line * ✅ FIX: endpoint mutation test * 🐛 FIX: windows build * ♻️ IMPROVE: file orga * fixed hidden page.js client import path * 🚸 IMPROVE: linting * inline document functions return stores directly * added changeset * initial pageinfo ssr's * paginated fragments typecheck * paginated fragments tests pass * more imports * more integration tests passing (sessions, endpoints, etc) * component queries * remove import.meta.env for cjs compat * more integration test cleanup * watch-and-run errors and only generate runtime if version changed * add tests for generating route types * layout queries * set process.env.TEST in vite.setup * better check for updated versions * fix prettier config * 🎨 IMPROVE: logs * a * 🎨 IMPROVE: one liner in plugin * consolidate store vs inline docs * update intro * document config.client * update snapshots and check for unexported data variable * generate valid page data type * PageData includes return values from hook functions * update contributing guide * clean up todos * update snapshot * linter and check * update snapshot * bump * enable replay * downgrade node version * independent replay config file * add retries * remove workers config * fix a few tests * more local testing * more invalid tests * more test fixes * initial page size for paginated fragments * add retries to local test config * start migration guide * add migration guide to left bar * bring highlight imports local * conclusion for migration guide * small tweaks * 🐛 FIX: inline mutation * 🚧 UPDATE: rmv retries for fast tests (will be back later) * ⚡ IMPROVE: page goto default * ⚡ IMPROVE: timing margin * ⚡ UPDATE: goto with extra timing * 🐛 FIX: file name * 🚸 FIX: goto and expect (timing) * 👌 FIX: linting * 🚧 TMP: logs in gh * enter prerelease mode * more doc updates * ✅ IMPROVE: testing * 🚧 UPDATE: for CI * 🚧 REMOVE: waitForRequest * ♻️ UPDATE: namings * 🤡 UPDATE: OMG? * 👌 FIX: wait after click to navigate well * ✏️ UPDATE: comment * ♻️ REMOVE: scripts and 1 playwright config with options (test worker 60) * ♻️ UPDATE: playwright settings * try caching pnpm and playwright * bump playwright cache version * cache rest of workflows * fix houdini client import (to break integration tests) * graphql tag to return any * pull schema if it doesn't exist on startup * fix bug seeing changes in schema file * convert all errors to HoudiniError * more fixes from fehnomenal * fix nullish mutation response * remove context and inline document functions * added changeset * remove all inline document functions except fragment * document lack of inline wrappers * tests pass * 🐛 FIX: types (thx to @fehnomenal) Co-authored-by: fehnomenal <fehnomenal@fehn.systems> * 🚸 FIX: typings * update snapshots * remove mention of session * Generate input types (and more fixes) (#476) * Fix typing for generated fragment load functions * Fix copy/paste error (probably) * Unify naming and usage of document inputs and results * Generate null input types * ✨ NEW: custom globalStoreName (#460) * ✏️ UPDATE: doc & changeset * ✅ UPDATE: tests with globalStorePrefix * 🚧 IMPROVE: adding forbiddenNames * ✅ FIX: tests using forbidden names * 🤡 UPDATE: snap (sorry, I pushed it wrong before) * different link to release notes * add mdsvex as regular dep * move dev deps to deps * actual link * add svelte as dep Co-authored-by: jycouet <jycouet@gmail.com> Co-authored-by: fehnomenal <fehnomenal@fehn.systems>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a sveltekit generator to the mix that creates type definitions for a route:
In order to make this work, the user has to change their tsconfig file to look like this: