Skip to content

Commit

Permalink
Version Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and nibtime committed Jul 24, 2022
1 parent f501354 commit d660b41
Show file tree
Hide file tree
Showing 18 changed files with 85 additions and 103 deletions.
5 changes: 0 additions & 5 deletions .changeset/brave-stingrays-smile.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/chilly-experts-type.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/empty-timers-guess.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/pink-seals-look.md

This file was deleted.

10 changes: 0 additions & 10 deletions .changeset/polite-waves-obey.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/quiet-comics-allow.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/shiny-jobs-peel.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/small-tools-tell.md

This file was deleted.

29 changes: 0 additions & 29 deletions .changeset/stale-meals-shout.md

This file was deleted.

10 changes: 0 additions & 10 deletions .changeset/stale-weeks-type.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/tasty-singers-allow.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/unlucky-emus-decide.md

This file was deleted.

12 changes: 12 additions & 0 deletions apps/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# docs

## 0.1.0

### Minor Changes

- [#47](https://github.com/nibtime/next-safe-middleware/pull/47) [`f9ecbe3`](https://github.com/nibtime/next-safe-middleware/commit/f9ecbe30fa047eed13958b5b74e38a248c7a23e4) Thanks [@nibtime](https://github.com/nibtime)! - :sparkles: set up docs website with [Nextra](https://nextra.vercel.app/) on Next.js 12.2 (fixes [#30](https://github.com/nibtime/next-safe-middleware/issues/30))

### Patch Changes

- Updated dependencies [[`f9ecbe3`](https://github.com/nibtime/next-safe-middleware/commit/f9ecbe30fa047eed13958b5b74e38a248c7a23e4), [`071f993`](https://github.com/nibtime/next-safe-middleware/commit/071f993866279d8d0920f348a0435f254ffe50fa), [`071f993`](https://github.com/nibtime/next-safe-middleware/commit/071f993866279d8d0920f348a0435f254ffe50fa), [`f9ecbe3`](https://github.com/nibtime/next-safe-middleware/commit/f9ecbe30fa047eed13958b5b74e38a248c7a23e4), [`071f993`](https://github.com/nibtime/next-safe-middleware/commit/071f993866279d8d0920f348a0435f254ffe50fa), [`071f993`](https://github.com/nibtime/next-safe-middleware/commit/071f993866279d8d0920f348a0435f254ffe50fa), [`071f993`](https://github.com/nibtime/next-safe-middleware/commit/071f993866279d8d0920f348a0435f254ffe50fa), [`f9ecbe3`](https://github.com/nibtime/next-safe-middleware/commit/f9ecbe30fa047eed13958b5b74e38a248c7a23e4), [`f9ecbe3`](https://github.com/nibtime/next-safe-middleware/commit/f9ecbe30fa047eed13958b5b74e38a248c7a23e4), [`071f993`](https://github.com/nibtime/next-safe-middleware/commit/071f993866279d8d0920f348a0435f254ffe50fa), [`f9ecbe3`](https://github.com/nibtime/next-safe-middleware/commit/f9ecbe30fa047eed13958b5b74e38a248c7a23e4)]:
- @next-safe/middleware@0.9.0
2 changes: 1 addition & 1 deletion apps/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docs",
"version": "0.0.0",
"version": "0.1.0",
"private": true,
"yarn.build": {
"input": [
Expand Down
7 changes: 7 additions & 0 deletions apps/e2e/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# e2e

## 0.6.1

### Patch Changes

- Updated dependencies [[`f9ecbe3`](https://github.com/nibtime/next-safe-middleware/commit/f9ecbe30fa047eed13958b5b74e38a248c7a23e4), [`071f993`](https://github.com/nibtime/next-safe-middleware/commit/071f993866279d8d0920f348a0435f254ffe50fa), [`071f993`](https://github.com/nibtime/next-safe-middleware/commit/071f993866279d8d0920f348a0435f254ffe50fa), [`f9ecbe3`](https://github.com/nibtime/next-safe-middleware/commit/f9ecbe30fa047eed13958b5b74e38a248c7a23e4), [`071f993`](https://github.com/nibtime/next-safe-middleware/commit/071f993866279d8d0920f348a0435f254ffe50fa), [`071f993`](https://github.com/nibtime/next-safe-middleware/commit/071f993866279d8d0920f348a0435f254ffe50fa), [`071f993`](https://github.com/nibtime/next-safe-middleware/commit/071f993866279d8d0920f348a0435f254ffe50fa), [`f9ecbe3`](https://github.com/nibtime/next-safe-middleware/commit/f9ecbe30fa047eed13958b5b74e38a248c7a23e4), [`f9ecbe3`](https://github.com/nibtime/next-safe-middleware/commit/f9ecbe30fa047eed13958b5b74e38a248c7a23e4), [`071f993`](https://github.com/nibtime/next-safe-middleware/commit/071f993866279d8d0920f348a0435f254ffe50fa), [`f9ecbe3`](https://github.com/nibtime/next-safe-middleware/commit/f9ecbe30fa047eed13958b5b74e38a248c7a23e4)]:
- @next-safe/middleware@0.9.0

## 0.6.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/e2e/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "e2e",
"version": "0.6.0",
"version": "0.6.1",
"private": true,
"yarn.build": {
"input": [
Expand Down
63 changes: 63 additions & 0 deletions packages/next-safe-middleware/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,68 @@
# @next-safe/middleware

## 0.9.0

### Minor Changes

- [#47](https://github.com/nibtime/next-safe-middleware/pull/47) [`071f993`](https://github.com/nibtime/next-safe-middleware/commit/071f993866279d8d0920f348a0435f254ffe50fa) Thanks [@nibtime](https://github.com/nibtime)! - provide `gsspWithNonceAppliedToCsp` and `gipWithNonceAppliedToCsp` wrappers to inject nonce into pages with `getServerSideProps` / `getInitialProps`.

BREAKING CHANGE: nonce doesn't get applied to CSP automatically anymore. This extra step is neccessary
as there is no longer a way of reliably do that with Next 12.2.

BREAKING CHANGE: drop `enhanceAppWithNonce`, it's no longer needed as nonce is injected though `getServerSideProps` of routes/pages now. That's actually a good thing, because [customizing `renderPage` is discouranged](https://nextjs.org/docs/advanced-features/custom-document#customizing-renderpage)

* [#47](https://github.com/nibtime/next-safe-middleware/pull/47) [`f9ecbe3`](https://github.com/nibtime/next-safe-middleware/commit/f9ecbe30fa047eed13958b5b74e38a248c7a23e4) Thanks [@nibtime](https://github.com/nibtime)! - :boom: changes to `ChainableMiddleware` decrease resource utilization (fixes [#45](https://github.com/nibtime/next-safe-middleware/issues/45))

- new `MiddlewareChainContext` interface

perf: decrease CPU utilization

- use `ctx.cache.get` and `ctx.cache.set` for caching CSP in middleware chain (no serialize/deserialize)
- write to repsonse only once from chain cache at the end
- remove unnecessary some double ops

perf: decrease deployed size

- use new built-in `userAgent` from `next/server`

BREAKING CHANGE: supports only Stable middleware from now on (needs `next >= 12.2`, as is specified in peerDeps)

BREAKING CHANGE: replace `ua-parser-js` with `userAgent` from `next/server` available since `12.2`

BREAKING CHANGE: `ChainableMiddleware` with `(ctx: MiddlewareChainContext)` as 3rd parameter.

BREAKING CHANGE: turn positional params into named params for `Configinitializer`

### Patch Changes

- [#47](https://github.com/nibtime/next-safe-middleware/pull/47) [`f9ecbe3`](https://github.com/nibtime/next-safe-middleware/commit/f9ecbe30fa047eed13958b5b74e38a248c7a23e4) Thanks [@nibtime](https://github.com/nibtime)! - fix(document): use `any` type (children and return value) for components of `provideComponents`(fixes [#46](https://github.com/nibtime/next-safe-middleware/issues/46))

* [#47](https://github.com/nibtime/next-safe-middleware/pull/47) [`071f993`](https://github.com/nibtime/next-safe-middleware/commit/071f993866279d8d0920f348a0435f254ffe50fa) Thanks [@nibtime](https://github.com/nibtime)! - fix(document): support new script insertion behavior
- handle `getPreloadDynamicChunks` and `getPreloadMainLinks` in `<Head>`
- hash `beforeInteractiveInlineScripts` in `<Head>`
- handle scripts also in drop-in component for `<NextScript>`
- trustify scripts in `initialProps.head`

- [#47](https://github.com/nibtime/next-safe-middleware/pull/47) [`071f993`](https://github.com/nibtime/next-safe-middleware/commit/071f993866279d8d0920f348a0435f254ffe50fa) Thanks [@nibtime](https://github.com/nibtime)! - fix(document): prevent application of nonce in production builds (fixes [#49](https://github.com/nibtime/next-safe-middleware/issues/49))

* [#47](https://github.com/nibtime/next-safe-middleware/pull/47) [`f9ecbe3`](https://github.com/nibtime/next-safe-middleware/commit/f9ecbe30fa047eed13958b5b74e38a248c7a23e4) Thanks [@nibtime](https://github.com/nibtime)! - provide base logical operators for chain matchers (request predicates): `matchNot`, `matchAnd`, `matchOr`

- [#47](https://github.com/nibtime/next-safe-middleware/pull/47) [`071f993`](https://github.com/nibtime/next-safe-middleware/commit/071f993866279d8d0920f348a0435f254ffe50fa) Thanks [@nibtime](https://github.com/nibtime)! - fix(strictDynamic): exclude Safari from Hash-based Strict CSP

- the problem is probably that Safari isn't truly CSP-3 compliant yet, like Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1409200. `strict-dynamic` seems to mess up SRI validation there.

* [#47](https://github.com/nibtime/next-safe-middleware/pull/47) [`071f993`](https://github.com/nibtime/next-safe-middleware/commit/071f993866279d8d0920f348a0435f254ffe50fa) Thanks [@nibtime](https://github.com/nibtime)! - fix: consider `basePath` from `next.config.js` for writing and fetching hashes (fixes [#48](https://github.com/nibtime/next-safe-middleware/issues/48))

- [#47](https://github.com/nibtime/next-safe-middleware/pull/47) [`f9ecbe3`](https://github.com/nibtime/next-safe-middleware/commit/f9ecbe30fa047eed13958b5b74e38a248c7a23e4) Thanks [@nibtime](https://github.com/nibtime)! - fix: better `isPageRequest` matcher

- exclude only basepaths `/_next` and `/api`
- exclude all paths with file endings
- exclude `isPreviewModeRequest` and `isNextJsDataRequest` (new matchers)

* [#47](https://github.com/nibtime/next-safe-middleware/pull/47) [`071f993`](https://github.com/nibtime/next-safe-middleware/commit/071f993866279d8d0920f348a0435f254ffe50fa) Thanks [@nibtime](https://github.com/nibtime)! - perf(middleware): `telemetry` wrapper to log basic measurements and infos from middleware execution

- [#47](https://github.com/nibtime/next-safe-middleware/pull/47) [`f9ecbe3`](https://github.com/nibtime/next-safe-middleware/commit/f9ecbe30fa047eed13958b5b74e38a248c7a23e4) Thanks [@nibtime](https://github.com/nibtime)! - fix(csp): handle boolean directives correctly

## 0.8.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/next-safe-middleware/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next-safe/middleware",
"version": "0.8.0",
"version": "0.9.0",
"main": "dist/index.js",
"module": "dist/index.mjs",
"typings": "dist/index.d.ts",
Expand Down

2 comments on commit d660b41

@vercel
Copy link

@vercel vercel bot commented on d660b41 Jul 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

e2e-next-safe-middleware – ./apps/e2e

e2e-next-safe-middleware.vercel.app
e2e-next-safe-middleware-git-main-nibtime.vercel.app
e2e-next-safe-middleware-nibtime.vercel.app

@vercel
Copy link

@vercel vercel bot commented on d660b41 Jul 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.