Skip to content

chore: clean up devDependencies, migrate CI to GitHub Actions - #262

Merged
vmurin merged 1 commit into
masterfrom
chore/deps-cleanup-ci-migration
Aug 13, 2026
Merged

vmurin merged 1 commit into
masterfrom
chore/deps-cleanup-ci-migration

Conversation

@vmurin

@vmurin vmurin commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Почему

Все 19 открытых алертов Dependabot имели scope: development — до потребителей библиотеки они не доходят, так как npm install тянет только dependencies. Прод-зависимости чисты.

Копились они потому, что security-обновления Dependabot падали с security_update_not_possible: уязвимые пакеты транзитивные, а держали их устаревшие родители верхнего уровня, которые Dependabot трогать не вправе. Поэтому убираем родителей.

Что сделано

Пакет Действие Почему
jsdoc-to-markdown удалён Нигде не использовался, но тянул через jsdoc-api вторую полную копию jsdoc 3 — именно он был источником taffydb
minami удалён Шаблон доков: require("taffydb") при полностью пустых dependencies, жил на хойстинге из jsdoc 3
jsdoc ^3.6.2 → ^4.0.5 taffydb заменён на @jsdoc/salty, markdown-it поднят до 14
codecov удалён Deprecated самим вендором. Это только аплоадер — покрытие по-прежнему считает jest --coverage
node-fetch добавлен См. ниже

Из дерева исчезли: taffydb, lodash.pick, uuid, @tootallnate/once, js-yaml@3.
Обновились до безопасных: linkify-it → 5.0.2, markdown-it → 14.3.0.

Попутно вскрылся латентный дефект

fetch-mock объявляет node-fetch как опциональную peer-зависимость, а репозиторий её никогда не предоставлял. Тесты проходили только потому, что node-fetch случайно подтягивался через codecov → teeny-request. После удаления codecov две сюиты перестали запускаться. Зависимость объявлена явно, зафиксирована на линии v2 — v3 чисто ESM и сломала бы CommonJS-окружение jest.

Доки

Переход на встроенный шаблон jsdoc 4 выбран после фактической генерации обоих вариантов: он даёт идентичный список из 24 HTML-файлов и сохраняет вложенность out/react-native-azure-auth/<version>/. Поэтому ссылка из README на AzureAuth.html, скрипт scripts/jsdocs.js и внешние входящие ссылки продолжают работать. Внешний clean-jsdoc-theme был отвергнут именно потому, что ломает схему URL.

CI

CircleCI → GitHub Actions. Бейдж статуса в README сохранён (заменён на аналог GH Actions), добавлен бейдж покрытия. codecov.yml фиксирует пороги явно: project: auto с допуском 1%, patch: auto. Пороги подобраны от реальной базы в 64%, а не round number — жёсткий patch: 80% блокировал бы обычные PR.

⚠️ Перед мёржем

Нужно завести CODECOV_TOKEN в GitHub Secrets (значение — на codecov.io → Settings репозитория). Сейчас секретов в репозитории нет вообще, токен живёт только в CircleCI. Без него шаг выгрузки покрытия упадёт.

Проверено локально

  • Чистая установка с нуля (rm -rf node_modules && yarn install)
  • yarn lint — чисто
  • yarn test — 87 тестов, 7 сюит, все зелёные (исходный уровень)
  • yarn jsdoc:generate — отрабатывает, список файлов совпадает с текущим docs/ один в один
  • YAML всех трёх конфигов валиден

Вне объёма

  • eslint 8 → 9/10 (алерты minimatch, brace-expansion) — требует миграции на flat config, линтер только что стабилизирован в 1.9.5
  • js-yaml@3 из babel-jest → istanbul → load-nyc-config — чинится только апстримом
  • Отсутствие поля files/.npmignore — в npm-пакет уезжает весь репозиторий

🤖 Generated with Claude Code

All 19 open Dependabot alerts were development-scope, so none of them
ever reached consumers - `npm install` only pulls `dependencies`. The
reason they piled up is that Dependabot's security updates were failing
with `security_update_not_possible`: the vulnerable packages are
transitive and were pinned by outdated top-level parents it may not
touch.

Remove the parents instead:

- jsdoc-to-markdown: unused anywhere in the repo, yet pulled a whole
  second copy of jsdoc 3 via jsdoc-api. It was the actual source of
  taffydb.
- minami: doc template that require()s taffydb while declaring no
  dependencies at all, surviving only on hoisting from jsdoc 3. Replaced
  by jsdoc 4's built-in template, which generates a byte-for-byte
  identical file list (all 24 HTML files), so the README deep link to
  AzureAuth.html and scripts/jsdocs.js keep working.
- jsdoc 3 -> 4: drops taffydb for @jsdoc/salty, raises markdown-it to 14.
- codecov: deprecated by the vendor itself. It is only the uploader -
  coverage is still measured by `jest --coverage` and now uploaded by
  codecov-action.

Removing codecov exposed a latent defect: fetch-mock declares node-fetch
as an optional peer dependency and this repo never provided it. Tests
passed only because codecov's teeny-request happened to hoist it. Now
declared explicitly, pinned to the v2 line since v3 is ESM-only and
would break the CommonJS jest setup.

CI moves from CircleCI to GitHub Actions, keeping the README status
badge and adding a coverage badge. codecov.yml records the thresholds
explicitly (project auto/1%, patch auto), chosen against the actual
64% baseline rather than a round number that would block ordinary PRs.

Eliminated from the tree: taffydb, lodash.pick, uuid, @tootallnate/once,
js-yaml 3.x. Fixed in place: linkify-it 5.0.2, markdown-it 14.3.0.
@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.00%. Comparing base (e060a27) to head (bf124c2).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #262   +/-   ##
=======================================
  Coverage   64.00%   64.00%           
=======================================
  Files          14       14           
  Lines         439      439           
  Branches      118      118           
=======================================
  Hits          281      281           
  Misses        127      127           
  Partials       31       31           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vmurin
vmurin merged commit 2354370 into master Aug 13, 2026
3 of 5 checks passed
@vmurin
vmurin deleted the chore/deps-cleanup-ci-migration branch August 13, 2026 10:28
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.

1 participant