Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

@google-labs-jules google-labs-jules bot commented Jan 5, 2026

💡 What:

  • Exposed eolDate property in NodeVersion object.
  • Added comprehensive JSDoc to getVersion and NodeVersion interface.

🎯 Why:

  • Developers need to know when a Node version becomes EOL, not just if it is EOL.
  • Better JSDoc improves IntelliSense and API discoverability.

Accessibility (DX):

  • Makes the library easier to understand and use for developers.

PR created automatically by Jules for task 8883804194562260782 started by @srod


Summary by cubic

Expose eolDate on NodeVersion so developers can see the exact End-of-Life date for the current Node major. Improve JSDoc for clearer IntelliSense and update tests to cover the new field.

  • New Features

    • Added eolDate (Date | undefined) to NodeVersion, derived from EOL_DATES and aligned with isEOL.
    • Expanded JSDoc for getVersion and NodeVersion with return details and examples; tests assert eolDate for known and unknown versions.
  • Dependencies

    • Loosened @biomejs/biome to ^2.3.11.

Written for commit d756029. Summary will update on new commits.

Summary by CodeRabbit

  • New Features

    • Added End-of-Life (EOL) date information for Node.js versions
    • Introduced eolDate property to view when a version reaches EOL
    • Exported version metadata as a public constant for programmatic access
  • Tests

    • Added tests for End-of-Life date validation
  • Chores

    • Updated development dependency constraints

✏️ Tip: You can customize this high-level summary in your review settings.

@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@changeset-bot
Copy link

changeset-bot bot commented Jan 5, 2026

⚠️ No Changeset found

Latest commit: d756029

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link

coderabbitai bot commented Jan 5, 2026

📝 Walkthrough

Walkthrough

This PR introduces End-of-Life (EOL) date tracking for Node.js versions by adding an EOL_DATES mapping, computing eolDate properties in the version object, expanding the NodeVersion type definition, and exporting a public version constant. The biome devDependency constraint was relaxed.

Changes

Cohort / File(s) Summary
Dependency Version Relaxation
package.json
Relaxed @biomejs/biome version constraint from pinned "2.3.11" to "^2.3.11" to allow compatible patch and minor updates.
EOL Date Implementation
src/index.ts
Added EOL_DATES mapping for major versions with EOL dates, implemented checkEOL helper function, enhanced getVersion() to compute and expose eolDate (Date or undefined) and isEOL status, and exported a public version constant.
Type Definition Expansion
src/types.ts
Added eolDate property (Date | undefined) to the NodeVersion interface to represent End-of-Life date for major versions.
Test Coverage Updates
src/index.test.ts
Updated expected property count from 15 to 16 for version and getVersion outputs; added tests verifying eolDate is correctly parsed as a Date for known versions (20.10.0 → 2026-04-30) and undefined for unknown versions (99.0.0).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 A rabbit hops through dates so clear,
EOL tracking, far and near,
With mapping keys and functions true,
The version object's shiny new!
Life cycles tracked, both old and spry, ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title uses an emoji and a vague term ('Palette') unrelated to the core changes; the substantive changes (exposing eolDate and JSDoc improvements) are not clearly conveyed. Revise the title to be more descriptive, such as 'Add eolDate property and improve getVersion JSDoc' or 'Expose Node.js End-of-Life date to API'. Remove the emoji for clarity.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 29e6014 and d756029.

📒 Files selected for processing (4)
  • package.json
  • src/index.test.ts
  • src/index.ts
  • src/types.ts
🧰 Additional context used
📓 Path-based instructions (6)
src/**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript with strict type checking for all source files

Files:

  • src/index.test.ts
  • src/types.ts
  • src/index.ts
src/**/*.test.ts

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.test.ts: Co-locate test files with source files using the *.test.ts naming convention
Use vitest for all testing; tests should be co-located in src/ directory

Files:

  • src/index.test.ts
src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Configure linting and formatting with Biome: 4 spaces indentation, double quotes, no semicolons

Files:

  • src/index.test.ts
  • src/types.ts
  • src/index.ts
package.json

📄 CodeRabbit inference engine (AGENTS.md)

package.json: Ensure package.json specifies type: module for ESM-only distribution and engines: >=20.0.0 for Node.js support
Node.js engine requirement must be set to >=20.0.0 in package.json

