Richard Hansen
5a91cf1b49
tests: Disable rate limiting for backend tests
2021-02-16 21:13:35 -05:00
Richard Hansen
4ae8fbc40d
tests: Increase importexportGetPost.js
timeouts
...
The tests were timing out on my machine.
2021-02-16 21:13:35 -05:00
Richard Hansen
3d2f77f75d
lint: Fix ESLint errors in backend tests
2021-02-16 21:13:35 -05:00
Richard Hansen
00d45e3229
Defer rate limiter creation to a hook call
...
This makes it possible to change the rate limiter settings via
`/admin/settings` or by modifying the appropriate settings object and
reinvoking the hook.
2021-02-16 21:13:35 -05:00
Richard Hansen
d7ed71eba0
plugins: Fix "Error: spawn npm ENOENT" error on Windows
...
On Windows, npm should be invoked as `npm.cmd`, not `npm`. Use a
drop-in replacement for `child_process.spawn()` that does the right
thing on Windows.
2021-02-16 22:00:20 +00:00
John McLear
2e92e8e9d0
tests: frontend test button increase timeouts
2021-02-16 16:38:59 +00:00
snyk-bot
b06e47c06e
fix: src/bin/doc/package.json & src/bin/doc/package-lock.json to reduce vulnerabilities
...
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-MARKED-584281
2021-02-16 11:10:46 +00:00
snyk-bot
095edb5043
fix: upgrade express-rate-limit from 5.1.1 to 5.2.3
...
Snyk has created this PR to upgrade express-rate-limit from 5.1.1 to 5.2.3.
See this package in npm:
https://www.npmjs.com/package/express-rate-limit
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-16 11:05:49 +00:00
Richard Hansen
c39d0606cf
ace2_inner: Delete special arrow key handling
...
I can't see any reason this would be necessary, and it appears to not
behave as intended (`scroll.scrollWhenPressArrowKeys()` is not invoked
after a continuously held arrow key is finally let up).
2021-02-16 11:03:31 +00:00
Richard Hansen
72704a9fbd
release: Update the doc/latest
symlink
2021-02-16 10:37:07 +00:00
Richard Hansen
345f5227fd
release: Use log4js to improve message readability
2021-02-16 10:37:07 +00:00
Richard Hansen
899f2e02f3
release: Reset Git repo on error
2021-02-16 10:37:07 +00:00
Richard Hansen
ba32f71f30
release: Automate more steps
2021-02-16 10:37:07 +00:00
Richard Hansen
18c8838a33
release: Stricter checking of CHANGELOG.md
2021-02-16 10:37:07 +00:00
Richard Hansen
5c48ebb406
release: Fix wrapping of log message
2021-02-16 10:37:07 +00:00
Richard Hansen
5816fd5f2f
release: Add git sanity checks
2021-02-16 10:37:07 +00:00
Richard Hansen
a814893ca3
release: Assume ../ether.github.com
exists
2021-02-16 10:37:07 +00:00
Richard Hansen
8db6b5da4a
release: Don't capture stdout when unnecessary
...
This should make it easier to troubleshoot issues.
2021-02-16 10:37:07 +00:00
Richard Hansen
83b55eb41f
release: Shorthand function for running a command
2021-02-16 10:37:07 +00:00
Richard Hansen
2691d556fe
release: Enforce lockfileVersion 1
2021-02-16 10:37:07 +00:00
Richard Hansen
1ada0ab5d6
release: cd to Etherpad root directory
2021-02-16 10:37:07 +00:00
Richard Hansen
565d020876
release: Make sure JSON ends with \n
2021-02-16 10:37:07 +00:00
Richard Hansen
ea4b2ef8fb
release: Factor out JSON read/write for later reuse
2021-02-16 10:37:07 +00:00
Richard Hansen
8155d6154d
release: Don't create release/x.y.z
branch
...
Patch-specific release branches should never diverge from the tag, so
they serve no useful purpose. (If they do diverge, which some did
before I deleted them all, what does it mean? Are we going to move the
tag in the future? It's just too confusing.)
In the future we might want to do major- or minor-specific
branches (e.g., `release/1` or `release/1.8`), but only if we want to
maintain old releases. For example, if 2.0 is a major release that
doesn't work with plugins designed for 1.x we might want to maintain a
`release/1` branch that continues to get bugfixes while the bulk of
new work continues to land on `develop`. If we do decide to maintain
old releases we'll need a new set of release scripts (or edit the
`release.js` script on the `release/1` branch).
2021-02-16 10:37:07 +00:00
John McLear
e1dcaa5210
release: Better steps for release procedure
2021-02-16 10:37:07 +00:00
John McLear
655ae90464
release: Exclude var/
during Windows build
2021-02-16 10:37:07 +00:00
Richard Hansen
d5969507cd
release: Clone docs repo in ..
2021-02-16 10:37:07 +00:00
Richard Hansen
bdd32f8915
Replace node_modules/ep_etherpad-lite
with src
2021-02-16 10:35:05 +00:00
snyk-bot
269c6d09c5
fix: upgrade npm from 6.14.8 to 6.14.11
...
Snyk has created this PR to upgrade npm from 6.14.8 to 6.14.11.
See this package in npm:
https://www.npmjs.com/package/npm
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-15 18:35:59 -05:00
snyk-bot
ed02606c4b
fix: upgrade semver from 5.6.0 to 5.7.1
...
Snyk has created this PR to upgrade semver from 5.6.0 to 5.7.1.
See this package in npm:
https://www.npmjs.com/package/semver
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-15 21:54:50 +00:00
John McLear
c0f73e6672
bump version
2021-02-15 12:47:20 -05:00
John McLear
b7e88cb904
security: New setting for Socket.IO maxHttpBufferSize
2021-02-15 12:45:31 -05:00
Richard Hansen
ed93ef5636
/admin/settings: Reload plugins, call loadSettings
hook on restart
...
This should match the normal startup procedure a bit more closely.
2021-02-15 08:43:14 +00:00
Guilherme Goncalves
3ff244f7a0
Update lines with zero height on sidediv
...
Avoid evaluation of `0` height as false within `if` condition,
since it is possible having 0px as line-height.
2021-02-15 00:42:00 -05:00
Egil
9c7dcb1d0a
eejs: Upgrade ejs to the latest version
...
The type of ejs's `__output` variable is now string instead of array
of strings, so the handling of `__output` had to change.
2021-02-14 23:36:53 -05:00
John McLear
615e47114b
Revert "socketio: increase socketio limit to 1MiB"
...
This reverts commit 55c96e5577
.
2021-02-14 16:53:48 +00:00
Richard Hansen
b711ff6acf
import: Ajaxify pad import
...
This eliminates an inline script (good for Content Security Policy)
and improves the user experience.
2021-02-14 08:35:38 +00:00
Richard Hansen
fba55fa6cf
ImportHandler: Refactor doImport()
for readability
2021-02-14 08:35:38 +00:00
Richard Hansen
28b28866a2
ImportHandler: Move the logger up
...
Also change the name to something shorter.
2021-02-14 08:35:38 +00:00
Richard Hansen
26b5a69ccc
ImportHandler: Use JSON.stringify()
to properly escape characters
2021-02-14 08:35:38 +00:00
Richard Hansen
ed80883709
ImportHandler: Lint the response script sent to the browser
2021-02-14 08:35:38 +00:00
Richard Hansen
0ff131bbbb
ImportHandler: Throw Errors, not strings
2021-02-14 08:35:38 +00:00
Richard Hansen
908635a1de
ImportHandler: Use return reject(...)
to avoid double settle
2021-02-14 08:35:38 +00:00
Richard Hansen
e01059dce5
ImportHandler: Switch to fs/promises
API
2021-02-14 08:35:38 +00:00
Richard Hansen
5b1b030906
ImportHandler: Use asynchronous rename instead of fs.renameSync()
2021-02-14 08:35:38 +00:00
Richard Hansen
c7b1abebe4
ImportHandler: Avoid deprecated fs.exists()
function
2021-02-14 08:35:38 +00:00
Richard Hansen
008209b0e0
ImportHandler: Delete redundant variable
2021-02-14 08:35:38 +00:00
Richard Hansen
cc52811cd0
pad_impexp: Use jQuery to build the import failure popup
...
This reduces the chances of accidentally introducing an XSS
vulnerability.
2021-02-14 08:35:38 +00:00
Richard Hansen
d869d96a2b
pad_impexp: Simplify creation of import failure message
2021-02-14 08:35:38 +00:00
Richard Hansen
890e16f6fc
pad_impexp: Style fixes to improve readability
2021-02-14 08:35:38 +00:00
Richard Hansen
efe07cd027
pad_impexp: Invert logic to improve readability
2021-02-14 08:35:38 +00:00
Richard Hansen
ce4ce8ce95
pad_impexp: Delete unnecessary importFailed
wrapper
2021-02-14 08:35:38 +00:00
Richard Hansen
8a221ca773
pad: Delete dead code
2021-02-14 08:35:38 +00:00
Richard Hansen
48205c1ddb
import/export: Make sure Express sees async errors
...
Express v4.x does not check to see if a Promise returned from a
middleware function will be rejected, so explicitly pass the Promise
rejection reason to `next()`.
We can revert this change after we upgrade to Express v5.0.
See https://expressjs.com/en/guide/error-handling.html for details.
2021-02-14 08:35:38 +00:00
John McLear
f59e0993a6
tests: test runner output HTML and CSS improvements to show duration ( #4775 )
2021-02-14 08:04:50 +00:00
Richard Hansen
e674d9789e
express: Change httpUptime
to httpStartTime
( #4777 )
...
It's better to provide a primitive value and let the consumer of the
metric do math if desired.
Co-authored-by: John McLear <john@mclear.co.uk>
2021-02-14 07:50:10 +00:00
John McLear
e585d321f9
tests: timeouts for tests ( #4773 )
2021-02-13 19:00:06 +00:00
Richard Hansen
f9ec49d7ac
tests: Improve /admin/settings
restart test
2021-02-13 10:02:28 +00:00
Richard Hansen
ac52fb8a9d
express: New httpUptime
metric
2021-02-13 10:02:28 +00:00
John McLear
e22d8dffc0
deps: use ci --no-optional flags, this might break some things as it requires npm 6.31.4
2021-02-13 10:01:36 +00:00
John McLear
483f4344c2
performance: maxAge for favicon and plugin definitions ( #4761 )
2021-02-13 08:13:48 +00:00
Richard Hansen
09e9c36098
tests: Accept async condition functions for helper.waitFor()
2021-02-13 08:12:53 +00:00
Richard Hansen
8dca4cb16f
tests: Give helper.waitFor()
timeout errors a useful stack trace
2021-02-13 08:12:53 +00:00
Richard Hansen
71c1899164
tests: Asyncify tests in api.js
2021-02-13 08:12:53 +00:00
Richard Hansen
e0f499cf5a
tests: Use the supertest agent from common.js
for api.js
2021-02-13 08:12:53 +00:00
Richard Hansen
08124ba733
tests: Delete unnecessary describe()
calls in api.js
2021-02-13 08:12:53 +00:00
Richard Hansen
fc9b22475a
tests: Always call backend common.init()
at startup
...
This provides a place to set the timeout for `common.init()` so that
individual tests don't have to.
2021-02-13 08:12:53 +00:00
Richard Hansen
6953e40c75
tests: Wait for common.init()
to complete before returning
2021-02-13 08:12:53 +00:00
Richard Hansen
1c8a913411
lint: Delete unnecessary eslint-disable-line
comment
2021-02-13 08:12:53 +00:00
Richard Hansen
d56a02c85a
express: Forcibly terminate HTTP connections when restarting
...
This should make restarts via `/admin` actions (e.g., plugin
installation) more reliable.
2021-02-13 07:37:22 +00:00
John McLear
4c4c7b526d
performance: i18n maxage ( #4759 )
2021-02-13 02:35:25 -05:00
Richard Hansen
01c83917d1
socket.io: Manually track client connections/disconnections
...
This change is required for socket.io 3.x because in 3.x
`io.sockets.clients()` no longer returns all client Socket objects.
2021-02-13 07:13:37 +00:00
Richard Hansen
66544be354
lint: src/tests/backend/specs/api/api.js
2021-02-13 00:46:30 -05:00
Richard Hansen
eb9d5bb470
lint: src/tests/frontend/helper.js
and friends
2021-02-13 00:46:30 -05:00
Richard Hansen
8f2f6593be
lint: Re-run eslint --fix
2021-02-13 00:31:36 -05:00
Richard Hansen
db8ca2818f
lint: Treat helper.js
and friends as normal browser files
...
This enables the prefer-arrow/prefer-arrow-functions rule.
2021-02-13 00:29:30 -05:00
John McLear
55c96e5577
socketio: increase socketio limit to 1MiB
2021-02-12 17:56:50 -05:00
John McLear
fcd9adf20d
tests: admin test timeout increase, bugfix and removal of buggy test ( #4762 )
2021-02-12 20:04:42 +00:00
Richard Hansen
73d31b12a8
Minify: Replace deprecated url.parse()
with new URL()
2021-02-12 07:08:51 +00:00
Richard Hansen
7efca7dc7d
Minify: Don't ignore request headers in requestURI()
2021-02-12 07:08:51 +00:00
Richard Hansen
7a003cb9e2
Minify: Let Express render the 500 error page
2021-02-12 07:08:51 +00:00
Richard Hansen
44e420b6c5
Minify: Return Date
objects from statFile()
2021-02-12 07:08:51 +00:00
Richard Hansen
aa11667ff7
Minify: Use fs.promises
2021-02-12 07:08:51 +00:00
Richard Hansen
073052ac66
Minify: Asyncify minify()
2021-02-12 07:08:51 +00:00
Richard Hansen
3eefe71834
Minify: Don't set cache headers if statFile()
causes 500
2021-02-12 07:08:51 +00:00
Richard Hansen
84190793dc
Minify: Asyncify getFileCompressed()
2021-02-12 07:08:51 +00:00
Richard Hansen
dd7ea1a8f9
Minify: Asyncify statFile()
2021-02-12 07:08:51 +00:00
Richard Hansen
947dc8eeed
Minify: Asyncify getFile()
2021-02-12 07:08:51 +00:00
Richard Hansen
5d7c07e81c
Minify: Asyncify lastModifiedDateOfEverything()
2021-02-12 07:08:51 +00:00
Richard Hansen
e573276755
Minify: Asyncify getAceFile()
2021-02-12 07:08:51 +00:00
Richard Hansen
5cc191f185
Minify: Replace async.forEach()
with Promise.all()
2021-02-12 07:08:51 +00:00
Richard Hansen
0c428e068e
Minify: Use Promise.all()
to simplify requestURIs()
2021-02-12 07:08:51 +00:00
Richard Hansen
1ec29e0d45
Minify: Asyncify requestURI()
2021-02-12 07:08:51 +00:00
Richard Hansen
a952df2cf5
Minify: Un-export requestURI()
...
Nobody outside this file uses it.
2021-02-12 07:08:51 +00:00
Richard Hansen
d9607f7c66
static: Asyncify
2021-02-12 07:08:51 +00:00
Richard Hansen
7f4a7156e2
Minify: Move getTar()
to static.js
...
`static.js` is the only file that uses it.
2021-02-12 07:08:51 +00:00
Richard Hansen
996dc81825
Minify: Move tar processing into a function
...
This reduces the overhead of `require()`ing the module, and it will
make it easier for a future commit to asyncify everything in
`Minify.js`.
2021-02-12 07:08:51 +00:00
Richard Hansen
8ae8710a14
ace: Fix EMBEDDED check
2021-02-12 07:08:51 +00:00
Richard Hansen
50929fe7f7
express: Call expressConfigure, expressCreateServer hooks asynchronously
2021-02-12 07:08:51 +00:00
Richard Hansen
8919f63c98
lint: Replace use of underscore.js with plain ECMAScript
2021-02-12 07:08:51 +00:00
John McLear
ab127289c4
security: limit socketio to 1M chars
2021-02-11 21:01:47 -05:00
Richard Hansen
085ab452a0
chat tests: Give some time to process each of the 140 chat messages
...
This avoids overflowing socket.io's receive buffer.
2021-02-11 21:01:47 -05:00
Richard Hansen
020df75677
chat tests: Asyncify
2021-02-11 21:01:47 -05:00
Richard Hansen
0fae34009d
chat tests: Delete unnecessary expect()
2021-02-11 21:01:47 -05:00
snyk-bot
f6df9ffad0
fix: upgrade measured-core from 1.11.2 to 1.51.1
...
Snyk has created this PR to upgrade measured-core from 1.11.2 to 1.51.1.
See this package in npm:
https://www.npmjs.com/package/measured-core
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-11 18:39:08 +00:00
John McLear
cc7f11560f
Fix OL list items not increasing ( #4749 )
...
* tests: additional test coverage for OL items
* parseInt means we can do a proper check
* tests: use ol check value test for #4748
2021-02-11 13:26:37 -05:00
snyk-bot
60a55ec428
fix: upgrade resolve from 1.1.7 to 1.19.0
...
Snyk has created this PR to upgrade resolve from 1.1.7 to 1.19.0.
See this package in npm:
https://www.npmjs.com/package/resolve
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-11 18:24:32 +00:00
snyk-bot
b50fcb065a
fix: upgrade underscore from 1.8.3 to 1.12.0
...
Snyk has created this PR to upgrade underscore from 1.8.3 to 1.12.0.
See this package in npm:
https://www.npmjs.com/package/underscore
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-11 18:18:11 +00:00
translatewiki.net
2f1d648787
Localisation updates from https://translatewiki.net .
2021-02-11 18:48:51 +01:00
Richard Hansen
2301c6ec83
pad: Don't throw on socket.io error
2021-02-11 17:25:09 +00:00
Richard Hansen
fc9f236977
plugins: Use npm ls
to list the installed plugins
...
This speeds up startup considerably, and we get rid of a lot of buggy
code.
This works with both npm v6.x and v7.x.
2021-02-09 22:18:35 +00:00
Richard Hansen
ce1b69feda
plugins: Helper function to run the npm
CLI
2021-02-09 22:18:35 +00:00
Richard Hansen
83a519941b
/admin/plugins: Fix logging of error messages
2021-02-09 22:18:35 +00:00
John McLear
94a65062c7
checkPlugins: remove lib/travis.yml and add github badges if they aren't present ( #4731 )
...
A future PR should remove all Travis badges and CI jobs.
2021-02-09 09:41:41 +00:00
Richard Hansen
ebdb2798ff
server: Fix handling of errors during startup and shutdown
...
Before, an unhandled rejection or uncaught exception during startup
would cause `exports.exit()` to wait forever for startup completion.
Similarly, an error during shutdown would cause `exports.exit()` to
wait forever for shutdown to complete. Now any error during startup or
shutdown triggers an immediate exit.
2021-02-09 08:57:24 +00:00
Richard Hansen
5999d8cd44
server: Only pass err
arg to exports.exit()
...
The `uncaughtException` event handlers are passed two arguments: error
and "origin". The `exports.exit()` argument doesn't expect a second
argument.
2021-02-09 08:57:24 +00:00
Richard Hansen
5b327b63ac
server: Simplify gating of state transition waiters
2021-02-09 08:57:24 +00:00
Richard Hansen
105f8b0ccb
server: Use a log4js logger object for logging
2021-02-09 08:57:24 +00:00
Richard Hansen
cb1116607e
Revert "backend tests: change loglevel to WARN ( #4514 )"
...
Logging verbosity of the openapi handlers was turned down so GitHub
should be happier with INFO now. This makes it easier to troubleshoot
problems.
This reverts commit b98aaf4904
.
2021-02-09 07:24:31 +00:00
Richard Hansen
1e3f352281
openapi: Turn down logging verbosity
2021-02-09 07:24:31 +00:00
Richard Hansen
714e099b2a
tests: Fix accidental functions in ordered_list.js
...
This fixes a bug introduced in commit
e9bb2c410e
.
2021-02-09 07:23:38 +00:00
Richard Hansen
e9bb2c410e
tests: Fix erroneous use of waitForPromise()
in ordered_list.js
...
`waitForPromise()` should always be used with `await` (either directly
or with a later `await` on the returned Promise). In this case,
the condition should be immediately true so `waitForPromise()` is not
the right tool here.
2021-02-08 18:24:11 +00:00
John McLear
7baa0cda02
tests: disabled checks shouldnt change behavior ( #4729 )
2021-02-08 11:07:07 +00:00
John McLear
9070c71e9f
color picker: allow full white
2021-02-08 11:01:27 +00:00
Richard Hansen
1c9afa5168
lint: src/static/js/ace.js
2021-02-07 20:04:07 +00:00
Richard Hansen
8668017c62
ace: Use globalThis
instead of non-strict default context
...
This is necessary before `'use strict';` can be added to the top of
the file.
2021-02-07 20:04:07 +00:00
Richard Hansen
3c2e0f0e16
ace: Simplify Ace2Editor method creation
...
* Delete the unused `optDoNow` parameter from `pendingInit()`.
* Move the `setAuthorInfo()` 1st parameter check out of the wrapper
and in to the `setAuthorInfo()` function itself.
2021-02-07 20:04:07 +00:00
John McLear
865a463154
fix: release script output
2021-02-07 19:28:00 +00:00
John McLear
2b112ac851
tests: Admin Frontend Test Coverage( #4717 )
...
Covers all frontend admin operations, runs separated in CI.
2021-02-07 11:32:57 +00:00
Richard Hansen
294f2a251f
lint: Fix bugs and style issues introduced in PR #4718
...
This fixes issues introduced in commit
f8a19c4527
.
2021-02-07 07:51:35 +00:00
Richard Hansen
0ff8274d2e
tests: Fix waitForPromise()
in enter.js
2021-02-07 07:13:04 +00:00
Richard Hansen
c625c611d2
tests: delete src/tests/frontend/specs/caret.js
...
All of the tests in this file are commented out so this file does
nothing. We can uncomment the code and clean it up, but the approach
taken in these tests will never work: For security reasons, browsers
do not allow synthetic key events to perform the default
behavior (such as moving the carent when an arrow key is pressed).
There are two ways to test responses to navigation keys:
* Use WebDriver to create "genuine" keyboard events.
* Suppress the default behavior and implement caret movement
ourselves. This is tremendously complicated, especially arrow
up/down.
2021-02-07 07:02:23 +00:00
John McLear
1f0cb01110
tests: fix enter test
2021-02-07 07:00:12 +00:00
John McLear
f8a19c4527
lint: lint and various fixes of frontend test specs
2021-02-07 06:39:03 +00:00
John McLear
e02246641e
ordered lists bugfix: first line item can be 0.*, don't show 0 as undefined ( #4600 )
2021-02-06 20:19:05 +00:00
John McLear
4862d6fa9c
editor: fix enter key keep line in view ( #4639 )
2021-02-06 19:56:59 +00:00
John McLear
c969ae58c2
stats: activePads & lastDisconnected stats
2021-02-06 19:53:52 +00:00
John McLear
5f58ce14d6
editor: remove grayed logic and styles so background color is not lost on disconnect/reconnect.
2021-02-06 09:58:10 +00:00
Richard Hansen
8b28e00784
restructure: Prefix bin/
and tests/
with src/
...
This is a follow-up to commit
2ea8ea1275
.
2021-02-05 21:52:08 +00:00
John McLear
2ea8ea1275
restructure: move bin/ and tests/ to src/
...
Also add symlinks from the old `bin/` and `tests/` locations to avoid
breaking scripts and other tools.
Motivations:
* Scripts and tests no longer have to do dubious things like:
require('ep_etherpad-lite/node_modules/foo')
to access packages installed as dependencies in
`src/package.json`.
* Plugins can access the backend test helper library in a non-hacky
way:
require('ep_etherpad-lite/tests/backend/common')
* We can delete the top-level `package.json` without breaking our
ability to lint the files in `bin/` and `tests/`.
Deleting the top-level `package.json` has downsides: It will cause
`npm` to print warnings whenever plugins are installed, npm will
no longer be able to enforce a plugin's peer dependency on
ep_etherpad-lite, and npm will keep deleting the
`node_modules/ep_etherpad-lite` symlink that points to `../src`.
But there are significant upsides to deleting the top-level
`package.json`: It will drastically speed up plugin installation
because `npm` doesn't have to recursively walk the dependencies in
`src/package.json`. Also, deleting the top-level `package.json`
avoids npm's horrible dependency hoisting behavior (where it moves
stuff from `src/node_modules/` to the top-level `node_modules/`
directory). Dependency hoisting causes numerous mysterious
problems such as silent failures in `npm outdated` and `npm
update`. Dependency hoisting also breaks plugins that do:
require('ep_etherpad-lite/node_modules/foo')
2021-02-04 17:15:08 -05:00
Richard Hansen
5a865dfc7e
pluginfw: Delete unused return value
2021-02-04 08:41:00 +00:00
Richard Hansen
a145b97682
pluginfw: Use for
loops to improve readability
2021-02-04 08:41:00 +00:00
Richard Hansen
fdaacc44c8
pluginfw: Replace slide.asyncMap()
with Promise.all()
2021-02-04 08:41:00 +00:00
Richard Hansen
746cc8cc34
pluginfw: In-line formatPluginsWithVersion()
...
There's only one caller of the function, so move the logic to where it
is used.
2021-02-04 08:41:00 +00:00
Richard Hansen
cd1d322af4
/admin/plugins/info: Move logic to .js
file
2021-02-04 08:41:00 +00:00
Richard Hansen
c5f0274116
lint: Move functions up to fix more lint errors
2021-02-04 08:41:00 +00:00
Richard Hansen
99ca57f3ab
lint: src/static/js/pluginfw/shared.js
2021-02-04 08:41:00 +00:00
Richard Hansen
2c80c1f2da
lint: src/static/js/pluginfw/read-installed.js
2021-02-04 08:41:00 +00:00
Richard Hansen
2b32bc1840
lint: src/static/js/pluginfw/plugins.js
2021-02-04 08:41:00 +00:00
Richard Hansen
9a86ebec2a
pluginfw: Fix state reset logic
2021-02-04 08:41:00 +00:00