Skip to content

Conversation

belgattitude
Copy link

@belgattitude belgattitude commented Jan 5, 2022

Purpose

Strict package managers like pnpm, yarn in pnp or pnpm mode won't allow next-secure-headers to access react.

So here's a fix. I've added react as dependency with a large range (16, 17 and 18).

For @types/node as it's seems only internal and typescript only, I just added them as an optional peerDependency... But it's not required, so I can remove it if you feel so.

By the way, thanks for this great lib.

PS:

As a workaround for yarn 2 or 3, it's possible to add the following in the yarnrc.yml

packageExtensions:
  "next-secure-headers@*":
    peerDependencies:
      react: ^17.0.0

Copy link
Owner

@jagaapple jagaapple left a comment

Choose a reason for hiding this comment

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

Thank you!

@jagaapple jagaapple changed the base branch from main to release/v2.3.0 August 21, 2022 13:02
@jagaapple jagaapple merged commit 6ff63b2 into jagaapple:release/v2.3.0 Aug 21, 2022
@jagaapple jagaapple mentioned this pull request Aug 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants