Skip to content

Commit

Permalink
Merge branch 'develop' into chore.tvsquare_remove_config
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsSudip authored Apr 1, 2024
2 parents 28c9864 + 5fc8674 commit ca8dd3e
Show file tree
Hide file tree
Showing 112 changed files with 1,124 additions and 943 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/deploy-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ env:
jobs:
deploy-tag:
name: Deploy to NPM
runs-on: ubuntu-latest # this runner should not be changed due to NPM publish restrictions
# As we publish the NPM package with provenance, we need to only use the GitHub hosted runners
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/main') || github.event.pull_request.merged == true

steps:
Expand Down Expand Up @@ -71,7 +72,7 @@ jobs:
npm set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
npx nx release publish --base=${{ env.last_monorepo_version }} --head=${{ env.current_monorepo_version }}
- name: Send message to Slack channel for v3
- name: Send message to Slack channel
id: slack
uses: slackapi/[email protected]
env:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
run: |
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_PROD_CF_DISTRIBUTION_ID }} --paths "/adobe-analytics-js*"
- name: Sync files to S3 v3 folder
- name: Sync files to S3
run: |
aws s3 cp packages/analytics-js/dist/cdn/legacy/iife/ s3://${{ secrets.AWS_PROD_S3_BUCKET_NAME }}/v3/legacy/ --recursive --cache-control max-age=3600
aws s3 cp packages/analytics-js/dist/cdn/modern/iife/ s3://${{ secrets.AWS_PROD_S3_BUCKET_NAME }}/v3/modern/ --recursive --cache-control max-age=3600
Expand All @@ -107,7 +107,7 @@ jobs:
run: |
AWS_MAX_ATTEMPTS=10 aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_PROD_CF_DISTRIBUTION_ID }} --paths "/v3/*"
- name: Sync files to S3 v3 versioned folder
- name: Sync files to S3 versioned directory
run: |
aws s3 cp packages/analytics-js/dist/cdn/legacy/iife/ s3://${{ secrets.AWS_PROD_S3_BUCKET_NAME }}/${{ env.CURRENT_VERSION_VALUE }}/legacy/ --recursive --cache-control max-age=3600
aws s3 cp packages/analytics-js/dist/cdn/modern/iife/ s3://${{ secrets.AWS_PROD_S3_BUCKET_NAME }}/${{ env.CURRENT_VERSION_VALUE }}/modern/ --recursive --cache-control max-age=3600
Expand All @@ -119,7 +119,7 @@ jobs:
run: |
AWS_MAX_ATTEMPTS=10 aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_PROD_CF_DISTRIBUTION_ID }} --paths "/${{ env.CURRENT_VERSION_VALUE }}/*"
# TODO: The '/latest' folder is unused. Might be removed in future.
# TODO: The '/latest' directory is unused. Might be removed in future.
- name: Sync files to S3 latest
run: |
aws s3 cp packages/analytics-js-integrations/dist/cdn/modern/js-integrations/ s3://${{ secrets.AWS_PROD_S3_BUCKET_NAME }}/latest/modern/js-integrations/ --recursive --cache-control max-age=3600
Expand All @@ -134,7 +134,7 @@ jobs:
run: |
AWS_MAX_ATTEMPTS=10 aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_PROD_CF_DISTRIBUTION_ID }} --paths "/latest*"
- name: Send message to Slack channel v3
- name: Send message to Slack channel
id: slack
uses: slackapi/[email protected]
env:
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
# Below steps are for v1.1 SDK (legacy)

