refactor: Modernising the repository#7
Open
jdrydn wants to merge 9 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request modernizes the project's build, test, and linting infrastructure, updates Node.js support, and introduces a new ESM/CJS-compatible build output. It also migrates from Mocha to Vitest for testing, removes legacy configuration files, and adds comprehensive integration tests for both ESM and CJS usage. These changes improve maintainability, compatibility with modern tooling, and ensure robust multi-environment support.
distdirectory with both ESM (index.mjs) and CJS (index.js) entry points, updates theexportsfield for dual module support, and provides type declarations for both formats. (package.json)tsupfor building and updates scripts for linting (ESLint and type checks) and testing (unit and integration with Vitest). (package.json)integration-tests/esm.test.ts) and CJS (integration-tests/cjs.test.js) usage of the package, ensuring correct exports and error handling in both environments..eslintrc.jsonand introduces a neweslint.config.mjsusing the latest ESLint and TypeScript-ESLint flat config, with updated rules and ignore patterns.These changes collectively modernize the project, improve compatibility with current JavaScript/TypeScript tooling, and ensure robust support for both ESM and CJS consumers.