Skip to content

fix: add missing trailing slash #204

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

Merged
merged 1 commit into from
Apr 27, 2025
Merged

fix: add missing trailing slash #204

merged 1 commit into from
Apr 27, 2025

Conversation

Xavier59
Copy link
Contributor

@Xavier59 Xavier59 commented Apr 24, 2025

User description

Description

Fix missing trailing slash in package name.

image

Checklist:

  • [ x] I have updated the documentation (if required).
  • [ x] I have read the CONTRIBUTING document.
  • [ x] I have added tests to cover my changes.
  • [ x] All new and existing tests passed.
  • [ x] I added a picture of a cute animal cause it's fun

PR Type

Bug fix


Description

  • Fixes missing trailing slash in resolved package URL validation.

  • Updates test to use a more accurate malicious package name.


Changes walkthrough 📝

Relevant files
Bug fix
ValidatePackageNames.js
Add trailing slash to expected resolved URL prefix             

packages/lockfile-lint-api/src/validators/ValidatePackageNames.js

  • Adds a trailing slash to the expected URL prefix for package
    validation.
  • Ensures stricter matching of resolved package URLs.
  • +1/-1     
    Tests
    validators.packageNames.test.js
    Update test with more accurate malicious package name       

    packages/lockfile-lint-api/tests/validators.packageNames.test.js

  • Changes test malicious package name from 'malicious' to 'meowlicious'.
  • Improves test accuracy for package name validation.
  • +1/-1     

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 PR contains tests
    🔒 No security concerns identified
    ⚡ No major issues detected

    Copy link

    Failed to generate code suggestions for PR

    @lirantal lirantal self-requested a review April 26, 2025 12:27
    @codecov-commenter
    Copy link

    codecov-commenter commented Apr 27, 2025

    Codecov Report

    All modified and coverable lines are covered by tests ✅

    Project coverage is 98.01%. Comparing base (89b5cad) to head (c02840f).
    Report is 6 commits behind head on main.

    Additional details and impacted files
    @@           Coverage Diff           @@
    ##             main     #204   +/-   ##
    =======================================
      Coverage   98.01%   98.01%           
    =======================================
      Files          13       13           
      Lines         403      403           
      Branches       96       96           
    =======================================
      Hits          395      395           
      Misses          8        8           

    ☔ 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.

    @lirantal lirantal merged commit 9e5305b into lirantal:main Apr 27, 2025
    4 of 6 checks passed
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    3 participants