mirror of
https://github.com/desktop/desktop
synced 2024-08-24 18:57:33 +00:00
Enable esModuleInterop in TypeScript configuration
This commit is contained in:
parent
eee3cf8268
commit
a3f21ac29b
|
@ -1,4 +1,8 @@
|
|||
import * as mri from 'mri'
|
||||
import mri, {
|
||||
DictionaryObject,
|
||||
Options as MriOptions,
|
||||
ArrayOrString,
|
||||
} from 'mri'
|
||||
import chalk from 'chalk'
|
||||
|
||||
import { dasherizeOption, CommandError } from './util'
|
||||
|
@ -45,10 +49,10 @@ function logError(err: CommandError) {
|
|||
|
||||
console.log() // nice blank line before the command prompt
|
||||
|
||||
interface IMRIOpts extends mri.Options {
|
||||
alias: mri.DictionaryObject<mri.ArrayOrString>
|
||||
interface IMRIOpts extends MriOptions {
|
||||
alias: DictionaryObject<ArrayOrString>
|
||||
boolean: Array<string>
|
||||
default: mri.DictionaryObject
|
||||
default: DictionaryObject
|
||||
string: Array<string>
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import * as Path from 'path'
|
|||
import { ChildProcess } from 'child_process'
|
||||
import * as FSE from 'fs-extra'
|
||||
import { GitError } from 'dugite'
|
||||
import * as byline from 'byline'
|
||||
import byline from 'byline'
|
||||
|
||||
import { Repository } from '../../models/repository'
|
||||
import {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as Path from 'path'
|
||||
import fileUrl = require('file-url')
|
||||
import fileUrl from 'file-url'
|
||||
|
||||
/**
|
||||
* Resolve and encode the path information into a URL.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { ChildProcess } from 'child_process'
|
||||
import * as Fs from 'fs'
|
||||
import * as Path from 'path'
|
||||
import * as byline from 'byline'
|
||||
import byline from 'byline'
|
||||
|
||||
import { GitProgressParser, IGitProgress, IGitOutput } from './git'
|
||||
import { IGitExecutionOptions } from '../git/core'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import * as moment from 'moment'
|
||||
import moment from 'moment'
|
||||
|
||||
import {
|
||||
ReleaseMetadata,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import * as Deque from 'double-ended-queue'
|
||||
import Deque from 'double-ended-queue'
|
||||
|
||||
import {
|
||||
FileEntry,
|
||||
|
|
|
@ -228,7 +228,7 @@ import {
|
|||
import { BranchPruner } from './helpers/branch-pruner'
|
||||
import { enableUpdateRemoteUrl } from '../feature-flag'
|
||||
import { Banner, BannerType } from '../../models/banner'
|
||||
import * as moment from 'moment'
|
||||
import moment from 'moment'
|
||||
import { isDarkModeEnabled } from '../../ui/lib/dark-theme'
|
||||
import { ComputedAction } from '../../models/computed-action'
|
||||
import {
|
||||
|
|
|
@ -12,7 +12,7 @@ import {
|
|||
} from '../../git'
|
||||
import { fatalError } from '../../fatal-error'
|
||||
import { RepositoryStateCache } from '../repository-state-cache'
|
||||
import * as moment from 'moment'
|
||||
import moment from 'moment'
|
||||
|
||||
/** Check if a repo needs to be pruned at least every 4 hours */
|
||||
const BackgroundPruneMinimumInterval = 1000 * 60 * 60 * 4
|
||||
|
|
|
@ -8,7 +8,7 @@ import { ILaunchStats } from '../lib/stats'
|
|||
import { menuFromElectronMenu } from '../models/app-menu'
|
||||
import { now } from './now'
|
||||
import * as path from 'path'
|
||||
import * as windowStateKeeper from 'electron-window-state'
|
||||
import windowStateKeeper from 'electron-window-state'
|
||||
|
||||
export class AppWindow {
|
||||
private window: Electron.BrowserWindow
|
||||
|
|
|
@ -12,7 +12,7 @@ import {
|
|||
} from './app'
|
||||
import { GitError, isAuthFailureError } from '../lib/git/core'
|
||||
import { Popup, PopupType } from '../models/popup'
|
||||
import { CSSTransitionGroup } from 'react-transition-group'
|
||||
import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup'
|
||||
import { OkCancelButtonGroup } from './dialog/ok-cancel-button-group'
|
||||
import { ErrorWithMetadata } from '../lib/error-with-metadata'
|
||||
import { RetryActionType, RetryAction } from '../models/retry-actions'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
|
||||
import { Octicon, OcticonSymbol } from '../octicons'
|
||||
import { MenuItem } from '../../models/app-menu'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
|
||||
import { List, ClickSource, SelectionSource } from '../lib/list'
|
||||
import {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as React from 'react'
|
||||
import { ipcRenderer, remote } from 'electron'
|
||||
import { CSSTransitionGroup } from 'react-transition-group'
|
||||
import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup'
|
||||
|
||||
import {
|
||||
IAppState,
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
} from '../lib/list'
|
||||
import { IAutocompletionProvider } from './index'
|
||||
import { fatalError } from '../../lib/fatal-error'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
|
||||
interface IRange {
|
||||
readonly start: number
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as moment from 'moment'
|
||||
import moment from 'moment'
|
||||
|
||||
import { IMatches } from '../../lib/fuzzy-find'
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import * as React from 'react'
|
|||
import { Octicon, OcticonSymbol } from '../octicons'
|
||||
import { APIRefState, IAPIRefStatus } from '../../lib/api'
|
||||
import { assertNever } from '../../lib/fatal-error'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
import { getRefStatusSummary } from './pull-request-status'
|
||||
import { GitHubRepository } from '../../models/github-repository'
|
||||
import { IDisposable } from 'event-kit'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as React from 'react'
|
||||
import * as moment from 'moment'
|
||||
import * as classNames from 'classnames'
|
||||
import moment from 'moment'
|
||||
import classNames from 'classnames'
|
||||
import { Octicon, OcticonSymbol } from '../octicons'
|
||||
import { CIStatus } from './ci-status'
|
||||
import { HighlightText } from '../lib/highlight-text'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as moment from 'moment'
|
||||
import moment from 'moment'
|
||||
import {
|
||||
FilterList,
|
||||
IFilterListGroup,
|
||||
|
|
|
@ -36,7 +36,7 @@ import { RebaseConflictState, ConflictState } from '../../lib/app-state'
|
|||
import { ContinueRebase } from './continue-rebase'
|
||||
import { Octicon, OcticonSymbol } from '../octicons'
|
||||
import { IStashEntry } from '../../models/stash-entry'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
import { hasWritePermission } from '../../models/github-repository'
|
||||
import { hasConflictedFiles } from '../../lib/status'
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
import {
|
||||
AutocompletingTextArea,
|
||||
AutocompletingInput,
|
||||
|
|
|
@ -28,7 +28,7 @@ import {
|
|||
} from '../autocompletion'
|
||||
import { ClickSource } from '../lib/list'
|
||||
import { WorkingDirectoryFileChange } from '../../models/status'
|
||||
import { CSSTransitionGroup } from 'react-transition-group'
|
||||
import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup'
|
||||
import { openFile } from '../lib/open-file'
|
||||
import { Account } from '../../models/account'
|
||||
import { PopupType } from '../../models/popup'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
|
||||
interface IDialogContentProps {
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
import { DialogHeader } from './header'
|
||||
import { createUniqueId, releaseUniqueId } from '../lib/id-pool'
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
import { Button } from '../lib/button'
|
||||
|
||||
interface IOkCancelButtonGroupProps {
|
||||
|
|
|
@ -1,12 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as CodeMirror from 'codemirror'
|
||||
|
||||
// Required for us to be able to customize the foreground color of selected text
|
||||
import 'codemirror/addon/selection/mark-selection'
|
||||
|
||||
// Autocompletion plugin
|
||||
import 'codemirror/addon/hint/show-hint'
|
||||
import {
|
||||
import CodeMirror, {
|
||||
Doc,
|
||||
EditorChangeLinkedList,
|
||||
Editor,
|
||||
|
@ -14,6 +7,12 @@ import {
|
|||
LineHandle,
|
||||
} from 'codemirror'
|
||||
|
||||
// Required for us to be able to customize the foreground color of selected text
|
||||
import 'codemirror/addon/selection/mark-selection'
|
||||
|
||||
// Autocompletion plugin
|
||||
import 'codemirror/addon/hint/show-hint'
|
||||
|
||||
if (__DARWIN__) {
|
||||
// This has to be required to support the `simple` scrollbar style.
|
||||
require('codemirror/addon/scroll/simplescrollbars')
|
||||
|
@ -76,7 +75,7 @@ interface ICodeMirrorHostProps {
|
|||
* given editor by accessing undocumented APIs. This is likely
|
||||
* to break in the future.
|
||||
*/
|
||||
function cancelActiveSelection(cm: CodeMirror.Editor) {
|
||||
function cancelActiveSelection(cm: Editor) {
|
||||
if (cm.state && cm.state.selectingText instanceof Function) {
|
||||
try {
|
||||
// Simulate a mouseup event which will cause CodeMirror
|
||||
|
|
|
@ -3,7 +3,7 @@ import { ImageContainer } from './image-container'
|
|||
import { ICommonImageDiffProperties } from './modified-image-diff'
|
||||
import { ISize } from './sizing'
|
||||
import { formatBytes, Sign } from '../../lib/bytes'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
|
||||
interface ITwoUpProps extends ICommonImageDiffProperties {
|
||||
readonly previousImageSize: ISize | null
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
|
||||
import { Repository } from '../../models/repository'
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
|
||||
import { FileChange } from '../../models/status'
|
||||
import { Octicon, OcticonSymbol } from '../octicons'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import { CSSTransitionGroup } from 'react-transition-group'
|
||||
import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup'
|
||||
|
||||
import { IGitHubUser } from '../../lib/databases'
|
||||
import { Commit } from '../../models/commit'
|
||||
|
|
|
@ -4,7 +4,7 @@ import * as React from 'react'
|
|||
import * as ReactDOM from 'react-dom'
|
||||
import * as Path from 'path'
|
||||
|
||||
import * as moment from 'moment'
|
||||
import moment from 'moment'
|
||||
|
||||
import { ipcRenderer, remote } from 'electron'
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
|
||||
interface IAccessTextProps {
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
import { ComputedAction } from '../../models/computed-action'
|
||||
import { assertNever } from '../../lib/fatal-error'
|
||||
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
import * as React from 'react'
|
||||
import * as CodeMirror from 'codemirror'
|
||||
import CodeMirror, {
|
||||
Editor,
|
||||
EditorConfiguration,
|
||||
Doc,
|
||||
Position,
|
||||
TextMarkerOptions,
|
||||
} from 'codemirror'
|
||||
import * as URL from 'url'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
import { UserAutocompletionProvider, IUserHit } from '../autocompletion'
|
||||
import { Editor, Doc, Position } from 'codemirror'
|
||||
import { getDotComAPIEndpoint } from '../../lib/api'
|
||||
import { compare } from '../../lib/compare'
|
||||
import { arrayEquals } from '../../lib/equality'
|
||||
|
@ -177,7 +182,7 @@ function scanUntil(
|
|||
function appendTextMarker(
|
||||
cm: Editor,
|
||||
text: string,
|
||||
options: CodeMirror.TextMarkerOptions
|
||||
options: TextMarkerOptions
|
||||
): ActualTextMarker {
|
||||
const doc = cm.getDoc()
|
||||
const from = doc.posFromIndex(Infinity)
|
||||
|
@ -206,7 +211,7 @@ function orderByPosition(x: ActualTextMarker, y: ActualTextMarker) {
|
|||
// The types for CodeMirror.TextMarker is all wrong, this is what it
|
||||
// actually looks like
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
interface ActualTextMarker extends CodeMirror.TextMarkerOptions {
|
||||
interface ActualTextMarker extends TextMarkerOptions {
|
||||
/** Remove the mark. */
|
||||
clear(): void
|
||||
|
||||
|
@ -696,7 +701,7 @@ export class AuthorInput extends React.Component<IAuthorInputProps, {}> {
|
|||
}
|
||||
|
||||
private initializeCodeMirror(host: HTMLDivElement) {
|
||||
const CodeMirrorOptions: CodeMirror.EditorConfiguration & {
|
||||
const CodeMirrorOptions: EditorConfiguration & {
|
||||
hintOptions: any
|
||||
} = {
|
||||
mode: null,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
import { Avatar } from './avatar'
|
||||
import { IAvatarUser } from '../../models/avatar'
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
|
||||
export interface IButtonProps {
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
|
||||
interface IErrorsProps {
|
||||
/** The class name for the internal element. */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as React from 'react'
|
||||
import { Octicon, OcticonSymbol } from '../octicons'
|
||||
import { TextBox, ITextBoxProps } from './text-box'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
|
||||
interface IFancyTextBoxProps extends ITextBoxProps {
|
||||
/** Icon to render */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classnames from 'classnames'
|
||||
import classnames from 'classnames'
|
||||
|
||||
import {
|
||||
List,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
|
||||
interface IFocusContainerProps {
|
||||
readonly className?: string
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
|
||||
interface IFormProps {
|
||||
/** The class name for the form. */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as React from 'react'
|
||||
import { shell } from '../../lib/app-shell'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
|
||||
interface ILinkButtonProps {
|
||||
/** A URI to open on click. */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
|
||||
interface IListRowProps {
|
||||
/** the total number of row in this list */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
|
||||
interface IRowProps {
|
||||
/** The class name for the internal element. */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
import { showContextualMenu } from '../main-process-proxy'
|
||||
|
||||
interface ITextAreaProps {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
import { createUniqueId, releaseUniqueId } from './id-pool'
|
||||
import { LinkButton } from './link-button'
|
||||
import { showContextualMenu } from '../main-process-proxy'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
|
||||
interface IToggleButtonProps {
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as React from 'react'
|
||||
import { OcticonSymbol } from './octicons.generated'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
import { createUniqueId, releaseUniqueId } from '../lib/id-pool'
|
||||
|
||||
interface IOcticonProps {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as moment from 'moment'
|
||||
import moment from 'moment'
|
||||
|
||||
interface IRelativeTimeProps {
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as React from 'react'
|
||||
|
||||
import * as ReactCSSTransitionReplace from 'react-css-transition-replace'
|
||||
import ReactCSSTransitionReplace from 'react-css-transition-replace'
|
||||
|
||||
interface ISuggestedActionGroup {
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
import { Button } from '../lib/button'
|
||||
|
||||
interface ISuggestedActionProps {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
|
||||
/** The tab bar type. */
|
||||
export enum TabBarType {
|
||||
|
|
|
@ -9,7 +9,7 @@ import { BranchesContainer, PullRequestBadge } from '../branches'
|
|||
import { assertNever } from '../../lib/fatal-error'
|
||||
import { BranchesTab } from '../../models/branches-tab'
|
||||
import { PullRequest } from '../../models/pull-request'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
import { UncommittedChangesStrategy } from '../../models/uncommitted-changes-strategy'
|
||||
|
||||
interface IBranchDropdownProps {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as React from 'react'
|
||||
import { Octicon, OcticonSymbol } from '../octicons'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
import { assertNever } from '../../lib/fatal-error'
|
||||
import { Button } from '../lib/button'
|
||||
import { clamp } from '../../lib/clamp'
|
||||
|
|
|
@ -3,7 +3,7 @@ import { Octicon, OcticonSymbol } from '../octicons'
|
|||
import { assertNever } from '../../lib/fatal-error'
|
||||
import { ToolbarButton, ToolbarButtonStyle } from './button'
|
||||
import { rectEquals } from '../lib/rect'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
|
||||
export type DropdownState = 'open' | 'closed'
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import { Octicon, OcticonSymbol } from '../octicons'
|
|||
import { RelativeTime } from '../relative-time'
|
||||
|
||||
import { ToolbarButton, ToolbarButtonStyle } from './button'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
|
||||
interface IPushPullButtonProps {
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
|
||||
interface IUiViewProps extends React.HTMLProps<HTMLDivElement> {}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
|
||||
import { Dispatcher } from '../dispatcher'
|
||||
import { encodePathAsUrl } from '../../lib/path'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import { CSSTransitionGroup } from 'react-transition-group'
|
||||
import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup'
|
||||
import { WindowState } from '../../lib/window-state'
|
||||
|
||||
interface IFullScreenInfoProps {
|
||||
|
|
|
@ -5,7 +5,7 @@ import {
|
|||
getWindowState,
|
||||
windowStateChannelName,
|
||||
} from '../../lib/window-state'
|
||||
import * as classNames from 'classnames'
|
||||
import classNames from 'classnames'
|
||||
|
||||
// These paths are all drawn to a 10x10 view box and replicate the symbols
|
||||
// seen on Windows 10 window controls.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import { CSSTransitionGroup } from 'react-transition-group'
|
||||
import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup'
|
||||
|
||||
interface IZoomInfoProps {
|
||||
readonly windowZoomFactor: number
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import * as moment from 'moment'
|
||||
import moment from 'moment'
|
||||
import { BranchPruner } from '../../src/lib/stores/helpers/branch-pruner'
|
||||
import { Repository } from '../../src/models/repository'
|
||||
import { GitStoreCache } from '../../src/lib/stores/git-store-cache'
|
||||
|
|
|
@ -8,7 +8,7 @@ import {
|
|||
getBranchCheckouts,
|
||||
} from '../../../src/lib/git'
|
||||
import { setupFixtureRepository } from '../../helpers/repositories'
|
||||
import * as moment from 'moment'
|
||||
import moment from 'moment'
|
||||
import { GitProcess } from 'dugite'
|
||||
|
||||
async function createAndCheckout(
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import * as path from 'path'
|
||||
import * as HtmlWebpackPlugin from 'html-webpack-plugin'
|
||||
import * as CleanWebpackPlugin from 'clean-webpack-plugin'
|
||||
import * as webpack from 'webpack'
|
||||
import * as merge from 'webpack-merge'
|
||||
import HtmlWebpackPlugin from 'html-webpack-plugin'
|
||||
import CleanWebpackPlugin from 'clean-webpack-plugin'
|
||||
import webpack from 'webpack'
|
||||
import merge from 'webpack-merge'
|
||||
import { getChannel } from '../script/dist-info'
|
||||
import { getReplacements } from './app-info'
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as common from './webpack.common'
|
||||
|
||||
import * as webpack from 'webpack'
|
||||
import * as merge from 'webpack-merge'
|
||||
import merge from 'webpack-merge'
|
||||
|
||||
const config: webpack.Configuration = {
|
||||
mode: 'development',
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import * as common from './webpack.common'
|
||||
|
||||
import * as webpack from 'webpack'
|
||||
import * as merge from 'webpack-merge'
|
||||
import * as MiniCssExtractPlugin from 'mini-css-extract-plugin'
|
||||
import merge from 'webpack-merge'
|
||||
import MiniCssExtractPlugin from 'mini-css-extract-plugin'
|
||||
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'
|
||||
const MinifyPlugin = require('babel-minify-webpack-plugin')
|
||||
|
||||
|
|
|
@ -4,7 +4,12 @@
|
|||
import * as path from 'path'
|
||||
import * as cp from 'child_process'
|
||||
import * as fs from 'fs-extra'
|
||||
import * as packager from 'electron-packager'
|
||||
import packager, {
|
||||
arch,
|
||||
ElectronNotarizeOptions,
|
||||
ElectronOsXSignOptions,
|
||||
Options,
|
||||
} from 'electron-packager'
|
||||
|
||||
import { externals } from '../app/webpack.common'
|
||||
|
||||
|
@ -126,7 +131,7 @@ interface IPackageAdditionalOptions {
|
|||
readonly name: string
|
||||
readonly schemes: ReadonlyArray<string>
|
||||
}>
|
||||
readonly osxSign: packager.ElectronOsXSignOptions & {
|
||||
readonly osxSign: ElectronOsXSignOptions & {
|
||||
readonly hardenedRuntime?: boolean
|
||||
}
|
||||
}
|
||||
|
@ -143,7 +148,7 @@ function packageApp() {
|
|||
)
|
||||
}
|
||||
|
||||
const toPackageArch = (targetArch: string | undefined): packager.arch => {
|
||||
const toPackageArch = (targetArch: string | undefined): arch => {
|
||||
if (targetArch === undefined) {
|
||||
return 'x64'
|
||||
}
|
||||
|
@ -172,7 +177,7 @@ function packageApp() {
|
|||
)
|
||||
}
|
||||
|
||||
const options: packager.Options & IPackageAdditionalOptions = {
|
||||
const options: Options & IPackageAdditionalOptions = {
|
||||
name: getExecutableName(),
|
||||
platform: toPackagePlatform(process.platform),
|
||||
arch: toPackageArch(process.env.TARGET_ARCH),
|
||||
|
@ -442,9 +447,7 @@ ${licenseText}`
|
|||
fs.removeSync(chooseALicense)
|
||||
}
|
||||
|
||||
function getNotarizationCredentials():
|
||||
| packager.ElectronNotarizeOptions
|
||||
| undefined {
|
||||
function getNotarizationCredentials(): ElectronNotarizeOptions | undefined {
|
||||
const appleId = process.env.APPLE_ID
|
||||
const appleIdPassword = process.env.APPLE_ID_PASSWORD
|
||||
if (appleId === undefined || appleIdPassword === undefined) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import { promisify } from 'util'
|
|||
|
||||
import { licenseOverrides } from './license-overrides'
|
||||
|
||||
import * as _legalEagle from 'legal-eagle'
|
||||
import _legalEagle from 'legal-eagle'
|
||||
const legalEagle = promisify(_legalEagle)
|
||||
|
||||
import { getVersion } from '../../app/package-info'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import * as Path from 'path'
|
||||
import { spawnSync, SpawnSyncOptions } from 'child_process'
|
||||
|
||||
import * as glob from 'glob'
|
||||
import glob from 'glob'
|
||||
|
||||
const root = Path.dirname(__dirname)
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ import * as Fs from 'fs'
|
|||
import { execSync } from 'child_process'
|
||||
import * as AWS from 'aws-sdk'
|
||||
import * as Crypto from 'crypto'
|
||||
import * as request from 'request'
|
||||
import request from 'request'
|
||||
|
||||
console.log('Packaging…')
|
||||
execSync('yarn package')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as express from 'express'
|
||||
import * as webpack from 'webpack'
|
||||
import * as devMiddleware from 'webpack-dev-middleware'
|
||||
import * as hotMiddleware from 'webpack-hot-middleware'
|
||||
import express from 'express'
|
||||
import webpack from 'webpack'
|
||||
import devMiddleware from 'webpack-dev-middleware'
|
||||
import hotMiddleware from 'webpack-hot-middleware'
|
||||
|
||||
import { forceUnwrap as u } from '../app/src/lib/fatal-error'
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"esModuleInterop": true,
|
||||
"target": "es2017",
|
||||
"allowUnreachableCode": false,
|
||||
"allowUnusedLabels": false,
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
import * as Path from 'path'
|
||||
import * as Fs from 'fs'
|
||||
|
||||
import * as Ajv from 'ajv'
|
||||
import Ajv, { ErrorObject } from 'ajv'
|
||||
|
||||
function handleError(error: string) {
|
||||
console.error(error)
|
||||
process.exit(-1)
|
||||
}
|
||||
|
||||
function formatErrors(errors: Ajv.ErrorObject[]): string {
|
||||
function formatErrors(errors: ErrorObject[]): string {
|
||||
return errors
|
||||
.map(error => {
|
||||
const { dataPath, message } = error
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"target": "es2017",
|
||||
"esModuleInterop": true,
|
||||
"allowUnreachableCode": false,
|
||||
"allowUnusedLabels": false,
|
||||
"noImplicitReturns": true,
|
||||
|
|
Loading…
Reference in a new issue