swagger-api / swagger-api/swagger-client
Convert swagger-client to ESM
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.7k
- Forks
- 765
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 6
Description
Node.js world has moved to native ESM support some time ago. Wee need to get on this train to be able to used ESM or CommonJS packages. If we maintain status quo, we can only use older CommonJS packages.
Resources:
- https://nodejs.org/docs/latest-v16.x/api/esm.html
- https://nodejs.org/docs/latest-v16.x/api/packages.html
We already have explicit usage of file extension that was introduced in https://github.com/swagger-api/swagger-js/pull/2320.
We need to add "type": "module" to the package.json as well.
This change should be fully compatible so we should still be using older package fields like main or browser along with new exports.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with package.json and the explicit file-extension changes introduced by pull request 2320. Review the linked Node.js ESM and packages documentation, then check how the package currently uses main and browser fields. Done means adding type: module and exports while preserving compatibility with both ESM and CommonJS consumers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- build-system, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100