Skip to content

Commit

Permalink
Merge pull request #179 from StorytellerCZ/master
Browse files Browse the repository at this point in the history
v1.1.0 release
  • Loading branch information
StorytellerCZ authored Feb 28, 2024
2 parents 128c398 + 587a6e0 commit af9b44a
Show file tree
Hide file tree
Showing 17 changed files with 1,142 additions and 1,136 deletions.
7 changes: 5 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 2018
"ecmaVersion": 2018,
"sourceType": "module",
"allowImportExportEverywhere": true,
"requireConfigFile": false
},
"parser": "babel-eslint",
"rules": {
"linebreak-style": [
"error",
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Lint test"

on:
push:
branches:
- master
pull_request:

jobs:
lint:
name: Javascript standard lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-18-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-18-
- name: Install dependencies
run: npm ci
- name: Run lint
run: npm run lint

3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ os:
- linux
language: node_js
node_js:
- "12.19.0"
- "14.21.3"
before_install:
- "curl -L http://git.io/ejPSng | /bin/sh"
script:
- npm run lint
- npm run test
6 changes: 6 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## vNEXT

## v1.1.0

* Bumped dependency versions
* Updated tests
* `Meteor.settings?.packages?.['mizzao:user-status']?.startupQuerySelector` option added to allow for custom startup selector

## v1.0.1

* Bumped dependency versions
Expand Down
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,23 @@ The `UserStatus.events` object is an `EventEmitter` on which you can listen for

Check out https://github.com/mizzao/meteor-accounts-testing for a simple accounts drop-in that you can use to test your app - this is also used in the demo.

#### Startup selector
By default, the startup selector for resetting user status is `{}`.
If you want to change that you can set the default selector in your settings.json file:

```json
{
"packages": {
"mizzao:user-status": {
"startupQuerySelector": {
// your selector here, for example:
"profile.name": "admin"
}
}
}
}
```

## Testing

There are some `Tinytest` unit tests that are used to test the logic in this package, but general testing with many users and connections is hard. Hence, we have set up a demo app (http://user-status.meteor.com) for testing that is also hosted as a proof of concept. If you think you've found a bug in the package, try to replicate it on the demo app and post an issue with steps to reproduce.
Expand Down
4 changes: 2 additions & 2 deletions client/monitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const activityDep = new Tracker.Dependency;
let focused = true;

// These settings are internal or exported for test only
export let MonitorInternals = {
export const MonitorInternals = {
idleThreshold: null,
idleOnBlur: false,

Expand Down Expand Up @@ -125,7 +125,7 @@ const stop = () => {

};

var monitor = (setAction) => {
const monitor = (setAction) => {
// Ignore focus/blur events when we aren't monitoring
if (!monitorId) {
return;
Expand Down
6 changes: 6 additions & 0 deletions demo/.meteor/.finished-upgraders
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ notices-for-facebook-graph-api-2
1.2.0-cordova-changes
1.2.0-breaking-changes
1.3.0-split-minifiers-package
1.4.0-remove-old-dev-bundle-link
1.4.1-add-shell-server-package
1.4.3-split-account-service-packages
1.5-add-dynamic-import-package
1.7-split-underscore-from-meteor-base
1.8.3-split-jquery-from-blaze
27 changes: 15 additions & 12 deletions demo/.meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.

meteor-base@1.4.0 # Packages every Meteor app needs to have
mobile-experience@1.0.5 # Packages for a great mobile UX
mongo@1.6.2 # The database Meteor supports right now
blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views
reactive-var@1.0.11 # Reactive variable for tracker
tracker@1.2.0 # Meteor's client-side reactive programming library
meteor-base # Packages every Meteor app needs to have
mobile-experience # Packages for a great mobile UX
mongo # The database Meteor supports right now
blaze-html-templates # Compile .html files into Meteor Blaze views
reactive-var # Reactive variable for tracker
tracker # Meteor's client-side reactive programming library

standard-minifier-css@1.5.3 # CSS minifier run for production mode
standard-minifier-js@2.4.1 # JS minifier run for production mode
es5-shim@4.8.0 # ECMAScript 5 compatibility for older browsers
ecmascript@0.12.4 # Enable ECMAScript2015+ syntax in app code
shell-server@0.4.0 # Server-side component of the `meteor shell` command
standard-minifier-css # CSS minifier run for production mode
standard-minifier-js # JS minifier run for production mode
es5-shim # ECMAScript 5 compatibility for older browsers
ecmascript # Enable ECMAScript2015+ syntax in app code
shell-server # Server-side component of the `meteor shell` command

mizzao:accounts-testing
communitypackages:accounts-testing
mizzao:timesync
mizzao:user-status
twbs:bootstrap
dynamic-import
underscore
jquery
2 changes: 1 addition & 1 deletion demo/.meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
METEOR@1.8.1
METEOR@2.14
155 changes: 73 additions & 82 deletions demo/.meteor/versions
Original file line number Diff line number Diff line change
@@ -1,93 +1,84 @@
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected].1
[email protected].10
[email protected].4
[email protected].11
[email protected]
html-tools@1.0.11
htmljs@1.0.11
http@1.4.2
[email protected].0
[email protected].0
html-tools@1.1.3
htmljs@1.1.1
http@2.0.0
[email protected].1
[email protected].1
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
mizzao:[email protected]
mizzao:[email protected]
mizzao:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
mizzao:[email protected]
mizzao:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected].7
npm-mongo@3.1.2
[email protected].16
[email protected].8
npm-mongo@4.17.2
[email protected].21
[email protected]
promise@0.11.2
random@1.1.0
rate-limit@1.0.9
[email protected]
[email protected].11
[email protected].0
promise@0.12.2
random@1.2.1
rate-limit@1.1.1
[email protected]
[email protected].12
[email protected].1
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
twbs:[email protected]
[email protected]
[email protected].10
url@1.2.0
webapp@1.7.4
webapp-hashing@1.0.9
[email protected]
[email protected].13
url@1.3.2
webapp@1.13.6
webapp-hashing@1.1.1
Loading

0 comments on commit af9b44a

Please sign in to comment.