Releases: DevRGD/server-response-helper
Releases · DevRGD/server-response-helper
Release v2.0.0 – Fix entry point resolution for reliable imports
This release fixes a critical issue where the package could not be imported properly in consuming Node.js projects due to an incorrect index entry point configuration.
🛠️ What's Fixed
- Corrected the
exportsfield inpackage.jsonto properly expose the middleware entry point. - Ensures compatibility with both CommonJS and ES module environments.
- Now works seamlessly with
require()andimportstatements.
🚨 Breaking Change Notice
- This is a breaking release only in terms of packaging and module resolution — the middleware API remains unchanged.
- Users must upgrade to
v2.0.0if they experiencedCannot find moduleorundefined default importerrors.
✅ Safe to Upgrade If:
- You're using Node.js and got import/module-related errors with
v1.0.x. - You want full compatibility with ESM or CommonJS environments.
🚀 Improvements & CI/CD Integration – v1.0.1
🎉 Minor release v1.0.1 brings CI/CD automation, better linting, test coverage, and codebase refinements!
This update focuses on improving the developer experience, code consistency, and publish reliability.
✨ Changes
- 🔧 Migrated to ESLint v9 using modern
eslint.config.jsflat config - 🎨 Added Prettier for consistent code formatting
- 🧪 Introduced Vitest with full test coverage for middleware and helper
- 🤖 Setup GitHub Actions CI/CD:
- Lint, Build, Test
- Auto publish to npm on new releases with provenance
- 🔒 Enabled secure npm provenance (Sigstore signed)
🐛 Fixes
- ✅ Fixed linting issues (
no-console,no-undef) - 🧹 Cleaned up legacy configs and CommonJS issues
- 📦 Resolved peer dependency conflicts with
eslintand@typescript-eslint
📦 Installation
npm install server-response-helper🧪 Test It
res.response({ data: user, messageIndex: 1 });
// or
res.response({ data: user, message: 'Custom success' });Thanks for supporting server-response-helper! 🔥
Initial Stable Release – v1.0.0
🎉 Initial release of server-response-helper!
This package adds a .response() helper to the Express res object, allowing you to return consistent, standardized JSON responses across your API with ease.
✨ Features
- ✅ Standard response format:
status,message,data,timestamp,path - 🔒 Type-safe: Fully written in TypeScript
- 🧠 Intelligent defaults: Optional message index or custom text
- 🛠 Zero dependencies
📦 Installation
npm install server-response-helper🚀 Usage
import express from 'express';
import { responseHelper } from 'server-response-helper';
const app = express();
app.use(responseHelper());
app.get('/', (req, res) => {
res.response(200, 'Welcome!');
});📚 Learn more
See the README for full documentation.
Licensed under the MIT License © DevRGD