pouchdb-adapter-utils
Advanced tools
Comparing version 6.2.0 to 6.2.1-prerelease
@@ -1,2 +0,2 @@ | ||
import { invalidIdError, normalizeDdocFunctionName, parseDdocFunctionName, uuid } from 'pouchdb-utils'; | ||
import { invalidIdError, normalizeDdocFunctionName, parseDdocFunctionName, rev, uuid } from 'pouchdb-utils'; | ||
import { BAD_ARG, DOC_VALIDATION, INVALID_REV, MISSING_DOC, REV_CONFLICT, createError } from 'pouchdb-errors'; | ||
@@ -47,9 +47,9 @@ import { isDeleted, isLocalId, merge, revExists, winningRev } from 'pouchdb-merge'; | ||
function parseRevisionInfo(rev) { | ||
if (!/^\d+\-./.test(rev)) { | ||
function parseRevisionInfo(rev$$1) { | ||
if (!/^\d+-./.test(rev$$1)) { | ||
return createError(INVALID_REV); | ||
} | ||
var idx = rev.indexOf('-'); | ||
var left = rev.substring(0, idx); | ||
var right = rev.substring(idx + 1); | ||
var idx = rev$$1.indexOf('-'); | ||
var left = rev$$1.substring(0, idx); | ||
var right = rev$$1.substring(idx + 1); | ||
return { | ||
@@ -93,3 +93,3 @@ prefix: parseInt(left, 10), | ||
} | ||
newRevId = uuid(32, 16).toLowerCase(); | ||
newRevId = rev(); | ||
if (doc._rev) { | ||
@@ -96,0 +96,0 @@ revInfo = parseRevisionInfo(doc._rev); |
@@ -51,9 +51,9 @@ 'use strict'; | ||
function parseRevisionInfo(rev) { | ||
if (!/^\d+\-./.test(rev)) { | ||
function parseRevisionInfo(rev$$1) { | ||
if (!/^\d+-./.test(rev$$1)) { | ||
return pouchdbErrors.createError(pouchdbErrors.INVALID_REV); | ||
} | ||
var idx = rev.indexOf('-'); | ||
var left = rev.substring(0, idx); | ||
var right = rev.substring(idx + 1); | ||
var idx = rev$$1.indexOf('-'); | ||
var left = rev$$1.substring(0, idx); | ||
var right = rev$$1.substring(idx + 1); | ||
return { | ||
@@ -97,3 +97,3 @@ prefix: parseInt(left, 10), | ||
} | ||
newRevId = pouchdbUtils.uuid(32, 16).toLowerCase(); | ||
newRevId = pouchdbUtils.rev(); | ||
if (doc._rev) { | ||
@@ -100,0 +100,0 @@ revInfo = parseRevisionInfo(doc._rev); |
{ | ||
"name": "pouchdb-adapter-utils", | ||
"version": "6.2.0", | ||
"version": "6.2.1-prerelease", | ||
"description": "Utilities for PouchDB adapters.", | ||
@@ -10,16 +10,3 @@ "main": "./lib/index.js", | ||
"repository": "https://github.com/pouchdb/pouchdb", | ||
"jsnext:main": "./lib/index.es.js", | ||
"dependencies": { | ||
"pouchdb-binary-utils": "6.2.0", | ||
"pouchdb-collections": "6.2.0", | ||
"pouchdb-errors": "6.2.0", | ||
"pouchdb-md5": "6.2.0", | ||
"pouchdb-merge": "6.2.0", | ||
"pouchdb-utils": "6.2.0" | ||
}, | ||
"files": [ | ||
"lib", | ||
"dist", | ||
"tonic-example.js" | ||
] | ||
"jsnext:main": "./src/index.js" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
49050
0
10
1165
2
- Removedpouchdb-binary-utils@6.2.0
- Removedpouchdb-collections@6.2.0
- Removedpouchdb-errors@6.2.0
- Removedpouchdb-md5@6.2.0
- Removedpouchdb-merge@6.2.0
- Removedpouchdb-utils@6.2.0
- Removedargsarray@0.0.1(transitive)
- Removedattempt-x@1.1.3(transitive)
- Removedbuffer-from@0.1.1(transitive)
- Removedcached-constructors-x@1.0.2(transitive)
- Removedclone-buffer@1.0.0(transitive)
- Removedhas-own-property-x@3.2.0(transitive)
- Removedhas-symbol-support-x@1.4.2(transitive)
- Removedhas-symbols@1.0.3(transitive)
- Removedhas-to-string-tag-x@1.4.1(transitive)
- Removedhas-tostringtag@1.0.2(transitive)
- Removedimmediate@3.0.6(transitive)
- Removedinfinity-x@1.0.2(transitive)
- Removedinherits@2.0.3(transitive)
- Removedis-array-buffer-x@1.7.0(transitive)
- Removedis-date-object@1.0.5(transitive)
- Removedis-falsey-x@1.0.3(transitive)
- Removedis-finite-x@3.0.4(transitive)
- Removedis-function-x@3.3.0(transitive)
- Removedis-index-x@1.1.0(transitive)
- Removedis-nan-x@1.0.3(transitive)
- Removedis-nil-x@1.4.2(transitive)
- Removedis-object-like-x@1.7.1(transitive)
- Removedis-primitive@2.0.03.0.1(transitive)
- Removedis-string@1.0.7(transitive)
- Removedis-symbol@1.0.4(transitive)
- Removedlie@3.1.1(transitive)
- Removedlodash.isnull@3.0.0(transitive)
- Removedmath-clamp-x@1.2.0(transitive)
- Removedmath-sign-x@3.0.0(transitive)
- Removedmax-safe-integer@1.0.1(transitive)
- Removednan-x@1.0.2(transitive)
- Removednormalize-space-x@3.0.0(transitive)
- Removedobject-get-own-property-descriptor-x@3.2.0(transitive)
- Removedparse-int-x@2.0.0(transitive)
- Removedpouchdb-binary-utils@6.2.0(transitive)
- Removedpouchdb-collections@6.2.0(transitive)
- Removedpouchdb-errors@6.2.0(transitive)
- Removedpouchdb-md5@6.2.0(transitive)
- Removedpouchdb-merge@6.2.0(transitive)
- Removedpouchdb-promise@6.2.0(transitive)
- Removedpouchdb-utils@6.2.0(transitive)
- Removedproperty-is-enumerable-x@1.1.0(transitive)
- Removedreplace-comments-x@2.0.0(transitive)
- Removedrequire-coercible-to-string-x@1.0.2(transitive)
- Removedrequire-object-coercible-x@1.4.3(transitive)
- Removedspark-md5@3.0.0(transitive)
- Removedto-boolean-x@1.0.3(transitive)
- Removedto-integer-x@3.0.0(transitive)
- Removedto-number-x@2.0.0(transitive)
- Removedto-object-x@1.5.0(transitive)
- Removedto-primitive-x@1.1.0(transitive)
- Removedto-property-key-x@2.0.2(transitive)
- Removedto-string-symbols-supported-x@1.0.2(transitive)
- Removedto-string-tag-x@1.4.3(transitive)
- Removedto-string-x@1.4.5(transitive)
- Removedtrim-left-x@3.0.0(transitive)
- Removedtrim-right-x@3.0.0(transitive)
- Removedtrim-x@3.0.0(transitive)
- Removedvalidate.io-undefined@1.0.3(transitive)
- Removedwhite-space-x@3.0.1(transitive)