Closed mrleblanc101 closed 1 year ago
Then this should be documented as a breaking change in the README and only be implemented in a Semver major...
Hi @mrleblanc101,
I understand your point of view. But we claimed for years that our minimum supported Node.js version is 12.20.0
. imports
and exports
fields are supported in Node.js 12.20.0. We go far beyond to keep 12.20.0
compatibility, like we did yesterday in https://github.com/swagger-api/swagger-js/pull/3137.
Then this should be documented as a breaking change in the README and only be implemented in a Semver major...
We technically did not do any breaking change. We just use feature from Node.js versions we claim for years we support. We're very careful about that. What we cannot control is what various bundlers/frameworks choose to support - nuxt@2 doesn't support exports/imports, but nuxt@3 does. We bind our complatibility to Node.js version, not to any particular bundler/framework.
I'm sorry that nuxt@2 stopped working for you.
same issue. use resolutions in package.json to lock the swagger-client version like this: "resolutions": { "swagger-client":"3.18.5", },
Node.js version is 12.20.0 --> Whe are on node 12.22 and when trying to update encountered the same issue. Import is just on node 12, otherwise I need yo use an experimental modules and rename for mjs. It broke our production pipeline, as @mrleblanc101 it shoud have been a major version. (https://stackoverflow.com/a/45854500)
Hi @pp-assis,
I already explained this in https://github.com/swagger-api/swagger-js/issues/3136#issuecomment-1716987319
We didn't do any change in this package. We've started using another package (ApiDOM) which is completely compatible with Node.js >=12.20.0 which we still fully support along with testing bundling on webpack@5.
ApiDOM is a direct dependency, but imaging we would use another dependency which has another indirect/transitive dependency that is using exports
or imports
field. We would never know about this, nor would we detect this. I don't understand why would we do a breaking change release as we didn't break anything related to our claim that swagger-client runs on Node.js >=12.20.0.
@pp-assis you provided some info in your comment, but truthfully I don't really understand it. I can successfully install and run latest version of swagger-client on Node.js@12.20
Maybe using UMD build fragment of swagger-client will help? More info in https://github.com/swagger-api/swagger-js/issues/3411#issuecomment-2100464291
Q&A (please complete the following information)
Describe the bug you're encountering
My Nuxt 2 app stop compiling after upgrading from 3.18.5 to 3.19.0 (or higer, tried 3.19.11 and 3.20.2).
To reproduce...
Here is my package.json:
Here is my lockfile if it can be of any help. Let me know if I cna provide anything else. yarn.txt