- name: Sync files to S3 v1.1 folder
- name: Sync files to S3 v1.1 directory
run: |
aws s3 cp packages/analytics-v1.1/dist/cdn/legacy/rudder-analytics.min.js s3://${{ secrets.AWS_PROD_S3_BUCKET_NAME }}/v1.1/rudder-analytics.min.js --cache-control max-age=3600
aws s3 cp packages/analytics-v1.1/dist/cdn/legacy/rudder-analytics.min.js.map s3://${{ secrets.AWS_PROD_S3_BUCKET_NAME }}/v1.1/rudder-analytics.min.js.map --cache-control max-age=3600
Expand All @@ -184,7 +184,7 @@ jobs:
run: |
AWS_MAX_ATTEMPTS=10 aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_PROD_CF_DISTRIBUTION_ID }} --paths "/v1.1*"
- name: Sync files to S3 v1.1 versioned folder
- name: Sync files to S3 v1.1 versioned directory
run: |
aws s3 cp packages/analytics-v1.1/dist/cdn/legacy/rudder-analytics.min.js s3://${{ secrets.AWS_PROD_S3_BUCKET_NAME }}/${{ env.CURRENT_VERSION_V1_VALUE }}/rudder-analytics.min.js --cache-control max-age=3600
aws s3 cp packages/analytics-v1.1/dist/cdn/legacy/rudder-analytics.min.js.map s3://${{ secrets.AWS_PROD_S3_BUCKET_NAME }}/${{ env.CURRENT_VERSION_V1_VALUE }}/rudder-analytics.min.js.map --cache-control max-age=3600
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,20 @@ jobs:
npm run build:browser
npm run build:browser:modern
- name: Sync files to S3 v3 staging folder
- name: Sync files to S3 staging directory
run: |
aws s3 cp packages/analytics-js/dist/cdn/legacy/iife/ s3://${{ secrets.AWS_PROD_S3_BUCKET_NAME }}/staging/latest/v3/legacy/ --recursive --cache-control max-age=3600
aws s3 cp packages/analytics-js/dist/cdn/modern/iife/ s3://${{ secrets.AWS_PROD_S3_BUCKET_NAME }}/staging/latest/v3/modern/ --recursive --cache-control max-age=3600
aws s3 cp packages/analytics-js-plugins/dist/cdn/modern/plugins/ s3://${{ secrets.AWS_PROD_S3_BUCKET_NAME }}/staging/latest/v3/modern/plugins/ --recursive --cache-control max-age=3600
aws s3 cp packages/analytics-js-integrations/dist/cdn/legacy/js-integrations/ s3://${{ secrets.AWS_PROD_S3_BUCKET_NAME }}/staging/latest/v3/legacy/js-integrations/ --recursive --cache-control max-age=3600
aws s3 cp packages/analytics-js-integrations/dist/cdn/modern/js-integrations/ s3://${{ secrets.AWS_PROD_S3_BUCKET_NAME }}/staging/latest/v3/modern/js-integrations/ --recursive --cache-control max-age=3600
- name: Create Cloudfront invalidation for v3
- name: Create Cloudfront invalidation
run: |
AWS_MAX_ATTEMPTS=10 aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_PROD_CF_DISTRIBUTION_ID }} --paths "/staging/latest/v3*"
# Below steps are for v1.1 SDK (legacy)
- name: Sync files to S3 v1.1 staging folder
- name: Sync files to S3 v1.1 staging directory
run: |
aws s3 cp packages/analytics-v1.1/dist/cdn/legacy/rudder-analytics.min.js s3://${{ secrets.AWS_STAGING_S3_BUCKET_NAME }}/staging/latest/v1.1/rudder-analytics.min.js --cache-control max-age=3600
aws s3 cp packages/analytics-v1.1/dist/cdn/legacy/rudder-analytics.min.js.map s3://${{ secrets.AWS_STAGING_S3_BUCKET_NAME }}/staging/latest/v1.1/rudder-analytics.min.js.map --cache-control max-age=3600
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/publish-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ env:
jobs:
release:
name: Publish new release
runs-on: [self-hosted, Linux, X64]
# For publishing GitHub release, we need to only use the GitHub hosted runners
runs-on: ubuntu-latest
# only merged pull requests must trigger this job
if: (startsWith(github.event.pull_request.head.ref, 'release/') || startsWith(github.event.pull_request.head.ref, 'hotfix-release/')) && github.event.pull_request.merged == true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
cache: 'npm'

