Commit graph

58 commits

Author SHA1 Message Date
SamTV12345
88862f0246 Fixed bin scripts. 2024-08-08 21:23:10 +02:00
SamTV12345
d6d636955c
Feat/bundle js (#6511)
* Added minify

* Added POC for browser

* Moved first js files to ts

* Fixed caret positioning

* Added support for plugins

* Fixed get undefined.

* Removed require of socketio, l10n, html10n and error reporter

* Added minify

* Added POC for browser

* Moved first js files to ts

* Fixed caret positioning

* Added support for plugins

* Fixed get undefined.

* Removed require of socketio, l10n, html10n and error reporter

* Fixed popup not showing

* Fixed timeslider

* Reworked paths

* Fixed loading

* Don't generate sources map in production mode

* Non working hmr

* Added live reloading.

* Fixed timeslider when hot reloading

* Removed eval

* Fixed.

* Fixed env

* Fixed frontend tests.

* Added minifying via lightningcss

* Added minify via esbuild

* Fixed diagnostic url

* Removed lightningcss

* Fixed types

* Fixed alias

* Fixed loadtest

* Fixed

* Fixed loading ep_font_color3

* Restructure windows build

* Fixed windows build

* Fixed pnpm lock

---------

Co-authored-by: SamTv12345 <samtv12345@samtv12345.com>
2024-07-18 08:51:30 +02:00
SamTV12345
27dab95113
Fixed documentation to be pnpm run plugins i for plugin installation (#6405) 2024-05-24 21:57:39 +02:00
SamTV12345
59b87e0631 Updated checkPlugin to work again and added updated workflow files. 2024-03-16 23:11:11 +01:00
SamTV12345
cb56ec0c17 Added test-and-release 2024-03-16 20:40:16 +01:00
SamTV12345
107598b4b3 Added updated workflow runners. 2024-03-16 20:38:05 +01:00
SamTV12345
65046a3ff2 Added node workspace. 2024-03-15 20:59:28 +01:00
SamTV12345
f9e3416d78 Ported bin folder to typescript. 2024-03-13 20:31:29 +01:00
SamTV12345
a768b322cf Updated pipeline templates. 2024-03-13 19:11:25 +01:00
JannikStreek
04063d664b
cleanup after workspace refactoring (#6174)
* fix bin folder and workflows as far its possible

cleanup of dockerfile

changed paths of scripts

add lock file

fix working directory for workflows

fix windows bin

fix travis (is travis used anyway?)

fix package refs

remove pnpm-lock file in root as these conflicts with the docker volume setup

optimize comments

use install again

refactor prod image call to run

fix --workspace can only be used inside a workspace

correct comment

try fix pipeline

try fix pipeline for upgrade-from-latest-release

install all deps

smaller adjustments

save

update dockerfile

remove workspace command

fix run test command

start repair latest release workflow

start repair latest release workflow

start repair latest release workflow

further repairs

* remove test plugin from docker compose
2024-02-21 21:50:11 +01: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
John McLear
0cc8405e9c Bump minimum required Node.js version to 10.17.0
This makes it possible to use fs.promises.
2021-01-30 17:00:40 -05:00
Richard Hansen
b02ab430fe Bump eslint-config-etherpad to 1.0.24 2021-01-29 01:10:58 -05:00
John McLear
2fdc737355
bugfix, lint and refactor all bin scripts (#4617)
* bugfix, lint and refactor all bin scripts

* for squash: throw Error(message) rather than log(message); throw Error()

* for squash: Exit non-0 on unhandled Promise rejection

Many of the recent lint changes have converted normal functions to
async functions, and an error thrown in an async function does not
cause Node.js to exit by default.

* for squash: fix `require()` paths

* for squash: remove erroneous `Object.keys()` call

* for squash: fix missing `continue` statements

* for squash: Fix HTTP method for deleteSession

* for squash: delete erroneous throw

Throw is only for errors, not successful completion.

* for squash: redo migrateDirtyDBtoRealDB.js to fix async bugs

* for squash: fix erroneous use of `for..of`

* for squash: Add line break between statements

* for squash: put closing paren on same line as last arg

* for squash: Move `log()` back up where it was

to minimize the diff to develop

* for squash: indentation fixes

* for squash: typo fix

* for squash: wrap long lines

* for squash: use `util.callbackify` to silence promise/no-callback-in-promise warning

* for squash: use double quotes to improve readability

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-01-18 08:53:15 +00:00
Richard Hansen
481fa047e4 checkPlugin: Merge the autoupdate option into autofix 2021-01-11 08:51:04 +00:00
Richard Hansen
039c50de80 checkPlugin: Make autocommit imply autoupdate, autoupdate imply autofix 2021-01-11 08:51:04 +00:00
Richard Hansen
27df9df47f checkPlugin: Revise README.md 2021-01-11 08:51:04 +00:00
Richard Hansen
adb38d0d61 checkPlugin: Display a diff of the changes 2021-01-11 08:51:04 +00:00
Richard Hansen
6ccbe374d8 checkPlugin: Don't nuke node_modules/
`git add -A` will ignore `node_modules/` because it's in `.gitignore`.
2021-01-11 08:51:04 +00:00
Richard Hansen
5f2aaea255 checkPlugin: Use git to determine whether there were changes 2021-01-11 08:51:04 +00:00
Richard Hansen
9f4bcfb79b checkPlugin: Ensure that a peer dep for ep_etherpad-lite exists
Tweak the new `updateDeps()` function and use it to add the
`ep_etherpad-lite` dependency if it is missing.
2021-01-11 08:51:04 +00:00
Richard Hansen
42da976705 checkPlugin: Move dependency update logic to a generic function
This will make it possible to reuse the logic for `peerDependencies`.
2021-01-11 08:51:04 +00:00
Richard Hansen
747f323552 checkPlugin: Use absolute path when installing ep_etherpad-lite
This makes it possible to check plugins that were installed by
symlinking into `node_modules/` like this:

    git clone git@github.com:ether/etherpad-lite.git
    git clone git@github.com:ether/ep_example.git
    cd etherpad-lite
    npm i ep_example@file:../ep_example
    node ./bin/checkPlugin.js ep_example
2021-01-11 08:51:04 +00:00
Richard Hansen
b719affe6e checkPlugin: Unconditionally run npm install 2021-01-11 08:51:04 +00:00
Richard Hansen
bba47ea2df checkPlugin: Make sure package.json ends with a newline 2021-01-11 08:51:04 +00:00
Richard Hansen
bf8d55ab8e checkPlugin: New writePackageJson() convenience function 2021-01-11 08:51:04 +00:00
Richard Hansen
b3b9afa668 checkPlugin: Split dirty working directory check into two checks
Rather than check for modifications and untracked files in one
command, use two commands: one for modifications and one for untracked
files. This makes the error messages easier to understand, and it
allows us to include `git status`-like output in the modifications
error message.
2021-01-09 22:49:27 +00:00
Richard Hansen
6a13baf7d4 checkPlugin: Use --name-status for git diff-index
`--compact-sumary` is relatively new (v2.17.0), and I actually
intended to use `--name-status` anyway.
2021-01-09 22:49:27 +00:00
Richard Hansen
071cca1d48 checkPlugin: Don't create an empty commit 2021-01-09 08:05:31 +00:00
Richard Hansen
38ca0c52a6 checkPlugin: Add lots of Git sanity checks 2021-01-09 08:05:31 +00:00
Richard Hansen
1a9bfc8d4f checkPlugin: Don't capture stdout when unnecessary 2021-01-09 08:05:31 +00:00
Richard Hansen
102c01f723 checkPlugin: Move log messages where they make more sense 2021-01-09 08:05:31 +00:00
Richard Hansen
d816bb2b38 checkPlugin: New execSync() convenience function 2021-01-09 08:05:31 +00:00
Richard Hansen
a55dd73f2b Typo fix: checkPlugins.js -> checkPlugin.js 2021-01-08 19:02:55 -05:00
Richard Hansen
44118c0e7b checkPlugin: Refine installation of lint dependencies 2021-01-08 19:02:55 -05:00
Richard Hansen
a0d21f75c4 checkPlugin: Add missing lint dependency 2021-01-08 18:42:10 -05:00
Richard Hansen
6890bfada1 checkPlugin: Bump eslint, eslint-config-etherpad versions 2021-01-08 18:24:42 -05:00
Richard Hansen
ba1c468865 checkPlugin: Fix command-line argument parsing bug 2021-01-08 18:07:55 -05:00
John McLear
fd3004faad
checkPlugins: various minor updates (#4635)
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-01-07 21:52:45 -05:00
Richard Hansen
3373f059e6 Plugin publish workflow: Run git push before npm publish 2021-01-05 21:59:03 +00:00
Richard Hansen
f54dcbc766 lint: Re-run eslint --fix 2020-12-16 22:09:48 +00:00
John McLear
003363bc89
checkPlugin: dont run sauce labs connector on travis backend tests (#4542) 2020-12-05 08:21:08 +00:00
John McLear
ee0a37f96c checkPlugins fix travis and include contributing.md 2020-12-05 07:50:16 +00:00
John McLear
239a0bccbd checkPlugins: improve travis config to not error 2020-12-05 07:50:16 +00:00
John McLear
d1e9ea6e27
tests/plugins: checkPlugins backend tests config
Tnx to @webzwo0i 👍
2020-11-30 17:22:52 +00:00
John McLear
42c0d80914 plugins: checkPlugin script includes remove node_modules if committed. 2020-11-28 13:13:14 +00:00
John McLear
325941a1ad
plugins: add peerdeps and correct engine to checkPlugins script (#4524)
* pere deps example

* fixed by rh

* doh

* doh...
2020-11-27 21:43:23 +00:00
Richard Hansen
5fcf5f6135 checkPlugin.js: Use https, not http, for Etherpad URL 2020-11-27 14:55:51 -05:00
Richard Hansen
2fdac836d0 lint: Bump eslint-config-etherpad to 1.0.13
Also bump eslint to 7.14.0.
2020-11-27 06:25:43 +00:00
Richard Hansen
b8d07a42eb lint: Run eslint --fix on bin/ and tests/ 2020-11-24 20:06:12 +00:00