Commit graph

71 commits

Author SHA1 Message Date
muxator
0a86024797 startup scripts: get rid of $* and replace it with properly quoted "$@"
In shell scripts an unquoted $* is rarely useful, for example because it breaks
in presence of file names with spaces.

References:
- https://google.github.io/styleguide/shell.xml
  Use "$@" unless you have a specific reason to use $*.

- https://unix.stackexchange.com/questions/41571/what-is-the-difference-between-and#94200
  Short answer: use "$@" (note the double quotes). The other forms are very
  rarely useful.
2019-12-01 01:52:32 +01:00
muxator
9ee131ca1f installDeps.sh: create a package-lock.json on startup. Track it in the repo.
This change reverts c4918efc1b, and basically negates what was done for #3396,
but aligns better with current practices in the nodejs ecosystem.

Pragmatically speaking, this will allow users, if they want, to use
npm-force-resolutions (https://github.com/rogeriochaves/npm-force-resolutions)
to manually fix security vulnerabilities.
We had a problem for that (see #3598), and - given the fragmented nature of
the nodejs ecosystem - it is reasonable to expect more issues like that one,
so it's better to be prepared.

Closes #3659.
2019-10-31 19:20:28 +01:00
muxator
4f753809fe runtime: decrease minimum command-line npm version from 6.4 to 5.5
When nodejs 8.9.0 was released, its bundled npm version was 5.5.1 (see
https://nodejs.org/en/download/releases). It makes sense that we lover our
requirement to that version.

Please note that the npm version mentioned here does not refer to the npm
library installed as Etherpad dependency in node_modules via package.json
(which indeed is higher) but is merely the npm version used to bootstrap the
installation when running installDeps.sh.

This change amends 9d35d15ae3 and its planning issue - #3424 - which were too
strict.
2019-10-19 22:38:32 +02:00
muxator
9d35d15ae3 node8: require nodejs >= 8.9.0, npm >= 6.4
Next version will be Etherpad 1.8. As planned in #3424, we are going to require
NodeJS >=8.9.0 and npm >= 6.4.

This commit implements that change and updates documentation and scripts.
Subsequent changes will get rid of old idioms, dating back to node < 0.7, that
still survive in the code.
Once migrated to NodeJS 8, we will be able to start working on migrating the
code base from callbacks to async/await, greatly simplifying legibility (see
#3540).

Closes #3557
2019-02-19 22:01:12 +01:00
muxator
9aaa02ec70 installDeps: no need to download jquery at starting time. Remove curl dependency
In installDeps.sh we have a bunch of code (from 2011) that checks for the
existence of jQuery and eventually downloads it, but since 1239ce7f28 (year
2012) jquery is vendorized in /src/static/js/jquery.js.

Also, stop mentioning curl as a dependency in the README.md

Fixes #3494
2018-10-07 18:56:28 +02:00
muxator
c09e638fc3 installDeps.sh: don't nuke all installed plugins on update
This is a modification of PR #3474 by rohieb <rohieb@rohieb.name>.

When this script is run after an update, and something fails during the npm
run, the installed plugins were deleted, too.

In this version what gets deleted is only the directory that contains the
direct dependencies of the core Etherpad, ie:
  node_modules/ep_etherpad-lite/node_modules
2018-08-29 21:45:33 +02:00
muxator
0c518cadf5 skins: replace {js,css}.template with actual files. Simplify startup scripts.
Currently, an Etherpad skin requires the existence of 6 files:
- index.{css,js}
- pad.{css,js}
- timeslider.{css,js}

In the default empty skin (in static/custom), there were 2 small placeholders
({js,css}.template) to be copied in place by the startup script in case no skin
was in use.

Now that we are moving to multiple directories (see #3471) we can simply commit
the example files and remove the copying code from the startup script.
2018-08-26 21:17:04 +02:00
"muxator ext:(%22)
d23cf924c9 installDeps: replace GNU specific long options whith short ones
Long options are only present in GNU cut, and we aim to also support other
platforms.
2018-07-31 12:44:17 +02:00
muxator
a3ae374a67 installDeps: made version detection more robust. Require Node >= 6.9, npm >= 3.10
require_minimal_version() tries to parse semvers in a Posix portable way and
ensure a minimal Major.minor version is met.
2018-07-28 23:33:24 +02:00
muxator
c4918efc1b installDeps.sh: do not modify package.json when installing dependencies
installDeps.sh's only side effect should be to actually install dependencies
according to a configuration file, and not to modify it.

Adding --no-save to the npm command line forces npm to have a read only access
to package.json.

Old npm versions seem to support --no-XXX style flags even if not documented
(see https://github.com/npm/npm/issues/14285#issuecomment-254298519)

Tested with npm 3.5.2 and 6.1.0

Fixes #3396
2018-07-14 17:54:26 +02:00
HairyFotr
c7548450c0
Typos and minor fixes in bin, doc, and root 2017-09-14 13:33:27 +02:00
rugk
f4bbe00322 Download JQuery over HTTPS
Otherwise anyone can MITM the connection and add rogue code there.
2016-07-23 16:59:47 +02:00
Stefan
8aa297fb40 Remove node version output on start 2016-04-24 20:29:07 +02:00
John McLear
e1999d826c allow greater than or equal to v 4 2016-03-27 13:31:00 +08:00
Stefan
2a81d2a578 Remove support for io.js 2016-03-20 15:21:56 +01:00
Stefan
18d583d92d Check for node version 4 or higher and not special versions 2016-03-20 15:19:34 +01:00
Komasa
5f9d1397e2 Update installDeps.sh 2015-11-04 21:15:13 +01:00
Stefan
bf7930fccb Support version 4 of node.js 2015-09-26 12:15:54 +02:00
Tom Hunkapiller
63cbab484d express dropped support for node 0.8; update engine requirements 2015-04-08 23:12:11 -05:00
Raphaël Dubigny
119fc82387 Update installDeps.sh 2015-04-04 17:30:41 +02:00
Raphaël Dubigny
dfd17d1aba Update installDeps.sh 2015-04-04 17:14:59 +02:00
Stefan
0505a47356 Support node version 0.12.x 2015-02-15 22:21:41 +01:00
John McLear
f880b0feb7 clean up iojs 2015-01-21 12:18:38 +00:00
nemetz
648ebc08d6 check for io.js
Added a check for io.js
2015-01-16 11:11:34 -02:00
Jan-Erik Rediger
1f558dc843 Removed useless use of cat 2015-01-08 14:16:07 +01:00
John McLear
0a84379364 make additional line break at end of imported doc 2014-11-26 15:19:22 +00:00
Stefan
94968e69be Add support for npm 2 2014-09-27 12:30:11 +02:00
John McLear
1f68f07083 support node 0.11 2013-11-14 22:46:58 +00:00
John McLear
fa4ebd602c Update installDeps.sh 2013-11-12 09:58:22 +00:00
Marcel Klehr
782c512e93 Drop support for node v0.6, officially 2013-04-01 14:07:38 +02:00
John McLear
e050ad57e4 fix typo 2013-03-22 17:39:22 +00:00
Marcel Klehr
5a9393d5da Update version checks 2013-03-16 09:46:35 +01:00
John McLear
3a73aa2f48 please wait msg 2013-02-10 03:17:04 +00:00
Manuel Knitza
98a9b1e222 update jquery 1.7.1 -> 1.9.1 2013-02-10 02:55:50 +01:00
Marcel Klehr
3e53a11127 Show errors on npm install 2012-11-19 15:19:59 +01:00
johnyma22
cefbd8354d fix tiny error of missing space 2012-11-16 21:12:04 +00:00
Peter 'Pita' Martischka
4c095202bd Merged branch feature/frontend-tests 2012-11-13 07:29:57 -08:00
Bastian
05f96429ef added solaris compatibility: removed -v flag from cp, witch is not known by solaris cp // added condition for gnu-grep (ggrep), solaris grep has no -o flag 2012-11-07 12:51:51 +01:00
Peter 'Pita' Martischka
c8dfa6d7ae less noise 2012-11-01 23:46:04 +00:00
John McLear
d18bb81aad Correct casing 2012-07-05 20:33:11 +03:00
johnyma22
f9805102f1 actually fix run script ;) 2012-07-05 18:30:59 +01:00
Marcel Klehr
5195f685e2 Correct error message. 2012-07-05 19:08:20 +02:00
Marcel Klehr
f15ffbb5e4 Allow v0.6.0 on UNIX 2012-07-05 19:02:20 +02:00
Marcel Klehr
02ce537c68 Use node v0.8.1 / allow node v0.8 2012-06-30 20:20:05 +02:00
Egil Moeller
434252a321 Removed prefixfree as it breaks @import in css files 2012-04-01 22:55:04 +02:00
Egil Moeller
da52353ba3 The big rename of pluginbs from pluginomatic to ep 2012-02-26 13:54:32 +01:00
Egil Moeller
758666c3e1 Better startup & symlinking 2012-02-26 13:31:47 +01:00
Jordan
8bac77ff80 Allow settings filename to be passed as a cli option 2012-02-21 14:20:45 -05:00
Peter 'Pita' Martischka
394d542d5e fix jquery version regex to make @0ip happy 2012-02-06 17:36:59 +01:00
Pedro Gracia
7a41cde51f Add -k option in curl to check prefixtree to avoid check ssl certificate 2012-02-06 07:25:36 +01:00