ueberdb2 4.0.17 → 4.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/package.json +4 -1
  2. package/.eslintignore +0 -2
  3. package/.eslintrc.cjs +0 -66
  4. package/.github/dependabot.yml +0 -11
  5. package/.github/workflows/npmpublish.yml +0 -134
  6. package/.travis.yml +0 -46
  7. package/CHANGELOG.md +0 -304
  8. package/CONTRIBUTING.md +0 -103
  9. package/SECURITY.md +0 -5
  10. package/databases/cassandra_db.ts +0 -265
  11. package/databases/couch_db.ts +0 -189
  12. package/databases/dirty_db.ts +0 -85
  13. package/databases/dirty_git_db.ts +0 -82
  14. package/databases/elasticsearch_db.ts +0 -257
  15. package/databases/memory_db.ts +0 -41
  16. package/databases/mock_db.ts +0 -43
  17. package/databases/mongodb_db.ts +0 -142
  18. package/databases/mssql_db.ts +0 -226
  19. package/databases/mysql_db.ts +0 -183
  20. package/databases/postgres_db.ts +0 -213
  21. package/databases/postgrespool_db.ts +0 -11
  22. package/databases/redis_db.ts +0 -129
  23. package/databases/rethink_db.ts +0 -114
  24. package/databases/sqlite_db.ts +0 -159
  25. package/docker-compose.yml +0 -44
  26. package/index.ts +0 -224
  27. package/lib/AbstractDatabase.ts +0 -79
  28. package/lib/CacheAndBufferLayer.ts +0 -665
  29. package/lib/logging.ts +0 -33
  30. package/test/lib/databases.ts +0 -73
  31. package/test/lib/mysql.sql +0 -84
  32. package/test/test.ts +0 -328
  33. package/test/test_bulk.ts +0 -69
  34. package/test/test_elasticsearch.ts +0 -128
  35. package/test/test_findKeys.ts +0 -41
  36. package/test/test_flush.ts +0 -55
  37. package/test/test_getSub.ts +0 -28
  38. package/test/test_lru.ts +0 -151
  39. package/test/test_memory.ts +0 -32
  40. package/test/test_metrics.ts +0 -734
  41. package/test/test_mysql.ts +0 -62
  42. package/test/test_postgres.ts +0 -16
  43. package/test/test_setSub.ts +0 -19
  44. package/test/test_tojson.ts +0 -34
package/package.json CHANGED
@@ -63,10 +63,13 @@
63
63
  "url": "https://github.com/ether/ueberDB.git"
64
64
  },
65
65
  "main": "./dist/index",
66
- "version": "4.0.17",
66
+ "version": "4.1.2",
67
67
  "bugs": {
68
68
  "url": "https://github.com/ether/ueberDB/issues"
69
69
  },
70
+ "files": [
71
+ "dist"
72
+ ],
70
73
  "homepage": "https://github.com/ether/ueberDB",
