Skip to content

Commit

Permalink
chore(release): pulling v3-release/3.0.0-beta.6 into main (#1353)
Browse files Browse the repository at this point in the history
  • Loading branch information
saikumarrs authored Aug 31, 2023
2 parents 113aa29 + 9e4e2bc commit a0c227a
Show file tree
Hide file tree
Showing 315 changed files with 8,549 additions and 11,998 deletions.
6 changes: 3 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ cdnSDKv3.js
*.md
*.d.ts
*.config.js
examples/chrome-extension/background-script/rudderAnalytics.js
examples/chrome-extension/background-script-websockets/rudderAnalytics.js
examples/chrome-extension/content-script/foreground.js
examples/chrome-extension/**/rudderAnalytics.js
examples/chrome-extension/**/foreground.js
testBookSuites/
tsconfig.build.tsbuildinfo
nativeSdkLoader.js
nativeSdkLoader.ts
assets/
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Please include a summary of the change along with the relevant motivation and context.

## Notion ticket
## Linear task (optional)

Ticket link
Linear task link

## Cross Browser Tests

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-quality-checks-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build & Code Quality Checks v3

on:
pull_request:
branches: ['develop', 'main']
branches: ['develop', 'main', 'v3-hotfix/*']
types: ['opened', 'reopened', 'synchronize']

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-quality-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build & Code Quality Checks v1.1

on:
pull_request:
branches: ['production', 'production-staging']
branches: ['production', 'production-staging', 'hotfix/*']
types: ['opened', 'reopened', 'synchronize']

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check_pr_title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: Check PR title

on:
pull_request:
branches: [ 'main', 'develop', 'production', 'production-staging']
branches: [ 'main', 'develop', 'production', 'production-staging', 'hotfix/*', 'v3-hotfix/*']
types: ['opened', 'reopened', 'edited', 'synchronize']

jobs:
check_pr_title:
name: Check PR title
runs-on: ubuntu-latest
steps:
- name: Checkout source branch
- name: Checkout
uses: actions/checkout@v3

- name: Check PR title
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-beta-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
role-to-assume: arn:aws:iam::${{ secrets.AWS_PROD_ACCOUNT_ID }}:role/${{ secrets.AWS_PROD_S3_SYNC_ROLE }}
aws-region: us-east-1

- name: Checkout source branch
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
role-to-assume: arn:aws:iam::${{ secrets.AWS_PROD_ACCOUNT_ID }}:role/${{ secrets.AWS_PROD_S3_SYNC_ROLE }}
aws-region: us-east-1

- name: Checkout source branch
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-dev-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
role-to-assume: arn:aws:iam::${{ secrets.AWS_DEV_ACCOUNT_ID }}:role/${{ secrets.AWS_DEV_S3_SYNC_ROLE }}
aws-region: us-east-1

- name: Checkout source branch
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
role-to-assume: arn:aws:iam::${{ secrets.AWS_DEV_ACCOUNT_ID }}:role/${{ secrets.AWS_DEV_S3_SYNC_ROLE }}
aws-region: us-east-1

- name: Checkout source branch
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-npm-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/main') || github.event.pull_request.merged == true
steps:
- name: Checkout source branch
- name: Checkout
uses: actions/checkout@v3

- name: Get new version number
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
uses: slackapi/[email protected]
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
PROJECT_NAME: 'JS SDK 1.1 NPM Package'
PROJECT_NAME: 'JS SDK v1.1 NPM Package'
NPM_PACKAGE_URL: 'https://www.npmjs.com/package/rudder-sdk-js'
with:
channel-id: ${{ secrets.SLACK_RELEASE_CHANNEL_ID }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/production') || github.event.pull_request.merged == true
steps:
- name: Checkout source branch
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-prod-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
role-to-assume: arn:aws:iam::${{ secrets.AWS_PROD_ACCOUNT_ID }}:role/${{ secrets.AWS_PROD_S3_SYNC_ROLE }}
aws-region: us-east-1

- name: Checkout source branch
- name: Checkout
uses: actions/checkout@v3

- name: Get new version number
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
role-to-assume: arn:aws:iam::${{ secrets.AWS_PROD_ACCOUNT_ID }}:role/${{ secrets.AWS_PROD_S3_SYNC_ROLE }}
aws-region: us-east-1

- name: Checkout source branch
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
Expand Down Expand Up @@ -87,6 +87,11 @@ jobs:
aws s3 cp public/list_integration_sdks.html s3://${{ secrets.AWS_PROD_S3_BUCKET_NAME }}/latest/modern/list_integration_sdks.html --cache-control max-age=3600
AWS_MAX_ATTEMPTS=10 aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_PROD_CF_DISTRIBUTION_ID }} --paths "/latest*"
- name: Sync assets to S3
run: |
aws s3 cp assets/integrations/AdobeAnalytics/ s3://${{ secrets.AWS_PROD_S3_BUCKET_NAME }}/adobe-analytics-js --recursive --cache-control max-age=3600
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_PROD_CF_DISTRIBUTION_ID }} --paths "/adobe-analytics-js*"
- name: Send message to Slack channel
id: slack
uses: slackapi/[email protected]
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/deploy-sanity-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
role-to-assume: arn:aws:iam::${{ secrets.AWS_PROD_ACCOUNT_ID }}:role/${{ secrets.AWS_PROD_S3_SYNC_ROLE }}
aws-region: us-east-1

