diff --git a/.npm/package/npm-shrinkwrap.json b/.npm/package/npm-shrinkwrap.json index e727ff6d..c857ab9b 100644 --- a/.npm/package/npm-shrinkwrap.json +++ b/.npm/package/npm-shrinkwrap.json @@ -2,34 +2,39 @@ "lockfileVersion": 1, "dependencies": { "deep-extend": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.0.tgz", - "integrity": "sha1-bvSgmwX5iw41jW2T1Mo8rsZnKAM=" + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, - "double-ended-queue": { - "version": "2.1.0-0", - "resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz", - "integrity": "sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw=" + "denque": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.1.tgz", + "integrity": "sha512-XwE+iZ4D6ZUB7mfYRMb5wByE8L74HCn30FBN7sWnXksWc1LO1bPDl67pBR9o/kC4z/xSNAwkMYcGgqDV3BE3Hw==" }, - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==" }, "redis": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/redis/-/redis-2.8.0.tgz", - "integrity": "sha512-M1OkonEQwtRmZv4tEWF2VgpG0JWJ8Fv1PhlgT5+B+uNq2cA3Rt1Yt/ryoR+vQNOQcIEgdCdfH0jr3bDpihAw1A==" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/redis/-/redis-3.1.2.tgz", + "integrity": "sha512-grn5KoZLr/qrRQVwoSkmzdbw6pwF+/rwODtrOr6vuBRiR/f3rjSTGupbF90Zpqm2oenix8Do6RV7pYEkGwlKkw==" }, "redis-commands": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.6.0.tgz", - "integrity": "sha512-2jnZ0IkjZxvguITjFTrGiLyzQZcTvaw8DAaCXxZq/dsHXz7KfMQ3OUJy7Tz9vnRtZRVz6VRCPDvruvU8Ts44wQ==" + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.7.0.tgz", + "integrity": "sha512-nJWqw3bTFy21hX/CPKHth6sfhZbdiHP6bTawSgQBlKOVRG7EZkfHbbHwQJnrE4vsQf0CMNE+3gJ4Fmm16vdVlQ==" + }, + "redis-errors": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", + "integrity": "sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==" }, "redis-parser": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-2.6.0.tgz", - "integrity": "sha1-Uu0J2srBCPGmMcB+m2mUHnoZUEs=" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz", + "integrity": "sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A==" } } } diff --git a/.versions b/.versions index 12ac1f34..4d450411 100644 --- a/.versions +++ b/.versions @@ -1,68 +1,67 @@ -accounts-base@2.2.4 -accounts-password@2.3.1 +accounts-base@2.2.8 +accounts-password@2.3.4 alanning:roles@3.4.0 aldeed:collection2@3.0.6 allow-deny@1.1.1 -babel-compiler@7.9.2 +babel-compiler@7.10.4 babel-runtime@1.5.1 base64@1.0.12 binary-heap@1.0.11 boilerplate-generator@1.7.1 -callback-hook@1.4.0 -check@1.3.1 -cultofcoders:redis-oplog@2.1.1 -ddp@1.4.0 -ddp-client@2.5.0 +callback-hook@1.5.1 +check@1.3.2 +cultofcoders:redis-oplog@2.2.0 +ddp@1.4.1 +ddp-client@2.6.1 ddp-common@1.4.0 -ddp-rate-limiter@1.1.0 -ddp-server@2.5.0 -diff-sequence@1.1.1 -dynamic-import@0.7.2 -ecmascript@0.16.2 -ecmascript-runtime@0.8.0 +ddp-rate-limiter@1.2.0 +ddp-server@2.6.1 +diff-sequence@1.1.2 +dynamic-import@0.7.3 +ecmascript@0.16.7 +ecmascript-runtime@0.8.1 ecmascript-runtime-client@0.12.1 ecmascript-runtime-server@0.11.0 -ejson@1.1.2 -email@2.2.1 -fetch@0.1.1 -geojson-utils@1.0.10 +ejson@1.1.3 +email@2.2.5 +fetch@0.1.3 +geojson-utils@1.0.11 id-map@1.1.1 inter-process-messaging@0.1.1 -local-test:cultofcoders:redis-oplog@2.1.1 +local-test:cultofcoders:redis-oplog@2.2.0 localstorage@1.2.0 -logging@1.3.1 +logging@1.3.2 matb33:collection-hooks@1.1.4 -meteor@1.10.0 +meteor@1.11.2 meteortesting:browser-tests@0.1.2 meteortesting:mocha@0.4.4 -minimongo@1.8.0 -modern-browsers@0.1.8 -modules@0.18.0 -modules-runtime@0.13.0 -mongo@1.15.0 +minimongo@1.9.3 +modern-browsers@0.1.9 +modules@0.19.0 +modules-runtime@0.13.1 +mongo@1.16.6 mongo-decimal@0.1.3 mongo-dev-server@1.1.0 mongo-id@1.0.8 natestrauser:publish-performant-counts@0.1.2 -npm-mongo@4.3.1 +npm-mongo@4.16.0 ordered-dict@1.1.0 practicalmeteor:mocha-core@1.0.1 -promise@0.12.0 +promise@0.12.2 raix:eventemitter@0.1.3 -random@1.2.0 -rate-limit@1.0.9 -react-fast-refresh@0.2.3 -reactive-var@1.0.11 +random@1.2.1 +rate-limit@1.1.1 +react-fast-refresh@0.2.7 +reactive-var@1.0.12 reload@1.3.1 retry@1.1.0 reywood:publish-composite@1.7.3 routepolicy@1.1.1 -service-configuration@1.3.0 sha@1.0.9 -socket-stream-client@0.5.0 +socket-stream-client@0.5.1 tmeasday:check-npm-versions@0.3.2 -tracker@1.2.0 -underscore@1.0.10 +tracker@1.3.2 +underscore@1.0.13 url@1.3.2 -webapp@1.13.1 -webapp-hashing@1.1.0 +webapp@1.13.5 +webapp-hashing@1.1.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b3537c9..6aee7206 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Updated `node-redis` to v3.1.2 - Updated `deep-extend` to v0.6.0 - Fix update not returning number +- Fix SyntheticMutator not applying `globalRedisPrefix` ### 2.1.1 - Fixes callback is not a function error when using SyntheticMutator.update diff --git a/lib/cache/lib/getChannels.js b/lib/cache/lib/getChannels.js index 6159045a..659836c1 100644 --- a/lib/cache/lib/getChannels.js +++ b/lib/cache/lib/getChannels.js @@ -1,6 +1,6 @@ import getChannelName from '../../utils/getChannelName'; -export default (collectionName, {namespace, channel, namespaces, channels}) => { +export default (collectionName, {namespace, channel, namespaces, channels} = {}) => { let channelStrings = []; if (namespaces) { diff --git a/lib/mongo/SyntheticMutator.js b/lib/mongo/SyntheticMutator.js index 50c14e2a..5d2c9730 100644 --- a/lib/mongo/SyntheticMutator.js +++ b/lib/mongo/SyntheticMutator.js @@ -5,6 +5,8 @@ import { EJSON } from 'meteor/ejson'; import getFields from '../utils/getFields'; import { Events, RedisPipe } from '../constants'; import containsOperators from '../mongo/lib/containsOperators'; +import getChannels from '../cache/lib/getChannels'; +import getDedicatedChannel from '../utils/getDedicatedChannel'; /** * call(Mongo.Collection).insert(data) @@ -92,9 +94,9 @@ export default class SyntheticMutator { if (!Array.isArray(channels)) { if (channels instanceof Mongo.Collection) { const name = channels._name; - channels = [name]; + channels = getChannels(name); if (_id) { - channels.push(`${name}::${_id}`); + channels.push(getDedicatedChannel(name, _id)); } } else { channels = [channels];