fix: закрепить @types/node совместимой версией#640
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
PR фиксит падение сборки в CI/локально из‑за того, что @types/node приходил транзитивно в слишком новой версии (с синтаксисом, не парсящимся typescript@4.9.4). Решение — явно закрепить совместимую версию @types/node в пакете @bem-react/pack, где и возникает ошибка.
Changes:
- Добавлен явный
devDependencyна@types/node@18.19.130вpackages/pack, чтобы исключить подтягивание несовестимых версий@types/nodeчерез транзитивные зависимости.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI job
unitкрасный на каждом прогоне с февраля 2026, включая master: шагbuildпадает в@bem-react/packс парс-ошибками видаnode_modules/@types/node/ffi.d.ts(94,21): error TS1139.Причина.
@types/nodeнигде не запинен и приходит транзитивно (вpack— через@types/fs-extraс диапазоном*). Корневой.npmrcсодержитpackage-lock=false, поэтому вложенные лок-файлы игнорируются и ставится последний@types/node(сейчас 26.x). Егоffi.d.tsиспользуетconsttype parameters — синтаксис TypeScript 5.0+, которыйtypescript@4.9.4проекта не парсит.Что сделано. В
packages/pack/package.jsonдобавлен devDependency@types/node: 18.19.130— последняя версия линейки 18.x (совпадает с Node 18 из CI). Эмпирически проверено с tsc 4.9.4: линейки 18.x и 20.x парсятся чисто, 22.x/24.x/26.x — ломаются. В корне@types/nodeуже стабильно резолвится в 20.5.1 (точный пин внутри@commitlint/load), поэтому корневой package.json не трогали.Проверка. Локально на Node 18.20.2 (как в CI, setup-node@v3 с node-version 18): до фикса
npm i && npm run buildвоспроизводит те же ошибкиffi.d.ts; после фиксаnpm run build— 5 пакетов собираются успешно,CI=true npm run unit— 6 suites, 75 тестов, все зелёные.🤖 Generated with Claude Code