Skip to content

Remove 6 unused packages#826

Open
bradystroud wants to merge 3 commits intomainfrom
remove-unused-packages
Open

Remove 6 unused packages#826
bradystroud wants to merge 3 commits intomainfrom
remove-unused-packages

Conversation

@bradystroud
Copy link
Copy Markdown
Member

Summary

  • Removed react-ga (replaced by gtag)
  • Removed react-youtube (not imported anywhere)
  • Removed history (not imported anywhere)
  • Removed to (not imported anywhere)
  • Removed update (not imported anywhere)
  • Removed 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

  • CI Gatsby build passes

🤖 Generated with Claude Code

- 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>
@bradystroud bradystroud force-pushed the remove-unused-packages branch from f73d06e to bd4ed7b Compare April 9, 2026 00:23
@bradystroud bradystroud enabled auto-merge (squash) April 9, 2026 00:28
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>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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) from package.json.
  • Adjust daysToGo calculation in src/helpers/eventHelper.js to 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'),
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

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

Copilot uses AI. Check for mistakes.
Comment thread package.json
Comment on lines 79 to 83
"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",
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
- 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>
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.

2 participants