Skip to content

chore: remove moment.js dependency (rebased from #92)#1

Merged
gacorpoll-ui merged 0 commit into
masterfrom
pr/remove-momentjs
May 31, 2026
Merged

chore: remove moment.js dependency (rebased from #92)#1
gacorpoll-ui merged 0 commit into
masterfrom
pr/remove-momentjs

Conversation

@gacorpoll-ui

Copy link
Copy Markdown
Owner

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.

@qodo-code-review

Copy link
Copy Markdown

Review Summary by Qodo

Remove unused moment.js dependency

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Remove unused moment.js dependency from package.json
• Reduces bundle size and dependency footprint
• Cleans up unused imports and declarations
Diagram
flowchart LR
  A["package.json"] -- "remove moment ^2.30.1" --> B["Reduced dependencies"]

Loading

Grey Divider

File Changes

1. package.json Dependencies +0/-1

Remove moment.js from dependencies

• Removed moment.js dependency entry (version ^2.30.1)
• Reduces overall package dependencies and bundle size
• No code changes required as moment was not imported anywhere

package.json


Grey Divider

ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan

Qodo Logo

@qodo-code-review

qodo-code-review Bot commented May 31, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0)

Grey Divider


Action required

1. Unmet moment peer dependency 🐞 Bug ☼ Reliability
Description
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.
Code

package.json[62]

Evidence
After the PR, moment is no longer listed in root dependencies, while ion2-calendar explicitly
declares moment as a peer dependency and the application imports/uses ion2-calendar modules on
user-facing screens.

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]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## 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


Grey Divider

ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan

Qodo Logo

Comment thread package.json Outdated
"ion2-calendar": "^3.5.0",
"ionicons": "^6.0.3",
"mixpanel-browser": "^2.45.0",
"moment": "^2.30.1",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

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

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.

1 participant