[email protected] pins google-auth-library to exact "10.5.0" (was "^10.1.0"), breaking deduplication

オープン 初心者向け
#8,678 コメント 3 件 リアクション 3 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
nodejs, typescript
領域
tooling

調査の方向性

core/packages/nodejs-googleapis-common/package.json から始め、その google-auth-library エントリを release 8.0.1 および monorepo の現在のバージョンと比較します。migration commit 36277d77 で再固定された兄弟パッケージにも同じ問題があるか確認し、その後、説明されている googleapis と google-auth-library の型チェック再現手順を使って依存関係グラフを検証します。完了条件は、OAuth2Client 型のコピーが2つ存在しない、互換性のある重複排除ができることです。

索引モデルが issue の本文から書いたものです。

説明

Summary

[email protected] declares "google-auth-library": "10.5.0" — an exact version with no caret. The previous release, 8.0.1, used "^10.1.0". This prevents google-auth-library from deduplicating for any consumer that also depends on a newer google-auth-library directly, installing two copies.

Where it changed

The caret was dropped in the monorepo migration commit 36277d77 (PR #7606, "chore: google cloud node core migration"), which bulk-pinned sibling cross-dependencies to exact versions across core/packages/*. nodejs-googleapis-common was one of several affected — gaxios, gcp-metadata, etc. got the same treatment.

Current source: core/packages/nodejs-googleapis-common/package.json still shows "google-auth-library": "10.5.0".

Why it's a problem

The pin is already stale — the same monorepo ships [email protected]. A consumer that depends on google-auth-library@^10.7.0 directly and on googleapis (which pulls googleapis-common@^8.0.0 → 8.0.2) ends up with both 10.5.0 and 10.7.0 installed. In TypeScript this breaks compilation, because the two OAuth2Client classes are structurally incompatible (each declares a private redirectUri):

error TS2322: Type 'OAuth2Client' ([email protected]) is not assignable to
type 'OAuth2Client' ([email protected]).
  Types have separate declarations of a private property 'redirectUri'.
Repro

A package depending on googleapis@^173 and google-auth-library@^10.7.0, type-checking any use of google.auth.OAuth2 against google.drive(...).

Note

8.0.2 has no source changes vs 8.0.1 (no commits touched the package src/ between the two releases) — it appears to be a dependency-repinning/version-bump release, so the exact pin looks like an unintended artifact of the migration tooling rather than a deliberate constraint.

Expected

Restore a caret range for google-auth-library (e.g. ^10.1.0 or ^10.7.0) in googleapis-common, and ideally across the other siblings repinned in #7606.

主要言語
TypeScript
スター
3.2k
フォーク
732
平均マージ
2日 11時間
マージ済み PR(30日)
99

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

googleapis/google-cloud-node のほかの issue

googleapis/google-cloud-node の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。