Skip to content

Comments

feat(toolkit-lib): notices can now target CDK app language#1160

Merged
mrgrain merged 7 commits intomainfrom
mrgrain/feat/toolkit-lib/filter-notices-by-language
Feb 20, 2026
Merged

feat(toolkit-lib): notices can now target CDK app language#1160
mrgrain merged 7 commits intomainfrom
mrgrain/feat/toolkit-lib/filter-notices-by-language

Conversation

@mrgrain
Copy link
Contributor

@mrgrain mrgrain commented Feb 19, 2026

This change enables CLI notices to target users based on the programming language of their CDK app.

The language is automatically detected by examining project files in the cdk.json directory (e.g. package.json with TypeScript indicators, requirements.txt, pom.xml, .csproj, go.mod). Detection is lazy and only runs when the fetched notice data actually contains language-* components, so there is no performance impact for existing notices.

A notice targeting TypeScript users would use a component like { name: "language-typescript", version: "*" }. The "Affected versions" line renders this as TypeScript apps rather than exposing the internal component name. Notice text can use {resolve:LANGUAGE} placeholders which resolve to properly cased names like "TypeScript" or ".NET".

If the language cannot be determined, language-specific notices are simply not shown.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

…guessLanguage utility that detects the CDK app language from\nproject files (package.json, requirements.txt, pom.xml, etc.).\nNotices can now target specific languages using component names\nlike language-typescript or language-python with version '*'.
@mrgrain mrgrain force-pushed the mrgrain/feat/toolkit-lib/filter-notices-by-language branch from 2d8d72d to 7f086f8 Compare February 19, 2026 20:09
@mrgrain mrgrain changed the title feat(toolkit-lib): filter notices by guessed CDK app language feat(toolkit-lib): filter notices by CDK app language Feb 19, 2026
@mrgrain mrgrain changed the title feat(toolkit-lib): filter notices by CDK app language feat(toolkit-lib): notices can now target CDK app language Feb 19, 2026
@codecov-commenter
Copy link

codecov-commenter commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.76%. Comparing base (44da006) to head (2011fa4).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1160      +/-   ##
==========================================
- Coverage   87.79%   87.76%   -0.03%     
==========================================
  Files          72       72              
  Lines       10133    10135       +2     
  Branches     1340     1337       -3     
==========================================
- Hits         8896     8895       -1     
- Misses       1212     1215       +3     
  Partials       25       25              
Flag Coverage Δ
suite.unit 87.76% <100.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

@mrgrain mrgrain added this pull request to the merge queue Feb 20, 2026
Merged via the queue into main with commit 3046f6f Feb 20, 2026
41 checks passed
@mrgrain mrgrain deleted the mrgrain/feat/toolkit-lib/filter-notices-by-language branch February 20, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants