diff --git a/.github/workflows/draft-new-release.yml b/.github/workflows/draft-new-release.yml index 727e072c..be3a2f8d 100644 --- a/.github/workflows/draft-new-release.yml +++ b/.github/workflows/draft-new-release.yml @@ -84,4 +84,3 @@ jobs: github_token: ${{ secrets.PAT }} pr_title: 'chore(release): pulling ${{ steps.create-release.outputs.branch_name }} into master' pr_body: ':crown: *An automated PR*' - pr_reviewer: 'bardisg,MoumitaM' diff --git a/.github/workflows/publish-new-release.yml b/.github/workflows/publish-new-release.yml index b07ffa52..de8ddd45 100644 --- a/.github/workflows/publish-new-release.yml +++ b/.github/workflows/publish-new-release.yml @@ -60,7 +60,6 @@ jobs: github_token: ${{ secrets.PAT }} pr_title: 'chore(release): pulling master into develop post release v${{ steps.extract-version.outputs.release_version }}' pr_body: ':crown: *An automated PR*' - pr_reviewer: 'bardisg,MoumitaM' - name: Delete hotfix release branch uses: koj-co/delete-merged-action@master diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 99091060..036ac595 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,8 +33,19 @@ jobs: npm run test:ci npm run check:lint:ci + - name: Fix filesystem paths in generated reports + run: | + ./scripts/fix-reports-path-in-github-runner.sh + - name: SonarCloud Scan uses: SonarSource/sonarcloud-github-action@master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + with: + files: ./coverage/clover.xml diff --git a/.gitignore b/.gitignore index 2f60ed0f..9467203c 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ examples/**/package-lock.json .idea/ .DS_Store .eslintcache -.env \ No newline at end of file +.env +reports/ \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 55ae1fd5..740cf5fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [2.0.8](https://github.com/rudderlabs/rudder-sdk-node/compare/v2.0.7...v2.0.8) (2024-08-14) + + +### Bug Fixes + +* upgrade axios to a safe version ([#143](https://github.com/rudderlabs/rudder-sdk-node/issues/143)) ([bba0cd4](https://github.com/rudderlabs/rudder-sdk-node/commit/bba0cd43c9b219fb7205395c364dd5c5242f6e7f)) + ### [2.0.7](https://github.com/rudderlabs/rudder-sdk-node/compare/v2.0.6...v2.0.7) (2024-01-29) diff --git a/CODEOWNERS b/CODEOWNERS index 4be47d07..1b3abc49 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1 @@ -* @MoumitaM @bardisg \ No newline at end of file +* @MoumitaM @saikumarrs diff --git a/readme.md b/README.md similarity index 85% rename from readme.md rename to README.md index ca04d100..1dacc4e5 100644 --- a/readme.md +++ b/README.md @@ -1,6 +1,8 @@ +## [![Releases](https://img.shields.io/github/release/rudderlabs/rudder-sdk-node.svg)](https://github.com/rudderlabs/rudder-sdk-node/releases) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=rudderlabs_rudder-sdk-node&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=rudderlabs_rudder-sdk-node) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=rudderlabs_rudder-sdk-node&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=rudderlabs_rudder-sdk-node) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=rudderlabs_rudder-sdk-node&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=rudderlabs_rudder-sdk-node) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=rudderlabs_rudder-sdk-node&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=rudderlabs_rudder-sdk-node) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=rudderlabs_rudder-sdk-node&metric=coverage)](https://sonarcloud.io/summary/new_code?id=rudderlabs_rudder-sdk-node) +
diff --git a/examples/async-flush/package.json b/examples/async-flush/package.json index f563c9f8..82d53a45 100644 --- a/examples/async-flush/package.json +++ b/examples/async-flush/package.json @@ -9,6 +9,6 @@ "author": "", "license": "ISC", "dependencies": { - "@rudderstack/rudder-sdk-node": "^1.1.4" + "@rudderstack/rudder-sdk-node": "*" } } diff --git a/package-lock.json b/package-lock.json index 070acb37..e52a84b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,14 @@ { "name": "@rudderstack/rudder-sdk-node", - "version": "2.0.7", + "version": "2.0.8", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@rudderstack/rudder-sdk-node", - "version": "2.0.7", + "version": "2.0.8", "dependencies": { - "axios": "1.6.5", + "axios": "1.7.4", "axios-retry": "3.7.0", "component-type": "1.2.1", "join-component": "1.1.0", @@ -4153,11 +4153,12 @@ } }, "node_modules/axios": { - "version": "1.6.5", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz", - "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", + "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", + "license": "MIT", "dependencies": { - "follow-redirects": "^1.15.4", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -4166,6 +4167,7 @@ "version": "3.7.0", "resolved": "https://registry.npmjs.org/axios-retry/-/axios-retry-3.7.0.tgz", "integrity": "sha512-ZTnCkJbRtfScvwiRnoVskFAfvU0UG3xNcsjwTR0mawSbIJoothxn67gKsMaNAFHRXJ1RmuLhmZBzvyXi3+9WyQ==", + "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.15.4", "is-retry-allowed": "^2.2.0" @@ -6703,7 +6705,8 @@ "node_modules/component-type": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/component-type/-/component-type-1.2.1.tgz", - "integrity": "sha1-ikeQFwAjjk/DIml3EjAibyS0Fak=" + "integrity": "sha512-Kgy+2+Uwr75vAi6ChWXgHuLvd+QLD7ssgpaRq2zCvt80ptvAfMc/hijcJxXkBa2wMlEZcJvC2H8Ubo+A9ATHIg==", + "license": "MIT" }, "node_modules/concat-map": { "version": "0.0.1", @@ -13201,15 +13204,16 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.4", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", - "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", "url": "https://github.com/sponsors/RubenVerborgh" } ], + "license": "MIT", "engines": { "node": ">=4.0" }, @@ -31071,11 +31075,11 @@ "peer": true }, "axios": { - "version": "1.6.5", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz", - "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", + "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", "requires": { - "follow-redirects": "^1.15.4", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -33182,7 +33186,7 @@ "component-type": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/component-type/-/component-type-1.2.1.tgz", - "integrity": "sha1-ikeQFwAjjk/DIml3EjAibyS0Fak=" + "integrity": "sha512-Kgy+2+Uwr75vAi6ChWXgHuLvd+QLD7ssgpaRq2zCvt80ptvAfMc/hijcJxXkBa2wMlEZcJvC2H8Ubo+A9ATHIg==" }, "concat-map": { "version": "0.0.1", @@ -38079,9 +38083,9 @@ "dev": true }, "follow-redirects": { - "version": "1.15.4", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", - "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==" + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==" }, "for-each": { "version": "0.3.3", diff --git a/package.json b/package.json index 4928f9fa..23154d8c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rudderstack/rudder-sdk-node", - "version": "2.0.7", + "version": "2.0.8", "description": "Rudder Node SDK", "main": "./cjs/index.js", "module": "./esm/index.js", @@ -26,8 +26,8 @@ "build": "babel src/index.js --out-dir dist", "build:cjs": "tsc -p tsconfig.json --outDir ./dist/cjs --module commonjs", "build:esm": "tsc -p tsconfig.json", - "test": "AVA_MODE_ON=true nyc --reporter=lcov --reporter=html --reporter=text ava --serial --verbose > coverage.lcov", - "test:ci": "AVA_MODE_ON=true nyc --reporter=lcov --reporter=html --reporter=text ava --serial --verbose > coverage.lcov", + "test": "AVA_MODE_ON=true nyc --reporter=lcov --reporter=html --reporter=text --reporter=text-summary ava --serial --verbose", + "test:ci": "AVA_MODE_ON=true nyc --reporter=lcov --reporter=text --reporter=text-summary --reporter=clover ava --serial --verbose", "changelog": "auto-changelog -p -t keepachangelog -u true -l false --sort-commits date-desc ", "generateHistory": "auto-changelog -p -r origin --tag-prefix v --tag-pattern 'v(1.0.(0|[1-9]d*)|1.1.[0-4]|2.(0|[1-9]d*).(0|[1-9]d*))' -l false -o HISTORY.md -t keepachangelog", "check:lint": "eslint src", @@ -49,7 +49,7 @@ "analytics" ], "dependencies": { - "axios": "1.6.5", + "axios": "1.7.4", "axios-retry": "3.7.0", "component-type": "1.2.1", "join-component": "1.1.0", diff --git a/scripts/fix-reports-path-in-github-runner.sh b/scripts/fix-reports-path-in-github-runner.sh new file mode 100755 index 00000000..29a3f59c --- /dev/null +++ b/scripts/fix-reports-path-in-github-runner.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# Path variables +defaultPrefixToReplace="/github/workspace" +defaultAbsolutePathPrefix="home/runner/work/rudder-sdk-node/rudder-sdk-node" +selfHostedAbsolutePathPrefix="runner/_work/rudder-sdk-node/rudder-sdk-node" +absolutePathPrefix="$defaultAbsolutePathPrefix" + +# List of files to alter +echo "Replacing $absolutePathPrefix for reports" +sed -i "s+$absolutePathPrefix+$defaultPrefixToReplace+g" "coverage/lcov.info" +# For relative paths in lcov.info +sed -i "s+SF:$absolutePathPrefix/+SF:+g" "coverage/lcov.info" +sed -i "s+/$absolutePathPrefix+$defaultPrefixToReplace+g" "reports/eslint.json" diff --git a/sonar-project.properties b/sonar-project.properties index ef2ee3a4..602c19d8 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -6,12 +6,16 @@ sonar.qualitygate.wait=false sonar.projectKey=rudderlabs_rudder-sdk-node sonar.organization=rudderlabs sonar.projectName=rudder-sdk-node -sonar.projectVersion=2.0.7 +sonar.projectVersion=2.0.8 # Meta-data for the project sonar.links.scm=https://github.com/rudderlabs/rudder-sdk-node sonar.links.issue=https://github.com/rudderlabs/rudder-sdk-node/issues +# Path to reports +sonar.javascript.lcov.reportPaths=coverage/lcov.info +sonar.eslint.reportPaths=reports/eslint.json + # Path to sources sonar.sources=src sonar.inclusions=**/*.js