Skip to content

Commit

Permalink
chore(release): pull release/3.21.0 into main (#1788)
Browse files Browse the repository at this point in the history
  • Loading branch information
MoumitaM authored Jul 22, 2024
2 parents d2e8846 + d55e933 commit b284617
Show file tree
Hide file tree
Showing 124 changed files with 4,268 additions and 2,554 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/deploy-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_call:
inputs:
is_called:
type: boolean
type: string
required: true
secrets:
RS_PROD_BUGSNAG_API_KEY:
Expand Down Expand Up @@ -74,6 +74,14 @@ jobs:
run: |
npm run setup:ci
- name: Build release artifacts
env:
BUGSNAG_API_KEY: ${{ secrets.RS_PROD_BUGSNAG_API_KEY }}
BUGSNAG_RELEASE_STAGE: 'production'
run: |
npm run build:package
npm run build:package:modern
- name: Get the two latest monorepo versions
run: |
CURRENT_VERSION=$(git tag -l "v3*" --sort=-version:refname | head -n 1)
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/draft-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ jobs:
npm run bump-version:monorepo
npx replace $CURRENT_VERSION_VALUE $NEW_VERSION_VALUE sonar-project.properties
npm run clean
npm run setup
git add .
git commit -m "chore(monorepo): sync versions and generate release logs" -n
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ jobs:
name: Publish packages to NPM
uses: ./.github/workflows/deploy-npm.yml
with:
is_called: true
is_called: 'true'
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
RS_PROD_BUGSNAG_API_KEY: ${{ secrets.RS_PROD_BUGSNAG_API_KEY }}
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/security-code-quality-and-bundle-size-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
install_script: setup:ci
build_script: check:size:build
clean_script: clean
script: npm run check:size:json:ci --silent -- --output-style=static --silent=true --exclude=@rudderstack/analytics-js-sanity-suite,@rudderstack/analytics-js-loading-scripts
script: npm run check:size:json:ci --silent -- --output-style=static --silent=true --exclude=@rudderstack/analytics-js-sanity-suite
is_monorepo: true

security-code-quality-checks:
Expand All @@ -41,6 +41,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v4
Expand All @@ -56,12 +58,20 @@ jobs:
- name: Execute code quality checks
run: |
npm run check:circular
npm run check:duplicates
- name: Build the project
env:
BASE_REF: ${{ github.event.pull_request.base.sha }}
run: |
npm run build:ci
npm run build:modern:ci
- name: Execute package linting checks
env:
BASE_REF: ${{ github.event.pull_request.base.sha }}
run: |
npm run check:pub
npm run check:pub:ci
- name: Execute security checks
run: |
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/unit-tests-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
npm run setup:ci
- name: Execute unit tests
env:
BASE_REF: ${{ github.event.pull_request.base.sha || 'HEAD' }}
run: |
npm run test:ci
Expand All @@ -46,6 +48,8 @@ jobs:
files: ./packages/analytics-js/reports/coverage/clover.xml,./packages/analytics-js-common/reports/coverage/clover.xml,./packages/analytics-js-integrations/reports/coverage/clover.xml,./packages/analytics-js-plugins/reports/coverage/clover.xml,./packages/analytics-js-service-worker/reports/coverage/clover.xml,./packages/analytics-v1.1/reports/coverage/clover.xml,./packages/analytics-js-cookies/reports/coverage/clover.xml

- name: Execute linting check
env:
BASE_REF: ${{ github.event.pull_request.base.sha || 'HEAD' }}
run: |
npm run check:lint:ci
Expand Down
3 changes: 3 additions & 0 deletions jest/jest.setup-dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ global.window.innerHeight = 1024;
global.window.__BUNDLE_ALL_PLUGINS__ = false;
global.window.__IS_LEGACY_BUILD__ = false;
global.window.__IS_DYNAMIC_CUSTOM_BUNDLE__ = false;
global.PromiseRejectionEvent = function (reason) {
this.reason = reason;
};

// TODO: remove once we use globalThis in analytics v1.1 too
// Setup mocking for window.navigator
Expand Down
39 changes: 29 additions & 10 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,23 @@
"inputs": ["default", "^production"],
"cache": true
},
"build-browser": {
"build:modern": {
"inputs": ["default", "^production"],
"cache": true
},
"build-browser-modern": {
"build:browser": {
"inputs": ["default", "^production"],
"cache": true
},
"build-npm": {
"build:browser:modern": {
"inputs": ["default", "^production"],
"cache": true
},
"build-npm-modern": {
"build:package": {
"inputs": ["default", "^production"],
"cache": true
},
"build-package": {
"inputs": ["default", "^production"],
"cache": true
},
"build-check-size": {
"build:package:modern": {
"inputs": ["default", "^production"],
"cache": true
},
Expand All @@ -66,12 +62,34 @@
"cache": true
},
"check:size:json": {
"inputs": ["default", "^production", "{projectRoot}/.size-limit.js"],
"inputs": [
"default",
"^production",
"{projectRoot}/.size-limit.js",
"{projectRoot}/.size-limit.mjs"
],
"cache": true
},
"check:pub": {
"inputs": ["{projectRoot}/package.json"],
"cache": true
},
"test:pre-commit:affected": {
"inputs": ["default", "^test"],
"cache": true
},
"check:size:build:pre-commit:affected": {
"inputs": ["default", "^production"],
"cache": true
},
"check:size:json:pre-commit:affected": {
"inputs": [
"default",
"^production",
"{projectRoot}/.size-limit.js",
"{projectRoot}/.size-limit.mjs"
],
"cache": true
}
},
"generators": {
Expand All @@ -95,6 +113,7 @@
"!{projectRoot}/**/*.txt",
"!{projectRoot}/serve.json",
"!{projectRoot}/.size-limit.js",
"!{projectRoot}/.size-limit.mjs",
"!{projectRoot}/.jscpd.json",
"{workspaceRoot}/tsconfig.build.json",
"{workspaceRoot}/tsconfig.json",
Expand Down
Loading

0 comments on commit b284617

Please sign in to comment.