Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deps/upgrade deps #2189

Draft
wants to merge 86 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
b186413
gui: Open Cozy web in Desktop with Ctrl+click
taratatach Jun 8, 2021
d55f8d0
gui: Open paths in Drive web with Ctrl+click
taratatach Jan 5, 2022
8c62004
gui: Open remote errors paths in Drive web
taratatach Jan 6, 2022
a6bf5f5
deps: Upgrade cheerio's dependencies
taratatach Jan 7, 2022
b5f5f69
deps: Upgrade @babel/runtime to v7.16.7
taratatach Jan 7, 2022
0b2d385
deps: Remove abortcontroller-polyfill
taratatach Jan 7, 2022
a329f5c
deps: Upgrade async to v3.2.3
taratatach Jan 7, 2022
dc428a0
deps: Upgrade istanbul's dependencies
taratatach Jan 7, 2022
5cad456
deps: Upgrade istanbul-api to v3.0.0
taratatach Jan 7, 2022
03cb55e
deps: Upgrade istanbul-api's dependencies
taratatach Jan 7, 2022
9655a90
deps: Upgrade istanbul-lib-coverage to v3.2.0
taratatach Jan 7, 2022
5cad321
deps: Upgrade istanbul-lib-hook to v3.0.0
taratatach Jan 7, 2022
93e0848
deps: Upgrade auto-bind to v4.0.0
taratatach Jan 7, 2022
c856f76
deps: Upgrade bluebird to v3.7.2
taratatach Jan 7, 2022
8bdd20f
deps: Upgrade bunyan to v2.0.5
taratatach Jan 7, 2022
8e248ff
deps: Upgrade bunyan's dependencies
taratatach Jan 7, 2022
7bd80f7
deps: Upgrade chai to v4.3.4
taratatach Jan 7, 2022
71aa5be
deps: Move chai and chai-like to dev dependencies
taratatach Jan 7, 2022
9367645
deps: Upgrade chokidar-cli to v3.0.0
taratatach Jan 7, 2022
764b1a6
deps: Upgrade commander to v8.3.0
taratatach Jan 7, 2022
c2562fb
deps: Upgrade cozy-client to v27.7.0
taratatach Jan 7, 2022
6085cd0
deps: Upgrade cozy-client's dependencies
taratatach Jan 7, 2022
8651bc7
deps: Upgrade cozy-client-js to v0.20.0
taratatach Jan 7, 2022
d23409b
deps: Upgrade cozy-client-js' dependencies
taratatach Jan 7, 2022
a9e430b
deps: Upgrade cross-env to v7.0.3
taratatach Jan 7, 2022
ecc30f7
deps: Upgrade cross-env's dependencies
taratatach Jan 7, 2022
6503ffe
deps: Upgrade elm-format to v0.8.5
taratatach Jan 7, 2022
82395c6
deps: Upgrade elm-format's dependencies
taratatach Jan 7, 2022
31321ce
deps: Bump elm-upgrade requirement to v0.19.8
taratatach Jan 11, 2022
8917773
deps: Upgrade elm-upgrade's dependencies
taratatach Jan 7, 2022
24cd482
deps: Upgrade env-cmd to v10.1.0
taratatach Jan 11, 2022
1908f80
chore: Set Node v14.16.0 as minimal version
taratatach Jan 7, 2022
d2c7277
deps: Upgrade eslint-plugin-node to v11.1.0
taratatach Jan 7, 2022
017cf54
deps: Upgrade eslint-plugin-node's dependencies
taratatach Jan 7, 2022
6a0432e
deps: Upgrade eslint-plugin-promise to v4.3.1
taratatach Jan 7, 2022
008fad6
deps: Upgrade faker to 5.5.3
taratatach Jan 7, 2022
58f9ce5
deps: Upgrade fs-extra to v10.0.0
taratatach Jan 7, 2022
5c8c898
deps: Upgrade fs-extra's dependencies
taratatach Jan 7, 2022
64bb080
deps: Upgrade eslint-config-cozy-app to v1.6.0
taratatach Jan 11, 2022
5b69265
deps: Upgrade glob to v7.2.0
taratatach Jan 11, 2022
28e625f
deps: Upgrade flow-typed to v3.6.1
taratatach Jan 7, 2022
7649dbf
deps: Upgrade flow-typed's dependencies
taratatach Jan 11, 2022
97e63b5
deps: Upgrade jsdoc to v3.6.7
taratatach Jan 11, 2022
f02d561
deps: Upgrade jsdoc's dependencies
taratatach Jan 11, 2022
5b3680d
deps: Upgrade lodash to v4.17.21
taratatach Jan 11, 2022
4e528fa
deps: Upgrade micromatch to v4.0.4
taratatach Jan 7, 2022
3f08927
chore: Set Node v14.17.6 as minimal version
taratatach Jan 7, 2022
b68ccca
deps: Upgrade eslint-plugin-promise to v6.0.0
taratatach Jan 7, 2022
2d559b6
deps: Add @babel/core
taratatach Jan 7, 2022
3ea90b7
deps: Upgrade eslint-config-cozy-app to v4.0.0
taratatach Jan 7, 2022
db78fc6
chore: Fix linter errors
taratatach Jan 10, 2022
0c1971c
deps: Upgrade eslint-config-cozy-app's dependencies
taratatach Jan 7, 2022
2f13aa7
deps: Upgrade tar to v6.1.11
taratatach Jan 11, 2022
be466bd
deps: Upgrade source-map-support to v0.5.21
taratatach Jan 11, 2022
16a1254
deps: Bump semver requirement to v7.3.5
taratatach Jan 11, 2022
b2c9e9f
deps: Upgrade stylus to v0.56.0
taratatach Jan 11, 2022
54223d3
deps: Upgrade uuid to v8.3.2
taratatach Jan 11, 2022
b3b5911
deps: Upgrade regedit to v5.0.0
taratatach Jan 11, 2022
6d76d8c
deps: Remove request-promise
taratatach Jan 11, 2022
772f616
deps: Upgrade nan to v2.15.0
taratatach Jan 11, 2022
e1b3e74
deps: Upgrade node-abi to v3.5.0
taratatach Jan 11, 2022
ebcefc0
deps: Upgrade electron-fetch to v1.7.4
taratatach Jan 11, 2022
2588af7
deps: Upgrade electron-fetch's dependencies
taratatach Jan 11, 2022
fab62db
deps: Upgrade react and react-dom to v17.0.2
taratatach Jan 11, 2022
9eafad8
deps: Upgrade react-markdown to v6.0.3
taratatach Jan 11, 2022
64b3199
deps: Upgrade should-sinon to v0.0.6
taratatach Jan 11, 2022
15f099b
deps: Upgrade prop-types to v15.8.1
taratatach Jan 11, 2022
893fb57
deps: Upgrade isomorphic-fetch to v3.0.0
taratatach Jan 11, 2022
c190ffe
deps: Upgrade mime to v3.0.0
taratatach Jan 11, 2022
a460514
deps: Bump rimraf requirement to v3.0.2
taratatach Jan 11, 2022
4e66047
deps: Replace opn with open v8.4.0
taratatach Jan 11, 2022
4e9a14c
deps: Upgrade electron-proxy-agent to v1.2.1
taratatach Jan 11, 2022
b618272
deps: Upgrade electron-proxy-agent's dependencies
taratatach Jan 11, 2022
315a35e
deps: Upgrade cozy-flags to v2.8.3
taratatach Jan 11, 2022
b8450e1
deps: Upgrade electron-mocha to v11.0.2
taratatach Jan 11, 2022
d4494fa
deps: Upgrade electron-mocha's dependencies
taratatach Jan 11, 2022
1be7814
deps: Upgrade @sentry/electron to v2.5.4
taratatach Jan 11, 2022
a60ffa8
deps: Upgrade @sentry/electron's dependencies
taratatach Jan 11, 2022
a89f7f1
deps: Upgrade yargs to v17.3.1
taratatach Jan 11, 2022
b2ae56e
deps: Upgrade sinon to v12.0.1
taratatach Jan 11, 2022
6487d9d
deps: Upgrade sinon's dependencies
taratatach Jan 11, 2022
5eff319
WIP: to be removed?
taratatach Jan 10, 2022
d807a41
deps: Upgrade flow-bin to 0.99.0
taratatach Jan 12, 2022
7ed356f
deps: Upgrade flow-bin to v0.100.0
taratatach Jan 12, 2022
5f1f989
deps: Upgrade flow-bin to v0.104.0
taratatach Jan 12, 2022
f9598e9
WIP: deps: Upgrade flow-bin to v0.109.0
taratatach Jan 14, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ environment:
- BUILD_JOB: "scenarios_build"

