From 3a45aa1cb2e77ccdde6d4b6d83b06f7553b35d41 Mon Sep 17 00:00:00 2001 From: webzwo0i Date: Thu, 6 Jul 2023 02:21:08 +0200 Subject: [PATCH] Add symlinks in ./src/node_modules for backwards compatibility. See "Note for plugin authors" section in Changelog. Some packages that are in use by plugins got a symlink in ./src/node_modules so that they still work after updating Etherpad. In the future don't require('etherpad_ep-lite/node_modules/dependency') anymore, but change this to require('dependency') and add the dependency to your plugin's package.json --- src/bin/installDeps.sh | 1 - src/bin/installOnWindows.bat | 1 - src/node_modules/async | 1 + src/node_modules/express | 1 + src/node_modules/formidable | 1 + src/node_modules/log4js | 1 + src/node_modules/supertest | 1 + 7 files changed, 5 insertions(+), 2 deletions(-) create mode 120000 src/node_modules/async create mode 120000 src/node_modules/express create mode 120000 src/node_modules/formidable create mode 120000 src/node_modules/log4js create mode 120000 src/node_modules/supertest diff --git a/src/bin/installDeps.sh b/src/bin/installDeps.sh index 2c2b2d248..9193756a6 100755 --- a/src/bin/installDeps.sh +++ b/src/bin/installDeps.sh @@ -88,7 +88,6 @@ fi log "Adding symlinks for plugin backwards compatibility" mkdir src/node_modules -p ln -s ../../node_modules/async src/node_modules/async -ln -s ../../node_modules/cheerio src/node_modules/cheerio ln -s ../../node_modules/express src/node_modules/express ln -s ../../node_modules/formidable src/node_modules/formidable ln -s ../../node_modules/log4js src/node_modules/log4js diff --git a/src/bin/installOnWindows.bat b/src/bin/installOnWindows.bat index 62521f8b5..a235ba57f 100644 --- a/src/bin/installOnWindows.bat +++ b/src/bin/installOnWindows.bat @@ -31,7 +31,6 @@ echo Adding symlinks for plugin backwards compatibility mkdir src\node_modules cd /D src\node_modules mklink /D "async" "..\..\node_modules\async" -mklink /D "cheerio" "..\..\node_modules\cheerio" mklink /D "express" "..\..\node_modules\express" mklink /D "formidable" "..\..\node_modules\formidable" mklink /D "log4js" "..\..\node_modules\log4js" diff --git a/src/node_modules/async b/src/node_modules/async new file mode 120000 index 000000000..cbc300bf6 --- /dev/null +++ b/src/node_modules/async @@ -0,0 +1 @@ +../../node_modules/async \ No newline at end of file diff --git a/src/node_modules/express b/src/node_modules/express new file mode 120000 index 000000000..1517da94d --- /dev/null +++ b/src/node_modules/express @@ -0,0 +1 @@ +../../node_modules/express \ No newline at end of file diff --git a/src/node_modules/formidable b/src/node_modules/formidable new file mode 120000 index 000000000..a3e3966e2 --- /dev/null +++ b/src/node_modules/formidable @@ -0,0 +1 @@ +../../node_modules/formidable \ No newline at end of file diff --git a/src/node_modules/log4js b/src/node_modules/log4js new file mode 120000 index 000000000..20812bb60 --- /dev/null +++ b/src/node_modules/log4js @@ -0,0 +1 @@ +../../node_modules/log4js \ No newline at end of file diff --git a/src/node_modules/supertest b/src/node_modules/supertest new file mode 120000 index 000000000..e46f9389e --- /dev/null +++ b/src/node_modules/supertest @@ -0,0 +1 @@ +../../node_modules/supertest \ No newline at end of file