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

Explicitly use package.json for functions typegen #1558

Merged
merged 1 commit into from
Mar 7, 2023

Conversation

nickwesselman
Copy link
Contributor

WHY are these changes introduced?

Workaround for unexpected behavior in graphql-config.

If a developer has a root .graphqlrc or similar in their app, typegen fails with an error such as

ENOENT: no such file or directory, scandir './sample-apps/discounts/extensions'

WHAT is this pull request doing?

Explicitly pass --config package.json to graphql-code-generator. This makes us more opinionated but matches the structure of our boilerplate. I don't have a known use case at the moment which would require customizing this.

How to test your changes?

image

  • The same is successful using a local build of this PR
pnpm shopify app function typegen --path ~/src/function-examples/sample-apps/discounts/extensions/product-discount-js

image

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2023

We detected some changes at either packages/*/src or packages/cli-kit/assets/cli-ruby/** and there are no updates in the .changeset.
If the changes are user-facing, run "yarn changeset add" to track your changes and include them in the next release CHANGELOG.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2023

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
72.64% (-0.12% 🔻)
4161/5728
🟡 Branches
69.98% (-0.28% 🔻)
1881/2688
🟡 Functions
69.78% (-0.03% 🔻)
1099/1575
🟡 Lines
73.94% (-0.1% 🔻)
3973/5373
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / app-command.ts
0%
0% (-100% 🔻)
0% 0%
🟢
... / ui.tsx
95.83%
57.14% (-7.14% 🔻)
100% 95.65%
🟢
... / base-command.ts
87.93% (+1.49% 🔼)
83.33% (-3.51% 🔻)
87.5% (+7.5% 🔼)
90.2% (+1.73% 🔼)
🟡
... / output.ts
68.81% (-3.67% 🔻)
64.41% (-3.39% 🔻)
62.79% (-2.33% 🔻)
69.9% (-2.91% 🔻)

Test suite run success

1075 tests passing in 535 suites.

Report generated by 🧪jest coverage report action from a8720bd

@Arkham Arkham merged commit 55f02cf into main Mar 7, 2023
@Arkham Arkham deleted the js-function-typegen-config branch March 7, 2023 09:35
@shopify-shipit shopify-shipit bot temporarily deployed to nightly March 7, 2023 12:16 Inactive
@shopify-shipit shopify-shipit bot temporarily deployed to production March 8, 2023 11:39 Inactive
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