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 @@
accounts-base@1.4.4
accounts-ui@1.3.1
accounts-ui-unstyled@1.4.2
allow-deny@1.1.0
autoupdate@1.6.0
babel-compiler@7.3.4
babel-runtime@1.3.0
accounts-base@2.2.9
allow-deny@1.1.1
autoupdate@1.8.0
babel-compiler@7.10.5
babel-runtime@1.5.1
base64@1.0.12
binary-heap@1.0.11
blaze@2.3.3
blaze-html-templates@1.1.2
blaze-tools@1.0.10
boilerplate-generator@1.6.0
caching-compiler@1.2.1
caching-html-compiler@1.1.3
callback-hook@1.1.0
check@1.3.1
coffeescript@1.0.17
ddp@1.4.0
ddp-client@2.3.3
blaze@2.7.1
blaze-html-templates@2.0.0
blaze-tools@1.1.3
boilerplate-generator@1.7.2
caching-compiler@1.2.2
caching-html-compiler@1.2.1
callback-hook@1.5.1
check@1.3.2
ddp@1.4.1
ddp-client@2.6.1
ddp-common@1.4.0
ddp-rate-limiter@1.0.7
ddp-server@2.3.0
deps@1.0.12
diff-sequence@1.1.1
dynamic-import@0.5.1
ecmascript@0.12.7
ecmascript-runtime@0.7.0
ecmascript-runtime-client@0.8.0
ecmascript-runtime-server@0.7.1
ejson@1.1.0
ddp-rate-limiter@1.2.1
ddp-server@2.7.0
diff-sequence@1.1.2
dynamic-import@0.7.3
ecmascript@0.16.8
ecmascript-runtime@0.8.1
ecmascript-runtime-client@0.12.1
ecmascript-runtime-server@0.11.0
ejson@1.1.3
es5-shim@4.8.0
fetch@0.1.1
geojson-utils@1.0.10
fetch@0.1.4
geojson-utils@1.0.11
hot-code-push@1.0.4
html-tools@1.0.11
htmljs@1.0.11
http@1.4.2
id-map@1.1.0
inter-process-messaging@0.1.0
html-tools@1.1.3
htmljs@1.1.1
http@2.0.0
id-map@1.1.1
inter-process-messaging@0.1.1
jquery@1.11.11
launch-screen@1.1.1
less@2.8.0
livedata@1.0.18
launch-screen@2.0.0
localstorage@1.2.0
logging@1.1.20
meteor@1.9.3
meteor-base@1.4.0
minifier-css@1.4.2
minifier-js@2.4.1
minimongo@1.4.5
mizzao:accounts-testing@0.1.0
mizzao:timesync@0.5.1
mizzao:user-status@0.7.0
mobile-experience@1.0.5
mobile-status-bar@1.0.14
modern-browsers@0.1.4
modules@0.13.0
modules-runtime@0.10.3
mongo@1.6.3
mongo-decimal@0.1.1
logging@1.3.3
meteor@1.11.4
meteor-base@1.5.1
minifier-css@1.6.4
minifier-js@2.7.5
minimongo@1.9.3
mizzao:timesync@0.5.4
mizzao:user-status@1.0.2
mobile-experience@1.1.1
mobile-status-bar@1.1.0
modern-browsers@0.1.10
modules@0.20.0
modules-runtime@0.13.1
mongo@1.16.8
mongo-decimal@0.1.3
mongo-dev-server@1.1.0
mongo-id@1.0.7
npm-mongo@3.1.2
observe-sequence@1.0.16
mongo-id@1.0.8
npm-mongo@4.17.2
observe-sequence@1.0.21
ordered-dict@1.1.0
promise@0.11.2
random@1.1.0
rate-limit@1.0.9
reactive-dict@1.3.0
reactive-var@1.0.11
reload@1.3.0
promise@0.12.2
random@1.2.1
rate-limit@1.1.1
react-fast-refresh@0.2.8
reactive-var@1.0.12
reload@1.3.1
retry@1.1.0
routepolicy@1.1.0
service-configuration@1.0.11
session@1.2.0
shell-server@0.4.0
socket-stream-client@0.2.2
spacebars@1.0.15
spacebars-compiler@1.1.3
standard-minifier-css@1.5.3
standard-minifier-js@2.4.1
templating@1.3.2
templating-compiler@1.3.3
templating-runtime@1.3.2
templating-tools@1.1.2
tracker@1.2.0
routepolicy@1.1.1
shell-server@0.5.0
socket-stream-client@0.5.2
spacebars@1.4.1
spacebars-compiler@1.3.1
standard-minifier-css@1.9.2
standard-minifier-js@2.8.1
templating@1.4.2
templating-compiler@1.4.1
templating-runtime@1.6.3
templating-tools@1.2.2
tracker@1.3.3
twbs:bootstrap@3.3.6
ui@1.0.13
underscore@1.0.10
url@1.2.0
webapp@1.7.4
webapp-hashing@1.0.9
typescript@4.9.5
underscore@1.0.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.