Skip to content

feat: ES Modules - #180

Open
babblebey wants to merge 4 commits into
betafrom
feat/esm
Open

feat: ES Modules#180
babblebey wants to merge 4 commits into
betafrom
feat/esm

Conversation

@babblebey

Copy link
Copy Markdown
Member

This pull request modernizes the codebase by migrating it to ES modules, updates Node.js version support, and improves developer tooling and documentation. The changes include converting require/module.exports to import/export, updating Node.js versions in configs, replacing code style and coverage tools, and updating documentation to reflect the new module syntax.

  • Converted all CommonJS require/module.exports to ES module import/export syntax in index.js and lib/hosts-config.js, and set "type": "module" in package.json to enable ES modules.
  • Updated supported Node.js versions in .github/workflows/test.yml, .nvmrc, and package.json to require Node.js 22.22.2 and 24.x, dropping support for older versions.
  • Switched from nyc to c8 for code coverage, replaced xo with prettier for code formatting, and updated related scripts in package.json.
  • Updated all usage examples in README.md from CommonJS require to ES module import syntax to match the codebase changes.
  • Unified string delimiters to double quotes and refactored some functions for conciseness and consistency throughout the codebase.

BREAKING CHANGE: issue-parser is now a native ES Module.

BREAKING CHANGE: Now require Node.js versions ^22.22.2 or >=24.15

- Changed package.json to set "type" to "module" and updated main entry point.
- Replaced "nyc" with "c8" for test coverage in scripts.
- Refactored test files to use ES module syntax (import/export).
- Updated all instances of the issue parser to use the new import.
- Added new dependencies and removed deprecated ones.
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedc8@​12.0.09810010089100
Updatedprettier@​1.19.1 ⏵ 3.8.597 -110097 -197 -2100

View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants