Skip to content

Commit

Permalink
decaffeinate: Convert actionability.coffee and 14 other files to JS
Browse files Browse the repository at this point in the history
  • Loading branch information
kuceb committed Dec 11, 2019
1 parent 2cdf378 commit be49ff3
Show file tree
Hide file tree
Showing 15 changed files with 5,246 additions and 4,529 deletions.
623 changes: 342 additions & 281 deletions packages/driver/src/cy/actionability.js

Large diffs are not rendered by default.

463 changes: 256 additions & 207 deletions packages/driver/src/cy/commands/cookies.js

Large diffs are not rendered by default.

958 changes: 514 additions & 444 deletions packages/driver/src/cypress.js

Large diffs are not rendered by default.

2,050 changes: 1,085 additions & 965 deletions packages/driver/src/cypress/cy.js

Large diffs are not rendered by default.

2,124 changes: 1,142 additions & 982 deletions packages/driver/src/cypress/runner.js

Large diffs are not rendered by default.

421 changes: 232 additions & 189 deletions packages/extension/app/background.js

Large diffs are not rendered by default.

50 changes: 30 additions & 20 deletions packages/extension/lib/extension.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,44 @@
fs = require("fs")
path = require("path")
Promise = require("bluebird")
background = require("../app/background")

fs = Promise.promisifyAll(fs)
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
let fs = require("fs");
const path = require("path");
const Promise = require("bluebird");
const background = require("../app/background");

fs = Promise.promisifyAll(fs);

module.exports = {
getPathToExtension: (args...) ->
args = [__dirname, "..", "dist"].concat(args)
getPathToExtension(...args) {
args = [__dirname, "..", "dist"].concat(args);

path.join.apply(path, args)
return path.join.apply(path, args);
},

getPathToTheme: ->
path.join(__dirname, "..", "theme")
getPathToTheme() {
return path.join(__dirname, "..", "theme");
},

getPathToRoot: ->
path.join(__dirname, "..")
getPathToRoot() {
return path.join(__dirname, "..");
},

setHostAndPath: (host, path) ->
src = @getPathToExtension("background.js")
setHostAndPath(host, path) {
const src = this.getPathToExtension("background.js");

fs.readFileAsync(src, "utf8")
.then (str) ->
return fs.readFileAsync(src, "utf8")
.then(str =>
str
.replace("CHANGE_ME_HOST", host)
.replace("CHANGE_ME_PATH", path)
);
},

getCookieUrl: background.getUrl
getCookieUrl: background.getUrl,

connect: background.connect
connect: background.connect,

app: background
}
};
Loading

0 comments on commit be49ff3

Please sign in to comment.