Skip to content
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

Plugins #593

Merged
merged 153 commits into from
Oct 15, 2022
Merged

Plugins #593

merged 153 commits into from
Oct 15, 2022

Conversation

AlecAivazis
Copy link
Collaborator

@AlecAivazis AlecAivazis commented Oct 8, 2022

This PR reorganizes the project into two distinct packages:

  • houdini - the core artifact generation pipeline, cache runtime, vite plugin, and a collection of utilities for building extensions to the system
  • houdini-svelte - a plugin that extends the core houdini package to support the current API (generate stores, transform files, generate loads for kit, etc)

The exact details of the plugin API are still very much TBD but what is in place is enough to build bindings for other frameworks which is fine for an internal API. Eventually, I would like to provide a way for users to provide their own plugins to extend houdini to fit their specific needs.

Unfortunately, I couldn't find a way to make houdini-svelte be included as part of houdini so this version will technically be a breaking change that forces the user to install houdini-svelte in their project. There are still some more things that need to be done so I'm hoping to collect some feedback on the broad strokes while I work on tidying things up.

For anyone interested, here is a very much in progress overview of how I think plugins can fit into the system: https://app.excalidraw.com/l/5mJ4nb9Inaz/7QsnYkLMbK3

cc @DanielHritcu

To help everyone out, please make sure your PR does the following:

  • Update the first line to point to the ticket that this PR fixes
  • Add a message that clearly describes the fix
  • If applicable, add a test that would fail without this fix
  • Make sure the unit and integration tests pass locally with pnpm run tests and cd integration && pnpm run tests
  • Includes a changeset if your fix affects the user with pnpm changeset

Things Left

  • only generate runtimes when versions change (so we don't get that annoying error on save)
  • correct expand HOUDINI_VERSION
  • make sure changelog is preserved
  • package.json metadata (description, link, etc)
  • update set up project guide
  • update pokedex
  • turbo pipeline for linting
  • update init
  • release notes
  • move store config to plugin config
  • define types for houdini-svelte

* 🚸 IMPROVE: integration tests with layout ideas

* 🚧 UPDATE: types generated

* 🚧 UPDATE: layout_query_path

* 🚧 UPDATE: tmp while no Lyaout_User

* ✅ DOC: update

* ✨ NEW: +page & +layout

* ✅ NEW: tests

* ✏️ DOC: one line doc

* ✏️ UPDATE: changeset

* ✅ NEW: eae test

* 🚸 IMPROVE: display the correct file that has an issue (including +page|+layout)
@AlecAivazis AlecAivazis merged commit c1363fe into main Oct 15, 2022
@AlecAivazis AlecAivazis deleted the plugins branch October 15, 2022 09:21
@github-actions github-actions bot mentioned this pull request Oct 21, 2022
endigma pushed a commit to endigma/houdini that referenced this pull request Nov 10, 2024
* initial layout

* move runtime

* there are only packages

* start turbo

* start on houdini plugins

* add fsPatch to houdini-svelte

* plugins can modify index files

* move houdini into src

* redlines

* more redlines

* more redlines

* start unifying build tasks

* runtimes aren't bundled

* unify structure more

* build non-standard directories as submodules

* both packages build (with type errors)

* fix imports

* comment out watch-and-run

* start converting to rollup

* go back to esbuild

* import svelte plugin directly

* remove cyclic dependency

* move recursive copy

* start generating typedefs

* fix typescript lib config

* move kit filepath conventions to houdini-svelte

* more kit consolidation

* houdini core typechecks 🎉

* remove flatten fs export

* more fs imports

* clean up deps

* non transform page script related type issues

* houdini-svelte typechecks

* only emit typedefs

* fix more circular imports

* plugins can be imported

* plugins need to be built to be imported

* move codegen out of cmd

* add config to vite adapter

* add typedefs to generated runtime

* runtime generation to svelte plugin

* start on filepath conventions

* fix ciruclar impots

* more ciruclar deps cleared up

* fixed issue in svelte transform

* start on tests

* add houdini/test

* fixed some test type errors

* update package.json

* fix type error from merge

* make fs_patch mix more clear

* consolidate extraction logic

* centralize plugin option config

* svelte runtime can import core

* new line when generating typescript index file

* better newline behavior

* fix parsing erors

* svelte plugin generates stores in plugin_root

* snapshot

* fix relative paths and include fragments

* it all builds 🎉

* remove plugin envar check since its static analysis now

* update package.json

* runtime typedefs

* fix setSession exports

* fix some more imports

* remove extensions

* fix timing issue with the fs patch

* everything but preview layouts

* fix preview errors

* rename integration tests as end-to-end

* example builds

* update example

* update pnpm lock file

* rename houdini-svelte to houdini-plugin-svelte

* fix imports in e2e tests

* fix imports in tests

* update vite setup imports

* more test fixes

* add root deps

* fix includeFile call

* update versions

* add root deps

* tests run

* add pkg commands

* build command now compiles and generates typedefs

* use turbo publish pipeline when publishing changeset

* remove artifact snapshot with normal inline extension

* houdini-svelte tests need to run through full pipeline

* and then there was one

* there isn't a single version any more to welcome users to :(

* fix siteURL references

* fix imports

* add lint

* remove svelte-kit sync

* move some dev deps to deps in sit

* update pnpm lock

* only compile for tests

* build before e2e tests

* build e2e

* add type reference

* triple slash -> import

* fix adapter location

* add reference back

* local def for runtime

* turn off  @typescript-eslint/no-namespace

* fix typedef for plugins

* fix relative imports in generate typedefs

* remove more lint rules

* remove framework from config

* plugin config embedded in config file

* can't use framework config to identify v16

* use external watch and run

* remove conflicting type

* fix framework passed to unit tests

* convert playwright config to js

* refresh lock file

* integration tests run locally

* centralize config file logic in runtime

* move svelte specific config to svelte plugin

* update configs in exaple and e2e tests

* remove unused file

* fix quiet errors check

* update tests

* add 0.17.0 release notes

* add houdini-svelte as a depencey in init

* update setting-up guide

* fix package descriptions

* move changelog

* use correct package.json version

* revert pnpm-lock

* fix component query docs

* +layout.gql (HoudiniGraphql#601)

* 🚸 IMPROVE: integration tests with layout ideas

* 🚧 UPDATE: types generated

* 🚧 UPDATE: layout_query_path

* 🚧 UPDATE: tmp while no Lyaout_User

* ✅ DOC: update

* ✨ NEW: +page & +layout

* ✅ NEW: tests

* ✏️ DOC: one line doc

* ✏️ UPDATE: changeset

* ✅ NEW: eae test

* 🚸 IMPROVE: display the correct file that has an issue (including +page|+layout)

* add changeset

* move generate command to its own file

* remove deprecated cli args

* always export package.json

* update release notes to use the new setSession

* start trasnform_runtime api

* consolidate runtime transforms

* fix path of cjs runtime

* update docs

* more doc updates

Co-authored-by: JYC <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants