Skip to content
This repository has been archived by the owner on Jul 31, 2020. It is now read-only.

Commit

Permalink
Merge pull request #170 from brave/staging
Browse files Browse the repository at this point in the history
v1.4.2
  • Loading branch information
ayumi authored Oct 9, 2017
2 parents 4f2bf8c + 30c337c commit 350c7af
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 203 deletions.
2 changes: 1 addition & 1 deletion client/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ module.exports = {
// 2-byte encryption nonce counter, rotated periodically
nonceCounter: 0,
// Sync library version, updated every brave/sync release
syncVersion: 'v1.4.1'
syncVersion: 'v1.4.2'
}
6 changes: 3 additions & 3 deletions client/recordUtil.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use strict'

const deepEqual = require('deep-equal')
const merge = require('lodash.merge')
const proto = require('./constants/proto')
const serializer = require('../lib/serializer')
const valueEquals = require('../lib/valueEquals')
const {api} = require('../lib/api.proto.js')
const syncTypes = require('../lib/syncTypes.js')

Expand Down Expand Up @@ -144,7 +144,7 @@ const resolveRecordWithObject = (record, existingObject) => {
return resolveSiteSettingsRecordWithObject(record, existingObject)
}
if (record.action === proto.actions.UPDATE) {
if (valueEquals(record[type], existingObject[type])) {
if (deepEqual(record[type], existingObject[type])) {
// no-op
return null
}
Expand Down Expand Up @@ -174,7 +174,7 @@ const resolveSiteSettingsRecordWithObject = (record, existingObject) => {
if (record.action === proto.actions.UPDATE) {
resolveField = (field) => {
return !commonFields.includes(field) &&
(!existingFields.has(field) || !valueEquals(existingObject[type][field], record[type][field]))
(!existingFields.has(field) || !deepEqual(existingObject[type][field], record[type][field]))
}
} else if (record.action === proto.actions.DELETE) {
resolveField = (field) => {
Expand Down
193 changes: 0 additions & 193 deletions lib/valueEquals.js

This file was deleted.

5 changes: 2 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "brave-sync",
"version": "1.4.1",
"version": "1.4.2",
"description": "Brave sync server and client",
"main": "server/index.js",
"scripts": {
Expand Down Expand Up @@ -57,6 +57,7 @@
"config": "^1.24.0",
"cors": "^2.8.1",
"crc": "^3.4.4",
"deep-equal": "^1.0.1",
"express": "^4.14.0",
"lodash.merge": "^4.6.0",
"protobufjs": "^6.8.0",
Expand All @@ -72,8 +73,7 @@
"test/client/fixtures/*.js",
"bundles/*.js",
"client/polyfill/*.js",
"lib/api.proto.js",
"lib/valueEquals.js"
"lib/api.proto.js"
]
}
}

0 comments on commit 350c7af

Please sign in to comment.