Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating npm #5812

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
1f9b927
Use `npm link` to install ep_etherpad-lite. This places a package.json
webzwo0i Jul 5, 2023
688ca73
admin tests: refactor
webzwo0i Jul 1, 2023
740af6a
Add symlinks in ./src/node_modules for backwards compatibility.
webzwo0i Jul 6, 2023
a44f611
Frontend tests: longer timeout in language.js test to make tests for
webzwo0i Jul 7, 2023
c1a28b7
admin/plugins: explicitly call npm with a plugin version
webzwo0i Jul 8, 2023
23ce7bd
JSON.stringify error for debugging
webzwo0i Jul 8, 2023
519aba4
Remove etherpad-cli-client devDependency.
webzwo0i Jul 28, 2023
5df101f
adminplugins; Fix reloading admin/plugins
webzwo0i Jul 28, 2023
c835c2a
remove npm i - is this still needed?
webzwo0i Jul 29, 2023
864c6f1
temporary: no mocha bin link
webzwo0i Jul 29, 2023
4239d85
debug
webzwo0i Jul 29, 2023
811e0b8
debug
webzwo0i Jul 29, 2023
a95c8e3
plugin uninstall: Remove unnecessary code
webzwo0i Jul 30, 2023
81646b1
admin/plugins: Fix UI in case of missed finished:uninstall event
webzwo0i Jul 30, 2023
9f2e8c9
admin/plugins: fix test
webzwo0i Jul 30, 2023
6bb0c2a
updated package-lock.json.
SamTV12345 Dec 15, 2023
92e86d4
updated package-lock.json.
SamTV12345 Dec 15, 2023
52cf318
Removed fix for npm@6
SamTV12345 Dec 15, 2023
943e6e6
Updated dependencies.
SamTV12345 Dec 16, 2023
6ed7cba
Use npx mocha for starting tests.
SamTV12345 Dec 16, 2023
97f0ef7
Don't delete supertest.
SamTV12345 Dec 16, 2023
25b4ece
Use development.
SamTV12345 Dec 16, 2023
9abc5a5
Use node env development.
SamTV12345 Dec 16, 2023
c243973
Use development version.
SamTV12345 Dec 16, 2023
368a0a2
Updated to package-lock.json v3
SamTV12345 Dec 18, 2023
d6a3395
Modified windows deployment.
SamTV12345 Dec 18, 2023
df9dd77
Modified windows deployment.
SamTV12345 Dec 18, 2023
e046524
Added backend tests as script.
SamTV12345 Dec 18, 2023
02b826c
Updated jQuery.
SamTV12345 Dec 18, 2023
d2ebb06
Remove ls statement from runner.
SamTV12345 Dec 18, 2023
60ae55d
Remove cd into src
SamTV12345 Dec 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
56 changes: 21 additions & 35 deletions .github/workflows/backend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
sudo apt update
sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
-
name: Install all dependencies and symlink for ep_etherpad-lite
name: Install the ep_etherpad-lite package from ./src
run: src/bin/installDeps.sh
-
name: Run the backend tests
Expand Down Expand Up @@ -74,12 +74,13 @@ jobs:
sudo add-apt-repository -y ppa:libreoffice/ppa
sudo apt update
sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
-
name: Install the ep_etherpad-lite package from ./src
run: src/bin/installDeps.sh
-
name: Install Etherpad plugins
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
# https://github.com/npm/cli/issues/2199
run: >
npm install --no-save --legacy-peer-deps
npm install
ep_align
ep_author_hover
ep_cursortrace
Expand All @@ -93,18 +94,6 @@ jobs:
ep_spellcheck
ep_subscript_and_superscript
ep_table_of_contents
# Etherpad core dependencies must be installed after installing the
# plugin's dependencies, otherwise npm will try to hoist common
# dependencies by removing them from src/node_modules and installing them
# in the top-level node_modules. As of v6.14.10, npm's hoist logic appears
# to be buggy, because it sometimes removes dependencies from
# src/node_modules but fails to add them to the top-level node_modules.
# Even if npm correctly hoists the dependencies, the hoisting seems to
# confuse tools such as `npm outdated`, `npm update`, and some ESLint
# rules.
-
name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installDeps.sh
-
name: Run the backend tests
run: cd src && npm test
Expand All @@ -129,17 +118,22 @@ jobs:
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
- name: Install dependencies
run: cd src && npm i --legacy-peer-deps
-
name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installOnWindows.bat
name: Install the ep_etherpad-lite package from ./src
run: cd src && ./bin/installOnWindows.bat
# -
# name: Run npm i once to make bin files available - why is this needed at all?
# run: npm i
-
name: Fix up the settings.json
run: |
powershell -Command "(gc settings.json.template) -replace '\"max\": 10', '\"max\": 10000' | Out-File -encoding ASCII settings.json.holder"
powershell -Command "(gc settings.json.holder) -replace '\"points\": 10', '\"points\": 1000' | Out-File -encoding ASCII settings.json"
-
name: Run the backend tests
run: cd src && npm test
run: cd src && npm run test-on-windows

withpluginsWindows:
# run on pushes to any branch
Expand All @@ -162,12 +156,16 @@ jobs:
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
-
name: Install the ep_etherpad-lite package from ./src
run: src/bin/installOnWindows.bat
# -
# name: Run npm i once to make bin files available - why is this needed at all?
# run: npm i
-
name: Install Etherpad plugins
# The --legacy-peer-deps flag is required to work around a bug in npm
# v7: https://github.com/npm/cli/issues/2199
run: >
npm install --no-save --legacy-peer-deps
npm install
ep_align
ep_author_hover
ep_cursortrace
Expand All @@ -181,23 +179,11 @@ jobs:
ep_spellcheck
ep_subscript_and_superscript
ep_table_of_contents
# Etherpad core dependencies must be installed after installing the
# plugin's dependencies, otherwise npm will try to hoist common
# dependencies by removing them from src/node_modules and installing them
# in the top-level node_modules. As of v6.14.10, npm's hoist logic appears
# to be buggy, because it sometimes removes dependencies from
# src/node_modules but fails to add them to the top-level node_modules.
# Even if npm correctly hoists the dependencies, the hoisting seems to
# confuse tools such as `npm outdated`, `npm update`, and some ESLint
# rules.
-
name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installOnWindows.bat
-
name: Fix up the settings.json
run: |
powershell -Command "(gc settings.json.template) -replace '\"max\": 10', '\"max\": 10000' | Out-File -encoding ASCII settings.json.holder"
powershell -Command "(gc settings.json.holder) -replace '\"points\": 10', '\"points\": 1000' | Out-File -encoding ASCII settings.json"
-
name: Run the backend tests
run: cd src && npm test
run: cd src && npm run test-on-windows
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
-
name: Test
run: |
docker run --rm -d -p 9001:9001 --name test ${{ env.TEST_TAG }}
docker run -e NODE_ENV=development --rm -d -p 9001:9001 --name test ${{ env.TEST_TAG }}
docker logs -f test &
./src/bin/installDeps.sh
while true; do
Expand All @@ -58,7 +58,7 @@ jobs:
*) printf %s\\n "unexpected status: ${status}" >&2; exit 1;;
esac
done
(cd src && npm run test-container)
(npm run test-container)
git clean -dxf .
-
name: Docker meta
Expand Down
20 changes: 4 additions & 16 deletions .github/workflows/frontend-admin-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,11 @@ jobs:
src/package-lock.json
src/bin/doc/package-lock.json
-
name: Install etherpad plugins
# We intentionally install an old ep_align version to test upgrades to
# the minor version number. The --legacy-peer-deps flag is required to
# work around a bug in npm v7: https://github.com/npm/cli/issues/2199
run: npm install --no-save --legacy-peer-deps ep_align@0.2.27
# Etherpad core dependencies must be installed after installing the
# plugin's dependencies, otherwise npm will try to hoist common
# dependencies by removing them from src/node_modules and installing them
# in the top-level node_modules. As of v6.14.10, npm's hoist logic appears
# to be buggy, because it sometimes removes dependencies from
# src/node_modules but fails to add them to the top-level node_modules.
# Even if npm correctly hoists the dependencies, the hoisting seems to
# confuse tools such as `npm outdated`, `npm update`, and some ESLint
# rules.
-
name: Install all dependencies and symlink for ep_etherpad-lite
name: Install the ep_etherpad-lite package from ./src
run: src/bin/installDeps.sh
-
name: Install etherpad plugins
run: npm install ep_align@0.2.27
-
name: Install etherpad plugins
run: rm -Rf node_modules/ep_align/static/tests/*
Expand Down
21 changes: 5 additions & 16 deletions .github/workflows/frontend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
src/package-lock.json
src/bin/doc/package-lock.json
-
name: Install all dependencies and symlink for ep_etherpad-lite
name: Install the ep_etherpad-lite package from ./src
run: src/bin/installDeps.sh
-
name: export GIT_HASH to env
Expand Down Expand Up @@ -85,12 +85,13 @@ jobs:
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
-
name: Install the ep_etherpad-lite package from ./src
run: src/bin/installDeps.sh
-
name: Install Etherpad plugins
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
# https://github.com/npm/cli/issues/2199
run: >
npm install --no-save --legacy-peer-deps
npm install
ep_align
ep_author_hover
ep_cursortrace
Expand All @@ -105,18 +106,6 @@ jobs:
ep_spellcheck
ep_subscript_and_superscript
ep_table_of_contents
# Etherpad core dependencies must be installed after installing the
# plugin's dependencies, otherwise npm will try to hoist common
# dependencies by removing them from src/node_modules and installing them
# in the top-level node_modules. As of v6.20.10, npm's hoist logic appears
# to be buggy, because it sometimes removes dependencies from
# src/node_modules but fails to add them to the top-level node_modules.
# Even if npm correctly hoists the dependencies, the hoisting seems to
# confuse tools such as `npm outdated`, `npm update`, and some ESLint
# rules.
-
name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installDeps.sh
-
name: export GIT_HASH to env
id: environment
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/lint-package-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ jobs:
--allowed-hosts npm
--allowed-schemes https:
--allowed-schemes github:
--allowed-urls github:mapbox/node-sqlite3#593c9d498be2510d286349134537e3bf89401c4a
--allowed-schemes git+ssh:
--allowed-schemes file:
--allowed-urls git+ssh://git@github.com/mapbox/node-sqlite3.git#593c9d498be2510d286349134537e3bf89401c4a
23 changes: 6 additions & 17 deletions .github/workflows/load-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
src/package-lock.json
src/bin/doc/package-lock.json
-
name: Install all dependencies and symlink for ep_etherpad-lite
name: Install the ep_etherpad-lite package from ./src
run: src/bin/installDeps.sh
-
name: Install etherpad-load-test
Expand Down Expand Up @@ -57,15 +57,16 @@ jobs:
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
-
name: Install the ep_etherpad-lite package from ./src
run: src/bin/installDeps.sh
-
name: Install etherpad-load-test
run: sudo npm install -g etherpad-load-test
-
name: Install etherpad plugins
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
# https://github.com/npm/cli/issues/2199
run: >
npm install --no-save --legacy-peer-deps
npm install
ep_align
ep_author_hover
ep_cursortrace
Expand All @@ -78,18 +79,6 @@ jobs:
ep_spellcheck
ep_subscript_and_superscript
ep_table_of_contents
# Etherpad core dependencies must be installed after installing the
# plugin's dependencies, otherwise npm will try to hoist common
# dependencies by removing them from src/node_modules and installing them
# in the top-level node_modules. As of v6.14.10, npm's hoist logic appears
# to be buggy, because it sometimes removes dependencies from
# src/node_modules but fails to add them to the top-level node_modules.
# Even if npm correctly hoists the dependencies, the hoisting seems to
# confuse tools such as `npm outdated`, `npm update`, and some ESLint
# rules.
-
name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installDeps.sh
-
name: Run load test
run: src/tests/frontend/travis/runnerLoadTest.sh 25 50
Expand All @@ -115,7 +104,7 @@ jobs:
src/package-lock.json
src/bin/doc/package-lock.json
-
name: Install all dependencies and symlink for ep_etherpad-lite
name: Install the ep_etherpad-lite package from ./src
run: src/bin/installDeps.sh
-
name: Install etherpad-load-test
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/rate-limit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ jobs:
-
name: install dependencies and create symlink for ep_etherpad-lite
run: src/bin/installDeps.sh
-
name: Install etherpad-cli-client
run: npm i etherpad-cli-client
-
name: run rate limit test
run: |
Expand Down
41 changes: 26 additions & 15 deletions .github/workflows/upgrade-from-latest-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ jobs:
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
# FIXME after 1.9.2
# After 1.9.2 is released, we need to remove '--legacy-peer-deps --no-save'
-
name: Install Etherpad plugins
# The --legacy-peer-deps flag is required to work around a bug in npm
# v7: https://github.com/npm/cli/issues/2199
run: >
npm install --no-save --legacy-peer-deps
npm install --legacy-peer-deps --no-save
ep_align
ep_author_hover
ep_cursortrace
Expand All @@ -52,15 +52,6 @@ jobs:
ep_spellcheck
ep_subscript_and_superscript
ep_table_of_contents
# Etherpad core dependencies must be installed after installing the
# plugin's dependencies, otherwise npm will try to hoist common
# dependencies by removing them from src/node_modules and installing them
# in the top-level node_modules. As of v6.14.10, npm's hoist logic appears
# to be buggy, because it sometimes removes dependencies from
# src/node_modules but fails to add them to the top-level node_modules.
# Even if npm correctly hoists the dependencies, the hoisting seems to
# confuse tools such as `npm outdated`, `npm update`, and some ESLint
# rules.
-
name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installDeps.sh
Expand All @@ -83,17 +74,37 @@ jobs:
# commit that merges the PR's source branch to its destination branch.
run: git checkout "${GITHUB_SHA}"
-
name: Install all dependencies and symlink for ep_etherpad-lite
name: Temporary remove ./node_modules; Remove this after 1.9.2 release
run: rm -rf ./node_modules
-
name: Install the ep_etherpad-lite package from ./src
run: src/bin/installDeps.sh
-
name: Install Etherpad plugins again; Remove this after 1.9.2 release
run: >
npm install
ep_align
ep_author_hover
ep_cursortrace
ep_font_size
ep_hash_auth
ep_headings2
ep_image_upload
ep_markdown
ep_readonly_guest
ep_set_title_on_pad
ep_spellcheck
ep_subscript_and_superscript
ep_table_of_contents
-
name: Run the backend tests
run: cd src && npm test
-
name: Install Cypress
run: cd src && npm install cypress --legacy-peer-deps
run: npm install cypress
-
name: Run Etherpad & Test Frontend
run: |
node src/node/server.js &
curl --connect-timeout 10 --max-time 20 --retry 5 --retry-delay 10 --retry-max-time 60 --retry-connrefused http://127.0.0.1:9001/p/test
./src/node_modules/cypress/bin/cypress run --config-file src/tests/frontend/cypress/cypress.config.js
./node_modules/cypress/bin/cypress run --config-file src/tests/frontend/cypress/cypress.config.js
11 changes: 7 additions & 4 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,16 @@ jobs:
src/package-lock.json
src/bin/doc/package-lock.json
-
name: Install all dependencies and symlink for ep_etherpad-lite
name: Install the ep_etherpad-lite package from ./src
shell: msys2 {0}
run: src/bin/installDeps.sh
# -
# name: Run npm i once to make bin files available - why is this needed at all?
# run: npm i
-
name: Run the backend tests
shell: msys2 {0}
run: cd src && npm test
run: cd src && npm run test-on-windows
-
name: Build the .zip
shell: msys2 {0}
Expand Down Expand Up @@ -115,14 +118,14 @@ jobs:
etherpad/src/bin/doc/package-lock.json
-
name: Install Cypress
run: cd etherpad && cd src && npm install cypress --legacy-peer-deps
run: cd etherpad && npm install cypress
-
name: Run Etherpad
run: |
cd etherpad
node node_modules\ep_etherpad-lite\node\server.js &
curl --connect-timeout 10 --max-time 20 --retry 5 --retry-delay 10 --retry-max-time 60 --retry-connrefused http://127.0.0.1:9001/p/test
src\node_modules\cypress\bin\cypress run --config-file src\tests\frontendcypress\cypress.config.js
node_modules\cypress\bin\cypress run --config-file src\tests\frontendcypress\cypress.config.js
# On release, upload windows zip to GitHub release tab
-
name: Rename to etherpad-lite-win.zip
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ out/
/src/bin/convertSettings.json
/src/bin/etherpad-1.deb
/src/bin/node.exe
/package.json