install:
- ps: Install-Product node 14.15.4 x64
- ps: Install-Product node 14.17.6 x64
- cmd: appveyor-retry yarn install:all
- cmd: appveyor-retry yarn bootstrap:remote

Expand Down
2 changes: 2 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ extends:
- plugin:node/recommended
rules:
node/shebang: off
no-param-reassign: off
spaced-comment: off
settings:
node:
allowModules:
Expand Down
6 changes: 2 additions & 4 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
<PROJECT_ROOT>/build/.*
<PROJECT_ROOT>/coverage/.*
<PROJECT_ROOT>/tmp/.*
<PROJECT_ROOT>/node_modules/ach/.*
<PROJECT_ROOT>/node_modules/config-chain/test/broken.json
<PROJECT_ROOT>/node_modules/elm-test/.*
<PROJECT_ROOT>/node_modules/jsverify/.*
<PROJECT_ROOT>/node_modules/resolve/.*
<PROJECT_ROOT>/node_modules/yargs/.*

[include]

Expand Down
18 changes: 5 additions & 13 deletions .github/actions/build-and-publish/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,9 @@ runs:
APPLE_ID_PASSWORD: "${{ inputs.apple-id-password }}"
run: |
if [ "${{ runner.os }}" == "Linux" ]; then
docker run --rm \
$(env | \
grep -Eo '^[^\s=]*(NODE_|ELECTRON_|YARN_|NPM_|CI|GITHUB_|CSC_|_TOKEN|_KEY)[^\s=]*' | \
sed 's/^/-e /;/^$/d' | \
paste -sd ' ' \
) \
-v ${PWD}:/project \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder:12 \
/bin/bash -c "yarn dist:all"
else
yarn dist:all
# Install build dependencies:
# - `libopenjp2-tools` for the basic build
# - the others for cross-compiling 32 bit apps on a 64 bit machine
sudo apt install --no-install-recommends -y libopenjp2-tools gcc-multilib g++-multilib
fi
yarn dist:all
2 changes: 1 addition & 1 deletion .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ env:
NODE_ENV: "test"
COZY_DESKTOP_HEARTBEAT: "1000"
DISPLAY: ":99.0"
NODE_VERSION: "14.16.0"
NODE_VERSION: "14.17.6"
GO_VERSION: "1.17"
COUCHDB_VERSION: "2.3.1"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ env:
NODE_ENV: "test"
COZY_DESKTOP_HEARTBEAT: "1000"
DISPLAY: ":99.0"
NODE_VERSION: "14.16.0"
NODE_VERSION: "14.17.6"
GO_VERSION: "1.17"
COUCHDB_VERSION: "2.3.1"

