Skip to content

fix: add Node 18 deprecation notice #1506

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

grdsdev
Copy link
Contributor

@grdsdev grdsdev commented Jul 16, 2025

What kind of change does this PR introduce?

As announced in https://github.com/orgs/supabase/discussions/37217, Node 18 support has been deprecated.

This PR adds a console warning when this lib is used on Node 18 environment.

@coveralls
Copy link

coveralls commented Jul 16, 2025

Pull Request Test Coverage Report for Build 16416810697

Details

  • 6 of 9 (66.67%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.7%) to 72.199%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/index.ts 6 9 66.67%
Totals Coverage Status
Change from base Build 16347588541: -0.7%
Covered Lines: 115
Relevant Lines: 141

💛 - Coveralls

@grdsdev grdsdev marked this pull request as ready for review July 17, 2025 13:22
grdsdev and others added 3 commits July 17, 2025 15:28
- Add browser environment check to only show Node.js deprecation warning in Node.js
- Fix typo in types import path

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Fix typo in types import path
- Improve formatting of Node.js 18 deprecation warning condition

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Copy link

@Copilot 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 implements a deprecation notice for Node.js 18 as announced in the Supabase community discussions. The changes add runtime detection and warning for Node.js 18 usage while also improving the CI coverage reporting workflow.

  • Adds runtime deprecation warning for Node.js 18 environments
  • Updates CI workflow to support parallel coverage reporting with proper completion handling

Reviewed Changes

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

File Description
src/index.ts Adds Node.js 18 deprecation detection and console warning
.github/workflows/ci.yml Updates coverage reporting to use parallel processing with finish step
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

- Add deprecation warning for Node.js versions 18 and below
- Extract shouldShowDeprecationWarning function with robust version parsing
- Parse major version number from process.version using regex
- Handle edge cases: null version, malformed strings, browser environments
- Display informative warning message directing users to upgrade to Node.js 20+
- Include link to GitHub discussion for more information
@grdsdev grdsdev force-pushed the guilherme/clibs-244-add-warning-in-js-lib-when-node-version-equals-18 branch from 034be14 to ec3c428 Compare July 21, 2025 12:20
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