Skip to content

Commit 94a5bf5

Browse files
authored
Bug: Fix object/array size in query details (#4)
* Fix object/array size in query details
1 parent 3657813 commit 94a5bf5

13 files changed

Lines changed: 41 additions & 35 deletions

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ jobs:
1313
registry-url: "https://registry.npmjs.org"
1414
- run: yarn install --frozen-lockfile
1515
- run: yarn build-client
16-
- run: yarn publish
16+
- run: yarn publish-client
1717
env:
1818
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release-electron.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ jobs:
88
build:
99
strategy:
1010
matrix:
11-
os:
12-
[
13-
{ name: "macos", image: "macos-latest" },
14-
{ name: "linux", image: "ubuntu-latest" },
11+
os: [
1512
{ name: "windows", image: "windows-latest" },
13+
{ name: "macos", image: "macos-latest" },
14+
# { name: "linux", image: "ubuntu-latest" },
1615
]
1716

1817
runs-on: ${{ matrix.os.image }}

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ React Native Query Devtool is a monorepo containing a React Native component and
1111

1212
## Standalone App
1313

14-
The standalone app allows you to visualize and debug query data from your React Native application using the `@jdl/react-native-query-devtool` package.
14+
The standalone app allows you to visualize and debug query data from your React Native application using the `@jsmdeleon/react-native-query-devtool` package.
1515

1616
## Installation
1717

18-
You can download the standalone app from the following link. Currently, it's available only for **macOS M1**:
18+
You can download the standalone app from the following link. Currently, it's available only for **macOS M1** and **Windows x64**:
1919

2020
[Download latest App](https://github.com/jossydeleon/react-native-query-devtool-monorepo/releases)
2121

22-
**Windows and Linux users:** You need to build the app from source as it's currently only available for **macOS M1**. Ensure to set up your environment accordingly before building the app.
22+
**Linux users:** You need to build the app from source as it's currently only available for **macOS M1** and **Windows x64**. Ensure to set up your environment accordingly before building the app.
2323

2424
```bash
2525
# Go to app folder
@@ -39,17 +39,17 @@ After running the build command, you'll find the freshly built app in a new fold
3939
To use the devtool component in your React Native project, install the package:
4040

4141
```bash
42-
npm install @jdl/react-native-query-devtool
42+
npm install @jsmdeleon/react-native-query-devtool
4343
# or
44-
yarn add @jdl/react-native-query-devtool
44+
yarn add @jsmdeleon/react-native-query-devtool
4545
```
4646

4747
## Usage
4848

4949
In your React Native application, import `QueryNativeDevtool` to send query data to the server app for debugging:
5050

5151
```javascript
52-
import { QueryNativeDevtool } from "@jdl/react-native-query-devtool";
52+
import { QueryNativeDevtool } from "@jsmdeleon/react-native-query-devtool";
5353

5454
export default function App() {
5555
return (
@@ -68,7 +68,7 @@ export default function App() {
6868
If your app runs `react-query v3` pass `version="v3"` prop to `QueryNativeDevtool`
6969

7070
```javascript
71-
import { QueryNativeDevtool } from "@jdl/react-native-query-devtool";
71+
import { QueryNativeDevtool } from "@jsmdeleon/react-native-query-devtool";
7272

7373
export default function App() {
7474
return (
@@ -86,7 +86,7 @@ This will enable your React Native application to send query data to the Electro
8686

8787
## Examples
8888

89-
In the example folder, you can find example projects demonstrating the usage of `@jdl/react-native-query-devtool` with different versions of React Query (v3, v4, and v5). To test the examples, navigate to the example folder, select the desired example, and run yarn ios or yarn android.
89+
In the example folder, you can find example projects demonstrating the usage of `@jsmdeleon/react-native-query-devtool` with different versions of React Query (v3, v4, and v5). To test the examples, navigate to the example folder, select the desired example, and run yarn ios or yarn android.
9090

9191
```bash
9292
cd example

example/react-query-v3/src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { QueryClient, QueryClientProvider } from "react-query";
33
import { StatusBar } from "expo-status-bar";
44
import { StyleSheet, View, Text, SafeAreaView } from "react-native";
55
import { Users } from "./components/Users";
6-
import { QueryNativeDevtool } from "@jdl/react-native-query-devtool/src";
6+
import { QueryNativeDevtool } from "@jsmdeleon/react-native-query-devtool/src";
77

88
const queryClient = new QueryClient();
99

example/react-query-v4/src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
33
import { StatusBar } from "expo-status-bar";
44
import { StyleSheet, View, Text, SafeAreaView } from "react-native";
55
import { Users } from "./components/Users";
6-
import { QueryNativeDevtool } from "@jdl/react-native-query-devtool/src";
6+
import { QueryNativeDevtool } from "@jsmdeleon/react-native-query-devtool/src";
77

88
const queryClient = new QueryClient();
99

example/react-query-v5/src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
33
import { StatusBar } from "expo-status-bar";
44
import { StyleSheet, View, Text, SafeAreaView } from "react-native";
55
import { Users } from "./components/Users";
6-
import { QueryNativeDevtool } from "@jdl/react-native-query-devtool/src";
6+
import { QueryNativeDevtool } from "@jsmdeleon/react-native-query-devtool/src";
77

88
const queryClient = new QueryClient();
99

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@jdl/react-native-query-devtool-monorepo",
2+
"name": "@jsmdeleon/react-native-query-devtool-monorepo",
33
"description": "React Native Query Devtool is a monorepo containing a React Native component and a standalone app to visualize query data in a similar way to react-query-devtools for the web.",
44
"author": {
55
"name": "Josymar",
@@ -12,6 +12,7 @@
1212
"build-server": "cd ./packages/react-native-query-devtool-app && electron-forge make",
1313
"publish-server":"cd ./packages/react-native-query-devtool-app && electron-forge publish",
1414
"build-client": "cd ./packages/react-native-query-devtool && tsup",
15+
"publish-client": "cd ./packages/react-native-query-devtool && yarn publish --access public",
1516
"v3-example-ios": "cd ./example/react-query-v3 && expo start --ios",
1617
"v3-example-android": "cd ./example/react-query-v3 && expo start --android"
1718
},

packages/react-native-query-devtool-app/forge.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ const config: ForgeConfig = {
1515
},
1616
rebuildConfig: {},
1717
makers: [
18-
new MakerSquirrel({}),
18+
new MakerSquirrel({ name: "rnqdt" }),
1919
new MakerZIP({}, ["darwin"]),
20-
new MakerRpm({}),
21-
new MakerDeb({}),
20+
new MakerRpm({ options: { name: "rnqdt" } }),
21+
new MakerDeb({ options: { name: "rnqdt" } }),
2222
],
2323
publishers: [
2424
{

packages/react-native-query-devtool-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "@jdl/react-native-query-devtool-app",
2+
"name": "@jsmdeleon/react-native-query-devtool-app",
33
"productName": "react-native-query-devtool-app",
44
"version": "1.0.0",
5-
"description": "The standalone app allows you to visualize and debug query data from your React Native application using the @jdl/react-native-query-devtool package.",
5+
"description": "The standalone app allows you to visualize and debug query data from your React Native application using the @jsmdeleon/react-native-query-devtool package.",
66
"main": ".webpack/main",
77
"scripts": {
88
"start": "electron-forge start",

packages/react-native-query-devtool-app/src/components/JSONTreeSearcheable/index.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ const JSONTreeSearcheable: React.FC<JSONTreeSearcheableProps> = ({ data }) => {
2323
<JSONTree
2424
data={data}
2525
theme={theme}
26-
shouldExpandNodeInitially={() => true}
27-
getItemString={() => (
28-
<span dangerouslySetInnerHTML={{ __html: getItemString(data) }} />
26+
getItemString={(_, currentData) => (
27+
<span
28+
dangerouslySetInnerHTML={{ __html: getItemString(currentData) }}
29+
/>
2930
)}
3031
labelRenderer={([key]) => (
3132
<span dangerouslySetInnerHTML={{ __html: highlightLabel(key) }} />

0 commit comments

Comments
 (0)