Skip to content

Commit

Permalink
rename expor (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Jan 19, 2024
1 parent aa0c824 commit 862a815
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/three-guests-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'fuse': patch
---

Rename the rsc export to `__internal_execute` so folks don't accidentally import it
1 change: 1 addition & 0 deletions examples/ecommerce/fuse/server.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// This is a generated file!

export * from 'fuse/next/server'
export { __internal_execute as execute } from 'fuse/next/server'
1 change: 1 addition & 0 deletions examples/spacex/fuse/server.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// This is a generated file!

export * from 'fuse/next/server'
export { __internal_execute as execute } from 'fuse/next/server'
2 changes: 1 addition & 1 deletion packages/core/rsc.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export * from '@urql/core'
type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>
export function createClient(opts: Optional<ClientOptions, 'exchanges'>): Client

export function execute<
export function __internal_execute<
Data = any,
Variables extends AnyVariables = AnyVariables,
>(
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/next/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ async function boostrapFuse(isUsingTada: boolean) {
[
fs.writeFile(
baseDirectory + '/fuse/server.ts',
`// This is a generated file!\n\nexport * from 'fuse/next/server'\n`,
`// This is a generated file!\n\nexport * from 'fuse/next/server'\nexport { __internal_execute as execute } from 'fuse/next/server'\n`,
),
fs.writeFile(
baseDirectory + '/fuse/client.ts',
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/next/rsc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const convertNullprototype = (obj: Record<string, any>): any => {
}
}

export const execute = async <
export const __internal_execute = async <
Data = any,
Variables extends AnyVariables = AnyVariables,
>(
Expand Down

0 comments on commit 862a815

Please sign in to comment.