mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 09:31:41 -05:00
WIP: swap ramda for rambda
It supports TS a bit better and is a bit quicker. But it has fewer functions
This commit is contained in:
parent
8a5f6dcb65
commit
9fe79529c7
15 changed files with 23 additions and 23 deletions
|
@ -21,7 +21,7 @@
|
||||||
"fuse.js": "^6.4.6",
|
"fuse.js": "^6.4.6",
|
||||||
"jasmine-fail-fast": "^2.0.1",
|
"jasmine-fail-fast": "^2.0.1",
|
||||||
"mark.js": "^8.11.1",
|
"mark.js": "^8.11.1",
|
||||||
"ramda": "^0.27.1",
|
"rambda": "^6.7.0",
|
||||||
"rss-parser": "^3.12.0",
|
"rss-parser": "^3.12.0",
|
||||||
"semver-compare": "^1.0.0",
|
"semver-compare": "^1.0.0",
|
||||||
"stream-browserify": "^3.0.0",
|
"stream-browserify": "^3.0.0",
|
||||||
|
@ -32,7 +32,6 @@
|
||||||
"@types/firefox-webext-browser": "^82.0.0",
|
"@types/firefox-webext-browser": "^82.0.0",
|
||||||
"@types/jest": "^26.0.23",
|
"@types/jest": "^26.0.23",
|
||||||
"@types/node": "^14.14.41",
|
"@types/node": "^14.14.41",
|
||||||
"@types/ramda": "^0.27.37",
|
|
||||||
"@types/selenium-webdriver": "^4.0.12",
|
"@types/selenium-webdriver": "^4.0.12",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.22.0",
|
"@typescript-eslint/eslint-plugin": "^4.22.0",
|
||||||
"@typescript-eslint/eslint-plugin-tslint": "^4.22.0",
|
"@typescript-eslint/eslint-plugin-tslint": "^4.22.0",
|
||||||
|
|
|
@ -24,7 +24,7 @@ import * as webext from "@src/lib/webext"
|
||||||
import { AutoContain } from "@src/lib/autocontainers"
|
import { AutoContain } from "@src/lib/autocontainers"
|
||||||
import * as extension_info from "@src/lib/extension_info"
|
import * as extension_info from "@src/lib/extension_info"
|
||||||
import * as omnibox from "@src/background/omnibox"
|
import * as omnibox from "@src/background/omnibox"
|
||||||
import * as R from "ramda"
|
import * as R from "rambda"
|
||||||
import * as webrequests from "@src/background/webrequests"
|
import * as webrequests from "@src/background/webrequests"
|
||||||
import * as commands from "@src/background/commands"
|
import * as commands from "@src/background/commands"
|
||||||
import * as meta from "@src/background/meta"
|
import * as meta from "@src/background/meta"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
import * as Native from "@src/lib/native"
|
import * as Native from "@src/lib/native"
|
||||||
import * as config from "@src/lib/config"
|
import * as config from "@src/lib/config"
|
||||||
import * as R from "ramda"
|
import * as R from "rambda"
|
||||||
import { getDownloadFilenameForUrl } from "@src/lib/url_util"
|
import { getDownloadFilenameForUrl } from "@src/lib/url_util"
|
||||||
|
|
||||||
/** Construct an object URL string from a given data URL
|
/** Construct an object URL string from a given data URL
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as excmds from "@src/.excmds_background.generated"
|
import * as excmds from "@src/.excmds_background.generated"
|
||||||
import * as R from "ramda"
|
import * as R from "rambda"
|
||||||
import * as config from "@src/lib/config"
|
import * as config from "@src/lib/config"
|
||||||
import { getTridactylTabs } from "@src/background/meta"
|
import { getTridactylTabs } from "@src/background/meta"
|
||||||
|
|
||||||
|
|
|
@ -48,10 +48,9 @@ import "@src/lib/number.clamp"
|
||||||
import * as genericParser from "@src/parsers/genericmode"
|
import * as genericParser from "@src/parsers/genericmode"
|
||||||
import * as perf from "@src/perf"
|
import * as perf from "@src/perf"
|
||||||
import state, * as State from "@src/state"
|
import state, * as State from "@src/state"
|
||||||
import * as R from "ramda"
|
import * as R from "rambda"
|
||||||
import { KeyEventLike } from "./lib/keyseq"
|
import { KeyEventLike } from "./lib/keyseq"
|
||||||
|
|
||||||
|
|
||||||
/** @hidden **/
|
/** @hidden **/
|
||||||
const logger = new Logger("cmdline")
|
const logger = new Logger("cmdline")
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import * as Containers from "@src/lib/containers"
|
||||||
import * as Completions from "@src/completions"
|
import * as Completions from "@src/completions"
|
||||||
import * as config from "@src/lib/config"
|
import * as config from "@src/lib/config"
|
||||||
import * as Messaging from "@src/lib/messaging"
|
import * as Messaging from "@src/lib/messaging"
|
||||||
import * as R from "ramda"
|
import * as R from "rambda"
|
||||||
|
|
||||||
class BufferCompletionOption
|
class BufferCompletionOption
|
||||||
extends Completions.CompletionOptionHTML
|
extends Completions.CompletionOptionHTML
|
||||||
|
|
|
@ -153,7 +153,7 @@ import { EditorCmds as editor } from "@src/content/editor"
|
||||||
import * as updates from "@src/lib/updates"
|
import * as updates from "@src/lib/updates"
|
||||||
import * as urlutils from "@src/lib/url_util"
|
import * as urlutils from "@src/lib/url_util"
|
||||||
import * as scrolling from "@src/content/scrolling"
|
import * as scrolling from "@src/content/scrolling"
|
||||||
import * as R from "ramda"
|
import * as R from "rambda"
|
||||||
import * as visual from "@src/lib/visual"
|
import * as visual from "@src/lib/visual"
|
||||||
import * as metadata from "@src/.metadata.generated"
|
import * as metadata from "@src/.metadata.generated"
|
||||||
/* tslint:disable:import-spacing */
|
/* tslint:disable:import-spacing */
|
||||||
|
|
|
@ -36,7 +36,7 @@ import {
|
||||||
import { contentState } from "@src/content/state_content"
|
import { contentState } from "@src/content/state_content"
|
||||||
import * as config from "@src/lib/config"
|
import * as config from "@src/lib/config"
|
||||||
import Logger from "@src/lib/logging"
|
import Logger from "@src/lib/logging"
|
||||||
import * as R from "ramda"
|
import * as R from "rambda"
|
||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
const logger = new Logger("hinting")
|
const logger = new Logger("hinting")
|
||||||
|
|
|
@ -91,7 +91,7 @@ import * as Native from "@src/lib/native"
|
||||||
import * as TTS from "@src/lib/text_to_speech"
|
import * as TTS from "@src/lib/text_to_speech"
|
||||||
import * as excmd_parser from "@src/parsers/exmode"
|
import * as excmd_parser from "@src/parsers/exmode"
|
||||||
import * as escape from "@src/lib/escape"
|
import * as escape from "@src/lib/escape"
|
||||||
import * as R from "ramda"
|
import * as R from "rambda"
|
||||||
import semverCompare from "semver-compare"
|
import semverCompare from "semver-compare"
|
||||||
import * as hint_util from "@src/lib/hint_util"
|
import * as hint_util from "@src/lib/hint_util"
|
||||||
import { OpenMode } from "@src/lib/hint_util"
|
import { OpenMode } from "@src/lib/hint_util"
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* Intrepid Tridactyl users: this page is how Tridactyl arranges and manages its settings internally. To view your own settings, use `:viewconfig` and `:viewconfig --user`. To understand how to set settings, see `:help set`.
|
* Intrepid Tridactyl users: this page is how Tridactyl arranges and manages its settings internally. To view your own settings, use `:viewconfig` and `:viewconfig --user`. To understand how to set settings, see `:help set`.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
import * as R from "ramda"
|
import * as R from "rambda"
|
||||||
import * as binding from "@src/lib/binding"
|
import * as binding from "@src/lib/binding"
|
||||||
import * as platform from "@src/lib/platform"
|
import * as platform from "@src/lib/platform"
|
||||||
import { DeepPartial } from "tsdef"
|
import { DeepPartial } from "tsdef"
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
import { filter, find, izip } from "@src/lib/itertools"
|
import { filter, find, izip } from "@src/lib/itertools"
|
||||||
import { Parser } from "@src/lib/nearley_utils"
|
import { Parser } from "@src/lib/nearley_utils"
|
||||||
import * as config from "@src/lib/config"
|
import * as config from "@src/lib/config"
|
||||||
import * as R from "ramda"
|
import * as R from "rambda"
|
||||||
import grammar from "@src/grammars/.bracketexpr.generated"
|
import grammar from "@src/grammars/.bracketexpr.generated"
|
||||||
const bracketexpr_grammar = grammar
|
const bracketexpr_grammar = grammar
|
||||||
const bracketexpr_parser = new Parser(bracketexpr_grammar)
|
const bracketexpr_parser = new Parser(bracketexpr_grammar)
|
||||||
|
@ -389,7 +389,9 @@ export function minimalKeyToMozMap(key: MinimalKey): string {
|
||||||
key.ctrlKey && mozMap.push("MacCtrl")
|
key.ctrlKey && mozMap.push("MacCtrl")
|
||||||
key.shiftKey && mozMap.push("Shift")
|
key.shiftKey && mozMap.push("Shift")
|
||||||
key.metaKey && mozMap.push("Command")
|
key.metaKey && mozMap.push("Command")
|
||||||
const jsKey2commandKey = R.invertObj(commandKey2jsKey)
|
const jsKey2commandKey = Object.fromEntries(
|
||||||
|
Object.entries(commandKey2jsKey).map(([key, value]) => [value, key]),
|
||||||
|
)
|
||||||
mozMap.push(R.propOr(key.key.toUpperCase(), key.key, jsKey2commandKey))
|
mozMap.push(R.propOr(key.key.toUpperCase(), key.key, jsKey2commandKey))
|
||||||
return mozMap.join("+")
|
return mozMap.join("+")
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import * as R from "ramda"
|
import * as R from "rambda"
|
||||||
|
|
||||||
// Synchronous version of runtime.getPlatformInfo()
|
// Synchronous version of runtime.getPlatformInfo()
|
||||||
// Not as exhaustive as the real thing
|
// Not as exhaustive as the real thing
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
import Logger from "@src/lib/logging"
|
import Logger from "@src/lib/logging"
|
||||||
import * as messaging from "@src/lib/messaging"
|
import * as messaging from "@src/lib/messaging"
|
||||||
import { notBackground } from "@src/lib/webext"
|
import { notBackground } from "@src/lib/webext"
|
||||||
import * as R from "ramda"
|
import * as R from "rambda"
|
||||||
|
|
||||||
const logger = new Logger("state")
|
const logger = new Logger("state")
|
||||||
|
|
||||||
|
|
|
@ -6,15 +6,15 @@
|
||||||
"noEmitOnError": true,
|
"noEmitOnError": true,
|
||||||
"outDir": "build/tsc-out",
|
"outDir": "build/tsc-out",
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"target": "es2017",
|
"target": "es2019",
|
||||||
"lib": ["es2017","es2019.array", "es2018.promise", "dom", "dom.iterable"],
|
"lib": ["es2019", "dom", "dom.iterable"],
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"alwaysStrict": true,
|
"alwaysStrict": true,
|
||||||
"strictBindCallApply": true,
|
"strictBindCallApply": true,
|
||||||
"noImplicitThis": true,
|
"noImplicitThis": true,
|
||||||
"strictFunctionTypes": true,
|
"strictFunctionTypes": true,
|
||||||
"baseUrl": "src/",
|
"baseUrl": "src/",
|
||||||
"types": ["@types/ramda", "@types/firefox-webext-browser", "web-ext-types"],
|
"types": ["@types/firefox-webext-browser", "web-ext-types"],
|
||||||
"paths": {
|
"paths": {
|
||||||
"@src/*": ["*"]
|
"@src/*": ["*"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -5850,10 +5850,10 @@ railroad-diagrams@^1.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz#eb7e6267548ddedfb899c1b90e57374559cddb7e"
|
resolved "https://registry.yarnpkg.com/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz#eb7e6267548ddedfb899c1b90e57374559cddb7e"
|
||||||
integrity sha1-635iZ1SN3t+4mcG5Dlc3RVnN234=
|
integrity sha1-635iZ1SN3t+4mcG5Dlc3RVnN234=
|
||||||
|
|
||||||
ramda@^0.27.1:
|
rambda@^6.7.0:
|
||||||
version "0.27.1"
|
version "6.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.1.tgz#66fc2df3ef873874ffc2da6aa8984658abacf5c9"
|
resolved "https://registry.yarnpkg.com/rambda/-/rambda-6.7.0.tgz#50322efdd23a108b61eb6ac4e0868d10dd95b4aa"
|
||||||
integrity sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw==
|
integrity sha512-qg2atEwhAS4ipYoNfggkIP7qBUbY2OqdW17n25VqZIz5YC1MIwSpIToQ7XacvqSCZz16efM8Y8QKLx+Js1Sybg==
|
||||||
|
|
||||||
randexp@0.4.6:
|
randexp@0.4.6:
|
||||||
version "0.4.6"
|
version "0.4.6"
|
||||||
|
|
Loading…
Add table
Reference in a new issue