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(release): pulling release/3.6.0 into main #1690

Merged
merged 9 commits into from
Apr 15, 2024
13 changes: 8 additions & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
},
"lintAllEsApis": true,
"polyfills": [
"Promise",
"URL",
"URLSearchParams",
"Promise",
"Number.isNaN",
"Number.isInteger",
"Array.from",
Expand All @@ -16,15 +16,18 @@
"String.prototype.endsWith",
"String.prototype.startsWith",
"String.prototype.includes",
"String.prototype.replaceAll",
"String.fromCodePoint",
"Object.entries",
"Object.values",
"Element.prototype.dataset",
"String.prototype.replaceAll",
"Object.assign",
"TextEncoder",
"TextDecoder",
"String.fromCodePoint",
"CustomEvent",
"requestAnimationFrame",
"cancelAnimationFrame"
"cancelAnimationFrame",
"navigator.sendBeacon",
"Uint8Array"
]
},
"env": {
Expand Down
18 changes: 11 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Bug report
about: Create a report to help us improve
title: 'BUG : <Title>'
labels: bug, open source
assignees: MoumitaM
assignees: rudderlabs/js-sdk
---

**Describe the bug**
Expand All @@ -25,13 +25,17 @@ If applicable, add screenshots to help explain your problem.

**Additional Information (please complete the following information):**

- SDK installation: NPM/CDN
- CDN URL: (if applicable)
- NPM Version: (if applicable)
- SDK installation type: NPM/CDN
- SDK CDN URL: (if applicable)
- SDK version: (for NPM installation)
- Node version: (if applicable)
- NPM version: (if applicable)
- TypeScript version: (if applicable)
- Webpage URL: (where the SDK is installed, if applicable)
- Share the event payload
- Integration that has the issue (if applicable)
- Used JS Framework (e.g: NextJS, ReactJs, Vue) (if applicable)
- Share the event payload: (if applicable)
- Integration that has the issue: (if applicable)
- Framework and version(e.g: Next.js, React, Vue): (if applicable)
- Bundling toolset (e.g: Webpack, Rollup): (if applicable)

**Desktop (please complete the following information):**

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Feature request
about: Suggest an idea for this project
title: 'Feature Request: <Title>'
labels: open source
assignees: saikumarrs
assignees: rudderlabs/js-sdk
---

**Is your feature request related to a problem? Please describe.**
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rudderstack/analytics-js-monorepo",
"version": "3.5.0",
"version": "3.6.0",
"private": true,
"description": "Monorepo for RudderStack Analytics JS SDK",
"workspaces": [
Expand Down
7 changes: 7 additions & 0 deletions packages/analytics-js-integrations/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [3.0.4](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-04-12)


### Bug Fixes

* making the error message as warn ([#1686](https://github.com/rudderlabs/rudder-sdk-js/issues/1686)) ([56e34be](https://github.com/rudderlabs/rudder-sdk-js/commit/56e34be3575f66531bfe4910ff4aa970ed2ee208))

## [3.0.3](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-04-02)


Expand Down
5 changes: 2 additions & 3 deletions packages/analytics-js-integrations/CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
## [3.0.3](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected].2...@rudderstack/[email protected].3) (2024-04-02)
## [3.0.4](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected].3...@rudderstack/[email protected].4) (2024-04-12)


### Bug Fixes

* ninetailed: modify page support ([#1677](https://github.com/rudderlabs/rudder-sdk-js/issues/1677)) ([e45ef06](https://github.com/rudderlabs/rudder-sdk-js/commit/e45ef06186cb4dc1d0568f2b39d8e786d278390a))
* updated isLoaded and isReady conditions for mixpanel ([#1650](https://github.com/rudderlabs/rudder-sdk-js/issues/1650)) ([80c76a1](https://github.com/rudderlabs/rudder-sdk-js/commit/80c76a1f7f27a93930a6146730ac94d945b19b25))
* making the error message as warn ([#1686](https://github.com/rudderlabs/rudder-sdk-js/issues/1686)) ([56e34be](https://github.com/rudderlabs/rudder-sdk-js/commit/56e34be3575f66531bfe4910ff4aa970ed2ee208))

Comment on lines +1 to +6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the extra blank lines to adhere to standard markdown practices.

3c3
< 
---
> 
8c8
< 
---
> 

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
## [3.0.4](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-04-12)
### Bug Fixes
* ninetailed: modify page support ([#1677](https://github.com/rudderlabs/rudder-sdk-js/issues/1677)) ([e45ef06](https://github.com/rudderlabs/rudder-sdk-js/commit/e45ef06186cb4dc1d0568f2b39d8e786d278390a))
* updated isLoaded and isReady conditions for mixpanel ([#1650](https://github.com/rudderlabs/rudder-sdk-js/issues/1650)) ([80c76a1](https://github.com/rudderlabs/rudder-sdk-js/commit/80c76a1f7f27a93930a6146730ac94d945b19b25))
* making the error message as warn ([#1686](https://github.com/rudderlabs/rudder-sdk-js/issues/1686)) ([56e34be](https://github.com/rudderlabs/rudder-sdk-js/commit/56e34be3575f66531bfe4910ff4aa970ed2ee208))
## [3.0.4](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-04-12)
### Bug Fixes
* making the error message as warn ([#1686](https://github.com/rudderlabs/rudder-sdk-js/issues/1686)) ([56e34be](https://github.com/rudderlabs/rudder-sdk-js/commit/56e34be3575f66531bfe4910ff4aa970ed2ee208))

2 changes: 1 addition & 1 deletion packages/analytics-js-integrations/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rudderstack/analytics-js-integrations",
"version": "3.0.3",
"version": "3.0.4",
"private": true,
"description": "RudderStack JavaScript SDK device mode integrations",
"main": "dist/npm/modern/cjs/index.js",
Expand Down
6 changes: 3 additions & 3 deletions packages/analytics-js-integrations/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@
"github": {
"executor": "@jscutlery/semver:github",
"options": {
"tag": "@rudderstack/[email protected].3",
"title": "@rudderstack/[email protected].3",
"discussion-category": "@rudderstack/[email protected].3",
"tag": "@rudderstack/[email protected].4",
"title": "@rudderstack/[email protected].4",
"discussion-category": "@rudderstack/[email protected].4",
"notesFile": "./packages/analytics-js-integrations/CHANGELOG_LATEST.md"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
false,
);
if (!eventMapping[trimmedEvent]) {
logger.error(
logger.warn(

Check warning on line 67 in packages/analytics-js-integrations/src/integrations/LinkedInInsightTag/browser.js

View check run for this annotation

Codecov / codecov/patch

packages/analytics-js-integrations/src/integrations/LinkedInInsightTag/browser.js#L67

Added line #L67 was not covered by tests
`The "${event}" event is not mapped in the destination dashboard. It'll be skipped`,
);
return;
Expand Down
8 changes: 8 additions & 0 deletions packages/analytics-js/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [3.0.4](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-04-12)


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reduce multiple consecutive blank lines to improve readability.

- 

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change

### Bug Fixes

* remove MutationObserver and make polyfill checks consistent ([#1688](https://github.com/rudderlabs/rudder-sdk-js/issues/1688)) ([51b42fe](https://github.com/rudderlabs/rudder-sdk-js/commit/51b42fe51a5fbfa79df23b9b36095cc494dbcaa1))
* remove unnecessary window globals declarations ([#1687](https://github.com/rudderlabs/rudder-sdk-js/issues/1687)) ([09e5ab8](https://github.com/rudderlabs/rudder-sdk-js/commit/09e5ab89965a0b0dc5070891288a08358c103c0e))

## [3.0.3](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-03-22)

### Dependency Updates
Expand Down
9 changes: 6 additions & 3 deletions packages/analytics-js/CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## [3.0.3](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected].2...@rudderstack/[email protected].3) (2024-03-22)
## [3.0.4](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected].3...@rudderstack/[email protected].4) (2024-04-12)

### Dependency Updates

* `@rudderstack/analytics-js-plugins` updated to version `3.0.2`
### Bug Fixes

* remove MutationObserver and make polyfill checks consistent ([#1688](https://github.com/rudderlabs/rudder-sdk-js/issues/1688)) ([51b42fe](https://github.com/rudderlabs/rudder-sdk-js/commit/51b42fe51a5fbfa79df23b9b36095cc494dbcaa1))
* remove unnecessary window globals declarations ([#1687](https://github.com/rudderlabs/rudder-sdk-js/issues/1687)) ([09e5ab8](https://github.com/rudderlabs/rudder-sdk-js/commit/09e5ab89965a0b0dc5070891288a08358c103c0e))

2 changes: 1 addition & 1 deletion packages/analytics-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rudderstack/analytics-js",
"version": "3.0.3",
"version": "3.0.4",
"description": "RudderStack JavaScript SDK",
"main": "dist/npm/modern/cjs/index.js",
"module": "dist/npm/modern/esm/index.js",
Expand Down
6 changes: 3 additions & 3 deletions packages/analytics-js/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@
"github": {
"executor": "@jscutlery/semver:github",
"options": {
"tag": "@rudderstack/[email protected].3",
"title": "@rudderstack/[email protected].3",
"discussion-category": "@rudderstack/[email protected].3",
"tag": "@rudderstack/[email protected].4",
"title": "@rudderstack/[email protected].4",
"discussion-category": "@rudderstack/[email protected].4",
"notesFile": "./packages/analytics-js/CHANGELOG_LATEST.md"
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,36 +1,39 @@
import { isFunction, isUndefined } from '@rudderstack/analytics-js-common/utilities/checks';
import { isFunction } from '@rudderstack/analytics-js-common/utilities/checks';

const isDatasetAvailable = (): boolean => {
const testElement = document.createElement('div');
const testElement = globalThis.document.createElement('div');
testElement.setAttribute('data-a-b', 'c');
return testElement.dataset ? testElement.dataset.aB === 'c' : false;
};

const legacyJSEngineRequiredPolyfills: Record<string, () => boolean> = {
URL: () => !isFunction(globalThis.URL) || !globalThis.URLSearchParams,
MutationObserver: () => isUndefined(MutationObserver),
Promise: () => isUndefined(Promise),
'Number.isNaN': () => !Number.isNaN,
'Number.isInteger': () => !Number.isInteger,
'Array.from': () => !Array.from,
'Array.prototype.find': () => !Array.prototype.find,
'Array.prototype.includes': () => !Array.prototype.includes,
'String.prototype.endsWith': () => !String.prototype.endsWith,
'String.prototype.startsWith': () => !String.prototype.startsWith,
'String.prototype.includes': () => !String.prototype.includes,
'Object.entries': () => !Object.entries,
'Object.values': () => !Object.values,
'Object.assign': () => typeof Object.assign !== 'function',
// Ideally, we should separate the checks for URL and URLSearchParams but
// the polyfill service serves them under the same feature name, "URL".
URL: () => !isFunction(globalThis.URL) || !isFunction(globalThis.URLSearchParams),
Promise: () => !isFunction(globalThis.Promise),
'Number.isNaN': () => !isFunction(globalThis.Number.isNaN),
'Number.isInteger': () => !isFunction(globalThis.Number.isInteger),
'Array.from': () => !isFunction(globalThis.Array.from),
'Array.prototype.find': () => !isFunction(globalThis.Array.prototype.find),
'Array.prototype.includes': () => !isFunction(globalThis.Array.prototype.includes),
'String.prototype.endsWith': () => !isFunction(globalThis.String.prototype.endsWith),
'String.prototype.startsWith': () => !isFunction(globalThis.String.prototype.startsWith),
'String.prototype.includes': () => !isFunction(globalThis.String.prototype.includes),
'String.prototype.replaceAll': () => !isFunction(globalThis.String.prototype.replaceAll),
'String.fromCodePoint': () => !isFunction(globalThis.String.fromCodePoint),
'Object.entries': () => !isFunction(globalThis.Object.entries),
'Object.values': () => !isFunction(globalThis.Object.values),
'Object.assign': () => !isFunction(globalThis.Object.assign),
'Element.prototype.dataset': () => !isDatasetAvailable(),
'String.prototype.replaceAll': () => !String.prototype.replaceAll,
TextEncoder: () => isUndefined(TextEncoder) || isUndefined(TextDecoder),
'String.fromCodePoint': () => !String.fromCodePoint,
// Ideally, we should separate the checks for TextEncoder and TextDecoder but
// the polyfill service serves them under the same feature name, "TextEncoder".
TextEncoder: () => !isFunction(globalThis.TextEncoder) || !isFunction(globalThis.TextDecoder),
requestAnimationFrame: () =>
!isFunction(globalThis.requestAnimationFrame) || !isFunction(globalThis.cancelAnimationFrame),
CustomEvent: () => !isFunction(globalThis.CustomEvent),
/* eslint-disable-next-line */
'navigator.sendBeacon': () => !isFunction(navigator.sendBeacon),
ArrayBuffer: () => !isFunction(Uint8Array),
'navigator.sendBeacon': () => !isFunction(globalThis.navigator.sendBeacon),
// Note, the polyfill service serves both ArrayBuffer and Uint8Array under the same feature name, "ArrayBuffer".
ArrayBuffer: () => !isFunction(globalThis.Uint8Array),
};

const isLegacyJSEngine = (): boolean => {
Expand Down
5 changes: 0 additions & 5 deletions packages/analytics-js/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { RudderAnalytics } from './app/RudderAnalytics';
import type { RudderAnalyticsPreloader } from './components/preloadBuffer/types';
import type { IRudderStackGlobals } from './app/IRudderStackGlobals';

export {
type AnonymousIdOptions,
Expand All @@ -21,7 +20,6 @@ export { type LogLevel } from '@rudderstack/analytics-js-common/types/Logger';
export { type PluginName } from '@rudderstack/analytics-js-common/types/PluginsManager';
export { type IdentifyTraits } from '@rudderstack/analytics-js-common/types/traits';
export { RudderAnalytics } from './app/RudderAnalytics';
export { type IRudderStackGlobals } from './app/IRudderStackGlobals';
export {
type RudderAnalyticsPreloader,
type PreloadedEventCall,
Expand All @@ -30,8 +28,5 @@ export {
declare global {
interface Window {
rudderanalytics: RudderAnalytics | RudderAnalyticsPreloader | undefined;
RudderStackGlobals: IRudderStackGlobals;
rudderAnalyticsMount: () => void;
rudderAnalyticsBuildType: 'legacy' | 'modern';
}
}
2 changes: 0 additions & 2 deletions packages/analytics-js/src/types/rudderanalytics.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ declare global {
interface Window {
rudderanalytics: RudderAnalytics | RudderAnalyticsPreloader | undefined;
RudderStackGlobals: IRudderStackGlobals;
rudderAnalyticsMount: () => void;
rudderAnalyticsBuildType: 'legacy' | 'modern';
RudderSnippetVersion?: string;
}
}
10 changes: 10 additions & 0 deletions packages/loading-scripts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [3.0.4](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-04-12)

### Dependency Updates

* `@rudderstack/analytics-js` updated to version `3.0.3`

### Bug Fixes

* remove unnecessary window globals declarations ([#1687](https://github.com/rudderlabs/rudder-sdk-js/issues/1687)) ([09e5ab8](https://github.com/rudderlabs/rudder-sdk-js/commit/09e5ab89965a0b0dc5070891288a08358c103c0e))

## [3.0.3](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-03-22)

### Dependency Updates
Expand Down
9 changes: 7 additions & 2 deletions packages/loading-scripts/CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## [3.0.3](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected].2...@rudderstack/[email protected].3) (2024-03-22)
## [3.0.4](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected].3...@rudderstack/[email protected].4) (2024-04-12)

### Dependency Updates

* `@rudderstack/analytics-js` updated to version `3.0.2`
* `@rudderstack/analytics-js` updated to version `3.0.3`

### Bug Fixes

* remove unnecessary window globals declarations ([#1687](https://github.com/rudderlabs/rudder-sdk-js/issues/1687)) ([09e5ab8](https://github.com/rudderlabs/rudder-sdk-js/commit/09e5ab89965a0b0dc5070891288a08358c103c0e))

2 changes: 1 addition & 1 deletion packages/loading-scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rudderstack/analytics-js-loading-scripts",
"version": "3.0.3",
"version": "3.0.4",
"private": true,
"description": "Loading script for RudderStack JavaScript SDK",
"main": "./src/index.js",
Expand Down
6 changes: 3 additions & 3 deletions packages/loading-scripts/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@
"github": {
"executor": "@jscutlery/semver:github",
"options": {
"tag": "@rudderstack/[email protected].3",
"title": "@rudderstack/[email protected].3",
"discussion-category": "@rudderstack/[email protected].3",
"tag": "@rudderstack/[email protected].4",
"title": "@rudderstack/[email protected].4",
"discussion-category": "@rudderstack/[email protected].4",
"notesFile": "./packages/loading-scripts/CHANGELOG_LATEST.md"
}
}
Expand Down
2 changes: 0 additions & 2 deletions packages/loading-scripts/src/types/rudderanalytics.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type {
IRudderStackGlobals,
RudderAnalytics,
PreloadedEventCall,
RudderAnalyticsPreloader,
Expand All @@ -8,7 +7,6 @@ import type {
declare global {
interface Window {
rudderanalytics: RudderAnalytics | RudderAnalyticsPreloader | undefined;
RudderStackGlobals: IRudderStackGlobals;
rudderAnalyticsMount: () => void;
rudderAnalyticsBuildType: 'legacy' | 'modern';
RudderSnippetVersion?: string;
Expand Down
Loading
Loading