swagger-api / swagger-api/swagger-client

Convert swagger-client to ESM

Open
#2,414 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cat: usability dependencies type: enhancement version: 3.x
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:

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.