- name: Execute bundle size checks
uses: rudderlabs/github-action-check-size-limit@v2.9.0
uses: rudderlabs/github-action-check-size-limit@v2.10.0
env:
HUSKY: 0
with:
Expand Down
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
* @saikumarrs @MoumitaM
* @rudderlabs/js-sdk
/packages/analytics-js-integrations/ @ItsSudip @shrouti1507 @sandeepdsvs @koladilip @mihir-4116
11 changes: 4 additions & 7 deletions examples/angular/sample-app/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,22 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<script>
window.RudderSnippetVersion = '3.0.1';
window.rudderanalytics = [];
var methods = [
'setDefaultInstanceKey',
'load',
'ready',
'page',
'track',
'identify',
'alias',
'group',
'ready',
'reset',
'getAnonymousId',
'setAnonymousId',
'getUserId',
'getUserTraits',
'getGroupId',
'getGroupTraits',
'startSession',
'endSession',
'getSessionId',
'consent'
];
for (var i = 0; i < methods.length; i++) {
var method = methods[i];
Expand Down
11 changes: 4 additions & 7 deletions examples/nextjs/hooks/sample-app/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,22 @@ export default function RootLayout({ children }: { children: React.ReactNode })
<head>
<Script id='bufferEvents'>
{`
window.RudderSnippetVersion = '3.0.1';
window.rudderanalytics = [];
var methods = [
'setDefaultInstanceKey',
'load',
'ready',
'page',
'track',
'identify',
'alias',
'group',
'ready',
'reset',
'getAnonymousId',
'setAnonymousId',
'getUserId',
'getUserTraits',
'getGroupId',
'getGroupTraits',
'startSession',
'endSession',
'getSessionId',
'consent'
];
for (var i = 0; i < methods.length; i++) {
var method = methods[i];
Expand Down
11 changes: 4 additions & 7 deletions examples/nextjs/js/sample-app/src/app/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,22 @@ export default function RootLayout({ children }) {
<head>
<Script id='bufferEvents'>
{`
window.RudderSnippetVersion = '3.0.1';
window.rudderanalytics = [];
var methods = [
'setDefaultInstanceKey',
'load',
'ready',
'page',
'track',
'identify',
'alias',
'group',
'ready',
'reset',
'getAnonymousId',
'setAnonymousId',
'getUserId',
'getUserTraits',
'getGroupId',
'getGroupTraits',
'startSession',
'endSession',
'getSessionId',
'consent'
];
for (var i = 0; i < methods.length; i++) {
var method = methods[i];
Expand Down
11 changes: 4 additions & 7 deletions examples/nextjs/page-router/sample-app/src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,22 @@ export default function Document() {
<Head>
<Script id='bufferEvents' strategy='beforeInteractive'>
{`
window.RudderSnippetVersion = '3.0.1';
window.rudderanalytics = [];
var methods = [
'setDefaultInstanceKey',
'load',
'ready',
'page',
'track',
'identify',
'alias',
'group',
'ready',
'reset',
'getAnonymousId',
'setAnonymousId',
'getUserId',
'getUserTraits',
'getGroupId',
'getGroupTraits',
'startSession',
'endSession',
'getSessionId',
'consent'
];
for (var i = 0; i < methods.length; i++) {
var method = methods[i];
Expand Down
11 changes: 4 additions & 7 deletions examples/nextjs/ts/sample-app/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,22 @@ export default function RootLayout({ children }: { children: React.ReactNode })
<head>
<Script id='bufferEvents'>
{`
window.RudderSnippetVersion = '3.0.1';
window.rudderanalytics = [];
var methods = [
'setDefaultInstanceKey',
'load',
'ready',
'page',
'track',
'identify',
'alias',
'group',
'ready',
'reset',
'getAnonymousId',
'setAnonymousId',
'getUserId',
'getUserTraits',
'getGroupId',
'getGroupTraits',
'startSession',
'endSession',
'getSessionId',
'consent'
];
for (var i = 0; i < methods.length; i++) {
var method = methods[i];
Expand Down
11 changes: 4 additions & 7 deletions examples/reactjs/hooks/sample-app/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,22 @@
-->
<title>React App</title>
<script>
window.RudderSnippetVersion = '3.0.1';
window.rudderanalytics = [];
var methods = [
'setDefaultInstanceKey',
'load',
'ready',
'page',
'track',
'identify',
'alias',
'group',
'ready',
'reset',
'getAnonymousId',
'setAnonymousId',
'getUserId',
'getUserTraits',
'getGroupId',
'getGroupTraits',
'startSession',
'endSession',
'getSessionId',
'consent'
];
for (var i = 0; i < methods.length; i++) {
var method = methods[i];
Expand Down
11 changes: 4 additions & 7 deletions examples/reactjs/js/sample-app/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,22 @@
-->
<title>React App</title>
<script>
window.RudderSnippetVersion = '3.0.1';
window.rudderanalytics = [];
var methods = [
'setDefaultInstanceKey',
'load',
'ready',
'page',
'track',
'identify',
'alias',
'group',
'ready',
'reset',
'getAnonymousId',
'setAnonymousId',
'getUserId',
'getUserTraits',
'getGroupId',
'getGroupTraits',
'startSession',
'endSession',
'getSessionId',
'consent'
];
for (var i = 0; i < methods.length; i++) {
var method = methods[i];
Expand Down
11 changes: 4 additions & 7 deletions examples/reactjs/ts/sample-app/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,22 @@
-->
<title>React App</title>
<script>
window.RudderSnippetVersion = '3.0.1';
window.rudderanalytics = [];
var methods = [
'setDefaultInstanceKey',
'load',
'ready',
'page',
'track',
'identify',
'alias',
'group',
'ready',
'reset',
'getAnonymousId',
'setAnonymousId',
'getUserId',
'getUserTraits',
'getGroupId',
'getGroupTraits',
'startSession',
'endSession',
'getSessionId',
'consent'
];
for (var i = 0; i < methods.length; i++) {
var method = methods[i];
Expand Down
11 changes: 4 additions & 7 deletions examples/reactjs/vite/sample-app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,22 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
<script>
window.RudderSnippetVersion = '3.0.1';
window.rudderanalytics = [];
var methods = [
'setDefaultInstanceKey',
'load',
'ready',
'page',
'track',
'identify',
'alias',
'group',
'ready',
'reset',
'getAnonymousId',
'setAnonymousId',
'getUserId',
'getUserTraits',
'getGroupId',
'getGroupTraits',
'startSession',
'endSession',
'getSessionId',
'consent'
];
for (var i = 0; i < methods.length; i++) {
var method = methods[i];
Expand Down
Loading

0 comments on commit ca8dd3e

Please sign in to comment.