Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: formatting changes #3002

Merged
merged 29 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ca66823
chore: prettier as a plugin in eslint & associated formatting updates
Jan 18, 2024
8fd10ef
chore: add verification action to check for linting & formatting errors
Jan 19, 2024
f42d2f0
chore: remove PR title check duplicate job
Jan 19, 2024
05ca07e
chore: add commands for lint:fix, lint & update lint command to use f…
Jan 19, 2024
34f577f
Merge branch 'develop' of github.com:rudderlabs/rudder-transformer in…
Jan 19, 2024
c7a9569
chore: lint command changes & add vscode editor settings to use prett…
Jan 20, 2024
ddd318b
chore: modify vscode settings
Jan 22, 2024
47b047c
Merge branch 'develop' of github.com:rudderlabs/rudder-transformer in…
Jan 22, 2024
96457bf
Merge branch 'develop' of github.com:rudderlabs/rudder-transformer in…
Feb 1, 2024
c1528de
chore: add commitlint workflow
Feb 1, 2024
bcb8aa6
Merge branch 'develop' of github.com:rudderlabs/rudder-transformer in…
Feb 5, 2024
dfbb83c
Merge branch 'develop' of github.com:rudderlabs/rudder-transformer in…
Feb 5, 2024
33b1d4a
chore: formatting updates - 2
Feb 5, 2024
3bfdb3d
fix: add missing user-deletion tests for iterable
Feb 6, 2024
7275b5d
fix: addition of custify user-deletion tests
Feb 7, 2024
4dc767a
Merge branch 'develop' of github.com:rudderlabs/rudder-transformer in…
Feb 7, 2024
3b1db74
Merge branch 'develop' of github.com:rudderlabs/rudder-transformer in…
Feb 12, 2024
1cfd84c
Merge branch 'develop' of github.com:rudderlabs/rudder-transformer in…
Feb 13, 2024
9df9f07
Merge branch 'develop' of github.com:rudderlabs/rudder-transformer in…
Feb 16, 2024
0b7238b
chore: formatting updates - 3
Feb 16, 2024
9aea52c
Merge branch 'develop' of github.com:rudderlabs/rudder-transformer in…
Feb 16, 2024
9af7201
chore: formatting updates - 4
Feb 16, 2024
b60573c
Merge branch 'develop' of github.com:rudderlabs/rudder-transformer in…
Feb 16, 2024
0594436
Merge branch 'develop' into chore.format-standard
koladilip Feb 20, 2024
d963897
fix: formatting src/cdk/v2/destinations/bluecore/procWorkflow.yaml
koladilip Feb 20, 2024
6418d7b
Merge branch 'develop' of github.com:rudderlabs/rudder-transformer in…
Feb 22, 2024
fe4fcea
Merge branch 'develop' of github.com:rudderlabs/rudder-transformer in…
Feb 26, 2024
9cb5fec
fix: formatting - 2
Feb 26, 2024
37d3e80
Merge branch 'develop' of github.com:rudderlabs/rudder-transformer in…
Feb 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"airbnb-base",
"airbnb-typescript/base",
"plugin:sonarjs/recommended",
"prettier",
"plugin:json/recommended",
"plugin:@typescript-eslint/recommended"
"plugin:@typescript-eslint/recommended",
"prettier"
],
"plugins": ["@typescript-eslint", "unicorn"],
"globals": {},
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-push-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
if: ${{ inputs.build_type == 'dt' }}
run: |
docker buildx imagetools create -t rudderstack/rudder-transformer:latest ${{ inputs.push_tags }}-amd64 ${{ inputs.push_tags }}-arm64

- name: Create latest ut multi-arch manifest
# To be triggered only for release/hotfix PR merges coming from `prepare-for-prod-ut-deploy.yaml`
if: ${{ inputs.build_type == 'ut' }}
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Commitlint

on: [push]

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0

- name: Setup Node
uses: actions/[email protected]
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install Dependencies
run: npm ci

- name: Print versions
run: |
git --version
node --version
npm --version
npx commitlint --version

# Run the commitlint action, considering its own dependencies and yours as well 🚀
# `github.workspace` is the path to your repository.
- uses: wagoid/commitlint-github-action@v5
env:
NODE_PATH: ${{ github.workspace }}/node_modules
with:
commitDepth: 1
4 changes: 1 addition & 3 deletions .github/workflows/component-test-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Uplaod Report to S3
run: |
aws s3 cp ./test_reports/ s3://test-integrations-dev/integrations-test-reports/rudder-transformer/${{ github.event.number }}/ --recursive

