socket.io-client icon indicating copy to clipboard operation
socket.io-client copied to clipboard

ESM build for 4.7.2 npm package generates with incorrect package version

Open bigcakes opened this issue 2 years ago • 4 comments

Describe the bug

The 4.7.2 npm version of "socket.io-client" has a build/esm output, that output is specifying "4.4.0" as the version of the module, which causes conflicts in Webpack Module Federation as it isn't the specified version.

{
  "name": "socket.io-client",
  "version": "4.4.0",
  "type": "module"
}

To Reproduce

Please fill the following code example:

Socket.IO server version: Any

Socket.IO client version: 4.7.2

Client

import { io } from "socket.io-client";

If you do that in a Module Federation project, you might end up with an error message similar to this: Unsatisfied version 4.4.0 from testapp of shared singleton module socket.io-client (required =4.7.2)

Expected behavior The version in the ESM build to match the npm version

Platform: Any

Additional context This primarily affects things that check that the provided version match what was specified, like Module Federation.

bigcakes avatar Oct 02 '23 15:10 bigcakes

Well that's embarrassing. We'll update it in the next release.

darrachequesne avatar Oct 02 '23 19:10 darrachequesne

Well that's embarrassing. We'll update it in the next release.

Thank you very much!

bigcakes avatar Oct 03 '23 16:10 bigcakes

This should be fixed in version 4.7.3.

Could you please check?

darrachequesne avatar Jan 12 '24 10:01 darrachequesne

@darrachequesne I just checked out 4.7.4 and it looks like the esm output is

{
  "name": "socket.io-client",
  "type": "module"
}

Which still throws an error since it just isn't specifying a version

bigcakes avatar Feb 13 '24 21:02 bigcakes

OK, I guess we'll have to keep it in sync!

This should be fixed in version 4.7.5, could you please check?

darrachequesne avatar Mar 14 '24 17:03 darrachequesne

This looks to be fixed, thanks @darrachequesne !

bigcakes avatar Mar 20 '24 21:03 bigcakes