feat(toolkit-lib): notices can now target CDK app language#1160
Merged
feat(toolkit-lib): notices can now target CDK app language#1160
Conversation
…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 '*'.
2d8d72d to
7f086f8
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
rix0rrr
approved these changes
Feb 20, 2026
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.
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.jsonwith TypeScript indicators,requirements.txt,pom.xml,.csproj,go.mod). Detection is lazy and only runs when the fetched notice data actually containslanguage-*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 asTypeScript appsrather 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