Skip to content

Commit

Permalink
updating scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
crysmags committed Sep 26, 2024
1 parent 2c33208 commit 686b046
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
7 changes: 4 additions & 3 deletions packages/datadog-instrumentations/src/helpers/matrices.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
],
"range": [
"2.4.2 - 2.6.12",
"3.0.0 - 3.0.5",
"3.0.7 - 3.2.7",
"4.0.0 - 4.4.2"
],
Expand All @@ -29,7 +30,7 @@
},
"amqplib": {
"range": [
"0.5.0 - 0.10.4"
"0.5.3 - 0.10.4"
]
},
"@apollo/gateway": {
Expand Down Expand Up @@ -344,7 +345,7 @@
"4.6.4 - 4.13.21",
"5.0.0 - 5.13.22",
"6.0.0 - 6.13.3",
"7.0.0 - 7.8.1",
"7.0.0 - 7.8.2",
"8.0.0 - 8.6.3"
]
},
Expand Down Expand Up @@ -383,7 +384,7 @@
"openai": {
"range": [
"3.0.0 - 3.3.0",
"4.0.0 - 4.63.0"
"4.0.0 - 4.64.0"
]
},
"@opensearch-project/opensearch": {
Expand Down
7 changes: 4 additions & 3 deletions packages/datadog-instrumentations/src/helpers/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"node-versions": {
"16": [
"2.4.2 - 2.6.12",
"3.0.0 - 3.2.7",
"3.0.7 - 3.2.7",
"4.0.0 - 4.4.2"
],
Expand All @@ -29,7 +30,7 @@
"amqplib": {
"min-version": "0.5.0",
"range": [
"0.5.0 - 0.10.4"
"0.5.3 - 0.10.4"
]
},
"@apollo/gateway": {
Expand Down Expand Up @@ -386,7 +387,7 @@
"4.6.4 - 4.13.21",
"5.0.0 - 5.13.22",
"6.0.0 - 6.13.3",
"7.0.0 - 7.8.1",
"7.0.0 - 7.8.2",
"8.0.0 - 8.6.3"
]
},
Expand Down Expand Up @@ -430,7 +431,7 @@
"min-version": "3.0.0",
"range": [
"3.0.0 - 3.3.0",
"4.0.0 - 4.63.0"
"4.0.0 - 4.64.0"
]
},
"@opensearch-project/opensearch": {
Expand Down
10 changes: 5 additions & 5 deletions scripts/outdated.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ function makeAPR (branchName) {
execSync(`gh pr create --title ${title} --body ${body} --base master --head ${branchName} `)
}

function splitting (element) {
return +element.split('.')[0]
}

function maxVersion (range) {
if (typeof range === 'string') {
return range
Expand All @@ -77,7 +73,7 @@ async function updateRange (name, major) {
async function loopRange (name, range) {
for (let ele = 0; ele < range.length; ele++) {
const latest = range[ele].split(' - ')
const major = splitting(latest[0])
const major = +latest[0].split('.')[0]

latest[1] = await updateRange(name, major)
range[ele] = `${latest[0]} - ${latest[1]}`
Expand Down Expand Up @@ -173,5 +169,9 @@ async function ranges (name, minimum) {
return ranges
}

function splitting (element) {
return +element.split('.')[0]
}

if (process.argv.includes('fix')) fix()
else check()

0 comments on commit 686b046

Please sign in to comment.