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

Feature/connector sdk versions. #239

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changeset/healthy-rocks-enjoy.md
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions adobe/manifest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const manifest = {
version: process.env.npm_package_version,
buildDate: new Date().toISOString(),
};

console.log(JSON.stringify(manifest));
5 changes: 3 additions & 2 deletions adobe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand All @@ -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": {
Expand Down
1 change: 1 addition & 0 deletions adobe/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export { AdobeConnector, type AdobeMetaData } from './api/AdobeConnector';
export { useAdobe } from './api/hooks/useAdobe';
export { sdkVersions } from './internal/version/Version';
9 changes: 9 additions & 0 deletions adobe/src/internal/version/Version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { SdkVersions } from 'react-native-theoplayer';
import manifest from '../../manifest.json';

export const sdkVersions = async (): Promise<SdkVersions> => {
const rnVersionString = manifest.version ?? '';
return {
rn: rnVersionString,
};
};
6 changes: 6 additions & 0 deletions comscore/manifest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const manifest = {
version: process.env.npm_package_version,
buildDate: new Date().toISOString(),
};

console.log(JSON.stringify(manifest));
3 changes: 2 additions & 1 deletion comscore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
1 change: 1 addition & 0 deletions comscore/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
9 changes: 9 additions & 0 deletions comscore/src/internal/version/Version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { SdkVersions } from 'react-native-theoplayer';
import manifest from '../../manifest.json';

export const sdkVersions = async (): Promise<SdkVersions> => {
const rnVersionString = manifest.version ?? '';
return {
rn: rnVersionString,
};
};
6 changes: 6 additions & 0 deletions conviva/manifest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const manifest = {
version: process.env.npm_package_version,
buildDate: new Date().toISOString(),
};

console.log(JSON.stringify(manifest));
3 changes: 2 additions & 1 deletion conviva/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
1 change: 1 addition & 0 deletions conviva/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
9 changes: 9 additions & 0 deletions conviva/src/internal/version/Version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { SdkVersions } from 'react-native-theoplayer';
import manifest from '../../manifest.json';

export const sdkVersions = async (): Promise<SdkVersions> => {
const rnVersionString = manifest.version ?? '';
return {
rn: rnVersionString,
};
};
6 changes: 6 additions & 0 deletions engage/manifest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const manifest = {
version: process.env.npm_package_version,
buildDate: new Date().toISOString(),
};

console.log(JSON.stringify(manifest));
3 changes: 2 additions & 1 deletion engage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
1 change: 1 addition & 0 deletions engage/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
2 changes: 2 additions & 0 deletions engage/src/internal/version/Version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import * as manifest from '../../manifest.json';
export const sdkVersion = manifest.version ?? '';
6 changes: 6 additions & 0 deletions mux/manifest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const manifest = {
version: process.env.npm_package_version,
buildDate: new Date().toISOString(),
};

console.log(JSON.stringify(manifest));
3 changes: 2 additions & 1 deletion mux/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
1 change: 1 addition & 0 deletions mux/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
9 changes: 9 additions & 0 deletions mux/src/internal/version/Version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { SdkVersions } from 'react-native-theoplayer';
import manifest from '../../manifest.json';

export const sdkVersions = async (): Promise<SdkVersions> => {
const rnVersionString = manifest.version ?? '';
return {
rn: rnVersionString,
};
};
6 changes: 6 additions & 0 deletions nielsen/manifest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const manifest = {
version: process.env.npm_package_version,
buildDate: new Date().toISOString(),
};

console.log(JSON.stringify(manifest));
3 changes: 2 additions & 1 deletion nielsen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
1 change: 1 addition & 0 deletions nielsen/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export { NielsenConnector } from './api/NielsenConnector';
export { useNielsen } from './api/hooks/useNielsen';
export { sdkVersions } from './internal/version/Version';
9 changes: 9 additions & 0 deletions nielsen/src/internal/version/Version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { SdkVersions } from 'react-native-theoplayer';
import manifest from '../../manifest.json';

export const sdkVersions = async (): Promise<SdkVersions> => {
const rnVersionString = manifest.version ?? '';
return {
rn: rnVersionString,
};
};
21 changes: 11 additions & 10 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
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions youbora/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Loading