Skip to content

Commit a0a6c39

Browse files
committed
feat(middleware): add changesets with v3 release
1 parent 881a6b3 commit a0a6c39

File tree

6 files changed

+866
-4
lines changed

6 files changed

+866
-4
lines changed

.changeset/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

CHANGELOG.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,33 @@
11
# Changelog
22

3+
## 3.0.0
4+
5+
### Major Changes
6+
7+
- Use middleware responses instead of api page redirect
8+
9+
This removes the `createApiPage` export and uses Middleware responses to serve
10+
a 401 when basic authentication fails. This requires `next` >=13.1.
11+
12+
This is a much cleaner and less hacky approach to return the correct status code to a browser.
13+
14+
:warning: This is a _breaking_ change, please use v2 if you are below `next` 13.1
15+
316
## 2.0.0
17+
418
- BREAKING CHANGE: Removes SSR Middleware
519
- BREAKING CHANGE: Updates Next.js middleware to use API pages for 401 error message
620

721
## 1.0.0
22+
823
- Adds first version of the Next.js middleware
924

1025
## 0.2.1
11-
- fix(middleware): return true when request object does not have a url
26+
27+
- fix(middleware): return true when request object does not have a url
1228

1329
## 0.2.0
30+
1431
- fix(auth): fix empty credentials returning valid authorization
1532
- fix(middleware): allow optional use of options object
1633
- chore: update all dependencies

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ Options can be set on the basic auth middleware and overridden using environment
99

1010
| Next.js version | Plugin version |
1111
| --------------- | -------------- |
12-
| Next.js 13 | 3.x |
13-
| Next.js 12 | 2.x |
12+
| Next.js >=13.1 | 3.x |
13+
| Next.js 12,13.0 | 2.x |
1414
| Next.js 10,11 | 1.x |
1515

1616

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "2.0.0",
2+
"version": "3.0.0",
33
"license": "MIT",
44
"main": "dist/index.js",
55
"typings": "dist/index.d.ts",
@@ -38,6 +38,7 @@
3838
"url": "git+https://github.com/labd/nextjs-basic-auth-middleware"
3939
},
4040
"devDependencies": {
41+
"@changesets/cli": "2.26.0",
4142
"@edge-runtime/jest-environment": "^1.1.0-beta.26",
4243
"@labdigital/eslint-config-node": "^0.0.5",
4344
"@types/jest": "26.0.15",

0 commit comments

Comments
 (0)