Skip to content

Conversation

@pujitm
Copy link
Member

@pujitm pujitm commented Mar 31, 2025

Sets license for all node.js packages to GPL-2.0-or-later

Summary by CodeRabbit

  • Chores
    • Simplified license compliance verification by removing legacy script logic.
    • Updated licensing terms across components to GPL-2.0-or-later for broader compatibility.
  • Documentation
    • Revised setup instructions to indicate that the use of the Just build tool is now optional.
  • New Features
    • Added fallback support in the build automation tool to ensure smoother operations when targets are missing.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 31, 2025

Walkthrough

This pull request removes the compliance script from the API’s package configuration and streamlines the compliance checking process in the build recipes. The changes replace a multi-step command with a direct call to pnpx license-checker in the Justfile. Additionally, several packages have their license declaration updated from “GPL-2.0-only” to “GPL-2.0-or-later”. The readme now indicates that “Just” is an optional dependency, and a fallback directive has been added to the unraid-ui Justfile to support target resolution.

Changes

File(s) Change Summary
api/package.json Removed the “compliance” script that invoked pnpx license-checker with specific flags.
justfile Replaced a multi-step compliance command (using pnpm compliance) with a direct invocation of pnpx license-checker and updated the recipe signature to @compliance:.
packages/unraid-api-plugin-health/package.json,
plugin/package.json,
unraid-ui/package.json,
web/package.json
Updated license declarations from “GPL-2.0-only” to “GPL-2.0-or-later”.
readme.md Modified the “Just” dependency note to indicate that installation is optional.
unraid-ui/justfile Introduced a set fallback directive to enable fallback behavior when a target is not found.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant JF as Justfile (@compliance)
    participant LC as pnpx license-checker

    Dev->>JF: Invoke "@compliance" target
    JF->>LC: Execute license check with flags
    LC-->>JF: Return compliance status
    JF-->>Dev: Output result
Loading

Possibly Related PRs

Suggested Reviewers

  • mdatelle
  • elibosley
  • zackspear

Poem

In the world of code, a script fades away,
New paths for license checks guide our day.
A fallback now stands, ready to deploy,
GPL upgrades bring extra joy.
Changes ripple in the digital night—
Every line refined, shining bright.
Cheers to the progress in our code’s light!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between e54f189 and 3607baf.

📒 Files selected for processing (8)
  • api/package.json (0 hunks)
  • justfile (1 hunks)
  • packages/unraid-api-plugin-health/package.json (1 hunks)
  • plugin/package.json (1 hunks)
  • readme.md (1 hunks)
  • unraid-ui/justfile (1 hunks)
  • unraid-ui/package.json (1 hunks)
  • web/package.json (1 hunks)
💤 Files with no reviewable changes (1)
  • api/package.json
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (7)
unraid-ui/justfile (1)

1-2: Set fallback directive added for better target resolution

The addition of set fallback allows the Just build tool to use fallback behavior when a specific target isn't found, improving flexibility during builds.

readme.md (1)

99-99: Updated Just requirement to optional

Making Just an optional dependency reflects the streamlined build process, where Just-specific commands can now be bypassed if necessary.

unraid-ui/package.json (1)

5-5: License updated to GPL-2.0-or-later

Updated license field from GPL-2.0-only to GPL-2.0-or-later, providing more licensing flexibility by allowing compatibility with future GPL versions.

plugin/package.json (1)

17-17: License updated to GPL-2.0-or-later

Updated license field consistently with other packages in the monorepo, ensuring uniform licensing terms across the project.

packages/unraid-api-plugin-health/package.json (1)

11-11: License declaration update

The license has been updated from "GPL-2.0-only" to "GPL-2.0-or-later", which provides more flexibility by allowing users to choose between GPL 2.0 or any later version of the GPL. This is a good change that aligns with current best practices for open source licensing.

web/package.json (1)

5-5: License declaration update

Similar to the change in unraid-api-plugin-health, the license has been updated from "GPL-2.0-only" to "GPL-2.0-or-later". This maintains consistency across the project's packages and allows for compatibility with future GPL versions.

justfile (1)

47-50: Simplified compliance checking process

The compliance check has been streamlined in three ways:

  1. Updated comment to reflect the specific GPL-2.0-or-later compliance check
  2. Added @ to make the recipe "quiet" (won't echo the command to console)
  3. Replaced the complex implementation with a direct call to pnpx license-checker

The new implementation is more maintainable and properly includes "GPL-2.0-or-later" in the allowed licenses list, which aligns with the license updates in the package.json files.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link
Contributor

This plugin has been deployed to Cloudflare R2 and is available for testing.
Download it at this URL:

https://preview.dl.unraid.net/unraid-api/tag/PR1298/dynamix.unraid.net.plg

@elibosley elibosley merged commit 4964cf5 into main Mar 31, 2025
8 checks passed
@elibosley elibosley deleted the chore/compliance branch March 31, 2025 18:52
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.

3 participants