You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for jumping on a fix across multiple packages Nishant, great initiative. I have a few concerns though.
Historically, when we build before export, we include the dependencies in the final build.
As I understand it, that is the case for ipfs-shipyard/ipfs-geoip#100, because we're bundling up everything in its entirety and want consumers to be able to use it in the browser. I can get on board with that(ipfs-shipyard/ipfs-geoip#100) move.
Still, I disagree with this issue(#1104), because when consuming a package from Node (such as in webui), the dependencies that are available to source code, say ESM package-A, need to match certain requirements for package-A to function properly, yes?
Without specifying which dependencies are used for building, and which are used for running, consumers of not-ipfs-geoip in NodeJS, who do not bundle their entire dependency tree (and shouldn't) will most likely break if there is a dependency mismatch. Essentially, merging this PR would be obfuscating the problem that peerDeps was intended to help resolve.
@SgtPooki that is not necessarily true, so this issue #1104 is to just make that check smarter so that it doesn't break builds like it does currently. The way to fix it is not skipping checks in it's entirety but instead to be smart about the checks and looking to the main entry for the package.json being built. e.g. https://github.com/ipfs-shipyard/ipfs-geoip/blob/main/package.json#L20 points to dist/index.min.js which is not importing any of the node modules.
So the idea would be to check the dir for the main entry making the checks more robust.
Describe the bug
Relates to #1096
dependencies
should not be required for transpiled ES Modules. This practice is acceptable, e.g. https://github.com/standard-things/esm/blob/master/package.jsonCurrently the build breaks: https://github.com/ipfs-shipyard/ipfs-geoip/actions/runs/3381199541/jobs/5614844080
Workaround:
The text was updated successfully, but these errors were encountered: