Skip to content

Commit be61b3d

Browse files
committed
Merge branch 'v4' into feature/export-collections
2 parents 5390b7e + 54130f4 commit be61b3d

38 files changed

Lines changed: 9824 additions & 5766 deletions

.github/CONTRIBUTING.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Contributing to Meteor Roles
2+
3+
Any contribution to this repository is highly appreciated!
4+
5+
## Setup development env
6+
7+
### Clone project and create a new branch to work on
8+
9+
First, clone this repository and create a new branch to work on.
10+
Branch names should follow the GitFlow standard and start with a descriptive prefix of their intended outcome, for example:
11+
12+
- `feature/` for features
13+
- `fix/` for general fixes
14+
15+
Then the name of the branch should describe the purpose of the branch and potentially reference the issue number it is solving.
16+
17+
```shell
18+
$ git clone git@github.com:Meteor-Community-Packages/meteor-roles.git
19+
$ cd meteor-roles
20+
$ git checkout -b fix/some-issue
21+
```
22+
23+
### Initialize test app
24+
25+
We use a proxy Meteor application to run our tests and handle coverage etc.
26+
This app contains several npm scripts to provide the complete toolchain that is required
27+
for your development and testing needs.
28+
29+
The setup is very easy. Go into the `testapp` directory, install dependencies and link
30+
the package:
31+
32+
```shell
33+
$ cd testapp
34+
$ meteor npm install
35+
$ meteor npm run setup # this is important for the tools to work!
36+
```
37+
38+
## Development toolchain
39+
40+
The `testapp` comes with some builtin scripts you can utilize during your development.
41+
They will also be picked up by our CI during pull requests.
42+
Therefore, it's a good call for you, that if they pass or fail, the CI will do so, too.
43+
44+
**Note: all tools require the npm `setup` script has been executed at least once!**
45+
46+
### Linter
47+
48+
We use `standard` as our linter. You can run either the linter or use it's autofix feature for
49+
the most common issues:
50+
51+
```shell
52+
# in testapp
53+
$ meteor npm run lint # show only outputs
54+
$ meteor npm run lint:fix # with fixes + outputs
55+
```
56+
57+
### Tests
58+
59+
We provide three forms of tests: once, watch, coverage
60+
61+
#### Once
62+
63+
Simply runs the test suite once, without coverage collection:
64+
65+
```shell
66+
$ meteor npm run test
67+
```
68+
69+
#### Watch
70+
71+
Runs the test suite in watch mode, good to use during active development, where your changes
72+
are picked up automatically to re-run the tests:
73+
74+
```shell
75+
$ meteor npm run test:watch
76+
```
77+
78+
#### Coverage
79+
80+
Runs the test suite once, including coverage report generation.
81+
Generates an html and json report output.
82+
83+
```shell
84+
$ meteor npm run test:coverage
85+
$ meteor npm run report # summary output in console
86+
```
87+
88+
If you want to watch the HTML output to find (un)covered lines, open
89+
the file at `testapp/.coverage/index.html` in your browser.
90+
91+
## Open a pull request
92+
93+
If you open a pull request, please make sure the following requirements are met:
94+
95+
- the `lint` script is passing
96+
- the `test` script is passing
97+
- your contribution is on point and solves one issue (not multiple)
98+
- your commit messages are descriptive and informative
99+
- complex changes are documented in the code with comments or jsDoc-compatible documentation
100+
101+
Please understand, that there will be a review process and your contribution
102+
might require changes before being merged. This is entirely to ensure quality and is
103+
never used as a personal offense.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
<!-- Read a guide on [opening issues](https://opensource.guide/how-to-contribute/#opening-an-issue) -->
10+
**Describe the bug**
11+
12+
A clear and concise description of what the bug is.
13+
14+
**To Reproduce**
15+
16+
Steps to reproduce the behavior:
17+
1. Go to '...'
18+
2. Click on '....'
19+
3. Scroll down to '....'
20+
4. See error
21+
22+
**Expected behavior**
23+
24+
A clear and concise description of what you expected to happen.
25+
26+
**Screenshots**
27+
28+
If applicable, add screenshots to help explain your problem.
29+
30+
**Versions (please complete the following information):**
31+
- Meteor version: [e.g. 1.8.2]
32+
- Browser: [e.g. Firefox, Chrome, Safari]
33+
- Version: [e.g. 1.0.0]
34+
35+
**Additional context**
36+
37+
Add any other context about the problem here.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
<!-- Read a guide on [opening issues](https://opensource.guide/how-to-contribute/#opening-an-issue) -->
10+
**Is your feature request related to a problem? Please describe.**
11+
12+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
13+
14+
**Describe the solution you'd like**
15+
16+
A clear and concise description of what you want to happen.
17+
18+
**Describe alternatives you've considered**
19+
20+
A clear and concise description of any alternative solutions or features you've considered.
21+
22+
**Additional context**
23+
24+
Add any other context or screenshots about the feature request here.

.github/SECURITY.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
Unless otherwise noted, MCP packages and projects support the latest version of Meteor.
6+
As of the time of writing this in September 2023 it is Meteor 2.13 and, in general the 2.x series.
7+
Support for Meteor 1.x is not guaranteed and at best can include Meteor 1.12.1.
8+
At the present time, we are also preparing to support Meteor 3.0 which is in development.
9+
10+
| Meteor Version | Supported |
11+
| -------------- | ------------------ |
12+
| 3.0 | 🚧 |
13+
| > 2.0 ||
14+
| < 1.12 ||
15+
16+
## Reporting a Vulnerability
17+
18+
We are not providing support for Meteor itself. See their [SECURITY](https://github.com/meteor/meteor/blob/devel/SECURITY.md) for more information.
19+
20+
Any security concerns should be first raised in the repository of the affected package.
21+
If you want to report a vulnerability privately, please contact the maintainer of the package directly.
22+
If you are not sure who that is, you can contact one of the following people, and they will take it from there:
23+
24+
Jan Dvorak
25+
hello+mcp-security@jandvorak.me
26+

.github/workflows/testsuite.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# the test suite runs the tests (headless, server+client) for multiple Meteor releases
2+
name: Test suite
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
lint:
11+
name: Javascript standard lint
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: checkout
15+
uses: actions/checkout@v4
16+
17+
- name: setup node
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
22+
- name: cache dependencies
23+
uses: actions/cache@v3
24+
with:
25+
path: ~/.npm
26+
key: ${{ runner.os }}-node-20-${{ hashFiles('**/package-lock.json') }}
27+
restore-keys: |
28+
${{ runner.os }}-node-20-
29+
30+
- run: cd testapp && npm ci && npm run setup && npm run lint
31+
32+
test:
33+
name: Meteor package tests
34+
needs: [lint]
35+
runs-on: ubuntu-latest
36+
strategy:
37+
matrix:
38+
meteorRelease:
39+
- '2.8.1'
40+
- '2.15'
41+
- '3.0-beta.7'
42+
# Latest version
43+
steps:
44+
- name: Checkout code
45+
uses: actions/checkout@v4
46+
47+
- name: Install Node.js
48+
uses: actions/setup-node@v4
49+
with:
50+
node-version: 20
51+
52+
- name: Setup meteor ${{ matrix.meteorRelease }}
53+
uses: meteorengineer/setup-meteor@v1
54+
with:
55+
meteor-release: ${{ matrix.meteorRelease }}
56+
57+
- name: cache dependencies
58+
uses: actions/cache@v3
59+
with:
60+
path: ~/.npm
61+
key: ${{ runner.os }}-node-20-${{ hashFiles('**/package-lock.json') }}
62+
restore-keys: |
63+
${{ runner.os }}-node-20-
64+
65+
- run: cd testapp && npm ci && npm run setup && npm run test

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ npm-debug.log
1616
smart.lock
1717

1818
.idea
19+
.DS_Store
1920
docs/
2021
node_modules/
2122
.npm/
22-
someapp/
23+
.coverage/

.meteorignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/testapp
2+
/tests
3+
**/*tests.js
4+
/examples

.versions

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,62 @@
1-
accounts-base@2.2.8
2-
alanning:roles@3.5.1
1+
accounts-base@2.2.10
2+
alanning:roles@4.0.0-alpha.3
33
allow-deny@1.1.1
4-
babel-compiler@7.10.4
4+
babel-compiler@7.10.5
55
babel-runtime@1.5.1
66
base64@1.0.12
77
binary-heap@1.0.11
8-
boilerplate-generator@1.7.1
8+
boilerplate-generator@1.7.2
99
callback-hook@1.5.1
1010
check@1.3.2
1111
ddp@1.4.1
1212
ddp-client@2.6.1
1313
ddp-common@1.4.0
14-
ddp-rate-limiter@1.2.0
15-
ddp-server@2.6.1
14+
ddp-rate-limiter@1.2.1
15+
ddp-server@2.7.0
1616
diff-sequence@1.1.2
1717
dynamic-import@0.7.3
18-
ecmascript@0.16.7
18+
ecmascript@0.16.8
1919
ecmascript-runtime@0.8.1
2020
ecmascript-runtime-client@0.12.1
2121
ecmascript-runtime-server@0.11.0
2222
ejson@1.1.3
23-
fetch@0.1.3
23+
fetch@0.1.4
2424
geojson-utils@1.0.11
25-
http@1.4.2
25+
http@2.0.0
2626
id-map@1.1.1
2727
inter-process-messaging@0.1.1
28-
lmieulet:meteor-coverage@3.2.0
29-
lmieulet:meteor-packages-coverage@0.2.0
30-
local-test:alanning:roles@3.5.1
28+
lmieulet:meteor-coverage@4.1.0
29+
lmieulet:meteor-legacy-coverage@0.1.0
30+
local-test:alanning:roles@4.0.0-alpha.3
3131
localstorage@1.2.0
32-
logging@1.3.2
33-
meteor@1.11.2
34-
meteortesting:browser-tests@0.1.2
35-
meteortesting:mocha@0.4.4
32+
logging@1.3.3
33+
meteor@1.11.5
34+
meteortesting:browser-tests@1.4.2
35+
meteortesting:mocha@2.1.0
36+
meteortesting:mocha-core@8.0.1
3637
minimongo@1.9.3
37-
modern-browsers@0.1.9
38-
modules@0.19.0
38+
modern-browsers@0.1.10
39+
modules@0.20.0
3940
modules-runtime@0.13.1
40-
mongo@1.16.6
41+
mongo@1.16.8
4142
mongo-decimal@0.1.3
4243
mongo-dev-server@1.1.0
4344
mongo-id@1.0.8
44-
npm-mongo@4.16.0
45+
npm-mongo@4.17.2
4546
ordered-dict@1.1.0
46-
practicalmeteor:mocha-core@1.0.1
4747
promise@0.12.2
4848
random@1.2.1
4949
rate-limit@1.1.1
50-
react-fast-refresh@0.2.7
50+
react-fast-refresh@0.2.8
5151
reactive-var@1.0.12
5252
reload@1.3.1
5353
retry@1.1.0
5454
routepolicy@1.1.1
55-
socket-stream-client@0.5.1
56-
tracker@1.3.2
57-
underscore@1.0.13
55+
socket-stream-client@0.5.2
56+
tracker@1.3.3
57+
typescript@4.9.5
58+
underscore@1.6.0
5859
url@1.3.2
59-
webapp@1.13.5
60+
webapp@1.13.8
6061
webapp-hashing@1.1.1
61-
zodern:types@1.0.9
62+
zodern:types@1.0.13

0 commit comments

Comments
 (0)