Skip to content

Node / npm / TypeScript toolchain version の整合性を静的検査する #45

Description

@koh110

背景

Node version は Dockerfile / GitHub Actions / local development / type definitions 等の複数箇所に現れる。

これらを個別に更新すると、

  • CI は Node 24
  • Docker は Node 26
  • local は別 version
  • @types/node はさらに別 major

のような drift が発生しうる。

目的

repository が前提とする toolchain version を single source of truth にし、CI / container / local / type environment の不整合を機械的に検出する。

source of truth 候補

  • root package.json
    • engines.node
    • packageManager
  • .node-version
  • .nvmrc
  • project-specific toolchain config

どれを採用するかは実装時に1つへ統一する。

検査対象

Node

  • GitHub Actions setup-node
  • Dockerfile base image
  • root engines.node
  • local development version file
  • @types/node major

npm

  • packageManager
  • lockfile version
  • CI / Docker で利用する npm command

TypeScript

完全な version 統一ではなく、workspace ごとに意図しない major drift がないことを検査する。

必要なら Vite Plus / Next.js 等との compatibility も policy metadata に含める。

Acceptance Criteria

  • Node major の source of truth が1箇所に定義される
  • Actions / Docker / local の Node major 不一致を検出できる
  • @types/node の意図しない major drift を検出できる
  • npm package manager version を固定または明示できる
  • TypeScript major の workspace 間 drift を検出できる
  • toolchain update 時に1つの policy change としてレビューできる

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions