-
Notifications
You must be signed in to change notification settings - Fork 473
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
refactor: changed from npm to SheetJS cdn #9323
base: develop
Are you sure you want to change the base?
refactor: changed from npm to SheetJS cdn #9323
Conversation
WalkthroughThe changes in this pull request primarily involve modifications to the Changes
Assessment against linked issues
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for care-ohc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
package.json (1)
104-104
: Consider a two-phase approach for SheetJS dependencyGiven the PR objectives and the mention of potentially moving away from SheetJS, consider this approach:
Immediate fix (Phase 1):
- Replace the local vendor file with SheetJS CDN as originally intended
- Follow the official SheetJS documentation for CDN implementation
Long-term solution (Phase 2):
- Plan the transition away from SheetJS
- Research alternative libraries with better security track records
- Consider native browser features where possible
This ensures we address the immediate security concern while preparing for future improvements.
Would you like help creating a migration plan for either phase?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
⛔ Files ignored due to path filters (1)
package-lock.json
is excluded by!**/package-lock.json
📒 Files selected for processing (1)
package.json
(2 hunks)
🔇 Additional comments (2)
package.json (2)
63-63
: LGTM: No functional changes
The re-addition of @radix-ui/react-icons
with the same version (^1.3.2
) appears to be a package.json reorganization with no functional impact.
104-104
:
Implementation doesn't match PR objectives
The PR objective is to switch from npm to SheetJS CDN to address the ReDoS vulnerability. However, the implementation uses a local vendor file (file:vendor/xlsx-0.20.3.tgz
) instead of a CDN reference. While the version upgrade from 0.18.5 to 0.20.3 might address the vulnerability, the implementation approach differs from the intended solution.
Consider these concerns:
- Using a vendored package instead of CDN contradicts the PR objectives
- Local vendor files require manual updates and maintenance
- The SheetJS documentation specifically recommends using their CDN for this use case
Let's verify if the vendor file exists and check its contents:
@@ -101,7 +101,7 @@ | |||
"tailwind-merge": "^2.5.5", | |||
"tailwindcss-animate": "^1.0.7", | |||
"use-keyboard-shortcut": "^1.1.6", | |||
"xlsx": "^0.18.5" | |||
"xlsx": "file:vendor/xlsx-0.20.3.tgz" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use CDN link instead of adding the package to git the docs states to run npm i --save https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz
which does exactly that
vendor/xlsx-0.20.3.tgz
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file should not be added to the repo
@noufalrahim https://github.com/ohcnetwork/care_fe/actions/runs/12266788899/job/34225612132?pr=9323 the care_fe deploy is failing, look into it |
What exactly is this error..?
|
Proposed Changes
@ohcnetwork/care-fe-code-reviewers
Merge Checklist
Summary by CodeRabbit
@radix-ui/react-icons
dependency in the project.xlsx
dependency to reference a local file instead of the npm registry.