Skip to content

Commit

Permalink
build: Patch socket.io packages for node16 moduleResolution (#18170)
Browse files Browse the repository at this point in the history
This PR patches socket.io-client and engine.io-client, applying the
changes from socketio/socket.io-client#1595 and
socketio/engine.io-client#711, respectively.

I think this is a safe change because we are using only types from the
package, and the .d.ts/exported API still refers to the real
socket.io-client package, so consumers should see no difference - they
might still hit the same bug we're hitting, but only when using node16
moduleResolution.


[AB#6140](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/6140)
  • Loading branch information
tylerbutler authored Nov 6, 2023
1 parent 3b77940 commit 66a7043
Show file tree
Hide file tree
Showing 5 changed files with 1,918 additions and 11 deletions.
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,10 @@
"@types/node",
"fluid-framework"
]
},
"patchedDependencies": {
"[email protected]": "patches/[email protected]",
"[email protected]": "patches/[email protected]"
}
}
}
26 changes: 26 additions & 0 deletions patches/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Dependency patches

The files in this folder are patches for packages we depend on within the repo. The patches are created using
[pnpm patch](https://pnpm.io/cli/patch), and pnpm applies the patches automatically when running install.

## Patch details

Each patch is described here, along with any relevant links to issues or PRs and any additional relevant details.

### engine.io-client

This patch updates the `exports` field in package.json to be correct for TypeScript projects using
`moduleResolution: node16`.

It applies the changes covered in this PR: https://github.com/socketio/engine.io-client/pull/711

As soon as a version of the package is released with the changes in that PR, this patch can be removed.

### socket.io-client

This patch updates the `exports` field in package.json to be correct for TypeScript projects using
`moduleResolution: node16`.

It applies the changes covered in this PR: https://github.com/socketio/socket.io-client/pull/1595

As soon as a version of the package is released with the changes in that PR, this patch can be removed.
Loading

0 comments on commit 66a7043

Please sign in to comment.