- name: Checkout source branch
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
Expand All @@ -39,6 +39,7 @@ jobs:
WRITE_KEY: ${{ secrets.SANITY_SUITE_WRITE_KEY }}
FEATURE_PRELOAD_BUFFER_WRITE_KEY: ${{ secrets.SANITY_SUITE_FEATURE_PRELOAD_BUFFER_WRITE_KEY }}
FEATURE_EVENT_FILTERING_WRITE_KEY: ${{ secrets.SANITY_SUITE_FEATURE_EVENT_FILTERING_WRITE_KEY }}
FEATURE_DATA_RESIDENCY_WRITE_KEY: ${{ secrets.SANITY_SUITE_FEATURE_DATA_RESIDENCY_WRITE_KEY }}
DATAPLANE_URL: ${{ secrets.SANITY_SUITE_DATAPLANE_URL }}
CONFIG_SERVER_HOST: ${{ secrets.SANITY_SUITE_CONFIG_SERVER_HOST }}
HUSKY: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-staging-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
role-to-assume: arn:aws:iam::${{ secrets.AWS_STAGING_ACCOUNT_ID }}:role/${{ secrets.AWS_STAGING_S3_SYNC_ROLE }}
aws-region: us-east-1

- name: Checkout source branch
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
role-to-assume: arn:aws:iam::${{ secrets.AWS_STAGING_ACCOUNT_ID }}:role/${{ secrets.AWS_STAGING_S3_SYNC_ROLE }}
aws-region: us-east-1

- name: Checkout source branch
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/draft-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/heads/production-staging') || startsWith(github.ref, 'refs/heads/hotfix/')
steps:
- name: Checkout source branch
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-new-release-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
PROJECT_NAME: 'JS SDK (v3) monorepo'
RELEASES_URL: 'https://github.com/rudderlabs/rudder-sdk-react-native/compare/'
RELEASES_URL: 'https://github.com/rudderlabs/rudder-sdk-js/compare/'
with:
channel-id: ${{ secrets.SLACK_RELEASE_CHANNEL_ID }}
payload: |
Expand All @@ -126,7 +126,7 @@ jobs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Release: <${{env.RELEASES_URL}}${{ steps.extract-previous-version.outputs.previous_version }}...v${{ steps.extract-version.outputs.release_version }}|v${{ steps.extract-version.outputs.release_version }}>*\n${{ env.DATE }}"
"text": "*Release: <${{env.RELEASES_URL}}${{ env.last_version }}...v${{ steps.extract-version.outputs.release_version }}|v${{ steps.extract-version.outputs.release_version }}>*\n${{ env.DATE }}"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rollback-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ jobs:
}
- name: Send message to Slack channel
id: slack
id: slack-v1dot1
uses: slackapi/[email protected]
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
push:
branches: ['main', 'develop']
pull_request:
branches: ['main', 'develop']
branches: ['main', 'develop', 'v3-hotfix/*']
types: ['opened', 'reopened', 'synchronize']

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
push:
branches: ['production', 'production-staging']
pull_request:
branches: ['production', 'production-staging']
branches: ['production', 'production-staging', 'hotfix/*']
types: ['opened', 'reopened', 'synchronize']

jobs:
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
sed -i 's+/home/runner/work/rudder-sdk-js/rudder-sdk-js+/github/workspace+g' reports/eslint.json
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@v1.9
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
60 changes: 60 additions & 0 deletions __tests__/integrations/Mixpanel/browser.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/* eslint-disable no-underscore-dangle */
import { Mixpanel } from '../../../src/integrations/Mixpanel';

describe('Mixpanel init tests', () => {
let mixpanel;

beforeEach(() => {
window.mixpanel = {};
});

test('Persistence type is missing', () => {
mixpanel = new Mixpanel({ persistence: 'none' }, { logLevel: 'debug' });
mixpanel.init();
expect(window.mixpanel._i[0][1]).toEqual({
cross_subdomain_cookie: false,
secure_cookie: false,
persistence: 'cookie',
});
});

test('Persistence type is cookie', () => {
mixpanel = new Mixpanel(
{ persistenceType: 'cookie', persistenceName: '' },
{ logLevel: 'debug' },
);
mixpanel.init();
expect(window.mixpanel._i[0][1]).toEqual({
cross_subdomain_cookie: false,
secure_cookie: false,
persistence: 'cookie',
});
});

test('Persistence type is localStorage and Persistence name is non empty', () => {
mixpanel = new Mixpanel(
{ persistenceType: 'localStorage', persistenceName: 'abc' },
{ logLevel: 'debug' },
);
mixpanel.init();
expect(window.mixpanel._i[0][1]).toEqual({
cross_subdomain_cookie: false,
secure_cookie: false,
persistence: 'localStorage',
persistence_name: 'abc',
});
});

test('Persistence type is none', () => {
mixpanel = new Mixpanel(
{ persistenceType: 'none', persistenceName: '' },
{ logLevel: 'debug' },
);
mixpanel.init();
expect(window.mixpanel._i[0][1]).toEqual({
cross_subdomain_cookie: false,
secure_cookie: false,
disable_persistence: true,
});
});
});
Loading

0 comments on commit a0c227a

Please sign in to comment.