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

prefix function #752

Merged
merged 10 commits into from
Dec 13, 2022
Merged

prefix function #752

merged 10 commits into from
Dec 13, 2022

Conversation

jycouet
Copy link
Contributor

@jycouet jycouet commented Dec 9, 2022

Fixes #751, closes #597

Since SvelteKit 1.0.0-next.573, we are not allowed to export non-Kit functions from +page.js, or it has to start with "_".

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

@changeset-bot
Copy link

changeset-bot bot commented Dec 9, 2022

🦋 Changeset detected

Latest commit: 293c790

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
houdini-svelte Minor
houdini-react Minor
houdini Minor

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

@vercel
Copy link

vercel bot commented Dec 9, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
docs ✅ Ready (Inspect) Visit Preview Dec 9, 2022 at 10:30PM (UTC)
docs-next ✅ Ready (Inspect) Visit Preview Dec 9, 2022 at 10:30PM (UTC)

@sjcobb2022
Copy link
Contributor

sjcobb2022 commented Dec 10, 2022

Just a quick comment. Wouldn't this effect/fix #597?

Having the type without the _ prefix prevents the collision.

@jycouet
Copy link
Contributor Author

jycouet commented Dec 10, 2022

Just a quick comment. Wouldn't this effect/fix #597?

Having the type without the _ prefix prevents the collision.

Yes, you are right. We will have no more collisions with this fix.

You will be able to do:

import { FooVariables } from '$houdini'

export const _FooVariables: FooVariables = () => { ...}

Just FYI, I will probably continue to use:

import { FooVariables as V } from '$houdini'

export const _FooVariables: V = () => { ...}

To have as less "FooVariables" as possible, but I guess that it's only a preference

@jycouet jycouet requested a review from AlecAivazis December 12, 2022 14:43
@AlecAivazis AlecAivazis merged commit d1fcc47 into main Dec 13, 2022
@AlecAivazis AlecAivazis deleted the fix/prefix_function branch December 13, 2022 19:11
@github-actions github-actions bot mentioned this pull request Dec 13, 2022
gterras pushed a commit to gterras/houdini that referenced this pull request Dec 14, 2022
* ♻️ UPDATE: e2e to use _ for houdini functions

* ✨ UPDATE: with _

* ⬆️ UPDATE: version

* ✏️ UPDATE: update doc (HoudiniGraphql#751)

* 💡 UPDATE: no french

* 👌 FIX: linting

* 👌 FIX: linting (v2)

* ✅ UPDATE: tests

* ✏️ UPDATE: changeset

* ✅ UPDATE: tests
endigma pushed a commit to endigma/houdini that referenced this pull request Nov 10, 2024
* ♻️ UPDATE: e2e to use _ for houdini functions

* ✨ UPDATE: with _

* ⬆️ UPDATE: version

* ✏️ UPDATE: update doc (HoudiniGraphql#751)

* 💡 UPDATE: no french

* 👌 FIX: linting

* 👌 FIX: linting (v2)

* ✅ UPDATE: tests

* ✏️ UPDATE: changeset

* ✅ UPDATE: tests
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.

Invalid export 'houdini_load' Variable function type collides with exported function name
3 participants