Cleaned up final phantom-dep findings in knip#27952
Conversation
Closes out the unlisted-dependencies tail surfaced after PR #27948: - ghost/core/core/server/services/i18n.js: dropped the '/** @type {import("i18next").i18n} */' annotation. i18next isn't a declared dep of ghost/core and adding it just for a type ref isn't warranted -- the variable holds the result of require('@tryghost/i18n'), Ghost's own wrapper. - ghost/core/core/shared/sentry-knex-tracing-integration.js: removed the '@typedef SentryIntegration' and '@implements' annotations. The 'Integration' type is only exported from '@sentry/types', which isn't a direct dep of ghost/core (only '@sentry/node' is). Replaced with a prose comment explaining the interface relationship. - knip.json: added an ignore glob for the built theme bundles in ghost/core/test/utils/fixtures/themes/**/assets/built/**. Knip was scanning those minified theme fixture files and treating their internal 'ev-emitter' references as unresolved imports -- false positives. After this change, 'pnpm knip --include=unlisted' reports 0 findings.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
💤 Files with no reviewable changes (1)
WalkthroughThis PR contains three independent updates across the Ghost codebase. The i18n service module adds debug logging infrastructure for locale change events. The Sentry Knex tracing integration updates its type annotation documentation to clarify dependency constraints rather than using implicit type inference. The Knip configuration is updated to exclude compiled theme fixture assets from static analysis. All changes are localized, low-complexity updates with no alterations to public API surfaces. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Closes out the unlisted-dependencies tail surfaced after PR #27948. After this PR,
pnpm knip --include=unlistedreports 0 findings.i18n.js: dropped the/** @type {import('i18next').i18n} */annotation.i18nextisn't a declared dep ofghost/coreand adding it just for a type ref isn't warranted — the variable holdsrequire('@tryghost/i18n'), Ghost's own wrapper.sentry-knex-tracing-integration.js: removed the@typedef SentryIntegrationand@implementsannotations. TheIntegrationtype is only exported from@sentry/types, which isn't a direct dep ofghost/core(only@sentry/nodeis). Replaced with a prose comment.knip.json: added an ignore glob forghost/core/test/utils/fixtures/themes/**/assets/built/**. Knip was scanning the minified theme fixture bundles and treating their internalev-emitterreferences as unresolved imports — false positives.Test plan
pnpm knip --include=unlistedreturns 0 findings