bredikhin / barrels

Simple DB Fixtures for Sails.js
MIT License
85 stars 34 forks source link

Sails 1.0 issues #51

Closed albertpeiro closed 4 years ago

albertpeiro commented 7 years ago

Followed exactly your example and I'm getting this:

UsageError: Invalid criteria. Details: Cannot use this method (destroy) with a criteria ofundefined. (This is just a simple failsafe to help protect your data: if you really want to destroy ALL records, no problem-- please just be explicit and provide a criteria of{}`.)

at Deferred._.extend._WLModel [as _handleExec] (node_modules/waterline/lib/waterline/methods/destroy.js:173:17)
at Deferred.exec (node_modules/parley/lib/private/Deferred.js:191:10)
at node_modules/barrels/index.js:134:23
at node_modules/barrels/node_modules/async/lib/async.js:181:20
at Object.async.forEachOf.async.eachOf (node_modules/barrels/node_modules/async/lib/async.js:233:13)
at Object.async.forEach.async.each (node_modules/barrels/node_modules/async/lib/async.js:209:22)
at Barrels.populate (node_modules/barrels/index.js:130:51)
at test/lifecycle.test.js:30:13
at whenSailsIsReady (node_modules/sails/lib/app/lift.js:120:12)
at node_modules/async/dist/async.js:3679:13
at node_modules/async/dist/async.js:486:20
at replenish (node_modules/async/dist/async.js:879:29)
at iterateeCallback (node_modules/async/dist/async.js:869:21)
at node_modules/async/dist/async.js:847:20
at node_modules/async/dist/async.js:3676:17
at node_modules/async/dist/async.js:339:31
at node_modules/sails/lib/app/private/initialize.js:91:14
at node_modules/async/dist/async.js:952:25
at iteratorCallback (node_modules/async/dist/async.js:997:17)
at node_modules/async/dist/async.js:847:20
at expressListening (node_modules/sails/lib/hooks/http/start.js:169:14)
at node_modules/async/dist/async.js:486:20
at processQueue (node_modules/async/dist/async.js:1608:24)
at taskComplete (node_modules/async/dist/async.js:1630:13)
at node_modules/async/dist/async.js:1653:21
at node_modules/async/dist/async.js:339:31
at node_modules/async/dist/async.js:847:20
at async.auto.verify (node_modules/sails/lib/hooks/http/start.js:160:9)
at runTask (node_modules/async/dist/async.js:1660:17)
at node_modules/async/dist/async.js:1602:17
at processQueue (node_modules/async/dist/async.js:1612:17)
at taskComplete (node_modules/async/dist/async.js:1630:13)
at node_modules/async/dist/async.js:1653:21
at node_modules/async/dist/async.js:339:31
at node_modules/async/dist/async.js:847:20
at Server.<anonymous> (node_modules/sails/lib/hooks/http/start.js:38:20)
at emitListeningNT (net.js:1288:10)
at _combinedTickCallback (internal/process/next_tick.js:77:11)
at process._tickCallback (internal/process/next_tick.js:104:9)`
albertpeiro commented 7 years ago

Trying to upgrade this lib to Sails 1.0 https://github.com/albertpeiro/barrels

Help appreciated!

neonexus commented 4 years ago

To anyone that may stumble upon this, I created a fork of Barrels, called Fixted a couple years back, because of a different issue regarding fixture creation timing. It is currently up-to-date with Sails v1 standards.

bredikhin commented 4 years ago

@neonexus feel free to submit a PR to put the link to your library at the top of the README here.

neonexus commented 4 years ago

@bredikhin Done. Feel free to change the wording if you like.

neonexus commented 4 years ago

@bredikhin Looks like you'll have to deploy to NPM to update that README too, unfortunately.

neonexus commented 4 years ago

@bredikhin Another option would be to just tell NPM that the package is deprecated with a quick command:

npm deprecate barrels "Barrels has been deprecated in favor of 'Fixted': npm i --save-dev fixted"
neonexus commented 4 years ago

@bredikhin I know I'm asking a lot here, but if you are really done with this project, can you PLEASE run the command (or something similar to the one) above to make it official? No one actually reads the Github README's on NPM installs.