Skip to content

Commit

Permalink
Merge branch 'master' into nyc
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndrsn committed May 8, 2024
2 parents 4fa517a + 06170b6 commit 09754f5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ env:
NODE_VERSION: 14
TEST_HOST: localhost

permissions:
contents: read # to fetch code (actions/checkout)

jobs:

# Check style compliance of JavaScript code.
Expand Down
6 changes: 3 additions & 3 deletions bin/update-package-json-for-publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// and update the version numbers to reflect the version from the top-level
// dependencies list. Also throw an error if a dep is not declared top-level.
// Also add necessary "browser" switches to each package.json, as well as
// other fields like "jsnext:main" and "files".
// other fields like "module" and "files".

var fs = require('fs');
var path = require('path');
Expand Down Expand Up @@ -56,10 +56,10 @@ modules.forEach(function (mod) {
'./lib/index.es.js': './lib/index-browser.es.js',
};
}
// Update "jsnext:main" to point to `lib/` rather than `src/`.
// Update "module" to point to `lib/` rather than `src/`.
// `src/` is only used for building, not publishing.
// Also add "module" member: https://github.com/rollup/rollup/wiki/pkg.module
pkg['jsnext:main'] = pkg.module = './lib/index.es.js';
pkg.module = './lib/index.es.js';
// whitelist the files we'll actually publish
pkg.files = ['lib', 'dist'];

Expand Down
3 changes: 2 additions & 1 deletion packages/node_modules/pouchdb-core/src/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,9 @@ function isNotSingleDoc(doc) {
return doc === null || typeof doc !== 'object' || Array.isArray(doc);
}

const validRevRegex = /^\d+-[^-]*$/;
function isValidRev(rev) {
return typeof rev === 'string' && /^\d+-[^-]*$/.test(rev);
return typeof rev === 'string' && validRevRegex.test(rev);
}

class AbstractPouchDB extends EventEmitter {
Expand Down

0 comments on commit 09754f5

Please sign in to comment.