From 7a4dbc6e5a2145808f58ef24d5ac7127bb30d141 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Sun, 24 Mar 2024 16:15:48 +0000 Subject: [PATCH 1/4] ci: drop pouchdb-server from test matrix --- .github/workflows/ci.yml | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d48175dfb4..c981665891 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -201,45 +201,6 @@ jobs: if: steps.retry.outcome == 'failure' run: ${{ matrix.cmd }} - # Run the integration, find and mapreduce tests using pouchdb-server as the - # remote adapter. This checks that pouchdb-server works with the current - # PouchDB source tree. We run this on Node.js and on every target browser. - # Running against different versions of Node.js might require splitting this - # out into a distinct job. - - pouchdb-server: - needs: lint - strategy: - fail-fast: false - matrix: - client: ['node', 'firefox', 'chromium', 'webkit'] - cmd: - - npm test - - TYPE=find PLUGINS=pouchdb-find ADAPTERS=http npm test - - TYPE=mapreduce ADAPTERS=http npm test - runs-on: ubuntu-latest - env: - CLIENT: ${{ matrix.client }} - SERVER: pouchdb-server - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/install-node-package - with: - node-version: ${{ env.NODE_VERSION }} - - if: ${{ matrix.client != 'node' }} - uses: ./.github/actions/install-playwright - - uses: ./.github/actions/build-pouchdb - - id: test - run: ${{ matrix.cmd }} - continue-on-error: true - - name: First retry - id: retry - if: steps.test.outcome == 'failure' - run: ${{ matrix.cmd }} - continue-on-error: true - - name: Second retry - if: steps.retry.outcome == 'failure' - run: ${{ matrix.cmd }} # Run all the other testing tasks -- unit tests, and so on. These should be # run on every version of Node.js that we support. @@ -257,7 +218,6 @@ jobs: - npm run test-unit - npm run test-component - npm run test-fuzzy - # - SERVER=pouchdb-server POUCHDB_SERVER_FLAGS=--in-memory PLUGINS=pouchdb-find npm run report-coverage - npm run verify-build runs-on: ubuntu-latest steps: From 0e075b7e53306b0b771197bc4db074d577ecd49f Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Tue, 9 Apr 2024 05:13:50 +0000 Subject: [PATCH 2/4] Remove more server types; SKIP_MIGRATION --- .github/workflows/ci.yml | 123 ++----------------------- TESTING.md | 4 - bin/test-browser.js | 1 - tests/integration/browser.migration.js | 6 +- 4 files changed, 11 insertions(+), 123 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 25488e5d2f..e3f3177fee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,25 +45,27 @@ jobs: # Run the integration, find and mapreduce tests against CouchDB on Node.js. # This should be run against every version of CouchDB and every version of - # Node.js we support. + # Node.js we support. Also runs all the Node.js adapters against CouchDB. + # This should be run for every adapter on every version of Node.js we support. couchdb-nodejs: needs: lint strategy: fail-fast: false matrix: + adapter: ['leveldb', 'memory'] couchdb: ['2.3', '3.1'] node: [14, 16] cmd: - npm test - - TYPE=find PLUGINS=pouchdb-find ADAPTERS=http npm test - - TYPE=mapreduce ADAPTERS=http npm test + - TYPE=find PLUGINS=pouchdb-find npm test + - TYPE=mapreduce npm test runs-on: ubuntu-latest env: + ADAPTERS: ${{ matrix.adapter }} CLIENT: node SERVER: couchdb-master COUCH_HOST: http://admin:password@127.0.0.1:5984 - SKIP_MIGRATION: 1 steps: - uses: actions/checkout@v4 with: @@ -77,19 +79,11 @@ jobs: - uses: ./.github/actions/build-pouchdb - id: test run: ${{ matrix.cmd }} - continue-on-error: true - - name: First retry - id: retry - if: steps.test.outcome == 'failure' - run: ${{ matrix.cmd }} - continue-on-error: true - - name: Second retry - if: steps.retry.outcome == 'failure' - run: ${{ matrix.cmd }} # Run the integration, find and mapreduce tests against CouchDB in the # browser. This should be run against every version of CouchDB we support and - # every target browser. + # every target browser. Also runs all browser adapters against CouchDB. + # This should be run for every adapter on every target browser. couchdb-browser: needs: lint @@ -98,17 +92,18 @@ jobs: matrix: couchdb: ['2.3','3.1'] client: ['firefox', 'chromium', 'webkit'] + adapter: ['http', 'idb', 'indexeddb', 'memory'] cmd: - npm test - TYPE=find PLUGINS=pouchdb-find ADAPTERS=http npm test - TYPE=mapreduce ADAPTERS=http npm test runs-on: ubuntu-latest env: + ADAPTERS: ${{ matrix.adapter }} USE_MINIFIED: 1 CLIENT: ${{ matrix.client }} SERVER: couchdb-master COUCH_HOST: http://admin:password@127.0.0.1:5984 - SKIP_MIGRATION: 1 steps: - uses: actions/checkout@v4 with: @@ -123,95 +118,6 @@ jobs: - uses: ./.github/actions/build-pouchdb - id: test run: ${{ matrix.cmd }} - continue-on-error: true - - name: First retry - id: retry - if: steps.test.outcome == 'failure' - run: ${{ matrix.cmd }} - continue-on-error: true - - name: Second retry - if: steps.retry.outcome == 'failure' - run: ${{ matrix.cmd }} - - # Run the integration, find and mapreduce tests against all the Node.js - # PouchDB adapters. This should be run for every adapter on every version of - # Node.js we support. - - nodejs-adapter: - needs: lint - strategy: - fail-fast: false - matrix: - node: [14, 16] - adapter: ['leveldb', 'memory'] - cmd: - - npm test - - TYPE=find PLUGINS=pouchdb-find npm test - - TYPE=mapreduce npm test - runs-on: ubuntu-latest - env: - CLIENT: node - ADAPTERS: ${{ matrix.adapter }} - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - - uses: ./.github/actions/install-node-package - with: - node-version: ${{ matrix.node }} - - uses: ./.github/actions/build-pouchdb - - id: test - run: ${{ matrix.cmd }} - continue-on-error: true - - name: First retry - id: retry - if: steps.test.outcome == 'failure' - run: ${{ matrix.cmd }} - continue-on-error: true - - name: Second retry - if: steps.retry.outcome == 'failure' - run: ${{ matrix.cmd }} - - # Run the integration, find and mapreduce tests against all the browser-based - # adapters. PouchDB adapters. This should be run for every adapter on every - # target browser. - - browser-adapter: - needs: lint - strategy: - fail-fast: false - matrix: - client: ['firefox', 'chromium', 'webkit'] - adapter: ['idb', 'indexeddb', 'memory'] - cmd: - - npm test - - TYPE=find PLUGINS=pouchdb-find npm test - - TYPE=mapreduce npm test - runs-on: ubuntu-latest - env: - USE_MINIFIED: 1 - CLIENT: ${{ matrix.client }} - ADAPTERS: ${{ matrix.adapter }} - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - - uses: ./.github/actions/install-node-package - with: - node-version: ${{ env.NODE_VERSION }} - - uses: ./.github/actions/install-playwright - - uses: ./.github/actions/build-pouchdb - - id: test - run: ${{ matrix.cmd }} - continue-on-error: true - - name: First retry - id: retry - if: steps.test.outcome == 'failure' - run: ${{ matrix.cmd }} - continue-on-error: true - - name: Second retry - if: steps.retry.outcome == 'failure' - run: ${{ matrix.cmd }} # Run all the other testing tasks -- unit tests, and so on. These should be # run on every version of Node.js that we support. @@ -241,12 +147,3 @@ jobs: - uses: ./.github/actions/build-pouchdb - id: test run: ${{ matrix.cmd }} - continue-on-error: true - - name: First retry - id: retry - if: steps.test.outcome == 'failure' - run: git reset --hard && ${{ matrix.cmd }} - continue-on-error: true - - name: Second retry - if: steps.retry.outcome == 'failure' - run: git reset --hard && ${{ matrix.cmd }} diff --git a/TESTING.md b/TESTING.md index 2956490c7a..3080510e2e 100644 --- a/TESTING.md +++ b/TESTING.md @@ -151,10 +151,6 @@ following values: - `couchdb-master`: use this value if you already have CouchDB running; it causes `COUCH_HOST` to be set to the correct value. -#### `SKIP_MIGRATION` (default: `0`) - -Set this to `1` to skip the migration tests. - #### `VIEW_ADAPTERS` (default: `memory`) Comma-separated list of preferred view adapter backends that PouchDB will use. diff --git a/bin/test-browser.js b/bin/test-browser.js index e959ec2c6d..031b25fc68 100755 --- a/bin/test-browser.js +++ b/bin/test-browser.js @@ -50,7 +50,6 @@ const qs = { viewAdapters: process.env.VIEW_ADAPTERS, autoCompaction: process.AUTO_COMPACTION, SERVER: process.env.SERVER, - SKIP_MIGRATION: process.env.SKIP_MIGRATION, srcRoot: process.env.SRC_ROOT, src: process.env.POUCHDB_SRC, useMinified: process.env.USE_MINIFIED, diff --git a/tests/integration/browser.migration.js b/tests/integration/browser.migration.js index db3d710e98..88a04cd924 100644 --- a/tests/integration/browser.migration.js +++ b/tests/integration/browser.migration.js @@ -37,11 +37,7 @@ describe('migration', function () { var isNodeWebkit = typeof window !== 'undefined' && typeof process !== 'undefined'; - var skipMigration = 'SKIP_MIGRATION' in testUtils.params() && - testUtils.params().SKIP_MIGRATION; - - if (!usingDefaultPreferredAdapters() || window.msIndexedDB || - isNodeWebkit || skipMigration) { + if (!usingDefaultPreferredAdapters() || window.msIndexedDB || isNodeWebkit) { skip = true; return this.skip(); } From eb1ab0813a0296b1d08e8605edcb4da7ab98ec88 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Tue, 9 Apr 2024 10:10:55 +0000 Subject: [PATCH 3/4] re-instate original GHA config --- .github/workflows/ci.yml | 166 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 156 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3f3177fee..fd76d09df9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,27 +45,25 @@ jobs: # Run the integration, find and mapreduce tests against CouchDB on Node.js. # This should be run against every version of CouchDB and every version of - # Node.js we support. Also runs all the Node.js adapters against CouchDB. - # This should be run for every adapter on every version of Node.js we support. + # Node.js we support. couchdb-nodejs: needs: lint strategy: fail-fast: false matrix: - adapter: ['leveldb', 'memory'] couchdb: ['2.3', '3.1'] node: [14, 16] cmd: - npm test - - TYPE=find PLUGINS=pouchdb-find npm test - - TYPE=mapreduce npm test + - TYPE=find PLUGINS=pouchdb-find ADAPTERS=http npm test + - TYPE=mapreduce ADAPTERS=http npm test runs-on: ubuntu-latest env: - ADAPTERS: ${{ matrix.adapter }} CLIENT: node SERVER: couchdb-master COUCH_HOST: http://admin:password@127.0.0.1:5984 + SKIP_MIGRATION: 1 steps: - uses: actions/checkout@v4 with: @@ -79,11 +77,19 @@ jobs: - uses: ./.github/actions/build-pouchdb - id: test run: ${{ matrix.cmd }} + continue-on-error: true + - name: First retry + id: retry + if: steps.test.outcome == 'failure' + run: ${{ matrix.cmd }} + continue-on-error: true + - name: Second retry + if: steps.retry.outcome == 'failure' + run: ${{ matrix.cmd }} # Run the integration, find and mapreduce tests against CouchDB in the # browser. This should be run against every version of CouchDB we support and - # every target browser. Also runs all browser adapters against CouchDB. - # This should be run for every adapter on every target browser. + # every target browser. couchdb-browser: needs: lint @@ -92,18 +98,17 @@ jobs: matrix: couchdb: ['2.3','3.1'] client: ['firefox', 'chromium', 'webkit'] - adapter: ['http', 'idb', 'indexeddb', 'memory'] cmd: - npm test - TYPE=find PLUGINS=pouchdb-find ADAPTERS=http npm test - TYPE=mapreduce ADAPTERS=http npm test runs-on: ubuntu-latest env: - ADAPTERS: ${{ matrix.adapter }} USE_MINIFIED: 1 CLIENT: ${{ matrix.client }} SERVER: couchdb-master COUCH_HOST: http://admin:password@127.0.0.1:5984 + SKIP_MIGRATION: 1 steps: - uses: actions/checkout@v4 with: @@ -118,6 +123,137 @@ jobs: - uses: ./.github/actions/build-pouchdb - id: test run: ${{ matrix.cmd }} + continue-on-error: true + - name: First retry + id: retry + if: steps.test.outcome == 'failure' + run: ${{ matrix.cmd }} + continue-on-error: true + - name: Second retry + if: steps.retry.outcome == 'failure' + run: ${{ matrix.cmd }} + + # Run the integration, find and mapreduce tests against all the Node.js + # PouchDB adapters. This should be run for every adapter on every version of + # Node.js we support. + + nodejs-adapter: + needs: lint + strategy: + fail-fast: false + matrix: + node: [14, 16] + adapter: ['leveldb', 'memory'] + cmd: + - npm test + - TYPE=find PLUGINS=pouchdb-find npm test + - TYPE=mapreduce npm test + runs-on: ubuntu-latest + env: + CLIENT: node + ADAPTERS: ${{ matrix.adapter }} + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - uses: ./.github/actions/install-node-package + with: + node-version: ${{ matrix.node }} + - uses: ./.github/actions/build-pouchdb + - id: test + run: ${{ matrix.cmd }} + continue-on-error: true + - name: First retry + id: retry + if: steps.test.outcome == 'failure' + run: ${{ matrix.cmd }} + continue-on-error: true + - name: Second retry + if: steps.retry.outcome == 'failure' + run: ${{ matrix.cmd }} + + # Run the integration, find and mapreduce tests against all the browser-based + # adapters. PouchDB adapters. This should be run for every adapter on every + # target browser. + + browser-adapter: + needs: lint + strategy: + fail-fast: false + matrix: + client: ['firefox', 'chromium', 'webkit'] + adapter: ['idb', 'indexeddb', 'memory'] + cmd: + - npm test + - TYPE=find PLUGINS=pouchdb-find npm test + - TYPE=mapreduce npm test + runs-on: ubuntu-latest + env: + USE_MINIFIED: 1 + CLIENT: ${{ matrix.client }} + ADAPTERS: ${{ matrix.adapter }} + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - uses: ./.github/actions/install-node-package + with: + node-version: ${{ env.NODE_VERSION }} + - uses: ./.github/actions/install-playwright + - uses: ./.github/actions/build-pouchdb + - id: test + run: ${{ matrix.cmd }} + continue-on-error: true + - name: First retry + id: retry + if: steps.test.outcome == 'failure' + run: ${{ matrix.cmd }} + continue-on-error: true + - name: Second retry + if: steps.retry.outcome == 'failure' + run: ${{ matrix.cmd }} + + # Run the integration, find and mapreduce tests using pouchdb-server as the + # remote adapter. This checks that pouchdb-server works with the current + # PouchDB source tree. We run this on Node.js and on every target browser. + # Running against different versions of Node.js might require splitting this + # out into a distinct job. + + pouchdb-server: + needs: lint + strategy: + fail-fast: false + matrix: + client: ['node', 'firefox', 'chromium', 'webkit'] + cmd: + - npm test + - TYPE=find PLUGINS=pouchdb-find ADAPTERS=http npm test + - TYPE=mapreduce ADAPTERS=http npm test + runs-on: ubuntu-latest + env: + CLIENT: ${{ matrix.client }} + SERVER: pouchdb-server + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - uses: ./.github/actions/install-node-package + with: + node-version: ${{ env.NODE_VERSION }} + - if: ${{ matrix.client != 'node' }} + uses: ./.github/actions/install-playwright + - uses: ./.github/actions/build-pouchdb + - id: test + run: ${{ matrix.cmd }} + continue-on-error: true + - name: First retry + id: retry + if: steps.test.outcome == 'failure' + run: ${{ matrix.cmd }} + continue-on-error: true + - name: Second retry + if: steps.retry.outcome == 'failure' + run: ${{ matrix.cmd }} # Run all the other testing tasks -- unit tests, and so on. These should be # run on every version of Node.js that we support. @@ -135,6 +271,7 @@ jobs: - npm run test-unit - npm run test-component - npm run test-fuzzy + # - SERVER=pouchdb-server POUCHDB_SERVER_FLAGS=--in-memory PLUGINS=pouchdb-find npm run report-coverage - npm run verify-build runs-on: ubuntu-latest steps: @@ -147,3 +284,12 @@ jobs: - uses: ./.github/actions/build-pouchdb - id: test run: ${{ matrix.cmd }} + continue-on-error: true + - name: First retry + id: retry + if: steps.test.outcome == 'failure' + run: git reset --hard && ${{ matrix.cmd }} + continue-on-error: true + - name: Second retry + if: steps.retry.outcome == 'failure' + run: git reset --hard && ${{ matrix.cmd }} From 931472a2bc24d4f3b0942844fda60d4ed3306e27 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Tue, 9 Apr 2024 10:19:33 +0000 Subject: [PATCH 4/4] Remove pouchdb-server, express-pouchdb-minimum --- .github/workflows/ci.yml | 42 ------------ .gitignore | 1 - TESTING.md | 9 --- bin/run-test.sh | 65 +------------------ docs/adapters.md | 6 +- docs/getting-started.md | 2 +- package.json | 3 +- tests/integration/test.attachments.js | 4 +- tests/integration/utils.js | 3 +- .../express-pouchdb-minimum-for-pouchdb.js | 8 --- 10 files changed, 10 insertions(+), 133 deletions(-) delete mode 100644 tests/misc/express-pouchdb-minimum-for-pouchdb.js diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd76d09df9..d1d3fca94f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -213,48 +213,6 @@ jobs: if: steps.retry.outcome == 'failure' run: ${{ matrix.cmd }} - # Run the integration, find and mapreduce tests using pouchdb-server as the - # remote adapter. This checks that pouchdb-server works with the current - # PouchDB source tree. We run this on Node.js and on every target browser. - # Running against different versions of Node.js might require splitting this - # out into a distinct job. - - pouchdb-server: - needs: lint - strategy: - fail-fast: false - matrix: - client: ['node', 'firefox', 'chromium', 'webkit'] - cmd: - - npm test - - TYPE=find PLUGINS=pouchdb-find ADAPTERS=http npm test - - TYPE=mapreduce ADAPTERS=http npm test - runs-on: ubuntu-latest - env: - CLIENT: ${{ matrix.client }} - SERVER: pouchdb-server - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - - uses: ./.github/actions/install-node-package - with: - node-version: ${{ env.NODE_VERSION }} - - if: ${{ matrix.client != 'node' }} - uses: ./.github/actions/install-playwright - - uses: ./.github/actions/build-pouchdb - - id: test - run: ${{ matrix.cmd }} - continue-on-error: true - - name: First retry - id: retry - if: steps.test.outcome == 'failure' - run: ${{ matrix.cmd }} - continue-on-error: true - - name: Second retry - if: steps.retry.outcome == 'failure' - run: ${{ matrix.cmd }} - # Run all the other testing tasks -- unit tests, and so on. These should be # run on every version of Node.js that we support. diff --git a/.gitignore b/.gitignore index ceac637c73..4cc22f2d95 100644 --- a/.gitignore +++ b/.gitignore @@ -20,7 +20,6 @@ lib_unit src_browser/ tests/integration/utils-bundle.js *.heapsnapshot -/pouchdb-server-install package-lock.json yarn.lock /.eslintcache diff --git a/TESTING.md b/TESTING.md index 3080510e2e..745b99c868 100644 --- a/TESTING.md +++ b/TESTING.md @@ -146,8 +146,6 @@ following values: - `pouchdb-express-router` (default): a minimal implementation of the CouchDB API that supports the replication protocol but not the `query()` or `find()` methods. -- `pouchdb-server`: this is a full reimplementation of the CouchDB API on top of - PouchDB, including Mango and map-reduce queries. - `couchdb-master`: use this value if you already have CouchDB running; it causes `COUCH_HOST` to be set to the correct value. @@ -195,13 +193,6 @@ setting `ADAPTERS=http` and pointing `COUCH_HOST` at our server: $ TYPE=mapreduce ADAPTERS=http COUCH_HOST='' npm test -And we test [pouchdb-server](https://github.com/pouchdb/pouchdb-server) using -the current PouchDB source tree. This is an implementation of the CouchDB API -and supports the `find()` and `query()` methods. Run the test suites against it -like so: - - $ TYPE=mapreduce ADAPTERS=http SERVER=pouchdb-server npm test - Note that the default choice for the `SERVER` value (`pouchdb-express-router`) does not support `find` or `mapreduce` and does not need to pass these tests. diff --git a/bin/run-test.sh b/bin/run-test.sh index 4fcfdfcfb3..df7694d6a8 100755 --- a/bin/run-test.sh +++ b/bin/run-test.sh @@ -19,54 +19,6 @@ fi : "${VIEW_ADAPTERS:=memory}" export VIEW_ADAPTERS -pouchdb-setup-server() { - # in CI, link pouchdb-servers dependencies on pouchdb - # modules to the current implementations - if [ -d "pouchdb-server-install" ]; then - rm -rf pouchdb-server-install - fi - mkdir pouchdb-server-install - cd pouchdb-server-install - npm init -y - npm install pouchdb-server - cd .. - - for pkg in packages/node_modules/* ; do - pouchdb-link-server-modules "$(basename "$pkg")" - done - - TESTDIR=./tests/pouchdb_server - rm -rf $TESTDIR && mkdir -p $TESTDIR - FLAGS=("$POUCHDB_SERVER_FLAGS" --dir "$TESTDIR") - echo -e "Starting up pouchdb-server with flags: ${FLAGS[*]} \n" - ./pouchdb-server-install/node_modules/.bin/pouchdb-server -n -p 6984 "${FLAGS[@]}" & - export SERVER_PID=$! -} - -pouchdb-link-server-modules() { - local pkg="$1" - - cd "packages/node_modules/${pkg}" - npm link - cd ../../../pouchdb-server-install/ - - # node_modules of pouchdb-server-install - if [ -d "node_modules/${pkg}" ]; then - echo -e "\nnpm link ${pkg} for pouchdb-server-install" - npm link "${pkg}" - fi - - # internal node_modules of other packages - for subPkg in node_modules/**/node_modules/"$pkg"; do - cd "$subPkg/../.." - echo -e "\nnpm link ${pkg} for ${subPkg}" - npm link "${pkg}" - cd ../.. - done - - cd .. -} - search-free-port() { EXPRESS_PORT=3000 while (: < /dev/tcp/127.0.0.1/$EXPRESS_PORT) 2>/dev/null; do @@ -87,14 +39,7 @@ if [[ $CI = true ]] && [[ $CLIENT != node ]]; then fi if [[ -n $SERVER ]]; then - if [ "$SERVER" == "pouchdb-server" ]; then - export COUCH_HOST='http://127.0.0.1:6984' - if [[ -n "$GITHUB_REPOSITORY" || "$COVERAGE" == 1 ]]; then - pouchdb-setup-server - else - echo -e "pouchdb-server should be running on $COUCH_HOST\n" - fi - elif [ "$SERVER" == "couchdb-master" ]; then + if [ "$SERVER" == "couchdb-master" ]; then if [ -z $COUCH_HOST ]; then export COUCH_HOST="http://127.0.0.1:5984" fi @@ -104,14 +49,8 @@ if [[ -n $SERVER ]]; then node ./tests/misc/pouchdb-express-router.js & export SERVER_PID=$! export COUCH_HOST="http://127.0.0.1:${PORT}" - elif [ "$SERVER" == "express-pouchdb-minimum" ]; then - pouchdb-build-node - node ./tests/misc/express-pouchdb-minimum-for-pouchdb.js & - export SERVER_PID=$! - export COUCH_HOST='http://127.0.0.1:3000' else - # I mistype pouchdb-server a lot - echo -e "Unknown SERVER $SERVER. Did you mean pouchdb-server?\n" + echo -e "Unknown SERVER $SERVER.\n" exit 1 fi fi diff --git a/docs/adapters.md b/docs/adapters.md index 6f49dac2c6..c8f0a6591e 100644 --- a/docs/adapters.md +++ b/docs/adapters.md @@ -178,8 +178,6 @@ Currently PouchDB has full support for: * CouchDB 2.x ([tested in CI](https://github.com/pouchdb/pouchdb/actions)) * CouchDB 3.x ([tested in CI](https://github.com/pouchdb/pouchdb/actions)) * [Cloudant](https://cloudant.com/) (roughly the same as 2.x) -* [PouchDB Server](https://github.com/pouchdb/pouchdb-server) ([tested in CI](https://github.com/pouchdb/pouchdb/actions)) -* [PouchDB Server --in-memory mode](https://github.com/pouchdb/pouchdb-server) [Drupal 8](http://wearepropeople.com/blog/a-content-staging-solution-for-drupal-8-and-more) has also announced support for PouchDB, and there is [rcouch](https://github.com/rcouch/rcouch) as well, but these are both untested by PouchDB. @@ -189,12 +187,14 @@ If you are ever unsure about a server, consider replicating from PouchDB to Couc [PouchDB Server](https://github.com/pouchdb/pouchdb-server) is a standalone REST server that implements the CouchDB API, while using a LevelDB-based PouchDB under the hood. It also supports an `--in-memory` mode and any [LevelDOWN][] adapter, which you may find handy. -PouchDB Server passes the PouchDB test suite at 100%, but be aware that it is not as full-featured or battle-tested as CouchDB. +PouchDB Server is not currently maintained, so it is not currently supported or tested against in this repository. #### PouchDB Express The underlying module for PouchDB Server, [Express PouchDB](https://github.com/pouchdb/express-pouchdb) is an Express submodule that mimics most of the CouchDB API within your Express application. +Like PouchDB Server above, this module is not currently maintained, so it is not currently supported or tested against in this repository. + {% include anchor.html title="More resources" hash="more_resources"%} The best place to look for information on which browsers support which databases is [caniuse.com](http://caniuse.com). You can consult their tables on browser support for various backends: diff --git a/docs/getting-started.md b/docs/getting-started.md index d7d7d7bf3b..d688a92662 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -161,7 +161,7 @@ function todoBlurred(todo, event) { {% include anchor.html class="h3" title="Installing CouchDB" hash="installing_couchdb" %} -Now we'll implement the syncing. You need to have a compatible server instance. You can install either [PouchDB-Server](https://github.com/pouchdb/pouchdb-server), [CouchDB](http://couchdb.apache.org/) or use an hosted Couch service such as [Cloudant](https://cloudant.com/) +Now we'll implement the syncing. You need to have a compatible server instance. You can either install [CouchDB](http://couchdb.apache.org/) or use an hosted Couch service such as [Cloudant](https://cloudant.com/) {% include anchor.html class="h3" title="Enabling CORS" hash="enabling_cors" %} diff --git a/package.json b/package.json index c8d51f46fa..db6336eef4 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "publish-site": "./bin/publish-site.sh", "build-site": "node ./bin/build-site.js", "test-coverage": "./bin/test-coverage.sh", - "coverage": "COVERAGE=1 SERVER=pouchdb-server POUCHDB_SERVER_FLAGS=--in-memory PLUGINS=pouchdb-find ./bin/test-coverage.sh", + "coverage": "COVERAGE=1 POUCHDB_SERVER_FLAGS=--in-memory PLUGINS=pouchdb-find ./bin/test-coverage.sh", "report-coverage": "npm run test-coverage && istanbul-coveralls --no-rm", "build-test": "npm run build-test-utils && npm run build-perf", "build-test-utils": "browserify tests/integration/utils.js > tests/integration/utils-bundle.js", @@ -73,7 +73,6 @@ "derequire": "2.1.1", "eslint": "8.7.0", "express": "4.17.0", - "express-pouchdb": "4.2.0", "find-requires": "1.0.0", "glob": "7.1.5", "http-server": "0.12.3", diff --git a/tests/integration/test.attachments.js b/tests/integration/test.attachments.js index e87efbc2df..a0ac5853ea 100644 --- a/tests/integration/test.attachments.js +++ b/tests/integration/test.attachments.js @@ -2064,7 +2064,7 @@ adapters.forEach(function (adapter) { err.status.should.equal(400); const body = await err.json(); body.reason.should.equal('_local documents do not accept attachments.'); - } else if (serverType === 'pouchdb-express-router' || serverType === 'express-pouchdb') { + } else if (serverType === 'pouchdb-express-router') { err.status.should.equal(404); const body = await err.json(); body.reason.should.equal('missing'); @@ -2090,7 +2090,7 @@ adapters.forEach(function (adapter) { if (serverType === 'couchdb') { should.not.exist(doc._attachments); - } else if (serverType === 'pouchdb-express-router' || serverType === 'express-pouchdb') { + } else if (serverType === 'pouchdb-express-router') { doc._attachments['foo.txt'].content_type.should.equal('text/plain'); JSON.parse(decodeBase64(doc._attachments['foo.txt'].data)).should.deep.equal({ error: 'not_found', diff --git a/tests/integration/utils.js b/tests/integration/utils.js index 3f727a6a2e..bd971f5592 100644 --- a/tests/integration/utils.js +++ b/tests/integration/utils.js @@ -171,14 +171,13 @@ testUtils.isCouchDB = function (cb) { PouchDB.fetch(url, options).then(function (response) { return response.json(); }).then(function (res) { - cb('couchdb' in res || 'express-pouchdb' in res); + cb('couchdb' in res); }); }; testUtils.getServerType = async () => { const knownServers = [ 'couchdb', - 'express-pouchdb', 'pouchdb-express-router', ]; diff --git a/tests/misc/express-pouchdb-minimum-for-pouchdb.js b/tests/misc/express-pouchdb-minimum-for-pouchdb.js deleted file mode 100644 index ed7d17f1d3..0000000000 --- a/tests/misc/express-pouchdb-minimum-for-pouchdb.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var PouchDB = require('../../'); - -var app = require('express-pouchdb')(PouchDB, { - mode: 'minimumForPouchDB' -}); -app.listen(3000);