Fix babel scope tracker error on build

This commit is contained in:
Labhansh Agrawal 2019-12-03 17:33:52 +05:30 committed by Benjamin Staneck
parent a733963371
commit 41d70c3a15
6 changed files with 7 additions and 11 deletions

View file

@ -8,7 +8,7 @@ import {
} from '../constants/term-groups'; } from '../constants/term-groups';
import {SESSION_REQUEST} from '../constants/sessions'; import {SESSION_REQUEST} from '../constants/sessions';
import findBySession from '../utils/term-groups'; import findBySession from '../utils/term-groups';
import getRootGroups from '../selectors'; import {getRootGroups} from '../selectors';
import {setActiveSession, ptyExitSession, userExitSession} from './sessions'; import {setActiveSession, ptyExitSession, userExitSession} from './sessions';
import {Dispatch} from 'redux'; import {Dispatch} from 'redux';
import {ITermState, ITermGroup, HyperState} from '../hyper'; import {ITermState, ITermGroup, HyperState} from '../hyper';

View file

@ -1,6 +1,6 @@
import {php_escapeshellcmd as escapeShellCmd} from 'php-escape-shell'; import {php_escapeshellcmd as escapeShellCmd} from 'php-escape-shell';
import {isExecutable} from '../utils/file'; import {isExecutable} from '../utils/file';
import getRootGroups from '../selectors'; import {getRootGroups} from '../selectors';
import findBySession from '../utils/term-groups'; import findBySession from '../utils/term-groups';
import notify from '../utils/notify'; import notify from '../utils/notify';
import rpc from '../rpc'; import rpc from '../rpc';

View file

@ -4,7 +4,7 @@ import {createSelector} from 'reselect';
import Header from '../components/header'; import Header from '../components/header';
import {closeTab, changeTab, maximize, openHamburgerMenu, unmaximize, minimize, close} from '../actions/header'; import {closeTab, changeTab, maximize, openHamburgerMenu, unmaximize, minimize, close} from '../actions/header';
import {connect} from '../utils/plugins'; import {connect} from '../utils/plugins';
import getRootGroups from '../selectors'; import {getRootGroups} from '../selectors';
import {HyperState} from '../hyper'; import {HyperState} from '../hyper';
import {Dispatch} from 'redux'; import {Dispatch} from 'redux';
@ -29,7 +29,7 @@ const getTabs = createSelector(
}) })
); );
const HeaderContainer = connect( export const HeaderContainer = connect(
(state: HyperState) => { (state: HyperState) => {
return { return {
// active is an index // active is an index
@ -77,5 +77,3 @@ const HeaderContainer = connect(
}, },
null null
)(Header, 'Header'); )(Header, 'Header');
export default HeaderContainer;

View file

@ -8,7 +8,7 @@ import * as uiActions from '../actions/ui';
import {getRegisteredKeys, getCommandHandler, shouldPreventDefault} from '../command-registry'; import {getRegisteredKeys, getCommandHandler, shouldPreventDefault} from '../command-registry';
import stylis from 'stylis'; import stylis from 'stylis';
import HeaderContainer from './header'; import {HeaderContainer} from './header';
import TermsContainer from './terms'; import TermsContainer from './terms';
import NotificationsContainer from './notifications'; import NotificationsContainer from './notifications';
import {HyperState} from '../hyper'; import {HyperState} from '../hyper';

View file

@ -3,7 +3,7 @@ import {connect} from '../utils/plugins';
import {resizeSession, sendSessionData, setSessionXtermTitle, setActiveSession, onSearch} from '../actions/sessions'; import {resizeSession, sendSessionData, setSessionXtermTitle, setActiveSession, onSearch} from '../actions/sessions';
import {openContextMenu} from '../actions/ui'; import {openContextMenu} from '../actions/ui';
import getRootGroups from '../selectors'; import {getRootGroups} from '../selectors';
import {HyperState, TermsProps} from '../hyper'; import {HyperState, TermsProps} from '../hyper';
import {Dispatch} from 'redux'; import {Dispatch} from 'redux';

View file

@ -2,10 +2,8 @@ import {createSelector} from 'reselect';
import {HyperState} from './hyper'; import {HyperState} from './hyper';
const getTermGroups = ({termGroups}: Pick<HyperState, 'termGroups'>) => termGroups.termGroups; const getTermGroups = ({termGroups}: Pick<HyperState, 'termGroups'>) => termGroups.termGroups;
const getRootGroups = createSelector(getTermGroups, termGroups => export const getRootGroups = createSelector(getTermGroups, termGroups =>
Object.keys(termGroups) Object.keys(termGroups)
.map(uid => termGroups[uid]) .map(uid => termGroups[uid])
.filter(({parentUid}) => !parentUid) .filter(({parentUid}) => !parentUid)
); );
export default getRootGroups;