Remove 6 unused packages#826
Conversation
- react-ga (replaced by gtag) - react-youtube (not imported anywhere) - history (not imported anywhere) - to (not imported anywhere) - update (not imported anywhere) - babel-eslint (superseded by @babel/eslint-parser) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
f73d06e to
bd4ed7b
Compare
Removed unused packages: react-ga, react-youtube, history, to, update, babel-eslint Fixed moment.js deprecation warning by adding format specifier to moment() calls in eventHelper.js that were parsing 'DD MMM YYYY' strings without a format, causing fallback to unreliable Date(). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR aims to reduce dependency bloat by removing several unused packages from the project’s package.json, but it also includes an unrelated runtime logic change in eventHelper.js.
Changes:
- Remove unused dependencies (
react-ga,react-youtube,history,to,update) and devDependency (babel-eslint) frompackage.json. - Adjust
daysToGocalculation insrc/helpers/eventHelper.jsto parse dates using an explicit Moment format.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/helpers/eventHelper.js |
Changes Moment date parsing for the daysToGo calculation (behavioral/runtime change). |
package.json |
Removes several declared dependencies/devDependencies as part of package cleanup. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| endDateTime: endDateTime, | ||
| isSameDay: startdatetime === endDateTime, | ||
| daysToGo: moment(startdatetime).diff(moment(today), 'days'), | ||
| daysToGo: moment(startdatetime, 'DD MMM YYYY').diff(moment(today, 'DD MMM YYYY'), 'days'), |
There was a problem hiding this comment.
This PR is titled/described as a dependency-cleanup, but this hunk changes runtime behavior in mapEvent() (Moment parsing for daysToGo). Please either (a) drop this change from the dependency-removal PR, or (b) update the PR description to explain the behavioral fix and why it’s needed (and ideally add coverage / verification steps for it).
| "react-jotform": "^1.0.2", | ||
| "react-lazy-youtube": "^1.0.1", | ||
| "react-pose": "^4.0.10", | ||
| "react-responsive-modal": "^6.4.2", | ||
| "react-youtube": "^10.1.0", | ||
| "ssw.megamenu": "^4.13.8", |
There was a problem hiding this comment.
Removing the direct react-youtube dependency doesn’t actually remove react-youtube from the install, because react-lazy-youtube depends on it (transitively). If the goal is to eliminate react-youtube entirely (for supply-chain / footprint reasons), you’ll need to also replace/remove react-lazy-youtube or switch to a different embed solution.
- Add explicit schema types for CrmDataCollection and SkillUrls so Gatsby registers them even when no CRM data is fetched - Skip CRM data fetch when credentials are missing instead of crashing - Use optional chaining in createPages for CRM-dependent data Local builds now work without CRM_APP_ID/CRM_APP_SECRET env vars, generating pages from markdown and sample data only. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
react-ga(replaced by gtag)react-youtube(not imported anywhere)history(not imported anywhere)to(not imported anywhere)update(not imported anywhere)babel-eslint(superseded by@babel/eslint-parser)Verified none of these are imported or referenced in code, configs, or gatsby-node/gatsby-config.
Test plan
🤖 Generated with Claude Code