Skip to content

Commit

Permalink
Merge pull request #391 from Meteor-Community-Packages/release/2.2
Browse files Browse the repository at this point in the history
v2.2.0
  • Loading branch information
StorytellerCZ committed Jun 10, 2023
2 parents 2d4f594 + 4cbbc02 commit 5d34939
Show file tree
Hide file tree
Showing 71 changed files with 257 additions and 237 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/comment-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Add immediate comment on new issues

on:
issues:
types: [opened]

jobs:
createComment:
runs-on: ubuntu-latest
steps:
- name: Create Comment
uses: peter-evans/create-or-update-comment@v1.4.2
with:
issue-number: ${{ github.event.issue.number }}
body: |
Thank you for submitting this issue!
We, the Members of Meteor Community Packages take every issue seriously.
Our goal is to provide long-term lifecycles for packages and keep up
with the newest changes in Meteor and the overall NodeJs/JavaScript ecosystem.
However, we contribute to these packages mostly in our free time.
Therefore, we can't guarantee you issues to be solved within certain time.
If you think this issue is trivial to solve, don't hesitate to submit
a pull request, too! We will accompany you in the process with reviews and hints
on how to get development set up.
Please also consider sponsoring the maintainers of the package.
If you don't know who is currently maintaining this package, just leave a comment
and we'll let you know
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
meteor: [1.12.2, 2.6.1, 2.7.3]
redis-version: [4, 5, 6]
meteor: [1.12.2, 2.6.1, 2.7.3, 2.8.1, 2.12]
redis-version: [4, 5, 6, 7]

steps:
- uses: actions/checkout@v3

- name: Start Redis
uses: supercharge/redis-github-action@1.4.0
uses: supercharge/redis-github-action@1.5.0
with:
redis-version: ${{ matrix.redis-version }}

Expand Down
74 changes: 22 additions & 52 deletions .npm/package/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 37 additions & 38 deletions .versions
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
## CHANGELOG

### 2.2.0
- Bumped minimum Meteor version to v1.12.2
- Updated tests to cover from Meteor v1.12.2 to the latest v2.12
- Added testing for Redis v7
- 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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

### LICENSE: MIT

[![Build Status](https://api.travis-ci.org/cult-of-coders/redis-oplog.svg?branch=master)](https://travis-ci.org/cult-of-coders/redis-oplog) [![Backers on Open Collective](https://opencollective.com/redis-oplog/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/redis-oplog/sponsors/badge.svg)](#sponsors)
[![Backers on Open Collective](https://opencollective.com/redis-oplog/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/redis-oplog/sponsors/badge.svg)](#sponsors)

## RedisOplog

Expand Down
4 changes: 2 additions & 2 deletions docs/failover.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ In order to configure these events, you can do it like this:
// in a server-side file that is loaded on startup
import { Config } from 'meteor/cultofcoders:redis-oplog';

_.extend(Config.redisExtras.events, {
Object.assign(Config.redisExtras.events, {
reconnect({delay, attempt, error}) {
// put your logic here.
},
Expand All @@ -30,4 +30,4 @@ _.extend(Config.redisExtras.events, {
Since we have the logic of refreshing an observable collection, we can make it so it falls back to polling.
But polling is very dangerous and very expensive, so we should avoid it at all costs, however
this could be implemented and customized per collection, but honestly, your redis-server needs to have
high-availability, since it's a core component of your app.
high-availability, since it's a core component of your app.
6 changes: 3 additions & 3 deletions docs/outside_mutations.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ redis.publish('tasks', JSON.stringify({

You have to be careful, if in your app you subscribe by `_id`:
```js
return Task.find({_id: taskId})
return Tasks.find({_id: taskId})
```

In order for the processor to catch the event you have to send it to the `tasks::taskId` channel, where `taskId` represents the actual id inside MongoDB.
Expand All @@ -47,7 +47,7 @@ So, if you have both types of publications, you have to publish it to both `task

If you use namespaces, the channels also change:
```js
return Task.find({groupId}, {
return Tasks.find({groupId}, {
namespace: `group::${groupId}`
})
```
Expand All @@ -57,7 +57,7 @@ you have to send it to both `group::groupId::tasks` and `tasks::taskId`, where `

Keep in mind, that namespaces don't affect direct query processing:
```js
return Task.find({_id: taskId}, {
return Tasks.find({_id: taskId}, {
namespace: `group::${groupId}`
})
```
Expand Down
6 changes: 3 additions & 3 deletions lib/cache/ObservableCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export default class ObservableCollection {
}

if (fields) {
this.fieldsArray = _.keys(fields);
this.fieldsArray = Object.keys(fields);

if (!_.isArray(this.fieldsArray)) {
throw new Meteor.Error(
Expand Down Expand Up @@ -156,7 +156,7 @@ export default class ObservableCollection {
isEligibleByDB(_id) {
if (this.matcher) {
return !!this.collection.findOne(
_.extend({}, this.selector, { _id }),
Object.assign({}, this.selector, { _id }),
{ fields: { _id: 1 } }
);
}
Expand Down Expand Up @@ -326,7 +326,7 @@ export default class ObservableCollection {

// if we have options, we surely have fields array
let fieldsArray = this.fieldsArray.slice();
if (_.keys(this.selector).length > 0) {
if (Object.keys(this.selector).length > 0) {
fieldsArray = _.union(
fieldsArray,
extractFieldsFromFilters(this.selector)
Expand Down
2 changes: 2 additions & 0 deletions lib/cache/lib/extractFieldsFromFilters.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { _ } from 'meteor/underscore';

const deepFilterFieldsArray = ['$and', '$or', '$nor'];
const deepFilterFieldsObject = ['$not'];

Expand Down
3 changes: 1 addition & 2 deletions lib/cache/lib/getChannels.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { _ } from 'meteor/underscore';
import getChannelName from '../../utils/getChannelName';

export default (collectionName, {namespace, channel, namespaces, channels}) => {
export default (collectionName, {namespace, channel, namespaces, channels} = {}) => {
let channelStrings = [];

if (namespaces) {
Expand Down
4 changes: 2 additions & 2 deletions lib/cache/lib/getSnapbackFields.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ const isArray = (doc, parts) => {
if (parts.length > 1) {
return isArray(doc[parts[0]], parts.slice(1));
} else {
return _.isArray(doc[parts[0]]);
return Array.isArray(doc[parts[0]]);
}
};
};
2 changes: 1 addition & 1 deletion lib/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default (config = {}) => {

deepExtend(Config, config);

_.extend(Config, {
Object.assign(Config, {
isInitialized: true,
oldPublish: Meteor.publish,
});
Expand Down
Loading

0 comments on commit 5d34939

Please sign in to comment.