{"id":42225206,"url":"https://github.com/homer0/cjs2esm","last_synced_at":"2026-01-27T02:21:36.059Z","repository":{"id":39974446,"uuid":"285975330","full_name":"homer0/cjs2esm","owner":"homer0","description":"Transforms a project that uses CommonJS to ES Modules.","archived":false,"fork":false,"pushed_at":"2024-11-09T03:25:15.000Z","size":2158,"stargazers_count":23,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-24T23:04:48.966Z","etag":null,"topics":["commonjs","esmodules","hacktoberfest","nodejs"],"latest_commit_sha":null,"homepage":"https://homer0.github.io/cjs2esm","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/homer0.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-08-08T04:51:03.000Z","updated_at":"2025-06-16T10:05:30.000Z","dependencies_parsed_at":"2024-06-18T22:55:46.745Z","dependency_job_id":"50fe8923-d629-40d0-9f2d-610840cb1533","html_url":"https://github.com/homer0/cjs2esm","commit_stats":{"total_commits":124,"total_committers":3,"mean_commits":"41.333333333333336","dds":0.4516129032258065,"last_synced_commit":"90ff2099a65fb53f808bd33ed9255079f7430c1f"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/homer0/cjs2esm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homer0%2Fcjs2esm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homer0%2Fcjs2esm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homer0%2Fcjs2esm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homer0%2Fcjs2esm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/homer0","download_url":"https://codeload.github.com/homer0/cjs2esm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homer0%2Fcjs2esm/sbom","scorecard":{"id":468240,"data":{"date":"2025-08-11","repo":{"name":"github.com/homer0/cjs2esm","commit":"be328914acb1f46790285166820833d4d39663ea"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/homer0/cjs2esm/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/homer0/cjs2esm/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/homer0/cjs2esm/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/homer0/cjs2esm/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/homer0/cjs2esm/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/homer0/cjs2esm/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/homer0/cjs2esm/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/homer0/cjs2esm/test.yml/main?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 22 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-x4c5-c7rf-jjgv","Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T13:04:47.376Z","repository_id":39974446,"created_at":"2025-08-19T13:04:47.376Z","updated_at":"2025-08-19T13:04:47.376Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28796969,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T01:07:07.743Z","status":"online","status_checked_at":"2026-01-27T02:00:07.755Z","response_time":168,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["commonjs","esmodules","hacktoberfest","nodejs"],"created_at":"2026-01-27T02:21:35.389Z","updated_at":"2026-01-27T02:21:36.054Z","avatar_url":"https://github.com/homer0.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CJS 2 ESM\n\n[![GitHub Workflow Status (main)](https://img.shields.io/github/actions/workflow/status/homer0/cjs2esm/test.yml?branch=main\u0026style=flat-square)](https://github.com/homer0/cjs2esm/actions/workflows/test.yml?query=branch%3Amain)\n[![Coveralls GitHub](https://img.shields.io/coveralls/github/homer0/cjs2esm.svg?style=flat-square)](https://coveralls.io/github/homer0/cjs2esm?branch=main)\n![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/npm/cjs2esm?style=flat-square)\n\nTransforms a project that uses CommonJS to ES Modules.\n\n## 📝 Introduction\n\n\u003e If you are wondering why I built this, go to the [Motivation](#motivation) section.\n\nYou can use this tool to transform a project that uses **CommonJS** to **ES Modules** and get it ready for an ESM world, any module bundler with **ESM** support, or even [`typedef` imports on JSDoc](https://github.com/homer0/jsdoc-ts-utils#import-type-defintions).\n\nThis tool internally uses [`jscodeshift`](https://github.com/facebook/jscodeshift) with the transformations from [`5to6`](https://github.com/5to6/5to6-codemod) and an extra one created to fix missing extensions.\n\n## ⚡️ Examples\n\n### Require\n\n```js\nconst { Jimpex } = require('jimpex');\nconst ObjectUtils = require('wootils/shared/objectUtils');\nrequire('./homer0');\n\n// Becomes\n\nimport { Jimpex } from 'jimpex';\nimport ObjectUtils from 'wootils/shared/objectUtils.js';\nimport './homer0/index.js';\n```\n\nIt validates if the file needs an extension `.mjs` or `.js` by checking if the statement is for a directory and there's `package.json` in there.\n\nIf there's no `package.json`, it tries to find `index.mjs` or `index.js`.\n\n### Exports\n\n```js\nmodule.exports = Rosario;\nmodule.exports.Pilar = Pilar;\n\n// Becomes\n\nexport default Rosario;\nexport { Pilar }\n```\n\n\u003e ⚠️: Do not do `module.exports = { Pilar }`, as the latest version of the parser doesn't support it.\n\n## 🚀 Usage\n\nThe package comes with a binary that you can execute from your `package.json`, or with `pnpm`/`npm`/`yarn`:\n\n```bash\n# From the package.json\ncjs2esm\n\n# NPM\nnpx cjs2esm\n\n# Yarn\nyarn cjs2esm\n\n# PNPM\npnpm exec cjs2esm\n\n```\n\n### Configuration\n\nThe tool has a lot of different settings you can change to customize how the imports and extensions are handled:\n\n```js\nmodule.exports = {\n  input: ['src'],\n  ignore: [],\n  output: 'esm',\n  forceDirectory: null,\n  modules: [],\n  extension: {\n    use: 'js',\n    ignore: [],\n  },\n  addModuleEntry: false,\n  addPackageJson: true,\n  filesWithShebang: [],\n  codemod: {\n    path: '',\n    files: ['cjs', 'exports', 'named-export-generation'],\n  },\n};\n```\n\nTo modify the settings, you can...\n\n1. Create a property `cjs2esm` on your `package.json`.\n2. Create a property `cjs2esm` inside the `config` object of your `package.json`.\n3. Create a `.cjs2esm` file that uses JSON syntax.\n4. Create a `.cjs2esm.json` file.\n5. Create a `.cjs2esm.js` file and use `module.exports` to export the settings (like on the example above).\n\n#### .input\n\nThe list of directories that should be transformed.\n\n\u003e Default `['src']`\n\n#### .ignore\n\nA list of expressions (strings that will be converted on `RegExp`) to specify files/paths that should be ignored.\n\nWhen a path is ignored, not only doesn't it get transformed, but it also doesn't get copied to the output directory.\n\n#### .output\n\nThe directory where the transformed code should be placed.\n\n\u003e Default `esm`\n\n#### .forceDirectory\n\nBy default, if `input` has only one directory, the only thing copied will be its contents, instead of the directory itself; this flag can be used to force force it and always copy the directory.\n\n**This is a `boolean` setting**, using `null` means that the tool gets to decide.\n\n\u003e Default `null`\n\n#### .modules\n\nThis is a list of modifiers for imports of specific modules and that can be used to change their paths. Yes, pretty complicated to explain, an example will be better:\n\nThe module `wootils` uses this tool and generates an ESM version on a `esm` directory, so we need to change all the imports for `wootils` so they'll use `wootils/esm`:\n\n```js\nconst options = {\n  // ...\n  modules: {\n    name: 'wootils',\n    path: 'wootils/esm',\n  },\n};\n```\n\nNow, when tool gets executed, it will perform the following change:\n\n```js\n// From\nconst ObjectUtils = require('wootils/shared/objectUtils');\n// To\nimport ObjectUtils from 'wootils/esm/shared/objectUtils.js';\n```\n\n\u003e Default `[]`\n\n#### .extension\n\nStarting on Node `v14`, when you are using ESM, and unless there's a `package.json` specifying the `type` `modules`, you'll need all your imports to have file extensions.\n\nThis group of settings are specific for how the tool handles the extensions.\n\n##### .use\n\nThe extensions the files need to have; it can be `js` or `mjs`.\n\nIf you `use` `mjs`, when transforming the project files, all filenames will be renamed.\n\n\u003e Default `js`\n\n##### .ignore\n\nA list of expressions (strings that will be converted on `RegExp`) to ignore import statements when validating the use of extensions.\n\n\u003e Default `[]`\n\n#### .addModuleEntry\n\nWhether or not to modify the project `package.json` and add a `module` property with the path to the transformed entry file. This will only work if the project has a `main` property and the file it points to was transformed.\n\n\u003e Default `false`\n\n#### .addPackageJson\n\nWhether or not to add a `package.json` with `type` set to `module` on the `output` directory.\n\n\u003e Default `true`\n\n#### .filesWithShebang\n\nThe list of files that have a shebang, as the tool needs to remove it before transforming them in order to avoid issues with the parsers. The list are strings that will be converted on into `RegExp`s, so they can be a parts of the path, or expressions.\n\nFor example, this project uses `src/bin.js`.\n\n\u003e Default `[]`\n\n#### .codemod\n\nDue to the `jscodeshift` and `5to6-codemod` projects not being updated quite often, it's not hard to run on scenarios in which your code is not compatible with the transformations, so this group of settings will allow you to run custom versions of the codemod, change the order fo the transformations, and even are your own.\n\n##### .path\n\nThis is the path, relative to the working directory, in which the transformation files are located.\n\n\u003e Default `''` // On runtime, it gets resolved to `5to6-codemod/transforms`\n\n##### .files\n\nThese are the name of the files for the transformations, inside the `path` directory.\n\nThe list can also be used to change the order of the default transformations, and it can also contain the `\u003ccjs2esm\u003e` special keyword, which references the transformation file this package uses.\n\nFor example:\n\n```json\n{\n  \"files\": [\n    \"cjs\",\n    \"\u003ccjs2esm\u003e\",\n    \"named-export-generation\",\n  ]\n}\n```\n\nWith that, `exports` wouldn't be used, and the package transformation would run before `named-export-generation`.\n\nLocal transformation files can also be specified, using path relatives to the working directory:\n\n```json\n{\n  \"files\": [\n    \"cjs\",\n    \"\u003ccjs2esm\u003e\",\n    \"./my-custom-transformation\",\n    \"named-export-generation\",\n  ]\n}\n```\n\n- ⚠️ If the list is empty, it will use the default value.\n- ⚠️ The `\u003ccjs2esm\u003e` cannot be used as the first item in the list.\n- ⚠️ The names can't contain the extension, and they need to be `.js` files.\n\n\u003e Default `['cjs', 'exports', 'named-export-generation']`\n\n## ES Modules\n\nYes, if you want to use the tool as a library, the tool uses itself to generate a ESM version, so you can use the `/esm` path to access it:\n\n```js\n// commonjs\nconst { prepare, getConfiguration } = require('cjs2esm');\n\n// ESM\nimport { prepare, getConfiguration } from 'cjs2esm/esm';\n\n// #dogfooding\n```\n\n\u003e Check `src/index.js` to see how the API is used.\n\n## ⚙️ Development\n\n### Scripts\n\n| Script     | Description                         |\n|------------|-------------------------------------|\n| `test`     | Run the project unit tests.         |\n| `lint`     | Lint the modified files.            |\n| `lint:all` | Lint the entire project code.       |\n| `docs`     | Generate the project documentation. |\n| `todo`     | List all the pending to-do's.       |\n\n\n### Repository hooks\n\nI use [`husky`](https://www.npmjs.com/package/husky) to automatically install the repository hooks so the code will be tested and linted before any commit, and the dependencies updated after every merge.\n\n#### Commits convention\n\nI use [conventional commits](https://www.conventionalcommits.org) with [`commitlint`](https://commitlint.js.org) in order to support semantic releases. The one that sets it up is actually husky, that installs a script that runs `commitlint` on the `git commit` command.\n\nThe configuration is on the `commitlint` property of the `package.json`.\n\n### Releases\n\nI use [`semantic-release`](https://www.npmjs.com/package/semantic-release) and a GitHub action to automatically release on NPM everything that gets merged to main.\n\nThe configuration for `semantic-release` is on `./releaserc` and the workflow for the release is on `./.github/workflow/release.yml`.\n\n### Testing\n\nI use [Jest](https://facebook.github.io/jest/) to test the project.\n\nThe configuration file is on `./.jestrc.js`, the tests are on `./tests` and the script that runs it is on `./utils/scripts/test`.\n\n### Linting \u0026\u0026 Formatting\n\nI use [ESlint](https://eslint.org) with [my own custom configuration](https://www.npmjs.com/package/@homer0/eslint-plugin) to validate all the JS code. The configuration file for the project code is on `./eslint.config.mjs`. The script that runs it is on `./utils/scripts/lint-all`.\n\nFor formatting I use [Prettier](https://prettier.io) with [my custom configuration](https://www.npmjs.com/package/@homer0/prettier-config). The configuration file for the project code is on `./.prettierrc.mjs`.\n\n### Documentation\n\nI use [JSDoc](https://jsdoc.app) to generate an HTML documentation site for the project.\n\nThe configuration file is on `./.jsdoc.js` and the script that runs it is on `./utils/scripts/docs`.\n\n### To-Dos\n\nI use `@todo` comments to write all the pending improvements and fixes, and [Leasot](https://www.npmjs.com/package/leasot) to generate a report. The script that runs it is on `./utils/scripts/todo`.\n\n## 💡 Motivation\n\nI maintain a lot of open source projects (that only I use :P), most of them are Node libraries, and I alway respect the good practice of giving support to the oldest LTS, currently `v10` (for two more weeks).\n\n**I don't want to add transpilation just for this**, Node `v10` has enough features that I don't need Babel, which means that I don't have to use `babel-eslint` to lint, nor configure Jest for transpilation.\n\nSo I started looking for something that would transpile from CJS to ESM, but most of the tooling out there are for ESM to CJS, \"code with modern syntax, transpile for legacy\"... Node `v12`, the active LTS (soon to be the oldest), now supports ESM, but you cannot `require` an ESM module, even if it's natively supported.\n\nThe thing I like the least from transpiling from ESM to CJS is that if you use CJS, you have to use `require('something').default`, as `export default` becomes `exports.default`; I've had to update a lot of tools for this kind of changes (on the `webpack` ecosystem)...That's a sh*#ty experience.\n\nI found `jscodeshift` and the `5to6` codemod, that are normally used to migrate a project to ESM and I adapted so it can cover a couple more issues (like extensions and the `package.json`).\n\nIt's not as fast as Babel, running it on [Jimpex](https://github.com/homer0/jimpex) (~40 files), takes ~12seg, but you would only run it on your CI, or once or twice to see what generates.\n\nI believe it's a better experience to have the ESM version on a different path :D.\n\nEnjoy 🤘!\n\n\u003e ~~Once `v14` becomes the oldest LTS, I'll archive this repository and deprecate the tool.~~\n\n\u003e Node 12 now supports ESM without a flag, but there are still a lot of things that use CommonJS, and the fact that you can't `require` ESM makes things complicated, so I'm not sure yet when I'll deprecate the tool.\n\n\u003e Update: 2022, and the interop is still a mess, so I'm not sure when I'll deprecate the tool.\n\n\u003e Update: 2025, there's more push for ESM now, but CJS is still widely used, and seems like Node will add a proper interop soon. In my case, I started migrating all my projects, when possible, but I plan to keep this tool alive a bit longer.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhomer0%2Fcjs2esm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhomer0%2Fcjs2esm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhomer0%2Fcjs2esm/lists"}