Repository navigation
chore: clean up devDependencies, migrate CI to GitHub Actions - #262
Merged
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
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.
Почему
Все 19 открытых алертов Dependabot имели
scope: development— до потребителей библиотеки они не доходят, так какnpm installтянет толькоdependencies. Прод-зависимости чисты.Копились они потому, что security-обновления Dependabot падали с
security_update_not_possible: уязвимые пакеты транзитивные, а держали их устаревшие родители верхнего уровня, которые Dependabot трогать не вправе. Поэтому убираем родителей.Что сделано
jsdoc-to-markdownjsdoc-apiвторую полную копию jsdoc 3 — именно он был источникомtaffydbminamirequire("taffydb")при полностью пустыхdependencies, жил на хойстинге из jsdoc 3jsdoc^3.6.2→^4.0.5taffydbзаменён на@jsdoc/salty,markdown-itподнят до 14codecovjest --coveragenode-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/один в одинВне объёма
eslint8 → 9/10 (алертыminimatch,brace-expansion) — требует миграции на flat config, линтер только что стабилизирован в 1.9.5js-yaml@3изbabel-jest → istanbul → load-nyc-config— чинится только апстримомfiles/.npmignore— в npm-пакет уезжает весь репозиторий🤖 Generated with Claude Code