Skip to content

Commit e6f7fa5

Browse files
authored
v0.8.0 (#266)
* Implement root config file in home directory (#165) * Add handle for read root config * Add openConfigFile method use for application menu * Add `Open config file` appliciation menu item * Comment window size in config template * Apply windowBounds, autoUpdate config * Apply defaultRNPakcagerPorts, defaultNetworkInspect config * Apply editor, defaultReactDevToolsTheme config * Use zoomLevel instead of fontSize * Add comment for defaultNetworkInspect config * Update test snapshot * Don't set EDITOR env if no config.editor * Show error message if config parse failed * Apply fontFamily, showAllDevToolsTab config * Update config template * Add documentation for config file * Comment fontFamily in config template * fix typos (#182) * Changed the type you're to you've (#185) * Remove Code Sponsor link * Add Open Collective links * Fix badges separation in README * Update docs/react-devtools-integration.md * Improve English (#193) The previous message was not grammatically correct. * Added support rndebugger-open for RN >= 0.53.0 (#198) * [NPM package] v0.3.16 * Update travis script * Update to node 9 on travis * Revert "Update travis script" This reverts commit 7593608. * Fix` rndebugger-open` injection with RN >= 0.53 again (#202) * Fix rndebugger-open inject with RN >= 0.53 again * Update snapshots * [NPM package] v0.3.17 * Fixed typo (#204) * fix grammatical improvements / add clarity to the network inspect docs. (#207) Also fixed a broken internal link to these docs from debugger integration * Add Delta patcher from react-native * Check Delta support on executeApplicationScript * Clear logs when check Delta support finished * Update check Delta support * E2E Test: Support file:// for fetch only on test * E2E test: Update expected logs * Update deltaUrlToBlobUrl.js from upstream * Add Open Collective link in Help * Update dependencies * v0.7.14 * Fix prod bundle by downgrade uglifyjs-webpack-plugin * v0.7.15 * Fix auto_updater.json * Check if Delta Bundler available (#215) * Check if Delta bundler available * Update E2E test * Clear logs even if no error catched * Fix Blob error for use `fetch` if Network Inspect enabled (#217) * Patch fetch code on applyDelta * Disable `support.blob` in `whatwg-fetch` for use native XMLHttpRequest * Don't check fetch code if it already patched * Check only if map type is delta * Update regex pattern * v0.7.16 * Send `callFunctionReturnFlushedQueue` event after waiting application script executed (#219) * Send `callFunctionReturnFlushedQueue` event after waiting application script executed * Fix lint error * Check scriptExecuted first * Toggle network inspect after define `support` var on patchFetchPolyfill (#220) * v0.7.17 * [update] Improve dialog wording slightly. (#221) * Ensure the initial script of `whatwg-fetch` is executed related to #209 * Patch all `whatwg-fetch` packages related to #209 * v0.7.18 * Fix error of blob function not found in whatwg-fetch with Network Inspect enabled * Fix typos (#238) * Update debugger from upstream (#240) * Update debugger from upstream facebook/react-native@e5aa5b7 * Upgrade Expo / RN versions in examples * Fix lint error * Fix worker didnt post message if checkDeltaAvailable failed * Remove unnecessary waitingScriptExecuted * set global.Blob to global.originalBlob before deleting global.Blob for rn > 0.54 compatability (#246) * Fix context menu functions for RN 0.56 (#247) * Fix patchFetchPolyfill for compatible RN 0.56 * Fix required modules of RNDebugger functions on RN 0.56 * Update docs/network-inspect-of-chrome-devtools.md * Update docs/debugger-integration.md * Update test fixture * Add more comments about Network Inspect manually setup * Lookup for react-native implementation * Assign global.$reactNative for make debug easier * Detect metroRequire for RN 0.56 * Update docs/debugger-integration.md * Bump electron version to 1.7.15 * Add the recently changes from redux-devtools-extension (#248) * Bump redux-devtools-instrument to v1.9 * Add actionCreators option for connect API * Update dependencies also downgrade redux to v3.7.2 because remotedev-app still using * Fix lint errors * v0.7.19 * Fix buildTestBundle of E2E tests * Fix ref issue of Draggable related to #250 * v0.7.20 * Update auto_updater.json * Fixes typo (#258) * update react-devtools-core for supporting react-profiler (#262) * Fix context menu functions on RN 0.57 (#263) * Use __r from RN >= 0.57 as metro require in debugger worker * Fix patchFetchPolyfill for RN 0.57 * Update docs/react-devtools-integration.md * v0.8.0
1 parent fec0512 commit e6f7fa5

31 files changed

+421
-117
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ dist/main.js*
77
release/
88
*.bundle.js
99
tmp/
10+
config_test

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ $ brew update && brew cask install react-native-debugger
3131
* [Shortcut references](docs/shortcut-references.md)
3232
* [Network inspect of Chrome Developer Tools](docs/network-inspect-of-chrome-devtools.md)
3333
* [Enable open in editor in console](docs/enable-open-in-editor-in-console.md)
34+
* [Config file in home directory](docs/config-file-in-home-directory.md)
3435
* [Troubleshooting](docs/troubleshooting.md)
3536
* [Contributing](docs/contributing.md)
3637

app/containers/ReactInspector.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,13 @@ export default class ReactInspector extends Component {
9393
}
9494

9595
setDefaultThemeName(themeName) {
96-
getReactInspector().setDefaultThemeName(themeName === 'dark' ? 'ChromeDark' : 'ChromeDefault');
96+
const theme = window.query.defaultReactDevToolsTheme;
97+
const inspector = getReactInspector();
98+
if (!theme || theme === 'RNDebugger') {
99+
inspector.setDefaultThemeName(themeName === 'dark' ? 'ChromeDark' : 'ChromeDefault');
100+
} else {
101+
inspector.setDefaultThemeName(theme);
102+
}
97103
}
98104

99105
listeningPort = window.reactDevToolsPort;

app/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import React from 'react';
44
import { render } from 'react-dom';
55
import { Provider } from 'react-redux';
66
import launchEditor from 'react-dev-utils/launchEditor';
7+
import './setup';
78
import App from './containers/App';
89
import configureStore from './store/configureStore';
910
import { beforeWindowClose } from './actions/debugger';

app/middlewares/debuggerAPI.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ const setDebuggerLoc = ({ host: packagerHost, port: packagerPort }) => {
170170
if (host === packagerHost && port === Number(packagerPort)) return;
171171

172172
host = packagerHost || 'localhost';
173-
port = packagerPort || 8081;
173+
port = packagerPort || window.query.port || 8081;
174174
if (socket) {
175175
shutdownJSRuntime();
176176
socket.close();

app/reducers/debugger.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
import qs from 'querystring';
2-
import url from 'url';
31
import {
42
SET_DEBUGGER_STATUS,
53
SET_DEBUGGER_WORKER,
64
SET_DEBUGGER_LOCATION,
75
} from '../actions/debugger';
86

9-
const { isPortSettingRequired } = qs.parse(url.parse(location.href).query);
7+
const { isPortSettingRequired } = window.query;
108

119
function getStatusMessage(status, port) {
1210
let message;
@@ -40,7 +38,7 @@ const initialState = {
4038
statusMessage: getStatusMessage(isPortSettingRequired ? 'new' : 'disconnected', 8081),
4139
location: {
4240
host: 'localhost',
43-
port: 8081,
41+
port: window.query.port || 8081,
4442
},
4543
isPortSettingRequired,
4644
};

app/setup.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import url from 'url';
2+
import qs from 'querystring';
3+
4+
const query = qs.parse(url.parse(location.href).query);
5+
6+
window.query = query;
7+
8+
if (query.editor) {
9+
process.env.EDITOR = query.editor;
10+
}
11+
12+
if (query.fontFamily) {
13+
const styleEl = document.createElement('style');
14+
document.head.appendChild(styleEl);
15+
styleEl.sheet.insertRule(`div *, span * { font-family: ${query.fontFamily} !important; }`, 0);
16+
}

app/utils/devMenu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const setTouchBar = () =>
3333
const invokeDevMenuMethod = ({ name, args }) =>
3434
worker && worker.postMessage({ method: 'invokeDevMenuMethod', name, args });
3535

36-
let networkInspectEnabled = false;
36+
let networkInspectEnabled = !!window.query.networkInspect;
3737
export const networkInspect = {
3838
isEnabled: () => !!networkInspectEnabled,
3939
getHighlightColor: () => (networkInspectEnabled ? '#7A7A7A' : '#363636'),

auto_updater.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
2-
"url":
3-
"https://github.com/jhen0409/react-native-debugger/releases/download/v0.7.20/rn-debugger-macos-x64.zip",
4-
"name": "v0.7.20",
5-
"notes":
6-
"1. Add the recently changes from redux-devtools-extension\n2. Fix context menu functions for RN 0.56\n3. Fix ref issue of Draggable component"
2+
"url": "https://github.com/jhen0409/react-native-debugger/releases/download/v0.8.0/rn-debugger-macos-x64.zip",
3+
"name": "v0.8.0",
4+
"notes": "1. Fix context menu functions on RN 0.57\n2. Update react-devtools-core for supporting react-profiler\n3. Implement root config file in home directory"
75
}

dist/css/style.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
html, body {
1+
html,
2+
body {
23
font-family: monaco, Consolas, Lucida Console, monospace;
34
overflow: hidden;
45
font-size: 100%;
@@ -8,6 +9,7 @@ html, body {
89
height: 100%;
910
background-color: rgb(53, 59, 70);
1011
}
12+
1113
#root {
1214
width: 100%;
1315
height: 100%;

0 commit comments

Comments
 (0)