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

feat: Config.exclude can be array #559

Merged
merged 17 commits into from Oct 4, 2022
Merged

feat: Config.exclude can be array #559

merged 17 commits into from Oct 4, 2022

Conversation

ghost
Copy link

@ghost ghost commented Sep 20, 2022

In progress

Fixes #558

Allow passing an array of strings to Config.exclude. Also allow string for this to be a non breaking change.

Should Config.include support arrays as well ?

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 Sep 20, 2022

🦋 Changeset detected

Latest commit: ecf743a

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

@vercel
Copy link

vercel bot commented Sep 20, 2022

@DanielHritcu is attempting to deploy a commit to the HoudiniGraphQL Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Collaborator

@AlecAivazis AlecAivazis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for submitting this @DanielHritcu! Mind updating the config docs page too? It lives in site/src/routes/api/config.svx.

src/common/config.ts Outdated Show resolved Hide resolved
@vercel
Copy link

vercel bot commented Sep 20, 2022

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

Name Status Preview Updated
docs ✅ Ready (Inspect) Visit Preview Oct 4, 2022 at 7:21AM (UTC)
docs-next ✅ Ready (Inspect) Visit Preview Oct 4, 2022 at 7:21AM (UTC)

@@ -42,7 +42,10 @@ export default function ({
}

// make sure that the file doesn't match the exclude
return !config.exclude || !minimatch(filepath, config.exclude)
return (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize this was there before, but I think we should try to use config.includeFile here if possible

@ghost
Copy link
Author

ghost commented Sep 23, 2022

I added the code for include, but I can't manage to build the integration project to test.

I get this weird error, and can't figure out why it's thrown.

The files get included, and the artifacts generated.

Can be replicated until my commit here : f149302

The error I get:

file: /Users/danielhritcu/GitHub/houdini/integration/$houdini/runtime/lib/index.js:5:9
3: export { errorsToGraphQLLayout } from './errors';
4: export * from './types';
5: export * as log from './log';
            ^
6: export * from './deepEquals';
7: // putting this here was the only way i could find to reliably avoid import issues
[WebServer] error during build:
Error: Parse error @:5:10
    at parse$b (file:///Users/danielhritcu/GitHub/houdini/node_modules/.pnpm/vite@3.1.0/node_modules/vite/dist/node/chunks/dep-665b0112.js:33612:355)
    at Object.transform (file:///Users/danielhritcu/GitHub/houdini/node_modules/.pnpm/vite@3.1.0/node_modules/vite/dist/node/chunks/dep-665b0112.js:42799:27)
Error: Process from config.webServer was not able to start. Exit code: 1

@AlecAivazis
Copy link
Collaborator

@DanielHritcu are you still running into that error?

@ghost
Copy link
Author

ghost commented Sep 24, 2022

@AlecAivazis yes I am.

@AlecAivazis
Copy link
Collaborator

Oh, interesting it's happening on github too - alright so it must be related to your changes since these tests ran successfully in your other PR. I'll try to figure out what's going on

@AlecAivazis
Copy link
Collaborator

@DanielHritcu I pushed up a few changes that I think have fixed the problem. I'm really not sure how it's any different from what you have but i'm not getting the errors any more. Let me know what you think

@AlecAivazis AlecAivazis merged commit fd570de into HoudiniGraphql:main Oct 4, 2022
@github-actions github-actions bot mentioned this pull request Oct 4, 2022
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.

Config.exclude: can be array
1 participant