Skip to content

Conversation

@HofmannZ
Copy link
Member

No description provided.

@HofmannZ HofmannZ requested a review from Copilot March 29, 2025 11:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR prepares a stable release by introducing enhanced logging options and additional customization for exposing environment variables, while also updating CI workflows and GitHub Actions to support newer versions and improved configurations.

  • Added an optional logging options parameter and related types to make environment variables public.
  • Extended Next.js script components and their tests with additional props for custom behavior.
  • Updated CI workflows and GitHub Actions to support Node.js 22 and upgraded key dependencies.

Reviewed Changes

Copilot reviewed 13 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/utils/make-env-public.ts Introduces logging options and updates prefixing behavior
src/utils/make-env-public.spec.ts Updates tests to reflect the new logging options
src/script/public-env-script.tsx Adds new props for disabling Next.js Script rendering and custom props
src/script/env-script.tsx Integrates new props and conditional rendering for script types
src/script/env-script.spec.tsx Adds tests to cover Next.js Script tag props and behavior
src/helpers/log.ts Updates logging functions to accept a LogOptions parameter
src/helpers/log.spec.ts Adds tests for the silent log level and updated logging behavior
.github/workflows/ci.yml Updates Node.js versions in the matrix and upgrades the Codecov action
.github/actions/setup-pnpm/action.yml Upgrades the pnpm action version
.github/actions/back-merge/action.yml Refactors git configuration and merge command using env variables
Files not reviewed (3)
  • examples/with-app-router-context/package.json: Language not supported
  • examples/with-app-router-script/package.json: Language not supported
  • package.json: Language not supported
Comments suppressed due to low confidence (2)

src/utils/make-env-public.ts:17

  • Consider adding an early return after warning when the environment variable is already public to avoid redundant prefixing, which may lead to the creation of a variable with a double 'NEXT_PUBLIC_' prefix.
if (/^NEXT_PUBLIC_/i.test(key)) {

src/helpers/log.ts:44

  • [nitpick] Review the conditional logic that compares the log levels to ensure that messages are filtered as intended; adding a comment to explain the comparison rationale could improve maintainability.
if (prefixLevels[prefixType] < prefixLevels[logLevel]) {

@semgrep-code-expatfile
Copy link

Legal Risk

The following dependencies were released under a license that
has been flagged by your organization for consideration.

Recommendation

While merging is not directly blocked, it's best to pause and consider what it means to use this license before continuing. If you are unsure, reach out to your security team or Semgrep admin to address this issue.

MPL-2.0

@HofmannZ HofmannZ merged commit 34417e8 into main Mar 29, 2025
13 checks passed
@expatfile-bot
Copy link
Member

🎉 This PR is included in version 3.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants