Skip to content

Commit 1e0dc55

Browse files
authored
chore: update supported-configurations.json to v2 and data (#7338)
This adds the v2 format for supported-configurations.json. On top of that, it creates defaults from that file instead of having to have a separate list for that. Only some entries remain that are needed as fallback until user values are handled the same. The official programmatic documentation (index.d.ts) now contains references to the environment variables that can be used as alternative.
1 parent 4946ada commit 1e0dc55

26 files changed

Lines changed: 4645 additions & 827 deletions

File tree

.gitlab-ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ stages:
88
- macrobenchmarks-notify
99

1010
# Config Registry CI jobs
11-
validate_supported_configurations_local_file:
12-
extends: .validate_supported_configurations_local_file
11+
validate_supported_configurations_v2_local_file:
12+
extends: .validate_supported_configurations_v2_local_file
1313
variables:
1414
LOCAL_JSON_PATH: "packages/dd-trace/src/config/supported-configurations.json"
15+
BACKFILLED: "true"
1516

16-
update_central_configurations_version_range:
17-
extends: .update_central_configurations_version_range
17+
update_central_configurations_version_range_v2:
18+
extends: .update_central_configurations_version_range_v2
1819
variables:
1920
LOCAL_REPO_NAME: "dd-trace-js"
2021
LOCAL_JSON_PATH: "packages/dd-trace/src/config/supported-configurations.json"

eslint-rules/eslint-env-aliases.mjs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,17 @@ const supportedConfigsPath = path.resolve(
88
path.dirname(__filename),
99
'../packages/dd-trace/src/config/supported-configurations.json'
1010
)
11-
const { aliases } = JSON.parse(fs.readFileSync(supportedConfigsPath, 'utf8'))
11+
const { supportedConfigurations } = JSON.parse(fs.readFileSync(supportedConfigsPath, 'utf8'))
1212

1313
const aliasToCanonical = {}
14-
for (const canonical of Object.keys(aliases)) {
15-
for (const alias of aliases[canonical]) {
16-
aliasToCanonical[alias] = canonical
14+
for (const [canonical, entries] of Object.entries(supportedConfigurations)) {
15+
for (const entry of entries) {
16+
if (entry.aliases && !entry.deprecated) {
17+
for (const alias of entry.aliases) {
18+
aliasToCanonical[alias] ??= []
19+
aliasToCanonical[alias].push(canonical)
20+
}
21+
}
1722
}
1823
}
1924

0 commit comments

Comments
 (0)