Skip to content

Fix environment variable documentation and glob version mismatch#270

Merged
devakesu merged 2 commits into1.4.7from
copilot/sub-pr-264
Feb 6, 2026
Merged

Fix environment variable documentation and glob version mismatch#270
devakesu merged 2 commits into1.4.7from
copilot/sub-pr-264

Conversation

Copy link
Contributor

Copilot AI commented Feb 6, 2026

Addresses documentation inconsistency and invalid package version from PR #264 review feedback.

Environment Variable Documentation

  • Updated README.md to use NEXT_PUBLIC_ENABLE_SW_IN_DEV instead of ENABLE_SW_IN_DEV
  • Aligns documentation with actual implementation in next.config.ts and sw-register.tsx

Dependency Version Fix

  • Changed glob from non-existent ^13.0.1 to valid ^11.0.0 in package.json
  • Updated package-lock.json accordingly
# README.md now correctly documents the environment variable
NEXT_PUBLIC_ENABLE_SW_IN_DEV="true" npm run dev

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: devakesu <61821107+devakesu@users.noreply.github.com>
Copilot AI changed the title [WIP] Update dependencies and improve error handling Fix environment variable documentation and glob version mismatch Feb 6, 2026
Copilot AI requested a review from devakesu February 6, 2026 07:53
@devakesu devakesu marked this pull request as ready for review February 6, 2026 07:57
Copilot AI review requested due to automatic review settings February 6, 2026 07:57
@devakesu devakesu merged commit a2b22fc into 1.4.7 Feb 6, 2026
@devakesu devakesu deleted the copilot/sub-pr-264 branch February 6, 2026 07:57
Copy link
Contributor

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 pull request fixes two issues identified during PR #264 review: incorrect environment variable documentation and an invalid glob package version.

Changes:

  • Updated README.md to correctly document the NEXT_PUBLIC_ENABLE_SW_IN_DEV environment variable with the required Next.js prefix
  • Changed glob dependency from non-existent version ^13.0.1 to stable version ^11.0.0
  • Updated package-lock.json with proper dependency resolution and restructured nested dependencies

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
README.md Corrected environment variable name from ENABLE_SW_IN_DEV to NEXT_PUBLIC_ENABLE_SW_IN_DEV in all three platform-specific examples
package.json Changed glob version from ^13.0.1 to ^11.0.0 to use a valid, stable version
package-lock.json Updated dependency resolution for glob to version 11.1.0, reorganized nested dependencies, and maintained glob 13.0.1 as a nested dependency for rimraf

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

devakesu added a commit that referenced this pull request Feb 6, 2026
* chore: update dependencies and improve error handling

- Updated package dependencies in package.json:
  - Upgraded @redocly/cli from ^1.31.0 to 2.15.1
  - Upgraded jsdom from ^27.4.0 to 28.0.0
  - Added glob as a dependency with version ^13.0.1
  - Added node-domexception as a dependency with version ^2.0.2
  - Added source-map as a dependency with version ^0.8.0-beta.0

- Increased timeout for authentication service requests from 5s to 15s in save-token route to handle slow backends and network latency.
- Enhanced error handling for connection issues in save-token route, logging specific error codes and providing user-friendly messages.
- Added conditional service worker registration in development mode based on ENABLE_SW_IN_DEV environment variable.
- Improved session management in Supabase middleware by clearing invalid session cookies when token refresh fails and logging the error.

* Address PR review feedback: improve error handling and dependency management (#265)

* Initial plan

* fix: address PR review feedback on error handling and dependencies

Co-authored-by: devakesu <61821107+devakesu@users.noreply.github.com>

* refactor: optimize middleware error detection

Co-authored-by: devakesu <61821107+devakesu@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: devakesu <61821107+devakesu@users.noreply.github.com>

* Address PR review feedback: enhance error handling and fix redundant logic (#266)

* Initial plan

* Address PR review: add ECONNREFUSED error code and remove redundant checks

Co-authored-by: devakesu <61821107+devakesu@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: devakesu <61821107+devakesu@users.noreply.github.com>

* Address review feedback: safe error handling and remove deprecated dependency (#267)

* Initial plan

* fix: improve error handling and remove deprecated package

Co-authored-by: devakesu <61821107+devakesu@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: devakesu <61821107+devakesu@users.noreply.github.com>

* Replace string-based error matching with structured error detection in middleware (#268)

* Initial plan

* Improve error handling with structured properties and add npm version requirement

Co-authored-by: devakesu <61821107+devakesu@users.noreply.github.com>

* Optimize error handling: move constants to module scope and improve type safety

Co-authored-by: devakesu <61821107+devakesu@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: devakesu <61821107+devakesu@users.noreply.github.com>

* Unify service worker environment variable to NEXT_PUBLIC_ENABLE_SW_IN_DEV (#269)

* Initial plan

* Fix environment variable inconsistency in service worker registration

- Check both ENABLE_SW_IN_DEV and NEXT_PUBLIC_ENABLE_SW_IN_DEV
- Prioritize ENABLE_SW_IN_DEV (matching next.config.ts) with NEXT_PUBLIC_ as fallback
- Update logger message to document both options for backwards compatibility

Co-authored-by: devakesu <61821107+devakesu@users.noreply.github.com>

* Use consistent environment variable NEXT_PUBLIC_ENABLE_SW_IN_DEV in both config and component

- Update next.config.ts to use NEXT_PUBLIC_ENABLE_SW_IN_DEV instead of ENABLE_SW_IN_DEV
- Update comments in next.config.ts to reflect the correct variable name
- Simplify sw-register.tsx to only check NEXT_PUBLIC_ENABLE_SW_IN_DEV
- This ensures users only need to set one environment variable for both build-time and runtime SW control

Co-authored-by: devakesu <61821107+devakesu@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: devakesu <61821107+devakesu@users.noreply.github.com>

* Fix environment variable documentation and glob version mismatch (#270)

* Initial plan

* Fix README and package.json per review feedback

Co-authored-by: devakesu <61821107+devakesu@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: devakesu <61821107+devakesu@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants