Skip to content

Conversation

@jbourassa
Copy link
Contributor

@jbourassa jbourassa commented Jul 14, 2023

We want to leverage Javy's new multi-export feature. This commit helps by:

  1. Extracting the logic for running a function (stream & JSON handling) to a run function that can be used without index.ts.
  2. Making javy a peerDependency so that it's still accessible for run, (without using any file here as esbuild's entrypoint).

Part of https://github.com/Shopify/script-service/issues/7050
#gsd:34464

We want to leverage Javy's new multi-export feature. This commit helps
by:
1. Extracting the logic for running a function (stream & JSON handling)
   to a `run` function that can be used without `index.ts`.
2. Making `javy` a peerDependency so that it's still accessible for
   `run`, (without using any file here as esbuild's entrypoint).
Comment on lines -6 to -8
export type ShopifyFunction<Input extends {}, Output extends {}> = (
input: Input
) => Output;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we expect anyone to be using this exported type? If so, I can re-export it.

@dphm dphm merged commit ae56263 into main Jul 17, 2023
@dphm dphm deleted the jb/multi-exports branch July 17, 2023 20:12
@shopify-shipit shopify-shipit bot temporarily deployed to production July 17, 2023 20:50 Inactive
@dphm
Copy link
Contributor

dphm commented Jul 17, 2023

FYI deploy failed because I accidentally created the tag v.0.1.0 instead of v0.1.0. Fixed.

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.

3 participants