Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 14, 2025

The project used the monolithic googleapis package (112.0.0) which pulled in google-p12-pem and node-forge as transitive dependencies, creating security and maintenance concerns.

Changes

Dependencies:

  • Removed: googleapis (112.0.0)
  • Added: @googleapis/calendar (14.1.0) - specific API surface we actually use
  • Added: gaxios (7.1.3) - for GaxiosError handling (previously from googleapis-common)
  • Updated: google-auth-library → 10.5.0 (via googleapis-common 8.0.1)

Code:

  • Replaced google.calendar() with calendar() from @googleapis/calendar
  • Updated imports: googleapis-commongaxios for error handling
  • Updated type imports: calendar_v3 from @googleapis/calendar
  • Fixed GaxiosError mocks to include code property (required by gaxios)

Example migration:

// Before
import { google } from "googleapis";
const cal = google.calendar({ version: "v3", auth: client });

// After  
import { calendar } from "@googleapis/calendar";
const cal = calendar({ version: "v3", auth: client });

Impact

  • Removes google-p12-pem and node-forge from Google API dependency chain
  • Reduces bundle size by excluding unused Google APIs
  • All 333 backend tests passing
  • Zero security vulnerabilities (CodeQL clean)
Original prompt

This section details on the original issue you should resolve

<issue_title>Refactor dependencies: Remove googleapis and install only essential submodules</issue_title>
<issue_description>### Priority

High (would significantly improve my experience)

Feature Description

Update the project's dependencies by removing the monolithic googleapis library and installing only the necessary Google submodules required for the app. Specifically, install the following:

  • @googleapis/calendar
  • google-auth-library

Also, review the submodules listed at @googleapis/google-cloud-node for any other essential Google NodeJs submodule that should be included, instead of relying on the main googleapis package.

Use Case

This change will:

  • remove the node-forge - google-p12-pem depndency - build(deps): bump node-forge from 1.3.1 to 1.3.2 #1312
  • reduce unnecessary dependencies
  • remove the outdated google-p12-pem library
  • improve security
  • optimize the app footprint by including only the required Google APIs for our workspace.

Additional Context

  • Check https://github.com/googleapis/google-cloud-node for a comprehensive list of Google NodeJs submodules.
  • Ensure no needed functionality is lost when removing the main googleapis library.
  • Update all relevant code and documentation to use the new submodules instead of the full package.
  • Test Google API integrations after migration.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits December 14, 2025 23:03
Co-authored-by: victor-enogwe <23452630+victor-enogwe@users.noreply.github.com>
Co-authored-by: victor-enogwe <23452630+victor-enogwe@users.noreply.github.com>
Co-authored-by: victor-enogwe <23452630+victor-enogwe@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor dependencies to remove googleapis and install essential submodules Refactor: Replace monolithic googleapis with targeted @googleapis/calendar Dec 14, 2025
Copilot AI requested a review from victor-enogwe December 14, 2025 23:17
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.

Refactor dependencies: Remove googleapis and install only essential submodules

2 participants