You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Any contribution to this repository is highly appreciated!
4
+
2
5
3
6
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
4
7
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
5
8
**Table of Contents***generated with [DocToc](https://github.com/thlorenz/doctoc)*
6
9
7
10
-[Introduction](#introduction)
8
-
-[Your First Contribution](#your-first-contribution)
9
-
-[Submitting code](#submitting-code)
11
+
-[Setup development env](#setup-development-env)
12
+
-[Clone project and create a new branch to work on](#clone-project-and-create-a-new-branch-to-work-on)
13
+
-[Initialize test app](#initialize-test-app)
14
+
-[Development toolchain](#development-toolchain)
15
+
-[Linter](#linter)
16
+
-[Tests](#tests)
17
+
-[Once](#once)
18
+
-[Watch](#watch)
19
+
-[Coverage](#coverage)
20
+
-[Open a pull request](#open-a-pull-request)
10
21
-[Code review process](#code-review-process)
11
22
-[Questions](#questions)
12
23
-[Credits](#credits)
13
-
-[Contributors](#contributors)
14
-
-[Sponsors](#sponsors)
15
24
16
25
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
17
26
@@ -25,34 +34,122 @@ We welcome any type of contribution, not only code. You can help with
25
34
-**Marketing**: writing blog posts, howto's, printing stickers, ...
26
35
-**Community**: presenting the project at meetups, organizing a dedicated meetup for the local community, ...
27
36
-**Code**: take a look at the [open issues](issues). Even if you can't write code, commenting on them, showing that you care about a given issue matters. It helps us triage them.
28
-
-**Money**: we [welcome financial contributions](https://github.com/sponsors/aldeed).
37
+
-**Money**: we [welcome financial contributions](https://github.com/https://github.com/Meteor-Community-Packages).
38
+
39
+
## Setup development env
40
+
41
+
### Clone project and create a new branch to work on
42
+
43
+
First, clone this repository and create a new branch to work on.
44
+
Branch names should follow the GitFlow standard and start with a descriptive prefix of their intended outcome, for example:
45
+
46
+
-`feature/` for features
47
+
-`fix/` for general fixes
48
+
49
+
Then the name of the branch should describe the purpose of the branch and potentially reference the issue number it is solving.
We use a proxy Meteor application to run our tests and handle coverage etc.
60
+
This app contains several npm scripts to provide the complete toolchain that is required
61
+
for your development and testing needs.
62
+
63
+
The setup is very easy. Go into the `tests` directory, install dependencies and link
64
+
the package:
65
+
66
+
```shell
67
+
$ cd tests
68
+
$ meteor npm install
69
+
$ meteor npm run setup # this is important for the tools to work!
70
+
```
71
+
72
+
## Development toolchain
73
+
74
+
The `tests` comes with some builtin scripts you can utilize during your development.
75
+
They will also be picked up by our CI during pull requests.
76
+
Therefore, it's a good call for you, that if they pass or fail, the CI will do so, too.
77
+
78
+
**Note: all tools require the npm `setup` script has been executed at least once!**
79
+
80
+
### Linter
81
+
82
+
We use `standard` as our linter. You can run either the linter or use it's autofix feature for
83
+
the most common issues:
29
84
30
-
## Your First Contribution
85
+
```shell
86
+
# in tests
87
+
$ meteor npm run lint # show only outputs
88
+
$ meteor npm run lint:fix # with fixes + outputs
89
+
```
31
90
32
-
Working on your first Pull Request? You can learn how from this *free* series, [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).
91
+
### Tests
33
92
34
-
## Submitting code
93
+
We provide three forms of tests: once, watch, coverage
94
+
95
+
#### Once
96
+
97
+
Simply runs the test suite once, without coverage collection:
98
+
99
+
```shell
100
+
$ meteor npm run test
101
+
```
102
+
103
+
#### Watch
104
+
105
+
Runs the test suite in watch mode, good to use during active development, where your changes
106
+
are picked up automatically to re-run the tests:
107
+
108
+
```shell
109
+
$ meteor npm run test:watch
110
+
```
111
+
112
+
#### Coverage
113
+
114
+
Runs the test suite once, including coverage report generation.
115
+
Generates an html and json report output.
116
+
117
+
```shell
118
+
$ meteor npm run test:coverage
119
+
$ meteor npm run report # summary output in console
120
+
```
121
+
122
+
If you want to watch the HTML output to find (un)covered lines, open
123
+
the file at `tests/.coverage/index.html` in your browser.
124
+
125
+
## Open a pull request
126
+
127
+
If you open a pull request, please make sure the following requirements are met:
128
+
129
+
- the `lint` script is passing
130
+
- the `test` script is passing
131
+
- your contribution is on point and solves one issue (not multiple)
132
+
- your commit messages are descriptive and informative
133
+
- complex changes are documented in the code with comments or jsDoc-compatible documentation
134
+
135
+
Please understand, that there will be a review process and your contribution
136
+
might require changes before being merged. This is entirely to ensure quality and is
137
+
never used as a personal offense.
35
138
36
-
Any code change should be submitted as a pull request. The description should explain what the code does and give steps to execute it. The pull request should also contain tests.
37
139
38
140
## Code review process
39
141
40
-
The bigger the pull request, the longer it will take to review and merge. Try to break down large pull requests in smaller chunks that are easier to review and merge.
142
+
The bigger the pull request, the longer it will take to review and merge. Try to break down large pull requests in
143
+
smaller chunks that are easier to review and merge.
41
144
It is also always helpful to have some context for your pull request. What was the purpose? Why does it matter to you?
42
145
43
146
## Questions
44
147
45
-
If you have any questions, create an [issue](issue) (protip: do a quick search first to see if someone else didn't ask the same question before!).
148
+
If you have any questions, [create an issue](https://github.com/Meteor-Community-Packages/meteor-simple-schema/issues)
149
+
(protip: do a quick search first to see if someone else didn't ask the same question before!).
46
150
47
151
## Credits
48
152
49
-
### Contributors
153
+
Thank you to all the people who have already contributed to this project:
50
154
51
-
Thank you to all the people who have already contributed to simpl-schema!
Copy file name to clipboardExpand all lines: README.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,8 +5,12 @@
5
5
[](https://www.repostatus.org/#active)
> This package is back under maintenance by the Meteor Community Packages group 🚀
10
+
> Consider this a hard-fork to ensure a future-proof maintenance with focus on
11
+
> Meteor-Compatibility (Meteor 2.x; 3.x and beyond)! ☄️
9
12
13
+
## About this package
10
14
SimpleSchema validates JavaScript objects to ensure they match a schema. It can also clean the objects to automatically convert types, remove unsupported properties, and add automatic values such that the object is then more likely to pass validation.
11
15
12
16
There are a lot of similar packages for validating objects. These are some of the features of this package that might be good reasons to choose this one over another:
@@ -20,11 +24,10 @@ There are a lot of similar packages for validating objects. These are some of th
20
24
21
25
There are also reasons not to choose this package. Because of all it does, this package is more complex than (but still "simple" :) ) and slower than some other packages. Based on your needs, you should decide whether these tradeoffs are acceptable. One faster but less powerful option is [simplecheck](https://www.npmjs.com/package/simplecheck).
22
26
27
+
## Table of Contents
23
28
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
24
29
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
25
30
26
-
**Table of Contents**_generated with [DocToc](https://github.com/thlorenz/doctoc)_
27
-
28
31
-[The History of SimpleSchema](#the-history-of-simpleschema)
29
32
-[Installation](#installation)
30
33
-[Lingo](#lingo)
@@ -61,6 +64,7 @@ There are also reasons not to choose this package. Because of all it does, this
Anyone is welcome to contribute. Before submitting a pull request, make sure that you've added tests for your changes, and that all tests pass when you run `npm test`.
1433
+
Anyone is welcome to contribute. Before submitting a pull request, make sure that you've read our
0 commit comments