chore: remove moment.js dependency (rebased from #92)#1
Merged
Conversation
Review Summary by QodoRemove unused moment.js dependency
WalkthroughsDescription• Remove unused moment.js dependency from package.json • Reduces bundle size and dependency footprint • Cleans up unused imports and declarations Diagramflowchart LR
A["package.json"] -- "remove moment ^2.30.1" --> B["Reduced dependencies"]
File Changes1. package.json
|
Code Review by Qodo
1. Unmet moment peer dependency
|
| "ion2-calendar": "^3.5.0", | ||
| "ionicons": "^6.0.3", | ||
| "mixpanel-browser": "^2.45.0", | ||
| "moment": "^2.30.1", |
There was a problem hiding this comment.
1. Unmet moment peer dependency 🐞 Bug ☼ Reliability
This PR removes the root moment dependency, but ion2-calendar (used in the app) declares moment as a peer dependency, which can cause npm install to fail under strict peer-deps and/or runtime crashes when calendar code tries to load moment. The codebase actively imports CalendarModule/CalendarModal from ion2-calendar, so this is likely user-impacting.
Agent Prompt
## Issue description
`moment` was removed from `package.json`, but `ion2-calendar` still requires it as a peer dependency. This can break dependency installation (strict peer dependency enforcement) and/or break calendar screens at runtime.
## Issue Context
- `ion2-calendar` is imported in `AppModule` and used by multiple pages.
- `package-lock.json` shows `ion2-calendar` declares `moment` as a peer dependency.
## Fix
Choose one:
1) Re-add `moment` to `dependencies` (and ensure `package-lock.json` is updated accordingly), OR
2) Upgrade/replace `ion2-calendar` with an alternative that does not require `moment`, and adjust the calendar usages.
## Fix Focus Areas
- package.json[57-65]
- package-lock.json[10062-10068]
- src/app/app.module.ts[69-123]
- src/app/pages/logged-in/leave-request/leave-request.page.ts[1-5]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
6de9a52 to
8ae9c00
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR removes the unused moment.js dependency from package.json and package-lock.json. It is a rebase of the clean PR BAWES-Universe#92 from BAWES-Universe/studenthub-staff.