From 9659779aea61b7a73d8fe681d6ff057195f6f225 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Mon, 14 Aug 2023 16:34:51 +0000 Subject: [PATCH] Remove references to TonicDev * TonicDev became RunKit in 2016 - http://blog.runkit.com/2016/09/13/tonic-is-now-runkit-a-part-of-stripe/ * https://npm.runkit.com/pouchdb doesn't currently work * it's likely it hasn't worked for a long time, and no one has noticed * RunKit barely looks active itself - last blog post was in 2018: http://blog.runkit.com/ --- bin/update-package-json-for-publish.js | 2 +- packages/node_modules/pouchdb/package.json | 1 - .../node_modules/pouchdb/tonic-example.js | 50 ------------------- 3 files changed, 1 insertion(+), 52 deletions(-) delete mode 100644 packages/node_modules/pouchdb/tonic-example.js diff --git a/bin/update-package-json-for-publish.js b/bin/update-package-json-for-publish.js index b5c1e993c2..2c5b70fc9f 100644 --- a/bin/update-package-json-for-publish.js +++ b/bin/update-package-json-for-publish.js @@ -62,7 +62,7 @@ modules.forEach(function (mod) { // Also add "module" member: https://github.com/rollup/rollup/wiki/pkg.module pkg['jsnext:main'] = pkg.module = './lib/index.es.js'; // whitelist the files we'll actually publish - pkg.files = ['lib', 'dist', 'tonic-example.js']; + pkg.files = ['lib', 'dist']; var jsonString = JSON.stringify(pkg, null, ' ') + '\n'; fs.writeFileSync(pkgPath, jsonString, 'utf8'); diff --git a/packages/node_modules/pouchdb/package.json b/packages/node_modules/pouchdb/package.json index 5bdc3568da..6a92f4b627 100644 --- a/packages/node_modules/pouchdb/package.json +++ b/packages/node_modules/pouchdb/package.json @@ -14,7 +14,6 @@ "jspm": { "main": "dist/pouchdb.js" }, - "tonicExampleFilename": "tonic-example.js", "keywords": [ "db", "couchdb", diff --git a/packages/node_modules/pouchdb/tonic-example.js b/packages/node_modules/pouchdb/tonic-example.js deleted file mode 100644 index de5bc03fc2..0000000000 --- a/packages/node_modules/pouchdb/tonic-example.js +++ /dev/null @@ -1,50 +0,0 @@ -// see documentation for more detail: http://pouchdb.com/api.html - -const PouchDB = require('pouchdb') -require('pouchdb/extras/memory') /* this is used here just for compatibility with Tonic. - you can omit this line and the {adapter: 'memory'} - in the next, then your databases will be saved to disk or - browser storage. - */ -// create a database (here with memory storage): -const db = new PouchDB('test', {adapter: 'memory'}) - -// create a new doc with an _id of 'mydoc': -let response = await db.put({ - _id: 'mydoc', - title: 'Heroes' -}) - -// update an existing doc using _rev -await db.put({ - _id: 'mydoc', - _rev: response.rev, - title: "Sound and Vision", -}) - -// later you can fetch your doc -console.log(await db.get('mydoc')) - -// or add many more docs -response = await db.bulkDocs([ - {_id: 'myotherdoc', title: 'The Magisters', type: "fake band"}, - {_id: 'another', title: 'Kowabunga', type: "fake band"}, - {title: 'Without an _id', type: null} -]) - -console.log('bulkDocs response: ' + JSON.stringify(response, null, 2)) - -// and query them -await db.put({ - _id: '_design/fakebands', - views: { - fakebands: { - map: (function (doc) { - if (doc.type == "fake band") { - emit(doc.title) - } - }).toString() - } - } -}) -await db.query('fakebands', {include_docs: true})