Files:

  • package.json
src/types.ts

📄 CodeRabbit inference engine (AGENTS.md)

Define all type interfaces in src/types.ts, including NodeVersion structure with major, minor, and methods

Files:

  • src/types.ts
src/index.ts

📄 CodeRabbit inference engine (AGENTS.md)

src/index.ts: Export main entry point from src/index.ts including getVersion function, isAtLeast method, isLTS property, and NodeVersion interface
Maintain EOL_DATES constant in src/index.ts mapping Node.js major versions to End of Life dates
Handle version string parsing with strict input validation and support for optional v prefixes

Files:

  • src/index.ts
🧠 Learnings (8)
📓 Common learnings
Learnt from: CR
Repo: srod/node-version PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T20:10:06.248Z
Learning: Applies to src/index.ts : Maintain EOL_DATES constant in src/index.ts mapping Node.js major versions to End of Life dates
📚 Learning: 2026-01-05T20:10:06.248Z
Learnt from: CR
Repo: srod/node-version PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T20:10:06.248Z
Learning: Applies to src/index.ts : Maintain EOL_DATES constant in src/index.ts mapping Node.js major versions to End of Life dates

Applied to files:

  • src/index.test.ts
  • src/types.ts
  • src/index.ts
📚 Learning: 2026-01-05T20:10:06.248Z
Learnt from: CR
Repo: srod/node-version PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T20:10:06.248Z
Learning: Applies to src/index.ts : Export main entry point from src/index.ts including getVersion function, isAtLeast method, isLTS property, and NodeVersion interface

Applied to files:

  • src/index.test.ts
  • src/types.ts
  • src/index.ts
📚 Learning: 2026-01-05T20:10:06.248Z
Learnt from: CR
Repo: srod/node-version PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T20:10:06.248Z
Learning: Applies to src/index.ts : Handle version string parsing with strict input validation and support for optional v prefixes

Applied to files:

  • src/index.test.ts
  • src/index.ts
📚 Learning: 2026-01-05T20:10:06.248Z
Learnt from: CR
Repo: srod/node-version PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T20:10:06.248Z
Learning: Applies to biome.json : Maintain biome.json configuration for linting and formatting with 4 spaces, double quotes, and no semicolons

Applied to files:

  • package.json
📚 Learning: 2026-01-05T20:10:06.248Z
Learnt from: CR
Repo: srod/node-version PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T20:10:06.248Z
Learning: Applies to package.json : Ensure package.json specifies type: module for ESM-only distribution and engines: >=20.0.0 for Node.js support

Applied to files:

  • package.json
  • src/index.ts
📚 Learning: 2026-01-05T20:10:06.248Z
Learnt from: CR
Repo: srod/node-version PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T20:10:06.248Z
Learning: Applies to src/**/*.{ts,tsx} : Configure linting and formatting with Biome: 4 spaces indentation, double quotes, no semicolons

Applied to files:

  • package.json
📚 Learning: 2026-01-05T20:10:06.248Z
Learnt from: CR
Repo: srod/node-version PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T20:10:06.248Z
Learning: Applies to src/types.ts : Define all type interfaces in src/types.ts, including NodeVersion structure with major, minor, and methods

Applied to files:

  • src/types.ts
  • src/index.ts
🧬 Code graph analysis (3)
src/index.test.ts (1)
src/index.ts (2)
  • version (118-118)
  • getVersion (43-113)
src/types.ts (1)
src/index.ts (1)
  • version (118-118)
src/index.ts (1)
src/types.ts (1)
  • NodeVersion (10-96)
🔇 Additional comments (9)
package.json (1)

66-66: LGTM! Relaxing devDependency constraint is appropriate.

Using the caret (^) prefix for @biomejs/biome allows compatible minor and patch updates, which is standard practice for devDependencies and helps keep tooling up-to-date without manual intervention.

src/types.ts (2)

38-74: LGTM! Enhanced JSDoc improves developer experience.

The addition of explicit @returns documentation for all comparison methods clarifies their behavior and improves IntelliSense support.


87-91: LGTM! EOL date property is well-documented and correctly typed.

The eolDate property provides the exact End-of-Life date for Node.js major versions, complementing the boolean isEOL indicator. The Date | undefined type correctly handles cases where EOL dates are unknown.

