Skip to content

Commit

Permalink
Merge pull request #1461 from GMOD/fix_node10.9
Browse files Browse the repository at this point in the history
Alternative fsPromises usage
  • Loading branch information
rbuels authored Nov 19, 2020
2 parents a691938 + 1af6189 commit 06a36ff
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
4 changes: 3 additions & 1 deletion products/jbrowse-cli/src/commands/add-assembly.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { flags } from '@oclif/command'
import fs, { promises as fsPromises } from 'fs'
import fs from 'fs'
import path from 'path'
import JBrowseCommand, { Assembly, Sequence, Config } from '../base'

const fsPromises = fs.promises

function isValidJSON(string: string) {
try {
JSON.parse(string)
Expand Down
3 changes: 2 additions & 1 deletion products/jbrowse-cli/src/commands/add-connection.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { flags } from '@oclif/command'
import fetch from 'node-fetch'
import { promises as fsPromises } from 'fs'
import fs from 'fs'
import path from 'path'
import parseJSON from 'json-parse-better-errors'
import JBrowseCommand from '../base'

const fsPromises = fs.promises
interface Connection {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
[key: string]: any
Expand Down
4 changes: 3 additions & 1 deletion products/jbrowse-cli/src/commands/add-track.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
/* eslint curly:error */
import { flags } from '@oclif/command'
import fs, { promises as fsPromises } from 'fs'
import fs from 'fs'
import path from 'path'
import parseJSON from 'json-parse-better-errors'
import JBrowseCommand from '../base'

const fsPromises = fs.promises

interface Track {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
[key: string]: any
Expand Down
4 changes: 3 additions & 1 deletion products/jbrowse-cli/src/commands/admin-server.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { flags } from '@oclif/command'
import fs, { promises as fsPromises } from 'fs'
import fs from 'fs'
import crypto from 'crypto'
import boxen from 'boxen'
import chalk from 'chalk'
Expand All @@ -8,6 +8,8 @@ import express from 'express'
import cors from 'cors'
import JBrowseCommand, { Config } from '../base'

const fsPromises = fs.promises

function isValidPort(port: number) {
return port > 0 && port < 65535
}
Expand Down
4 changes: 3 additions & 1 deletion products/jbrowse-cli/src/commands/create.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
/* eslint curly:error */
import { flags } from '@oclif/command'
import { promises as fsPromises } from 'fs'
import fs from 'fs'
import fetch from 'node-fetch'
import unzip from 'unzipper'
import JBrowseCommand from '../base'

const fsPromises = fs.promises

export default class Create extends JBrowseCommand {
static description = 'Downloads and installs the latest JBrowse 2 release'

Expand Down
5 changes: 4 additions & 1 deletion products/jbrowse-cli/src/commands/set-default-session.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { flags } from '@oclif/command'
import { promises as fsPromises } from 'fs'
import fs from 'fs'

import parseJSON from 'json-parse-better-errors'
import JBrowseCommand from '../base'

const fsPromises = fs.promises

interface DefaultSession {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
[key: string]: any
Expand Down

0 comments on commit 06a36ff

Please sign in to comment.