Expand Down
17 changes: 17 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"color": true,
"slow": "150",
"timeout": "20000",
"reporter": "spec",
"require": [
"./core/globals",
"should",
"should-sinon",
"./test/support/assertions/change",
"./test/support/assertions/fileContents",
"./test/support/assertions/pending",
"./test/support/assertions/timestamp",
"./test/support/stacktraces"
],
"recursive": true
}
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: ['cozy-app']
}
7 changes: 6 additions & 1 deletion core/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const _ = require('lodash')
const os = require('os')
const path = require('path')
const url = require('url')
const uuid = require('uuid/v4')
const uuid = require('uuid').v4
const https = require('https')
const { createGzip } = require('zlib')
const semver = require('semver')
Expand All @@ -33,6 +33,7 @@ const { LOG_FILE, LOG_FILENAME } = logger
const sentry = require('./utils/sentry')
const { sendToTrash } = require('./utils/fs')
const notes = require('./utils/notes')
const web = require('./utils/web')

/*::
import type EventEmitter from 'events'
Expand Down Expand Up @@ -436,6 +437,10 @@ class App {
findNote(filePath /*: string */) {
return notes.findNote(filePath, this)
}

findDocument(filePath /*: string */) {
return web.findDocument(filePath, this)
}
}

module.exports = {
Expand Down
14 changes: 5 additions & 9 deletions core/ignore.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
*/

const { basename, dirname, resolve } = require('path')
const { matcher, makeRe } = require('micromatch')
const { matcher } = require('micromatch')
const fs = require('fs')

const logger = require('./utils/logger')
Expand Down Expand Up @@ -117,11 +117,9 @@ function buildPattern(line /*: string */) /*: IgnorePattern */ {
line = line.replace(/^\\/, '') // Remove leading escaping char
line = line.replace(/( |\t)*$/, '') // Remove trailing spaces
// Ignore case for case insensitive file-systems
if (process.platform === 'darwin' || process.platform === 'win32') {
line = makeRe(line, { nocase: true })
}
let pattern = {
match: matcher(line, {}),
const nocase = process.platform === 'darwin' || process.platform === 'win32'
const pattern = {
match: matcher(line, { nocase }),
basename: noslash, // The pattern can match only the basename
folder, // The pattern will only match a folder
negate // The pattern is negated
Expand All @@ -131,9 +129,7 @@ function buildPattern(line /*: string */) /*: IgnorePattern */ {

/** Parse many lines and build the corresponding pattern array */
function buildPatternArray(lines /*: string[] */) /*: IgnorePattern[] */ {
return Array.from(lines)
.filter(isNotBlankOrComment)
.map(buildPattern)
return Array.from(lines).filter(isNotBlankOrComment).map(buildPattern)
}

function isNotBlankOrComment(line /*: string */) /*: boolean */ {
Expand Down
10 changes: 6 additions & 4 deletions core/local/atom/dispatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,12 @@ async function dispatchEvent(
try {
await actions[event.action + event.kind](event, opts)
try {
const target = (await opts.pouch.db.changes({
limit: 1,
descending: true
})).last_seq
const target = (
await opts.pouch.db.changes({
limit: 1,
descending: true
})
).last_seq
opts.events.emit('sync-target', target)
} catch (err) {
log.warn({ err })
Expand Down
8 changes: 6 additions & 2 deletions core/local/atom/filter_ignored.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,13 @@ function movedToIgnoredPath(event /*: AtomEvent */) /*: AtomEvent */ {
...event,
action: 'deleted'
}

_.set(deletedEvent, [STEP_NAME, 'movedToIgnoredPath'], deletedEvent.path)
deletedEvent.path = deletedEvent.oldPath
delete deletedEvent.oldPath

if (deletedEvent.oldPath) {
deletedEvent.path = deletedEvent.oldPath
delete deletedEvent.oldPath
}

return deletedEvent
}
5 changes: 2 additions & 3 deletions core/local/atom/incomplete_fixer.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,8 @@ function step(
// (e.g. a temporary document now renamed), we'll want to make sure the old
// document is removed to avoid having 2 documents with the same inode.
// We can do this by keeping the completing renamed event.
const incompleteForExistingDoc /*: ?Metadata */ = await opts.pouch.byLocalPath(
item.event.path
)
const incompleteForExistingDoc /*: ?Metadata */ =
await opts.pouch.byLocalPath(item.event.path)
if (
incompleteForExistingDoc &&
!incompleteForExistingDoc.trashed &&
Expand Down
6 changes: 3 additions & 3 deletions core/local/checksumer.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ function computeChecksum(filePath /*: string */, callback /*: Callback */) {
const stream = fs.createReadStream(filePath)
const checksum = crypto.createHash('md5')
checksum.setEncoding('base64')
stream.on('end', function() {
stream.on('end', function () {
stopMeasure()
checksum.end()
callback(null, checksum.read())
})
stream.on('error', function(err) {
stream.on('error', function (err) {
stopMeasure()
checksum.end()
callback(err)
Expand Down Expand Up @@ -69,7 +69,7 @@ function init() /*: Checksumer */ {
// Use a queue for checksums to avoid computing many checksums at the
// same time. It's better for performance (hard disk are faster with
// linear readings).
const queue = Promise.promisifyAll(async.queue(retryComputeChecksum))
const queue = async.queue(retryComputeChecksum)

return {
push(filePath /*: string */) /*: Promise<string> */ {
Expand Down
Loading