src/index.test.ts (2)

107-109: LGTM! Property count updated correctly.

The update from 15 to 16 properties correctly reflects the addition of the eolDate field to the NodeVersion interface.


319-331: LGTM! Comprehensive eolDate test coverage.

The tests verify both positive and negative cases:

  • Known version (20.10.0) has a defined Date matching the expected EOL date
  • Unknown version (99.0.0) has undefined eolDate
src/index.ts (4)

22-29: LGTM! Clean EOL check implementation.

The checkEOL function correctly returns false for unknown versions (defensive default) and compares dates for known versions. The logic is straightforward and correct.


31-42: LGTM! Excellent JSDoc documentation.

The enhanced documentation with return type details and usage example significantly improves API discoverability and developer experience.


48-110: LGTM! Clean integration of EOL metadata.

The implementation cleanly integrates EOL tracking:

  • Extracts major once for reuse
  • Derives eolDate from EOL_DATES mapping
  • Computes isEOL using the checkEOL helper
  • Exposes major, isEOL, and eolDate in the returned object

The logic is correct and maintains consistency with the existing codebase.


12-20: EOL dates are accurate.

The EOL_DATES mapping correctly reflects the official Node.js End-of-Life schedule for versions 18, 20, 22, and 24.


Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Jan 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (29e6014) to head (d756029).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #790   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           45        46    +1     
  Branches        16        16           
=========================================
+ Hits            45        46    +1     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@srod srod marked this pull request as ready for review January 5, 2026 20:12
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 4 files

Exposed the `eolDate` property in the `NodeVersion` object to provide developers with the specific End-of-Life date for the current Node.js version.
Improved JSDoc for `getVersion` and `NodeVersion` to enhance developer experience.
Updated tests to verify the new property.
@srod srod force-pushed the palette-ux-eol-date-8883804194562260782 branch from 2635542 to d756029 Compare January 5, 2026 20:13
@srod
Copy link
Owner

srod commented Jan 5, 2026

@greptile

@greptile-apps
Copy link

greptile-apps bot commented Jan 5, 2026

Greptile Summary

Exposes eolDate property in NodeVersion to provide the exact End-of-Life date for Node.js versions, complementing the existing isEOL boolean flag.

  • Added eolDate: Date | undefined property that derives from EOL_DATES lookup
  • Enhanced JSDoc with @returns tags and examples for better IntelliSense support
  • Reorganized code by moving EOL_DATES and checkEOL before getVersion for logical flow
  • Updated tests to verify eolDate returns correct Date for known versions and undefined for unknown versions
  • Changed @biomejs/biome dependency from exact to caret range (^2.3.11) for patch updates

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • Clean implementation that adds a useful feature without breaking changes. The new eolDate property derives from the same EOL_DATES map used by isEOL, ensuring consistency. Tests cover both known and unknown versions. JSDoc improvements enhance developer experience. The dependency version change to caret range is standard practice.
  • No files require special attention

Important Files Changed

Filename Overview
src/index.ts Added eolDate property to NodeVersion, moved EOL_DATES and checkEOL to top, improved JSDoc for getVersion
src/types.ts Added eolDate property and @returns tags to comparison methods, improved JSDoc clarity
src/index.test.ts Updated property count from 15 to 16, added tests for eolDate property with known and unknown versions
package.json Changed @biomejs/biome from exact to caret version range (^2.3.11)

Sequence Diagram

sequenceDiagram
    participant User
    participant getVersion
    participant EOL_DATES
    participant NodeVersion
    
    User->>getVersion: Call getVersion()
    getVersion->>getVersion: Parse process.versions.node
    getVersion->>getVersion: Extract major version
    getVersion->>EOL_DATES: Lookup major version
    EOL_DATES-->>getVersion: Return EOL date string or undefined
    getVersion->>NodeVersion: Create NodeVersion object
    Note over NodeVersion: Now includes eolDate property
    NodeVersion->>NodeVersion: Convert EOL string to Date
    getVersion-->>User: Return NodeVersion with eolDate

Loading

@srod
Copy link
Owner

srod commented Jan 5, 2026

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Jan 5, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@srod srod merged commit c86db35 into main Jan 5, 2026
13 checks passed
@srod srod deleted the palette-ux-eol-date-8883804194562260782 branch January 5, 2026 20: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