Skip to content

Commit

Permalink
Add Object.fromEntries polyfill for use in text-index CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Nov 4, 2021
1 parent 78b2adc commit 31204eb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions products/jbrowse-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"ixixx": "^1.0.17",
"json-parse-better-errors": "^1.0.2",
"node-fetch": "^2.6.0",
"object.fromentries": "^2.0.5",
"tslib": "^1",
"unzipper": "^0.10.11"
},
Expand Down
6 changes: 6 additions & 0 deletions products/jbrowse-cli/src/commands/text-index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ import {
supported,
guessAdapterFromFileName,
} from '../types/common'
import fromEntries from 'object.fromentries'

if (!Object.fromEntries) {
// @ts-ignore
fromEntries.shim()
}

function readConf(confFilePath: string) {
return JSON.parse(fs.readFileSync(confFilePath, 'utf8')) as Config
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16073,7 +16073,7 @@ object.entries@^1.1.0, object.entries@^1.1.4:
define-properties "^1.1.3"
es-abstract "^1.19.1"

object.fromentries@^2.0.0, "object.fromentries@^2.0.0 || ^1.0.0", object.fromentries@^2.0.4:
object.fromentries@^2.0.0, "object.fromentries@^2.0.0 || ^1.0.0", object.fromentries@^2.0.4, object.fromentries@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.5.tgz#7b37b205109c21e741e605727fe8b0ad5fa08251"
integrity sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw==
Expand Down

0 comments on commit 31204eb

Please sign in to comment.