What's New
This release focuses on enhancing module compatibility and fixing package configuration issues to ensure seamless integration with various Node.js frameworks and environments.
Changes
-
Module Generation:
- Generate both ESM (
.mjs
) and CommonJS (.js
) modules. - Adjusted
tsup
configuration for proper module formats.
- Generate both ESM (
-
Package Configuration:
- Updated
package.json
to correctly reference modules in themain
,module
, andtypes
fields. - Removed invalid
types
condition from theexports
field.
- Updated
-
Testing Configuration:
- Renamed
jest.config.js
tojest.config.cjs
to resolve ESM-related errors. - Updated Jest configuration for ESM compatibility.
- Renamed
-
File Cleanup:
- Modified the build process to exclude unnecessary
.ts
and.cts
files from thedist
directory.
- Modified the build process to exclude unnecessary
-
Compatibility:
- Verified compatibility with frameworks like NestJS, Express, Koa, Fastify, and others.
- Users can now import the package in both CommonJS and ESM environments without issues.
Upgrade Notes
- Ensure your project uses Node.js version 18 or higher.
- Update your import statements if necessary, according to your environment (CommonJS or ESM).
Feedback
Thank you for using rest-data-validator. Your feedback is valuable, and we encourage you to report any issues or suggestions.