Skip to content
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
30 changes: 0 additions & 30 deletions .github/dependabot.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/cla.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/conventional-commits.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/gh-pages.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/react-native-performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,20 @@
yarn
cd android
./gradlew assembleDebug
npm-pack-dry-run:
name: 'NPM Pack with dry-run'
runs-on: ubuntu-latest
steps:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install Yarn
run: npm install --global yarn
- name: Checkout
uses: actions/checkout@v3
- name: Build Typescript
run: |
yarn
yarn build
npm pack --dry-run

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Comment on lines +145 to +160
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Pod::Spec.new do |s|
s.license = package['license']
s.author = package['author']
s.platform = :ios, '11.0'
s.source = { :git => 'https://github.com/shopify/react-native-performance.git', :tag => "v#{s.version}" }
s.source = { :git => 'https://github.com/ExodusMovement/react-native-performance.git', :tag => "v#{s.version}" }
s.source_files = 'ios/**/*.{h,m,swift}'
s.exclude_files = 'ios/**/*Tests.{h,m,swift}'
s.requires_arc = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class PerformanceMarkerManager : SimpleViewManager<PerformanceMarker>() {
view.componentInstanceId = componentInstanceId
}

override fun getExportedCustomDirectEventTypeConstants(): MutableMap<String, Any> {
override fun getExportedCustomDirectEventTypeConstants(): Map<String, Any> {
return MapBuilder.builder<String, Any>().put(
"onRenderComplete",
MapBuilder.of(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#import "ReactNativePerformance.h"
#import <ReactNativePerformance/ReactNativePerformance-Swift.h>
#import <ReactNativePerformance-Swift.h>

static NSTimeInterval startupTimestamp = -1.0;

Expand Down
27 changes: 14 additions & 13 deletions packages/react-native-performance/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
{
"name": "@shopify/react-native-performance",
"version": "4.1.2",
"name": "@exodus/react-native-performance",
"version": "4.1.2-exodus.0",
"description": "A library for measuring the render times for the different flows in your app.",
"publishConfig": {
"access": "public",
"@shopify:registry": "https://registry.npmjs.org/"
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
"keywords": [
"react-native"
],
"author": "shopify",
"author": "ExodusMovement",
"license": "MIT",
"scripts": {
"build": "tsc -b",
Expand All @@ -20,12 +16,12 @@
"test": "tsc -b && yarn jest"
},
"bugs": {
"url": "https://github.com/shopify/react-native-performance/issues"
"url": "https://github.com/ExodusMovement/react-native-performance/issues"
},
"homepage": "https://github.com/shopify/react-native-performance#readme",
"homepage": "https://github.com/ExodusMovement/react-native-performance#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/shopify/react-native-performance.git"
"url": "git+https://github.com/ExodusMovement/react-native-performance.git"
},
"peerDependencies": {
"@babel/runtime": "*",
Expand All @@ -40,10 +36,15 @@
"react-test-renderer": "17.0.2"
},
"files": [
"android",
"android/src",
"android/build.gradle",
"dist",
"!dist/__tests__/*",
"!**/*.map",
"ios",
"src",
"*.podspec"
"*.podspec",
"!**/*.d.ts",
"!dist/tsconfig.tsbuildinfo",
"!ios/ReactNativePerformance/ReactNativePerformanceTests.swift"
]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {getNativeTime} from './utils';
import { getNativeTime } from './utils';

export class BridgedEventTimestampBuilder {
private _nativeTimestamp: Promise<number> | undefined;
Expand Down Expand Up @@ -34,7 +34,7 @@ export class BridgedEventTimestampBuilder {
return new BridgedEventTimestamp(Date.now(), this._nativeTimestamp);
}

const {jsNowWithEpochReference, nativeTimestampWithEpochReference} = translateNativeTimestampToEpochReference(
const { jsNowWithEpochReference, nativeTimestampWithEpochReference } = translateNativeTimestampToEpochReference(
this._nativeTimestamp,
);
return new BridgedEventTimestamp(jsNowWithEpochReference, nativeTimestampWithEpochReference);
Expand All @@ -60,6 +60,9 @@ export default class BridgedEventTimestamp {
readonly jsTimestamp: number;

constructor(jsTimestamp: number, nativeTimestamp: Promise<number> | undefined) {
if (jsTimestamp && typeof jsTimestamp !== 'number') {
throw new Error('Invalid jsTimestamp type');
}
this.jsTimestamp = jsTimestamp;
this.nativeTimestamp = nativeTimestamp;
}
Expand All @@ -86,7 +89,7 @@ function translateNativeTimestampToEpochReference(nativeTimestampWithSystemBootR

const nativeTimestampWithEpochReference = Promise.all([getNativeTime(), nativeTimestampWithSystemBootReference]).then(
([
{nativeTimeSinceEpochMillis: nativeNowWithEpochReference, nativeUptimeMillis: nativeNowWithSystemBootReference},
{ nativeTimeSinceEpochMillis: nativeNowWithEpochReference, nativeUptimeMillis: nativeNowWithSystemBootReference },
nativeTimestampWithSystemBootReference,
]) => {
// If the JS <-> native communication were instantaneous, the nativeTimeSinceEpochMillis === jsNowWithEpochReference.
Expand Down
3 changes: 2 additions & 1 deletion packages/react-native-performance/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"tsBuildInfoFile": "dist/tsconfig.tsbuildinfo",
"outDir": "./dist",
"rootDir": "./src"
"rootDir": "./src",
"target":"ES6"
},
"include": ["src/**/*"],
"exclude": ["node_modules", "**/*.test.ts?(x)"]
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3401,6 +3401,11 @@
dependencies:
recharts "^2.1.8"

"@shopify/react-native-performance@4.1.2":
version "4.1.2"
resolved "https://registry.yarnpkg.com/@shopify/react-native-performance/-/react-native-performance-4.1.2.tgz#bd111af291b85ee125feaccd54c8e5f237a76ce7"
integrity sha512-1Xu2xo+hAxg75iuX5akVqAgc3h/J1ohfi7JKXlGsprP4ylpW7kHMfq/7AstL7FoUC8xcHsTUvUFhoZ94ot8g6Q==

"@sideway/address@^4.1.3":
version "4.1.4"
resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0"
Expand Down
Loading