- name: Add Test Report Link as Comment on PR
uses: actions/github-script@v7
with:
Expand Down Expand Up @@ -75,5 +75,3 @@ jobs:
issue_number: prNumber,
body: commentBody
});


1 change: 0 additions & 1 deletion .github/workflows/prepare-for-staging-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ jobs:
secrets:
DOCKERHUB_PROD_TOKEN: ${{ secrets.DOCKERHUB_PROD_TOKEN }}


create-pull-request:
name: Update Helm Charts For Staging and Create Pull Request
runs-on: ubuntu-latest
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Verify

on:
pull_request:

jobs:
formatting-lint:
name: Check for formatting & lint errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/[email protected]
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}

- name: Setup Node
uses: actions/[email protected]
with:
node-version-file: .nvmrc
cache: 'npm'

- name: Install Dependencies
run: npm ci

- name: Run Lint Checks
run: |
npm run lint

- run: git diff --exit-code

- name: Error message
if: ${{ failure() }}
run: |
echo 'Eslint check is failing Ensure you have run `npm run lint` and committed the files locally.'
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ test/**/*.js
!test/**/data.js
src/util/lodash-es-core.js
src/util/url-search-params.min.js
dist
24 changes: 24 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"prettier.requireConfig": true,
"prettier.configPath": ".prettierrc",
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"editor.codeActionsOnSave": {
"source.organizeImports": "never"
},
"eslint.validate": ["javascript", "typescript"]
}
91 changes: 84 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"setup": "npm ci",
"setup:swagger": "swagger-cli bundle swagger/api.yaml --outfile dist/swagger.json --type json",
"format": "prettier --write .",
"lint": "eslint . || exit 0",
"lint:fix": "eslint . --fix",
"lint:fix:json": "eslint --ext .json --fix .",
"lint": "npm run format && npm run lint:fix",
"check:merge": "npm run verify || exit 1; codecov",
"start": "cd dist;node ./src/index.js;cd ..",
"build:start": "npm run build && npm run start",
Expand Down Expand Up @@ -135,9 +135,10 @@
"eslint": "^8.40.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-json": "^3.1.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-sonarjs": "^0.19.0",
"eslint-plugin-unicorn": "^46.0.1",
"glob": "^10.3.3",
Expand All @@ -150,7 +151,7 @@
"madge": "^6.1.0",
"mocked-env": "^1.3.5",
"node-notifier": "^10.0.1",
"prettier": "^2.8.8",
"prettier": "^3.2.4",
"semver": "^7.5.3",
"standard-version": "^9.5.0",
"supertest": "^6.3.3",
Expand Down
5 changes: 3 additions & 2 deletions src/adapters/networkHandlerFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ SUPPORTED_VERSIONS.forEach((version) => {
// },
// generic: GenericNetworkHandler,
// }
handlers[version][dest] =
require(`../${version}/destinations/${dest}/networkHandler`).networkHandler;
handlers[version][dest] = require(
`../${version}/destinations/${dest}/networkHandler`,
).networkHandler;
} catch {
// Do nothing as exception indicates
// network handler is not defined for that destination
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ steps:
const response = $.defaultRequestConfig();
response.body.JSON = payload;
response
)
)
13 changes: 5 additions & 8 deletions src/cdk/v2/destinations/fullstory/procWorkflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ bindings:
exportAll: true
- name: removeUndefinedAndNullValues
path: ../../../../v0/util

steps:
- name: validateInput
template: |
Expand All @@ -28,7 +28,7 @@ steps:
$.context.payload.uid = .message.userId;
$.context.payload.email = .message.context.traits.email;
$.context.payload.display_name = .message.context.traits.name;

- name: trackPayload
condition: $.context.messageType == "track"
template: |
Expand All @@ -42,9 +42,9 @@ steps:
condition: $.context.messageType == "track"
template: |
$.assert(.message.event, "event is required for track call")

- name: mapContextFieldsForTrack
condition: $.context.messageType == "track"
condition: $.context.messageType == "track"
template: |
$.context.payload.context.browser = {
"url": .message.context.page.url,
Expand All @@ -67,7 +67,7 @@ steps:
"region": .message.properties.region,
"country": .message.properties.country,
};

- name: mapIdsForTrack
condition: $.context.messageType == "track"
template: |
Expand Down Expand Up @@ -99,6 +99,3 @@ steps:
"params": {},
"files": {}
})



Loading
Loading