diff --git a/app/package-lock.json b/app/package-lock.json index 972224c1a..f9d0513fe 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -78,6 +78,20 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" + }, + "are-we-there-yet": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", + "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.3.3" + } + }, "asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", @@ -697,6 +711,14 @@ "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.3.0.tgz", "integrity": "sha512-DpLh5EzMR2kzvX1KIlVC0VkC3iZtHKTgdtZ0a3pglBZdaQFjt5S9g9xd1lE+YvXyfd6mtCeRnrUfOLYiTMlNSw==" }, + "bl": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.1.tgz", + "integrity": "sha1-ysMo977kVzDUBLaSID/LWQ4XLV4=", + "requires": { + "readable-stream": "2.3.3" + } + }, "block-elements": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/block-elements/-/block-elements-1.2.0.tgz", @@ -792,6 +814,11 @@ "parse5": "3.0.3" } }, + "chownr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", + "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=" + }, "chromium-net-errors": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/chromium-net-errors/-/chromium-net-errors-1.0.3.tgz", @@ -864,6 +891,11 @@ "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, "coffee-script": { "version": "1.12.7", "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.7.tgz", @@ -937,6 +969,11 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + }, "convert-source-map": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", @@ -1088,6 +1125,11 @@ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + }, "detect-indent": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", @@ -1096,6 +1138,11 @@ "repeating": "2.0.1" } }, + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" + }, "direction": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/direction/-/direction-0.1.5.tgz", @@ -1268,6 +1315,14 @@ "iconv-lite": "0.4.19" } }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "requires": { + "once": "1.4.0" + } + }, "entities": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", @@ -1472,6 +1527,11 @@ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-0.1.6.tgz", "integrity": "sha1-jHrES4e6q1XNUMgo3Dh3jqwFLqU=" }, + "expand-template": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-1.1.0.tgz", + "integrity": "sha512-kkjwkMqj0h4w/sb32ERCDxCQkREMCAgS39DscDnSwDsbxnwwM1BTZySdC3Bn1lhY7vL08n9GoO/fVTynjDgRyQ==" + }, "extend": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", @@ -1628,6 +1688,21 @@ "is-callable": "1.1.3" } }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "requires": { + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, "gaze": { "version": "0.3.4", "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.3.4.tgz", @@ -1688,6 +1763,11 @@ "assert-plus": "1.0.0" } }, + "github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" + }, "glob": { "version": "5.0.15", "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", @@ -1789,6 +1869,11 @@ "has-symbol-support-x": "1.4.1" } }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + }, "hashids": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/hashids/-/hashids-1.1.4.tgz", @@ -1890,6 +1975,11 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" + }, "into-stream": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", @@ -1950,6 +2040,14 @@ "number-is-nan": "1.0.1" } }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "1.0.1" + } + }, "is-hotkey": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/is-hotkey/-/is-hotkey-0.0.3.tgz", @@ -2784,6 +2882,21 @@ "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-0.2.2.tgz", "integrity": "sha1-ddpKkn7liH45BliABltzNkE7MQ0=" }, + "node-abi": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.2.0.tgz", + "integrity": "sha512-FqVC0WNNL8fQWQK3GYTESfwZXZKDbSIiEEIvufq7HV6Lj0IDDZRVa4CU/KTA0JVlqY9eTDSuPiC8FS9UfGVuzA==", + "requires": { + "semver": "5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" + } + } + }, "node-emoji": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.8.1.tgz", @@ -2836,6 +2949,11 @@ } } }, + "noop-logger": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", + "integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=" + }, "normalize-url": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz", @@ -2853,6 +2971,17 @@ } } }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, "nth-check": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", @@ -3075,6 +3204,35 @@ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" }, + "prebuild-install": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-2.5.0.tgz", + "integrity": "sha512-3wlyZgmkeeyduOR8Ursu5gKr3yWAYObACa5aJOtt2farRRFV/+zXk/Y3wM6yQRMqmqHh+pHAwyKp5r82K699Rg==", + "requires": { + "detect-libc": "1.0.3", + "expand-template": "1.1.0", + "github-from-package": "0.0.0", + "minimist": "1.2.0", + "mkdirp": "0.5.1", + "node-abi": "2.2.0", + "noop-logger": "0.1.1", + "npmlog": "4.1.2", + "os-homedir": "1.0.2", + "pump": "1.0.3", + "rc": "1.2.4", + "simple-get": "1.4.3", + "tar-fs": "1.16.0", + "tunnel-agent": "0.6.0", + "xtend": "4.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + } + } + }, "prepend-http": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", @@ -3196,6 +3354,15 @@ } } }, + "pump": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", + "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", + "requires": { + "end-of-stream": "1.4.1", + "once": "1.4.0" + } + }, "punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", @@ -3258,6 +3425,24 @@ } } }, + "rc": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.4.tgz", + "integrity": "sha1-oPYGyq4qO4YrvQ74VILAElsxX6M=", + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + } + } + }, "react": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/react/-/react-16.2.0.tgz", @@ -3474,11 +3659,10 @@ } }, "runas": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/runas/-/runas-3.1.1.tgz", - "integrity": "sha1-Ut1TjbDkF0U5lTWjRwkbpFzA6rA=", + "version": "github:getflywheel/node-runas#ca4f0714a926319f53df4851b007f2e4fd5381e5", "requires": { - "nan": "2.8.0" + "nan": "2.8.0", + "prebuild-install": "2.5.0" } }, "rx-lite": { @@ -3513,9 +3697,14 @@ "integrity": "sha1-l6VGMxiKURq6ZBn8XB+pG0Z+a+E=" }, "semver": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", - "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=" + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=" + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, "setimmediate": { "version": "1.0.5", @@ -3527,6 +3716,28 @@ "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=" }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + }, + "simple-get": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-1.4.3.tgz", + "integrity": "sha1-6XVe2kB+ltpAxeUVjJ6jezO+y+s=", + "requires": { + "once": "1.4.0", + "unzip-response": "1.0.2", + "xtend": "4.0.1" + }, + "dependencies": { + "unzip-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-1.0.2.tgz", + "integrity": "sha1-uYTwh3/AqJwsdzzB73tbIytbBv4=" + } + } + }, "slash": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", @@ -3721,6 +3932,16 @@ "safe-buffer": "5.1.1" } }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", @@ -3734,6 +3955,11 @@ "ansi-regex": "2.1.1" } }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + }, "sudo-prompt": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/sudo-prompt/-/sudo-prompt-6.2.1.tgz", @@ -3754,6 +3980,28 @@ "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=" }, + "tar-fs": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.0.tgz", + "integrity": "sha512-I9rb6v7mjWLtOfCau9eH5L7sLJyU2BnxtEZRQ5Mt+eRKmf1F0ohXmT/Jc3fr52kDvjJ/HV5MH3soQfPL5bQ0Yg==", + "requires": { + "chownr": "1.0.1", + "mkdirp": "0.5.1", + "pump": "1.0.3", + "tar-stream": "1.5.5" + } + }, + "tar-stream": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.5.tgz", + "integrity": "sha512-mQdgLPc/Vjfr3VWqWbfxW8yQNiJCbAZ+Gf6GDu1Cy0bdb33ofyiNGBtAY96jHFhDuivCwgW1H9DgTON+INiXgg==", + "requires": { + "bl": "1.2.1", + "end-of-stream": "1.4.1", + "readable-stream": "2.3.3", + "xtend": "4.0.1" + } + }, "temp": { "version": "0.8.3", "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz", @@ -3930,13 +4178,6 @@ "integrity": "sha1-lV9JCq5lO6IguUVqCod2wZk2CZE=", "requires": { "semver": "5.3.0" - }, - "dependencies": { - "semver": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", - "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=" - } } }, "util-deprecate": { @@ -4017,6 +4258,14 @@ "isexe": "2.0.0" } }, + "wide-align": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", + "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", + "requires": { + "string-width": "1.0.2" + } + }, "window-size": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", diff --git a/app/package.json b/app/package.json index 1e693df12..03358cd48 100644 --- a/app/package.json +++ b/app/package.json @@ -55,9 +55,8 @@ "react-transition-group": "1.2.1", "reflux": "0.1.13", "rimraf": "2.5.2", - "runas": "^3.1", + "runas": "getflywheel/node-runas#ca4f0714", "rx-lite": "4.0.8", - "semver": "^4.2", "slate": "bengotow/slate#77f6337", "slate-auto-replace": "0.9.0", "slate-base64-serializer": "0.2.19", diff --git a/package.json b/package.json index 7cf4a4089..c14162200 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,6 @@ "babel-preset-electron": "bengotow/babel-preset-electron#00783dfc438f122997993ae597a41ec315ba121b", "babel-preset-react": "6.x.x", "chalk": "1.x.x", - "commander": "^2.9.0", "devtron": "^1.4.0", "electron": "1.8.2-beta.4", "electron-installer-dmg": "0.2.x", diff --git a/scripts/unused/daily.js b/scripts/unused/daily.js deleted file mode 100644 index 72f1854cd..000000000 --- a/scripts/unused/daily.js +++ /dev/null @@ -1,238 +0,0 @@ -#!/usr/bin/env node -const childProcess = require('child_process') -const path = require('path') -const mkdirp = require('mkdirp') -const semver = require('semver') -const program = require('commander') - -const TMP_DIR = path.join(__dirname, '..', 'tmp') - -async function spawn(cmd, args, opts = {}) { - return new Promise((resolve, reject) => { - const env = Object.assign({}, process.env, opts.env || {}) - delete opts.env - const options = Object.assign({stdio: 'inherit', env}, opts); - const proc = childProcess.spawn(cmd, args, options) - proc.on("error", reject) - proc.on("exit", resolve) - }) -} - -function exec(cmd, opts = {}) { - return new Promise((resolve, reject) => { - childProcess.exec(cmd, opts, (err, stdout) => { - if (err) { - return reject(err) - } - return resolve(stdout) - }) - }) -} - -function git(subCmd, opts = {}) { - const optsString = Object.keys(opts).reduce((prev, key) => { - const optVal = opts[key] - if (optVal == null) { - return key.length > 1 ? `${prev} --${key}` : `${prev} -${key}` - } - return key.length > 1 ? `${prev} --${key}=${optVal}` : `${prev} -${key} ${optVal}` - }, '') - return exec(`git ${subCmd} ${optsString}`, {cwd: './'}) -} - -async function prependToFile(filepath, string) { - await exec(`echo "${string}" > ${TMP_DIR}/tmpfile`) - await exec(`cat ${filepath} >> ${TMP_DIR}/tmpfile`) - await exec(`mv ${TMP_DIR}/tmpfile ${filepath}`) -} - -async function sliceFileLines(filepath, idx) { - await exec(`tail -n +${1 + idx} ${filepath} > ${TMP_DIR}/tmpfile`) - await exec(`mv ${TMP_DIR}/tmpfile ${filepath}`) -} - -async function updateChangelogFile(changelogString) { - mkdirp.sync(TMP_DIR) - await sliceFileLines('./app/CHANGELOG.md', 2) - await prependToFile('./app/CHANGELOG.md', changelogString) -} - -function getFormattedLogs(mainLog) { - const formattedMainLog = ( - mainLog - .filter(line => line.length > 0) - .filter(line => !/^bump/i.test(line) && !/changelog/i.test(line)) - .map(line => ` + ${line.replace('*', '\\*')}`) - .join('\n') - ) - return `${formattedMainLog}\n` -} - -function getChangelogHeader(nextVersion) { - const date = new Date().toLocaleDateString() - return ( - `# Mailspring Changelog - -### ${nextVersion} (${date}) - -` - ) -} - -function validateArgs(args) { - if (args.editChangelog && !process.env.EDITOR) { - throw new Error(`You can't edit the changelog without a default EDITOR in your env`) - } -} - -// TODO add progress indicators with ora -// TODO add options -// --update-daily-channel -// --notify -// --quiet -async function main(args) { - validateArgs(args) - - // Pull latest changes - try { - await git(`checkout master`) - await git(`pull --rebase`) - } catch (err) { - console.error(err) - process.exit(1) - } - - const pkg = require('../app/package.json') //eslint-disable-line - const currentVersion = pkg.version - const nextVersion = semver.inc(currentVersion, 'patch') - - // Make sure working directory is clean - try { - await exec('git diff --exit-code && git diff --cached --exit-code') - } catch (err) { - console.error('Git working directory is not clean!') - process.exit(1) - } - - // Make sure there is a diff to build - let mainLog = ''; - try { - mainLog = (await git(`log ${currentVersion}..master --format='%s'`)).split('\n') - if (mainLog.length <= 1) { - console.error(`There are no changes to build since ${currentVersion}`) - process.exit(1) - } - } catch (err) { - console.error(err) - process.exit(1) - } - - // Update CHANGELOG - try { - const commitLogSinceLatestVersion = await getFormattedLogs(mainLog) - const changelogHeader = getChangelogHeader(nextVersion) - const changelogString = `${changelogHeader}${commitLogSinceLatestVersion}` - await updateChangelogFile(changelogString) - console.log(changelogString) - } catch (err) { - console.error('Could not update changelog file') - console.error(err) - process.exit(1) - } - - // Allow editing - if (args.editChangelog) { - try { - await spawn(process.env.EDITOR, ['./app/CHANGELOG.md'], {stdio: 'inherit'}) - } catch (err) { - console.error('Error editing CHANGELOG.md') - console.error(err) - process.exit(1) - } - } - - // Bump patch version in package.json - try { - await exec('npm --no-git-tag-version version patch', {cwd: './app'}) - } catch (err) { - console.error('Could not bump version in package.json') - console.error(err) - process.exit(1) - } - - if (args.noCommit) { - return - } - - // Commit changes - try { - await git('add .') - await git(`commit -m 'bump(version): ${nextVersion}'`) - } catch (err) { - console.error('Could not commit changes') - console.error(err) - process.exit(1) - } - - if (args.noTag) { - return - } - - // Tag commit - try { - await git(`tag ${nextVersion}`) - } catch (err) { - console.error('Could not tag commit') - console.error(err) - process.exit(1) - } - - if (args.noPush) { - return - } - - // Push changes - try { - await git(`push origin master --tags`) - } catch (err) { - console.error('Could not tag commit') - console.error(err) - process.exit(1) - } - - // Build locally. This should only be used when building from our in-office - // coffee machine mac mini - if (args.build) { - try { - await spawn('git', ['clean', '-xdf']) - await spawn('cp', ['-r', '../n1-keys-and-certificates', 'app/build/resources/certs']) - await spawn('npm', ['install'], {env: {}}) - await spawn('npm', ['run', 'build-client'], {env: {SIGN_BUILD: true}}) - await spawn('codesign', ['--verify', '--deep', '--verbose=2', '"app/dist/Mailspring-darwin-x64/Mailspring.app"']) - // await spawn('npm', ['run', 'upload-client']) - } catch (err) { - console.error('Errored while running build') - console.error(err) - process.exit(1) - } - - // TODO Update `daily` channel - - // TODO send out notification email - } - - console.log('Done!') -} - -program -.version('0.0.1') -.usage('[options]') -.description('This script will bump the version in package.json, edit the changelog with the latest\n git log (for easier editing), commit and tag the changes, and push to Github to trigger\n a build') -.option('--edit-changelog', 'Open your $EDITOR to edit CHANGELOG before commiting version bump.') -.option('--no-commit', 'Wether to commit changes to CHANGELOG.md and package.json') -.option('--no-tag', 'Wether to tag the version bump commit (no-op if --no-commit is used)') -.option('--no-push', 'Wether to push changes to the Github remote') -.option('--build', 'Wether to build the app locally. This should only be used when building from our in-office Mac Mini by the coffee machine') -.parse(process.argv) - -main(program) diff --git a/scripts/unused/drop-data-except-accounts.sh b/scripts/unused/drop-data-except-accounts.sh deleted file mode 100644 index 7bd35ecdc..000000000 --- a/scripts/unused/drop-data-except-accounts.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -set -e - -CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -NYLAS_DIR="$HOME/.nylas-bench" -TRUNCATE_TABLES=" -Account -AccountPluginMetadata -Calendar -Category -Contact -ContactSearch -Event -EventSearch -File -Message -MessageBody -MessagePluginMetadata -ProviderSyncbackRequest -Thread -ThreadCategory -ThreadCounts -ThreadPluginMetadata -ThreadSearch" -SQLITE_DIR=$CWD/sqlite -SQLITE_BIN=$SQLITE_DIR/sqlite3 -SQLITE_SRC_DIR="$SQLITE_DIR/sqlite-amalgamation-3170000" - -# Build the sqlite3 amalgamation if necessary because we need FTS5 support. -if [[ ! -e "$SQLITE_BIN" ]] -then - mkdir -p $SQLITE_DIR - curl -s "https://www.sqlite.org/2017/sqlite-amalgamation-3170000.zip" > "$SQLITE_DIR/sqlite-amalgamation.zip" - unzip -o -d $SQLITE_DIR "$SQLITE_DIR/sqlite-amalgamation.zip" - clang -DSQLITE_DISABLE_INTRINSIC -DSQLITE_ENABLE_FTS5 "$SQLITE_SRC_DIR/sqlite3.c" "$SQLITE_SRC_DIR/shell.c" -o $SQLITE_BIN -fi - -rm -f $NYLAS_DIR/a-*.sqlite - -EDGEHILL_DB=$NYLAS_DIR/edgehill.db - -for TABLE in $TRUNCATE_TABLES -do - COMMAND="DELETE FROM $TABLE" - $SQLITE_BIN $EDGEHILL_DB "DELETE FROM $TABLE" -done - -$SQLITE_BIN $EDGEHILL_DB 'DELETE FROM JSONBlob WHERE client_id != "NylasID"' diff --git a/scripts/unused/requirements.txt b/scripts/unused/requirements.txt deleted file mode 100644 index 0964f01c7..000000000 --- a/scripts/unused/requirements.txt +++ /dev/null @@ -1,12 +0,0 @@ -appdirs==1.4.3 -gspread==0.6.2 -httplib2==0.10.3 -oauth2client==4.0.0 -packaging==16.8 -pyasn1==0.2.3 -pyasn1-modules==0.0.8 -pyparsing==2.2.0 -python-dateutil==2.6.0 -requests==2.13.0 -rsa==3.4.2 -six==1.10.0 diff --git a/yarn.lock b/yarn.lock index 167827e3f..ceb86f4fd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -115,14 +115,14 @@ ansi-escapes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92" -ansi-regex@*, ansi-regex@^3.0.0, ansi-regex@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" +ansi-regex@^3.0.0, ansi-regex@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" @@ -304,16 +304,16 @@ async-some@~1.0.2: dependencies: dezalgo "^1.0.2" -"async@>= 0.1.22", async@^2.0.1: +async@^1.4.0, async@^1.4.2, async@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +async@^2.0.1: version "2.6.0" resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4" dependencies: lodash "^4.14.0" -async@^1.4.0, async@^1.4.2, async@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - async@~0.1.22: version "0.1.22" resolved "https://registry.yarnpkg.com/async/-/async-0.1.22.tgz#0fc1aaa088a0e3ef0ebe2d8831bab0dcf8845061" @@ -926,10 +926,6 @@ builtin-modules@^1.0.0, builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" -builtins@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/builtins/-/builtins-0.0.4.tgz#ec6d4ca4ba5a3a173749f10146bdcda28ea6d65d" - builtins@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/builtins/-/builtins-0.0.7.tgz#355219cd6cf18dbe7c01cc7fd2dce765cfdc549a" @@ -1201,10 +1197,6 @@ code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" -coffee-script@1.10.x: - version "1.10.0" - resolved "https://registry.yarnpkg.com/coffee-script/-/coffee-script-1.10.0.tgz#12938bcf9be1948fa006f92e0c4c9e81705108c0" - coffee-script@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/coffee-script/-/coffee-script-1.3.3.tgz#150d6b4cb522894369efed6a2101c20bc7f4a4f4" @@ -1449,7 +1441,7 @@ debug@^3.1.0: dependencies: ms "2.0.0" -debuglog@*, debuglog@^1.0.1: +debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" @@ -1593,19 +1585,6 @@ domutils@^1.5.1: dom-serializer "0" domelementtype "1" -donna@^1.0.16: - version "1.0.16" - resolved "https://registry.yarnpkg.com/donna/-/donna-1.0.16.tgz#c3ffb233d3f6664d2a26f18327898dabd326659d" - dependencies: - async ">= 0.1.22" - builtins "0.0.4" - coffee-script "1.10.x" - optimist "~0.6" - source-map "0.1.29" - underscore ">= 0.1.0" - underscore.string ">= 0.1.0" - walkdir ">= 0.0.2" - dot-prop@^4.1.0: version "4.2.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" @@ -3061,7 +3040,7 @@ imul@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/imul/-/imul-1.0.1.tgz#9d5867161e8b3de96c2c38d5dc7cb102f35e2ac9" -imurmurhash@*, imurmurhash@^0.1.4: +imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -3681,10 +3660,6 @@ lockfile@~1.0.1, lockfile@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/lockfile/-/lockfile-1.0.3.tgz#2638fc39a0331e9cac1a04b71799931c9c50df79" -lodash._baseindexof@*: - version "3.1.0" - resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c" - lodash._baseuniq@~4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8" @@ -3692,28 +3667,10 @@ lodash._baseuniq@~4.6.0: lodash._createset "~4.0.0" lodash._root "~3.0.0" -lodash._bindcallback@*: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" - -lodash._cacheindexof@*: - version "3.0.2" - resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92" - -lodash._createcache@*: - version "3.1.2" - resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093" - dependencies: - lodash._getnative "^3.0.0" - lodash._createset@~4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26" -lodash._getnative@*, lodash._getnative@^3.0.0: - version "3.9.1" - resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" - lodash._reinterpolate@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" @@ -3794,10 +3751,6 @@ lodash.reject@^4.4.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.reject/-/lodash.reject-4.6.0.tgz#80d6492dc1470864bbf583533b651f42a9f52415" -lodash.restparam@*: - version "3.6.1" - resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" - lodash.some@^4.4.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" @@ -5167,7 +5120,7 @@ readable-stream@~2.1.5: string_decoder "~0.10.x" util-deprecate "~1.0.1" -readdir-scoped-modules@*, readdir-scoped-modules@^1.0.0: +readdir-scoped-modules@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz#9fafa37d286be5d92cbaebdee030dc9b5f406747" dependencies: @@ -5607,12 +5560,6 @@ source-map-support@^0.4.15: dependencies: source-map "^0.5.6" -source-map@0.1.29: - version "0.1.29" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.29.tgz#39d571a0988fb7a548a676c4de72db78914d173c" - dependencies: - amdefine ">=0.0.4" - source-map@0.1.x: version "0.1.43" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" @@ -5647,10 +5594,6 @@ speedometer@~0.1.2: version "0.1.4" resolved "https://registry.yarnpkg.com/speedometer/-/speedometer-0.1.4.tgz#9876dbd2a169d3115402d48e6ea6329c8816a50d" -sprintf-js@^1.0.3: - version "1.1.1" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.1.tgz#36be78320afe5801f6cea3ee78b6e5aab940ea0c" - sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" @@ -6135,13 +6078,6 @@ underscore-plus@1.x: dependencies: underscore "~1.6.0" -"underscore.string@>= 0.1.0": - version "3.3.4" - resolved "https://registry.yarnpkg.com/underscore.string/-/underscore.string-3.3.4.tgz#2c2a3f9f83e64762fdc45e6ceac65142864213db" - dependencies: - sprintf-js "^1.0.3" - util-deprecate "^1.0.2" - underscore.string@~2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/underscore.string/-/underscore.string-2.2.1.tgz#d7c0fa2af5d5a1a67f4253daee98132e733f0f19" @@ -6154,7 +6090,7 @@ underscore.string@~2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/underscore.string/-/underscore.string-2.4.0.tgz#8cdd8fbac4e2d2ea1e7e2e8097c42f442280f85b" -underscore@1.8.x, "underscore@>= 0.1.0": +underscore@1.8.x: version "1.8.3" resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022" @@ -6237,7 +6173,7 @@ utf8-byte-length@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz#f45f150c4c66eee968186505ab93fcbb8ad6bf61" -util-deprecate@^1.0.2, util-deprecate@~1.0.1: +util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -6259,7 +6195,7 @@ v8flags@^2.1.1: dependencies: user-home "^1.1.1" -validate-npm-package-license@*, validate-npm-package-license@^3.0.1, validate-npm-package-license@~3.0.1: +validate-npm-package-license@^3.0.1, validate-npm-package-license@~3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" dependencies: