From 84bfa46fc7174f46b9f24c1e7a7a1a977f0993f3 Mon Sep 17 00:00:00 2001 From: Steven Chim <655241+chimurai@users.noreply.github.com> Date: Mon, 1 Apr 2024 23:32:08 +0200 Subject: [PATCH] chore(package): v3.0.0 (#947) --- CHANGELOG.md | 7 ++++++- MIGRATION.md | 11 +++++++++++ README.md | 1 - package.json | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f83c78e..7a48ef00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Changelog -## next +## [v3.0.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v3.0.0) + +This release contains some breaking changes. + +Please read the V3 discussion +or follow the [MIGRATION.md](https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md) guide. - feat(typescript): type improvements ([#882](https://github.com/chimurai/http-proxy-middleware/pull/882)) - chore(deps): update micromatch to 4.0.5 diff --git a/MIGRATION.md b/MIGRATION.md index 422f481c..f02decba 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -1,5 +1,6 @@ # Migration guide +- [v3 changes and discussions](#v3-changes-and-discussions) - [v2 to v3 adapter](#v2-to-v3-adapter) - [`legacyCreateProxyMiddleware`](#legacycreateproxymiddleware) - [v3 breaking changes](#v3-breaking-changes) @@ -10,12 +11,20 @@ - [Removed `logProvider` and `logLevel` options](#removed-logprovider-and-loglevel-options) - [Refactored proxy events](#refactored-proxy-events) +## v3 changes and discussions + +See list of changes in V3: + + + ## v2 to v3 adapter ### `legacyCreateProxyMiddleware` Use the adapter to use v3 with minimal changes to your v2 implementation. +💡 When you use `legacyCreateProxyMiddleware` it will print out console messages in run-time to guide you on how to migrate legacy configurations. + NOTE: `legacyCreateProxyMiddleware` will be removed in a future version. ```js @@ -46,6 +55,8 @@ legacyCreateProxyMiddleware(...); ### Removed `req.url` patching +When proxy is mounted on a path, this path should be provided in the target. + ```js // before app.use('/user', proxy({ target: 'http://www.example.org' })); diff --git a/README.md b/README.md index 1a01f591..3e59082b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ [![Coveralls](https://img.shields.io/coveralls/chimurai/http-proxy-middleware.svg?style=flat-square&logo=coveralls)](https://coveralls.io/r/chimurai/http-proxy-middleware) [![Known Vulnerabilities](https://snyk.io/test/github/chimurai/http-proxy-middleware/badge.svg)](https://snyk.io/test/github/chimurai/http-proxy-middleware) [![npm](https://img.shields.io/npm/v/http-proxy-middleware?color=%23CC3534&style=flat-square&logo=npm)](https://www.npmjs.com/package/http-proxy-middleware) -[![npm (tag)](https://img.shields.io/npm/v/http-proxy-middleware/beta?color=CC3534&logo=npm&style=flat-square)](https://github.com/chimurai/http-proxy-middleware/discussions/768) Node.js proxying made simple. Configure proxy middleware with ease for [connect](https://github.com/senchalabs/connect), [express](https://github.com/expressjs/express), [next.js](https://github.com/vercel/next.js) and [many more](#compatible-servers). diff --git a/package.json b/package.json index 40a3a5be..14b5d51a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "http-proxy-middleware", - "version": "3.0.0-beta.1", + "version": "3.0.0", "description": "The one-liner node.js proxy middleware for connect, express, next.js and more", "main": "dist/index.js", "types": "dist/index.d.ts",