71
74
  "scripts": {
72
75
  "lint": "eslint .",
package/.eslintignore DELETED
@@ -1,2 +0,0 @@
1
- dist
2
- **/*.ts
package/.eslintrc.cjs DELETED
@@ -1,66 +0,0 @@
1
- 'use strict';
2
-
3
- // This is a workaround for https://github.com/eslint/eslint/issues/3458
4
- require('eslint-config-etherpad/patch/modern-module-resolution');
5
-
6
- module.exports = {
7
- parserOptions: {
8
- project: ['./tsconfig.json'],
9
- },
10
-
11
- root: true,
12
- extends: 'etherpad/node',
13
-
14
- rules: {
15
- 'mocha/no-exports': 'off',
16
- '@typescript-eslint/no-unsafe-call': 'off',
17
- 'max-len': 'off',
18
- '@typescript-eslint/restrict-template-expressions': 'off',
19
- '@typescript-eslint/no-unsafe-member-access': 'off',
20
- 'n/no-missing-import': 'off',
21
- 'strict': 'off',
22
- '@typescript-eslint/no-unsafe-return': 'off',
23
- '@typescript-eslint/no-explicit-any': 'off',
24
- '@typescript-eslint/no-unsafe-argument': 'off',
25
- '@typescript-eslint/no-unsafe-assignment': 'off',
26
- 'prefer-arrow/prefer-arrow-functions': 'off',
27
- '@typescript-eslint/await-thenable': 'off',
28
- '@typescript-eslint/brace-style': 'off',
29
- '@typescript-eslint/comma-spacing': 'off',
30
- '@typescript-eslint/consistent-type-assertions': 'off',
31
- '@typescript-eslint/consistent-type-definitions': 'off',
32
- '@typescript-eslint/default-param-last': 'off',
33
- '@typescript-eslint/dot-notation': 'off',
34
- '@typescript-eslint/explicit-function-return-type': 'off',
35
- '@typescript-eslint/explicit-member-accessibility': 'off',
36
- 'func-call-spacing': 'off',
37
- '@typescript-eslint/no-floating-promises': 'off',
38
- 'camelcase': 'off',
39
- 'n/no-unpublished-import': 'off',
40
- 'n/no-unpublished-require': 'off',
41
- 'no-unused-vars': 'off',
42
- '@typescript-eslint/no-unused-vars': 'off',
43
- '@typescript-eslint/ban-ts-comment': 'off',
44
- '@typescript-eslint/restrict-plus-operands': 'off',
45
- },
46
- overrides: [
47
- {
48
- files: [
49
- 'lib/**/*',
50
- 'databases/**/*',
51
- 'tests/**/*',
52
- ],
53
- extends: 'etherpad/tests/backend',
54
- overrides: [
55
- {
56
- files: [
57
- 'lib/**/*',
58
- 'databases/**/*',
59
- 'tests/**/*',
60
- ],
61
-
62
- },
63
- ],
64
- },
65
- ],
66
- };
@@ -1,11 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: "github-actions"
4
- directory: "/"
5
- schedule:
6
- interval: "daily"
7
- - package-ecosystem: "npm"
8
- directory: "/"
9
- schedule:
10
- interval: "daily"
11
- versioning-strategy: "increase"
@@ -1,134 +0,0 @@
1
- name: Node.js Package
2
-
3
- on:
4
- pull_request:
5
- push:
6
- branches:
7
- - main
8
- - master
9
- - v[0-9]+
10
-
11
- jobs:
12
- test:
13
- runs-on: ubuntu-latest
14
- services:
15
- couchdb:
16
- image: couchdb
17
- ports:
18
- - 5984:5984
19
- env:
20
- COUCHDB_USER: ueberdb
21
- COUCHDB_PASSWORD: ueberdb
22
- elasticsearch:
23
- image: elasticsearch:7.17.3
24
- ports:
25
- - 9200:9200
26
- env:
27
- discovery.type: single-node
28
- mongo:
29
- image: mongo
30
- ports:
31
- - 27017:27017
32
- mysql:
33
- # The default authentication used in MySQL 8.0 isn't supported by the
34
- # mysql npm package: https://github.com/mysqljs/mysql/issues/2002
35
- image: mariadb
36
- ports:
37
- - 3306:3306
38
- env:
39
- MYSQL_ROOT_PASSWORD: password
40
- MYSQL_USER: ueberdb
41
- MYSQL_PASSWORD: ueberdb
42
- MYSQL_DATABASE: ueberdb
43
- postgres:
44
- image: postgres
45
- ports:
46
- - 5432:5432
47
- env:
48
- POSTGRES_USER: ueberdb
49
- POSTGRES_PASSWORD: ueberdb
50
- POSTGRES_DB: ueberdb
51
- options: >-
52
- --health-cmd="pg_isready -d postgresql://ueberdb:ueberdb@127.0.0.1/ueberdb"
53
- --health-interval=10s
54
- --health-timeout=5s
55
- --health-retries=5
56
- redis:
57
- image: redis
58
- ports:
59
- - 6379:6379
60
- timeout-minutes: 10
61
- steps:
62
- - uses: actions/checkout@v3
63
- - uses: actions/setup-node@v3
64
- with:
65
- node-version: 20
66
- - run: npm ci
67
- # Optional dependencies must be installed manually.
68
- - run: npm i sqlite3
69
-
70
- # Verify databases are reachable.
71
- - name: MySQL client and server check
72
- run: |
73
- mysql --version &&
74
- mysql -h 127.0.0.1 -u ueberdb -pueberdb -e "SHOW TABLES;" ueberdb
75
- - name: PostgreSQL client and server check
76
- run: |
77
- psql --version &&
78
- psql -d postgresql://ueberdb:ueberdb@127.0.0.1/ueberdb -c '\dt'
79
-
80
- - run: npm test
81
- - run: npm run lint
82
-
83
- publish-npm:
84
- if: github.event_name == 'push'
85
- needs: test
86
- runs-on: ubuntu-latest
87
- steps:
88
- -
89
- uses: actions/checkout@v3
90
- with:
91
- fetch-depth: 0
92
- -
93
- uses: actions/setup-node@v3
94
- with:
95
- node-version: 20
96
- registry-url: https://registry.npmjs.org/
97
- cache: 'npm'
98
- # This is required if the package has a prepare script that uses something
99
- # in dependencies or devDependencies. This is also needed for bumping the
100
- # version.
101
- -
102
- run: npm ci
103
- -
104
- name: Bump version (patch)
105
- run: |
106
- LATEST_TAG=$(git describe --tags --abbrev=0) || exit 1
107
- NEW_COMMITS=$(git rev-list --count "${LATEST_TAG}"..) || exit 1
108
- [ "${NEW_COMMITS}" -gt 0 ] || exit 0
109
- git config user.name 'github-actions[bot]'
110
- git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
111
- npm version patch
112
- # Update the branch before pushing the tag in case the branch can't be
113
- # fast-forwarded.
114
- git push
115
- git push --follow-tags
116
- # `npm publish` must come after `git push` otherwise there is a race
117
- # condition: If two PRs are merged back-to-back then master/main will be
118
- # updated with the commits from the second PR before the first PR's
119
- # workflow has a chance to push the commit generated by `npm version
120
- # patch`. This causes the first PR's `git push` step to fail after the
121
- # package has already been published, which in turn will cause all future
122
- # workflow runs to fail because they will all attempt to use the same
123
- # already-used version number. By running `npm publish` after `git push`,
124
- # back-to-back merges will cause the first merge's workflow to fail but
125
- # the second's will succeed.
126
- -
127
- run: npm run publish
128
- env:
129
- NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
130
- -
131
- name: Add package to etherpad organization
132
- run: npm access grant read-write etherpad:developers
133
- env:
134
- NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
package/.travis.yml DELETED
@@ -1,46 +0,0 @@
1
- language: node_js
2
-
3
- node_js:
4
- - 14
5
-
6
- services:
7
- - docker
8
- - mysql
9
- - postgresql
10
- - couchdb
11
- - sqlite3
12
- - redis
13
- - cassandra
14
- - elasticsearch
15
- - mongodb
16
- - rethinkdb
17
-
18
- before_install:
19
- - mysql -e 'CREATE DATABASE ueberdb;'
20
- - mysql -e 'CREATE USER "ueberdb"@"localhost" identified by "ueberdb";'
21
- - mysql -e "ALTER DATABASE ueberdb CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;"
22
- - mysql -e "grant CREATE,ALTER,SELECT,INSERT,UPDATE,DELETE on ueberdb.* to 'ueberdb'@'localhost';"
23
- - mysql -e "CREATE TABLE \`store\` (\`key\` varchar(100) COLLATE utf8mb4_bin NOT NULL DEFAULT '',\`value\` longtext COLLATE utf8mb4_bin NOT NULL,PRIMARY KEY (\`key\`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;" ueberdb
24
- # - cp /etc/rethinkdb/default.conf.sample /etc/rethinkdb/instances.d/instance1.conf
25
-
26
- #addons:
27
- # rethinkdb: '2.3.4'
28
-
29
- # Brings in procedure required for creating large data set
30
- - mysql ueberdb < test/lib/mysql.sql
31
- - mysql ueberdb -e 'CALL generate_data();';
32
- - psql -c 'create database ueberdb;' -U postgres
33
- # - psql -c "grant CREATE,ALTER,SELECT,INSERT,UPDATE,DELETE on ueberdb.* to 'ueberdb'@'localhost';" -U postgres
34
-
35
- install:
36
- - "export GIT_HASH=$(git rev-parse --verify --short HEAD)"
37
-
38
- jobs:
39
- include:
40
- - name: "Run the Backend tests"
41
- install:
42
- - "npm install"
43
-
44
- notifications:
45
- email:
46
- - john@mclear.co.uk
package/CHANGELOG.md DELETED
@@ -1,304 +0,0 @@
1
- # Notable Changes
2
-
3
- ## v4.0.1
4
-
5
- Security fix:
6
-
7
- * `getSub()` now returns `null` when it encounters a non-"own" property
8
- (including `__proto__`) or any non-object while walking the given property
9
- path. This should make it easier to avoid accidental prototype pollution
10
- vulnerabilities.
11
-
12
- ## v4.0.0
13
-
14
- Compatibility changes:
15
-
16
- * `redis`: The `socket` and `client_options` settings, deprecated since
17
- v1.3.1, have been removed.
18
- * `redis`: The client configuration object has changed with the new version of
19
- the `redis` client library. See the [`redis` client library
20
- documentation](https://github.com/redis/node-redis/blob/redis%404.1.0/docs/client-configuration.md)
21
- for details.
22
-
23
- Bug fixes:
24
-
25
- * `redis`: Several `findKeys()` fixes.
26
-
27
- Updated database dependencies:
28
-
29
- * `redis`: Updated `redis` from 3.1.2 to 4.1.0.
30
-
31
- ## v3.0.2
32
-
33
- Security fix:
34
-
35
- * `getSub()` now returns `null` when it encounters a non-"own" property
36
- (including `__proto__`) or any non-object while walking the given property
37
- path. This should make it easier to avoid accidental prototype pollution
38
- vulnerabilities.
39
-
40
- ## v3.0.1
41
-
42
- Bug fixes:
43
-
44
- * Fixed `findKeys()` calls containing special regular expression characters
45
- (applicable to the database drivers that use the glob-to-regex helper
46
- function).
47
-
48
- ## v3.0.0
49
-
50
- Compatibility changes:
51
-
52
- * Minimum supported Node.js version is now 14.15.0.
53
- * `elasticsearch`: New index name and mapping (schema). To automatically copy
54
- existing data to the new index when the ueberdb client is initialized, set
55
- the `migrate_to_newer_schema` option to `true`.
56
- * As mentioned in the v2.2.0 changes, passing callbacks to the database
57
- methods is deprecated. Use the returned Promises instead.
58
- * `postgrespool`: As mentioned in the v1.4.15 changes, `postgrespool` is
59
- deprecated. Use `postgres` instead.
60
- * `redis`: As mentioned in the v1.3.1 changes, the `socket` and
61
- `client_options` settings are deprecated. Pass the [client options
62
- object](https://www.npmjs.com/package/redis/v/3.1.2#options-object-properties)
63
- directly.
64
-
65
- Bug fixes:
66
-
67
- * `elasticsearch`: Rewrote driver to fix numerous bugs and modernize the code.
68
-
69
- Updated database dependencies:
70
-
71
- * `couch`: Updated `nano` to 10.0.0.
72
- * `dirty_git`: Updated `simple-git` to 3.7.1.
73
- * `elasticsearch`: Switched the client library from the deprecated
74
- `elasticsearch` to `@elastic/elasticsearch` version 7.17.0.
75
- * `postgres`: Updated `pg` to 8.7.3.
76
- * `sqlite`: Updated `sqlite3` to 5.0.6.
77
-
78
- ## v2.2.4
79
-
80
- Security fix:
81
-
82
- * `getSub()` now returns `null` when it encounters a non-"own" property
83
- (including `__proto__`) or any non-object while walking the given property
84
- path. This should make it easier to avoid accidental prototype pollution
85
- vulnerabilities.
86
-
87
- ## v2.2.0
88
-
89
- Compatibility changes:
90
-
91
- * Passing callbacks to the database methods is deprecated; use the returned
92
- Promises instead.
93
-
94
- New features:
95
-
96
- * Database methods now return a Promise if a callback is not provided.
97
-
98
- Bug fixes:
99
-
100
- * A call to `flush()` immediately after a call to `set()`, `setSub()`, or
101
- `remove()` (within the same ECMAScript macro- or microtask) now flushes the
102
- new write operation.
103
- * Fixed a bug where `findKeys()` would return stale results when write
104
- buffering is enabled and writes are pending.
105
- * `couch`: Rewrote driver to fix numerous bugs.
106
-
107
- ## v2.1.1
108
-
109
- Security fix:
110
-
111
- * Fix `setSub()` prototype pollution vulnerability.
112
-
113
- ## v2.1.0
114
-
115
- * `memory`: New `data` setting that allows users to supply the backing Map
116
- object (rather than create a new Map).
117
-
118
- Updated database dependencies:
119
-
120
- * `dirty_git`: Updated `simple-git` to 3.6.0.
121
- * `mssql`: Updated `mssql` to 8.1.0.
122
-
123
- ## v2.0.0
124
-
125
- * When saving an object that has a `.toJSON()` method, the value returned from
126
- that method is saved to the database instead of the object itself. This
127
- matches [the behavior of
128
- `JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#tojson_behavior).
129
- The `.toJSON()` method is used even if the chosen database driver never
130
- actually converts anything to JSON.
131
- * New `memory` database driver that stores values in memory only.
132
-
133
- ## v1.4.19
134
-
135
- Updated database (and other) dependencies:
136
- * `mongodb`: Updated `mongodb` to 3.7.3.
137
- * `mssql`: Updated `mssql` to 7.3.0.
138
- * `dirty_git`: Updated `simple-git` to 2.47.0.
139
-
140
- ## v1.4.16
141
-
142
- * `postgres`: You can now provide a connection string instead of a settings
143
- object. For example:
144
- ```javascript
145
- const db = new ueberdb.Database('postgres', 'postgres://user:password@host/dbname');
146
- ```
147
-
148
- ## v1.4.15
149
-
150
- * `postgres`, `postgrespool`: The `postgrespool` database driver was renamed to
151
- `postgres`, replacing the old `postgres` driver. The old `postgrespool` name
152
- is still usable, but is deprecated. For users of the old `postgres` driver,
153
- this change increases the number of concurrent database connections. You may
154
- need to increase your configured connection limit.
155
- * `sqlite`: Updated `sqlite3` to 5.0.2.
156
-
157
- ## v1.4.14
158
-
159
- Updated dependencies:
160
- * `cassandra`: Updated `cassandra-driver` to 4.6.3.
161
- * `couch`: Updated `nano` to 9.0.3.
162
- * `dirty`: Updated `dirty` to 1.1.3.
163
- * `dirty_git`: Updated `simple-git` to 2.45.0.
164
- * `mongodb`: Updated `mongodb` to 3.6.11.
165
- * `mssql`: Updated `mssql` to 7.2.1.
166
- * `postgres`, `postgrespool`: Updated `pg` to 8.7.1.
167
-
168
- ## v1.4.13
169
-
170
- * `mongodb`: The `dbName` setting has been renamed to `database` for consistency
171
- with other database drivers. The `dbName` setting will continue to work (for
172
- backwards compatibility), but it is deprecated and is ignored if `database` is
173
- set.
174
- * `mongodb`: The `database` (formerly `dbName`) setting is now optional. If it
175
- is not specified, the database name embedded in the `url` setting is used.
176
-
177
- ## v1.4.8
178
-
179
- * `redis`: Updated `redis` dependency to 3.1.2.
180
-
181
- ## v1.4.7
182
-
183
- * Each write operation in a bulk write batch is now retried if the bulk write
184
- fails.
185
- * Fixed write metrics for `setSub()` read failures.
186
-
187
- ## v1.4.6
188
-
189
- * `mysql`: Use a connection pool to improve performance and simplify the code.
190
-
191
- ## v1.4.5
192
-
193
- * `mysql`: Reconnect on fatal error.
194
- * `mysql`: Log MySQL errors.
195
-
196
- ## v1.4.4
197
-
198
- * New experimental setting to limit the number of operations written at a time
199
- when flushing outstanding writes.
200
- * `mysql`: Bulk writes are limited to 100 changes at a time to avoid query
201
- timeouts.
202
- * `mysql`: Raised default cache size from 500 entries to 10000.
203
-
204
- ## v1.4.2
205
-
206
- * Refined the experimental read and write metrics.
207
-
208
- ## v1.4.1
209
-
210
- * The two callback arguments in `remove()`, `set()`, and `setSub()` have
211
- changed: Instead of a callback that is called after the write is buffered and
212
- another callback that is called after the write is committed, both callbacks
213
- are now called after the write is committed. Futhermore, the second callback
214
- argument is now deprecated.
215
- * Modernized record locking.
216
- * Experimental metrics for reads, writes, and locking.
217
-
218
- ## v1.3.2
219
-
220
- * `dirty`: Updated `dirty` dependency.
221
-
222
- ## v1.3.1
223
-
224
- * `redis`: The database config object is now passed directly to the `redis`
225
- package. For details, see
226
- https://www.npmjs.com/package/redis/v/3.0.2#options-object-properties.
227
- Old-style settings objects (where the `redis` options are in the
228
- `client_options` property) are still supported but deprecated.
229
-
230
- ## v1.2.9
231
-
232
- * `dirty`: Workaround for a bug in the upstream `dirty` driver.
233
-
234
- ## v1.2.7
235
-
236
- * `redis`: Experimental support for passing the settings object directly to the
237
- `redis` package.
238
-
239
- ## v1.2.6
240
-
241
- * `redis`: Fixed "Callback was already called" exception during init.
242
-
243
- ## v1.2.5
244
-
245
- * All: Fixed a major bug introduced in v1.1.10 that caused `setSub()` to
246
- silently discard changes.
247
- * All: Fixed a bug that prevented cache entries from being marked as most
248
- recently used.
249
-
250
- ## v1.2.4
251
-
252
- * `mssql`: Updated `mssql` dependency.
253
- * `dirty_git`: Updated `simple-git` dependency.
254
- * `sqlite`: Updated `sqlite3` dependency.
255
-
256
- ## v1.2.3
257
-
258
- * `mssql`: Updated `mssql` dependency.
259
-
260
- ## v1.2.2
261
-
262
- * All: Fixed minor `setSub()` corner cases.
263
-
264
- ## v1.2.1
265
-
266
- * New `flush()` method.
267
- * The `doShutdown()` method is deprecated. Use `flush()` instead.
268
- * The `close()` method now flushes unwritten entries before closing the database
269
- connection.
270
- * Bug fix: `null`/`undefined` is no longer cached if there is an error reading
271
- from the database.
272
-
273
- ## v1.1.10
274
-
275
- * Major performance improvement: The caching logic was rewritten with much more
276
- efficient algorithms. Also: Scans for entries to evict is performed less
277
- often. Depending on your workload you might observe a slight memory usage
278
- increase.
279
-
280
- ## v1.1.7
281
-
282
- * `mysql` dependency bumped to 7.0.0-alpha4 to avoid a security vulnerability in
283
- one of its indirect dependencies.
284
-
285
- ## v1.1.6
286
-
287
- * Bug fix: When write buffering is disabled, reads of keys with values that were
288
- changed but not yet written to the underlying database used to return the
289
- previous value. Now the updated value is returned.
290
- * Minor performance improvement: Setting a key to the same value no longer
291
- triggers a database write.
292
-
293
- ## v1.1.5
294
-
295
- * Minor performance improvement: Debug log message strings are no longer
296
- generated if debug logging is not enabled.
297
-
298
- ## v1.1.1
299
-
300
- * The `database()` constructor is deprecated; use `Database()` instead.
301
-
302
- ## Older
303
-
304
- See the Git history.
package/CONTRIBUTING.md DELETED
@@ -1,103 +0,0 @@
1
- # Contributor Guidelines
2
- (Please talk to people on the mailing list before you change this page, see our section on [how to get in touch](https://github.com/ether/etherpad-lite#get-in-touch))
3
-
4
- ## Pull requests
5
-
6
- * the commit series in the PR should be _linear_ (it **should not contain merge commits**). This is necessary because we want to be able to [bisect](https://en.wikipedia.org/wiki/Bisection_(software_engineering)) bugs easily. Rewrite history/perform a rebase if necessary
7
- * PRs should be issued against the **develop** branch: we never pull directly into **master**
8
- * PRs **should not have conflicts** with develop. If there are, please resolve them rebasing and force-pushing
9
- * when preparing your PR, please make sure that you have included the relevant **changes to the documentation** (preferably with usage examples)
10
- * contain meaningful and detailed **commit messages** in the form:
11
- ```
12
- submodule: description
13
-
14
- longer description of the change you have made, eventually mentioning the
15
- number of the issue that is being fixed, in the form: Fixes #someIssueNumber
16
- ```
17
- * if the PR is a **bug fix**:
18
- * the first commit in the series must be a test that shows the failure
19
- * subsequent commits will fix the bug and make the test pass
20
- * the final commit message should include the text `Fixes: #xxx` to link it to its bug report
21
- * think about stability: code has to be backwards compatible as much as possible. Always **assume your code will be run with an older version of the DB/config file**
22
- * if you want to remove a feature, **deprecate it instead**:
23
- * write an issue with your deprecation plan
24
- * output a `WARN` in the log informing that the feature is going to be removed
25
- * remove the feature in the next version
26
- * if you want to add a new feature, put it under a **feature flag**:
27
- * once the new feature has reached a minimal level of stability, do a PR for it, so it can be integrated early
28
- * expose a mechanism for enabling/disabling the feature
29
- * the new feature should be **disabled** by default. With the feature disabled, the code path should be exactly the same as before your contribution. This is a __necessary condition__ for early integration
30
- * think of the PR not as something that __you wrote__, but as something that __someone else is going to read__. The commit series in the PR should tell a novice developer the story of your thoughts when developing it
31
-
32
- ## How to write a bug report
33
-
34
- * Please be polite, we all are humans and problems can occur.
35
- * Please add as much information as possible, for example
36
- * client os(s) and version(s)
37
- * browser(s) and version(s), is the problem reproducible on different clients
38
- * special environments like firewalls or antivirus
39
- * host os and version
40
- * npm and nodejs version
41
- * Logfiles if available
42
- * steps to reproduce
43
- * what you expected to happen
44
- * what actually happened
45
- * Please format logfiles and code examples with markdown see github Markdown help below the issue textarea for more information.
46
-
47
- ## General goals of UeberDB
48
- To make sure everybody is going in the same direction:
49
- * easy to install for admins and easy to use for people
50
- * easy to integrate into other apps, but also usable as standalone
51
- * lightweight and scalable
52
- * extensible, as much functionality should be extendable with plugins so changes don't have to be done in core.
53
-
54
- ## How to work with git?
55
- * Don't work in your master branch.
56
- * Make a new branch for every feature you're working on. (This ensures that you can work you can do lots of small, independent pull requests instead of one big one with complete different features)
57
- * Don't use the online edit function of github (this only creates ugly and not working commits!)
58
- * Try to make clean commits that are easy readable (including descriptive commit messages!)
59
- * Test before you push. Sounds easy, it isn't!
60
- * Don't check in stuff that gets generated during build or runtime
61
- * Make small pull requests that are easy to review but make sure they do add value by themselves / individually
62
-
63
- ## Coding style
64
- * Do write comments. (You don't have to comment every line, but if you come up with something that's a bit complex/weird, just leave a comment. Bear in mind that you will probably leave the project at some point and that other people will read your code. Undocumented huge amounts of code are worthless!)
65
- * Never ever use tabs
66
- * Indentation: JS/CSS: 2 spaces; HTML: 4 spaces
67
- * Don't overengineer. Don't try to solve any possible problem in one step, but try to solve problems as easy as possible and improve the solution over time!
68
- * Do generalize sooner or later! (if an old solution, quickly hacked together, poses more problems than it solves today, refactor it!)
69
- * Keep it compatible. Do not introduce changes to the public API, db schema or configurations too lightly. Don't make incompatible changes without good reasons!
70
- * If you do make changes, document them! (see below)
71
- * Use protocol independent urls "//"
72
-
73
- ## Branching model / git workflow
74
- see git flow http://nvie.com/posts/a-successful-git-branching-model/
75
-
76
- ### `master` branch
77
- * the stable
78
- * This is the branch everyone should use for production stuff
79
-
80
- ### feature branches (in your own repos)
81
- * these are the branches where you develop your features in
82
- * If it's ready to go out, it will be merged into develop
83
-
84
- Over the time we pull features from feature branches into the develop branch. Every month we pull from develop into master. Bugs in master get fixed in hotfix branches. These branches will get merged into master AND develop. There should never be commits in master that aren't in develop
85
-
86
- ## Testing
87
- Front-end tests are found in the `tests/frontend/` folder in the repository. Run them by pointing your browser to `<yourdomainhere>/tests/frontend`.
88
-
89
- Back-end tests can be run via `npm test`.
90
-
91
- ## Things you can help with
92
- The Etherpad Foundation is much more than software. So if you aren't a developer then worry not, there is still a LOT you can do! A big part of what we do is community engagement. You can help in the following ways
93
- * Triage bugs (applying labels) and confirming their existence
94
- * Testing fixes (simply applying them and seeing if it fixes your issue or not) - Some git experience required
95
- * Notifying large site admins of new releases
96
- * Writing Changelogs for releases
97
- * Creating Windows packages
98
- * Creating releases
99
- * Bumping dependencies periodically and checking they don't break anything
100
- * Write proposals for grants
101
- * Co-Author and Publish CVEs
102
- * Work with SFC to maintain legal side of project
103
-
package/SECURITY.md DELETED
@@ -1,5 +0,0 @@
1
- # Security Policy
2
-
3
- ## Reporting a Vulnerability
4
-
5
- Please email contact@etherpad.org to report security related issues.