diff --git a/.changeset/healthy-rocks-enjoy.md b/.changeset/healthy-rocks-enjoy.md new file mode 100644 index 00000000..09e06932 --- /dev/null +++ b/.changeset/healthy-rocks-enjoy.md @@ -0,0 +1,11 @@ +--- +'@theoplayer/react-native-analytics-comscore': minor +'@theoplayer/react-native-analytics-conviva': minor +'@theoplayer/react-native-analytics-nielsen': minor +'@theoplayer/react-native-engage': minor +'@theoplayer/react-native-analytics-adobe': minor +'@theoplayer/react-native-analytics-mux': minor +'@theoplayer/react-native-analytics-youbora': patch +--- + +Added sdkVersions API to Nielsen, Mux, Conviva, Comscore, Adobe and Engage connectors diff --git a/.changeset/weak-turkeys-stare.md b/.changeset/weak-turkeys-stare.md new file mode 100644 index 00000000..a8da465c --- /dev/null +++ b/.changeset/weak-turkeys-stare.md @@ -0,0 +1,5 @@ +--- +'@theoplayer/react-native-analytics-youbora': patch +--- + +Added THEOplayer 8.x to peerDependency setup diff --git a/.gitignore b/.gitignore index 23a55f39..f694fd99 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,9 @@ lib/ /api youbora/manifest.json agama/src/static/manifest.json +engage/src/manifest.json +adobe/src/manifest.json +comscore/src/manifest.json +conviva/src/manifest.json +mux/src/manifest.json +nielsen/src/manifest.json diff --git a/adobe/manifest.js b/adobe/manifest.js new file mode 100755 index 00000000..e7629f28 --- /dev/null +++ b/adobe/manifest.js @@ -0,0 +1,6 @@ +const manifest = { + version: process.env.npm_package_version, + buildDate: new Date().toISOString(), +}; + +console.log(JSON.stringify(manifest)); diff --git a/adobe/package.json b/adobe/package.json index 1fe0f4cc..3ea2c501 100644 --- a/adobe/package.json +++ b/adobe/package.json @@ -31,7 +31,8 @@ "scripts": { "typescript": "tsc --noEmit", "build": "bob build", - "prepare": "npm run build", + "manifest": "node manifest.js > src/manifest.json", + "prepare": "npm run manifest && npm run build", "clean": "rimraf lib android/build example/android/build example/android/app/build example/ios/build" }, "keywords": [ @@ -55,7 +56,7 @@ "react": "*", "react-native": "*", "react-native-device-info": ">=10.0.0 <14.0.0", - "react-native-theoplayer": "^3 || ^7 || ^8", + "react-native-theoplayer": "^8.7.0", "theoplayer": "^5 || ^6 || ^7 || ^8" }, "peerDependenciesMeta": { diff --git a/adobe/src/index.ts b/adobe/src/index.ts index 9eadb965..183c4226 100644 --- a/adobe/src/index.ts +++ b/adobe/src/index.ts @@ -1,2 +1,3 @@ export { AdobeConnector, type AdobeMetaData } from './api/AdobeConnector'; export { useAdobe } from './api/hooks/useAdobe'; +export { sdkVersions } from './internal/version/Version'; diff --git a/adobe/src/internal/version/Version.ts b/adobe/src/internal/version/Version.ts new file mode 100644 index 00000000..b4d12fa4 --- /dev/null +++ b/adobe/src/internal/version/Version.ts @@ -0,0 +1,9 @@ +import type { SdkVersions } from 'react-native-theoplayer'; +import manifest from '../../manifest.json'; + +export const sdkVersions = async (): Promise => { + const rnVersionString = manifest.version ?? ''; + return { + rn: rnVersionString, + }; +}; diff --git a/comscore/manifest.js b/comscore/manifest.js new file mode 100755 index 00000000..e7629f28 --- /dev/null +++ b/comscore/manifest.js @@ -0,0 +1,6 @@ +const manifest = { + version: process.env.npm_package_version, + buildDate: new Date().toISOString(), +}; + +console.log(JSON.stringify(manifest)); diff --git a/comscore/package.json b/comscore/package.json index 87b13a9d..cc1716e0 100644 --- a/comscore/package.json +++ b/comscore/package.json @@ -30,7 +30,8 @@ "scripts": { "typescript": "tsc --noEmit", "build": "bob build", - "prepare": "npm run build", + "manifest": "node manifest.js > src/manifest.json", + "prepare": "npm run manifest && npm run build", "clean": "rimraf lib android/build example/android/build example/android/app/build example/ios/build" }, "keywords": [ diff --git a/comscore/src/index.ts b/comscore/src/index.ts index 8ceabca8..4c5131e7 100644 --- a/comscore/src/index.ts +++ b/comscore/src/index.ts @@ -2,3 +2,4 @@ export { ComscoreConnector } from './api/ComscoreConnector'; export * from './api/ComscoreConfiguration'; export * from './api/ComscoreMetadata'; export { useComscore } from './api/hooks/useComscore'; +export { sdkVersions } from './internal/version/Version'; diff --git a/comscore/src/internal/version/Version.ts b/comscore/src/internal/version/Version.ts new file mode 100644 index 00000000..b4d12fa4 --- /dev/null +++ b/comscore/src/internal/version/Version.ts @@ -0,0 +1,9 @@ +import type { SdkVersions } from 'react-native-theoplayer'; +import manifest from '../../manifest.json'; + +export const sdkVersions = async (): Promise => { + const rnVersionString = manifest.version ?? ''; + return { + rn: rnVersionString, + }; +}; diff --git a/conviva/manifest.js b/conviva/manifest.js new file mode 100755 index 00000000..e7629f28 --- /dev/null +++ b/conviva/manifest.js @@ -0,0 +1,6 @@ +const manifest = { + version: process.env.npm_package_version, + buildDate: new Date().toISOString(), +}; + +console.log(JSON.stringify(manifest)); diff --git a/conviva/package.json b/conviva/package.json index e9b4a996..6ef47760 100644 --- a/conviva/package.json +++ b/conviva/package.json @@ -31,7 +31,8 @@ "scripts": { "typescript": "tsc --noEmit", "build": "bob build", - "prepare": "npm run build", + "manifest": "node manifest.js > src/manifest.json", + "prepare": "npm run manifest && npm run build", "clean": "rimraf lib android/build example/android/build example/android/app/build example/ios/build" }, "keywords": [ diff --git a/conviva/src/index.ts b/conviva/src/index.ts index 77b17a22..a6d3606f 100644 --- a/conviva/src/index.ts +++ b/conviva/src/index.ts @@ -3,3 +3,4 @@ export { useConviva } from './api/hooks/useConviva'; export type { ConvivaConfiguration } from './api/ConvivaConfiguration'; export type { ConvivaMetadata } from './api/ConvivaMetadata'; export type { ConvivaEventDetail } from './api/ConvivaEventDetail'; +export { sdkVersions } from './internal/version/Version'; diff --git a/conviva/src/internal/version/Version.ts b/conviva/src/internal/version/Version.ts new file mode 100644 index 00000000..b4d12fa4 --- /dev/null +++ b/conviva/src/internal/version/Version.ts @@ -0,0 +1,9 @@ +import type { SdkVersions } from 'react-native-theoplayer'; +import manifest from '../../manifest.json'; + +export const sdkVersions = async (): Promise => { + const rnVersionString = manifest.version ?? ''; + return { + rn: rnVersionString, + }; +}; diff --git a/engage/manifest.js b/engage/manifest.js new file mode 100755 index 00000000..e7629f28 --- /dev/null +++ b/engage/manifest.js @@ -0,0 +1,6 @@ +const manifest = { + version: process.env.npm_package_version, + buildDate: new Date().toISOString(), +}; + +console.log(JSON.stringify(manifest)); diff --git a/engage/package.json b/engage/package.json index 306a1376..73d10966 100644 --- a/engage/package.json +++ b/engage/package.json @@ -30,8 +30,9 @@ ], "scripts": { "typescript": "tsc --noEmit", + "manifest": "node manifest.js > src/manifest.json", "build": "bob build", - "prepare": "npm run build", + "prepare": "npm run manifest && npm run build", "lint": "eslint \"**/*.{ts,tsx}\"", "clean": "rimraf lib android/build example/android/build example/android/app/build example/ios/build" }, diff --git a/engage/src/index.ts b/engage/src/index.ts index 78ba87c0..c7c67459 100644 --- a/engage/src/index.ts +++ b/engage/src/index.ts @@ -2,3 +2,4 @@ export * from './api'; export * from './internal/event/Event'; export * from './internal/event/EventListener'; export * from './internal/event/EventDispatcher'; +export { sdkVersion } from './internal/version/Version'; diff --git a/engage/src/internal/version/Version.ts b/engage/src/internal/version/Version.ts new file mode 100644 index 00000000..01b41ce9 --- /dev/null +++ b/engage/src/internal/version/Version.ts @@ -0,0 +1,2 @@ +import * as manifest from '../../manifest.json'; +export const sdkVersion = manifest.version ?? ''; diff --git a/mux/manifest.js b/mux/manifest.js new file mode 100755 index 00000000..e7629f28 --- /dev/null +++ b/mux/manifest.js @@ -0,0 +1,6 @@ +const manifest = { + version: process.env.npm_package_version, + buildDate: new Date().toISOString(), +}; + +console.log(JSON.stringify(manifest)); diff --git a/mux/package.json b/mux/package.json index ba97c202..3da10f14 100644 --- a/mux/package.json +++ b/mux/package.json @@ -31,7 +31,8 @@ "scripts": { "typescript": "tsc --noEmit", "build": "bob build", - "prepare": "npm run build", + "manifest": "node manifest.js > src/manifest.json", + "prepare": "npm run manifest && npm run build", "clean": "rimraf lib android/build example/android/build example/android/app/build example/ios/build" }, "keywords": [ diff --git a/mux/src/index.ts b/mux/src/index.ts index 8037c06b..a49fae9d 100644 --- a/mux/src/index.ts +++ b/mux/src/index.ts @@ -2,3 +2,4 @@ export { MuxConnector, MuxPresentation } from './api/MuxConnector'; export type { MuxData } from './api/MuxData'; export type { MuxOptions } from './api/MuxOptions'; export { useMux } from './api/hooks/useMux'; +export { sdkVersions } from './internal/version/Version'; diff --git a/mux/src/internal/version/Version.ts b/mux/src/internal/version/Version.ts new file mode 100644 index 00000000..b4d12fa4 --- /dev/null +++ b/mux/src/internal/version/Version.ts @@ -0,0 +1,9 @@ +import type { SdkVersions } from 'react-native-theoplayer'; +import manifest from '../../manifest.json'; + +export const sdkVersions = async (): Promise => { + const rnVersionString = manifest.version ?? ''; + return { + rn: rnVersionString, + }; +}; diff --git a/nielsen/manifest.js b/nielsen/manifest.js new file mode 100755 index 00000000..e7629f28 --- /dev/null +++ b/nielsen/manifest.js @@ -0,0 +1,6 @@ +const manifest = { + version: process.env.npm_package_version, + buildDate: new Date().toISOString(), +}; + +console.log(JSON.stringify(manifest)); diff --git a/nielsen/package.json b/nielsen/package.json index 41f03f3a..ae2c260f 100644 --- a/nielsen/package.json +++ b/nielsen/package.json @@ -31,7 +31,8 @@ "scripts": { "typescript": "tsc --noEmit", "build": "bob build", - "prepare": "npm run build", + "manifest": "node manifest.js > src/manifest.json", + "prepare": "npm run manifest && npm run build", "clean": "rimraf lib android/build example/android/build example/android/app/build example/ios/build" }, "keywords": [ diff --git a/nielsen/src/index.ts b/nielsen/src/index.ts index 9131445c..9d17c281 100644 --- a/nielsen/src/index.ts +++ b/nielsen/src/index.ts @@ -1,2 +1,3 @@ export { NielsenConnector } from './api/NielsenConnector'; export { useNielsen } from './api/hooks/useNielsen'; +export { sdkVersions } from './internal/version/Version'; diff --git a/nielsen/src/internal/version/Version.ts b/nielsen/src/internal/version/Version.ts new file mode 100644 index 00000000..b4d12fa4 --- /dev/null +++ b/nielsen/src/internal/version/Version.ts @@ -0,0 +1,9 @@ +import type { SdkVersions } from 'react-native-theoplayer'; +import manifest from '../../manifest.json'; + +export const sdkVersions = async (): Promise => { + const rnVersionString = manifest.version ?? ''; + return { + rn: rnVersionString, + }; +}; diff --git a/package-lock.json b/package-lock.json index 8eb1af60..53be35f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39,7 +39,7 @@ "react-native": "^0.74.5", "react-native-builder-bob": "^0.23.2", "react-native-device-info": "^13.1.0", - "react-native-theoplayer": "^7.9.0", + "react-native-theoplayer": "^8.7.0", "rimraf": "^5.0.10", "theoplayer": "^7.12.0", "typedoc": "^0.25.13", @@ -56,7 +56,7 @@ "react": "*", "react-native": "*", "react-native-device-info": ">=10.0.0 <14.0.0", - "react-native-theoplayer": "^3 || ^7 || ^8", + "react-native-theoplayer": "^8.7.0", "theoplayer": "^5 || ^6 || ^7 || ^8" }, "peerDependenciesMeta": { @@ -165,8 +165,8 @@ "peerDependencies": { "react": "*", "react-native": "*", - "react-native-theoplayer": "^3.0.0 || ^7.0.0", - "theoplayer": "^5.0.0 || ^6.0.0 || ^7.0.0" + "react-native-theoplayer": "^3.0.0 || ^7.0.0 || ^8.0.0", + "theoplayer": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "theoplayer": { @@ -12043,9 +12043,10 @@ } }, "node_modules/react-native-theoplayer": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/react-native-theoplayer/-/react-native-theoplayer-7.9.0.tgz", - "integrity": "sha512-aHcQcSbfRcNWglzVAtuSLHPykAgr2f5VfyF0gzP8qlUna3D85wiluFGm+WE4bq5Qkb3mCMm6pMWtRwar3t8inA==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/react-native-theoplayer/-/react-native-theoplayer-8.11.0.tgz", + "integrity": "sha512-wq6r5vrDS5D+YgKWy31MoJc6dU/Xpf0GhvjDQM1w+bVpUTSTTdI70LNlb1h8SrxoADq2cSHKHdP/gCTeJgYG/Q==", + "license": "SEE LICENSE AT https://www.theoplayer.com/terms", "dependencies": { "buffer": "^6.0.3" }, @@ -12055,7 +12056,7 @@ "peerDependencies": { "react": "*", "react-native": "*", - "theoplayer": "^6.0.0 || ^7.0.0" + "theoplayer": "^6 || ^7 || ^8" }, "peerDependenciesMeta": { "theoplayer": { @@ -14080,8 +14081,8 @@ "peerDependencies": { "react": "*", "react-native": "*", - "react-native-theoplayer": "^3.0.0 || ^7.0.0", - "theoplayer": "^5.0.0 || ^6.0.0 || ^7.0.0" + "react-native-theoplayer": "^3.0.0 || ^7.0.0 || ^8.0.0", + "theoplayer": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "theoplayer": { diff --git a/package.json b/package.json index 900170d1..87d75819 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "react-native": "^0.74.5", "react-native-builder-bob": "^0.23.2", "react-native-device-info": "^13.1.0", - "react-native-theoplayer": "^7.9.0", + "react-native-theoplayer": "^8.7.0", "rimraf": "^5.0.10", "theoplayer": "^7.12.0", "typedoc": "^0.25.13", diff --git a/youbora/package.json b/youbora/package.json index 4ba9d90b..2aec8088 100644 --- a/youbora/package.json +++ b/youbora/package.json @@ -63,8 +63,8 @@ "peerDependencies": { "react": "*", "react-native": "*", - "react-native-theoplayer": "^3.0.0 || ^7.0.0", - "theoplayer": "^5.0.0 || ^6.0.0 || ^7.0.0" + "react-native-theoplayer": "^3.0.0 || ^7.0.0 || ^8.0.0", + "theoplayer": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "theoplayer": {