mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-07 07:37:11 -04:00
Added pnpm
This commit is contained in:
parent
96c81906cb
commit
b2909a7be5
19 changed files with 5643 additions and 9862 deletions
55
.github/workflows/backend-tests.yml
vendored
55
.github/workflows/backend-tests.yml
vendored
|
@ -31,6 +31,23 @@ jobs:
|
|||
cache-dependency-path: |
|
||||
src/package-lock.json
|
||||
src/bin/doc/package-lock.json
|
||||
- uses: pnpm/action-setup@v3
|
||||
name: Install pnpm
|
||||
with:
|
||||
version: 8
|
||||
run_install: false
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
-
|
||||
name: Install libreoffice
|
||||
run: |
|
||||
|
@ -129,6 +146,23 @@ jobs:
|
|||
cache-dependency-path: |
|
||||
src/package-lock.json
|
||||
src/bin/doc/package-lock.json
|
||||
- uses: pnpm/action-setup@v3
|
||||
name: Install pnpm
|
||||
with:
|
||||
version: 8
|
||||
run_install: false
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
-
|
||||
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||
run: src/bin/installOnWindows.bat
|
||||
|
@ -157,17 +191,34 @@ jobs:
|
|||
-
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
node-version: 21
|
||||
cache: 'npm'
|
||||
cache-dependency-path: |
|
||||
src/package-lock.json
|
||||
src/bin/doc/package-lock.json
|
||||
- uses: pnpm/action-setup@v3
|
||||
name: Install pnpm
|
||||
with:
|
||||
version: 8
|
||||
run_install: false
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
-
|
||||
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
|
||||
pnpm install --no-save --legacy-peer-deps
|
||||
ep_align
|
||||
ep_author_hover
|
||||
ep_cursortrace
|
||||
|
|
19
.github/workflows/docker.yml
vendored
19
.github/workflows/docker.yml
vendored
|
@ -43,6 +43,23 @@ jobs:
|
|||
cache-dependency-path: |
|
||||
src/package-lock.json
|
||||
src/bin/doc/package-lock.json
|
||||
- uses: pnpm/action-setup@v3
|
||||
name: Install pnpm
|
||||
with:
|
||||
version: 8
|
||||
run_install: false
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
-
|
||||
name: Test
|
||||
run: |
|
||||
|
@ -96,4 +113,4 @@ jobs:
|
|||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
repository: etherpad/etherpad
|
||||
enable-url-completion: true
|
||||
enable-url-completion: true
|
||||
|
|
17
.github/workflows/frontend-admin-tests.yml
vendored
17
.github/workflows/frontend-admin-tests.yml
vendored
|
@ -36,6 +36,23 @@ jobs:
|
|||
cache-dependency-path: |
|
||||
src/package-lock.json
|
||||
src/bin/doc/package-lock.json
|
||||
- uses: pnpm/action-setup@v3
|
||||
name: Install pnpm
|
||||
with:
|
||||
version: 8
|
||||
run_install: false
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
-
|
||||
name: Install etherpad plugins
|
||||
# We intentionally install an old ep_align version to test upgrades to
|
||||
|
|
19
.github/workflows/frontend-tests.yml
vendored
19
.github/workflows/frontend-tests.yml
vendored
|
@ -25,11 +25,28 @@ jobs:
|
|||
-
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
node-version: 21
|
||||
cache: 'npm'
|
||||
cache-dependency-path: |
|
||||
src/package-lock.json
|
||||
src/bin/doc/package-lock.json
|
||||
- uses: pnpm/action-setup@v3
|
||||
name: Install pnpm
|
||||
with:
|
||||
version: 8
|
||||
run_install: false
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
-
|
||||
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||
run: src/bin/installDeps.sh
|
||||
|
|
17
.github/workflows/load-test.yml
vendored
17
.github/workflows/load-test.yml
vendored
|
@ -27,6 +27,23 @@ jobs:
|
|||
cache-dependency-path: |
|
||||
src/package-lock.json
|
||||
src/bin/doc/package-lock.json
|
||||
- uses: pnpm/action-setup@v3
|
||||
name: Install pnpm
|
||||
with:
|
||||
version: 8
|
||||
run_install: false
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
-
|
||||
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||
run: src/bin/installDeps.sh
|
||||
|
|
19
.github/workflows/perform-type-check.yml
vendored
19
.github/workflows/perform-type-check.yml
vendored
|
@ -24,10 +24,27 @@ jobs:
|
|||
cache-dependency-path: |
|
||||
src/package-lock.json
|
||||
src/bin/doc/package-lock.json
|
||||
- uses: pnpm/action-setup@v3
|
||||
name: Install pnpm
|
||||
with:
|
||||
version: 8
|
||||
run_install: false
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
-
|
||||
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||
run: ./bin/installDeps.sh
|
||||
working-directory: ./src
|
||||
- name: Perform type check
|
||||
working-directory: ./src
|
||||
run: npm run ts-check
|
||||
run: npm run ts-check
|
||||
|
|
17
.github/workflows/rate-limit.yml
vendored
17
.github/workflows/rate-limit.yml
vendored
|
@ -27,6 +27,23 @@ jobs:
|
|||
cache-dependency-path: |
|
||||
src/package-lock.json
|
||||
src/bin/doc/package-lock.json
|
||||
- uses: pnpm/action-setup@v3
|
||||
name: Install pnpm
|
||||
with:
|
||||
version: 8
|
||||
run_install: false
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
-
|
||||
name: docker network
|
||||
run: docker network create --subnet=172.23.42.0/16 ep_net
|
||||
|
|
|
@ -33,12 +33,29 @@ jobs:
|
|||
cache-dependency-path: |
|
||||
src/package-lock.json
|
||||
src/bin/doc/package-lock.json
|
||||
- uses: pnpm/action-setup@v3
|
||||
name: Install pnpm
|
||||
with:
|
||||
version: 8
|
||||
run_install: false
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
-
|
||||
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
|
||||
pnpm install --no-save --legacy-peer-deps
|
||||
ep_align
|
||||
ep_author_hover
|
||||
ep_cursortrace
|
||||
|
|
40
.github/workflows/windows.yml
vendored
40
.github/workflows/windows.yml
vendored
|
@ -28,13 +28,28 @@ jobs:
|
|||
-
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
node-version: 21
|
||||
cache: 'npm'
|
||||
cache-dependency-path: |
|
||||
src/package-lock.json
|
||||
src/bin/doc/package-lock.json
|
||||
- name: Install npm@6
|
||||
run: npm install npm@6 -g
|
||||
- uses: pnpm/action-setup@v3
|
||||
name: Install pnpm
|
||||
with:
|
||||
version: 8
|
||||
run_install: false
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
-
|
||||
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||
shell: msys2 {0}
|
||||
|
@ -115,8 +130,23 @@ jobs:
|
|||
cache-dependency-path: |
|
||||
etherpad/src/package-lock.json
|
||||
etherpad/src/bin/doc/package-lock.json
|
||||
- name: Install npm@6
|
||||
run: npm install npm@6 -g
|
||||
- uses: pnpm/action-setup@v3
|
||||
name: Install pnpm
|
||||
with:
|
||||
version: 8
|
||||
run_install: false
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
-
|
||||
name: Run Etherpad
|
||||
run: |
|
||||
|
|
|
@ -79,7 +79,7 @@ USER root
|
|||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199
|
||||
RUN \
|
||||
mkdir -p /usr/share/man/man1 && \
|
||||
npm install npm@6 -g && \
|
||||
npm install pnpm -g && \
|
||||
apk update && apk upgrade && \
|
||||
apk add \
|
||||
ca-certificates \
|
||||
|
@ -122,4 +122,4 @@ WORKDIR /opt/etherpad-lite
|
|||
HEALTHCHECK --interval=20s --timeout=3s CMD ["etherpad-healthcheck"]
|
||||
|
||||
EXPOSE 9001
|
||||
CMD ["npm", "run", "prod", "--prefix", "./src"]
|
||||
CMD ["npm", "run", "prod", "--prefix", "./src"]
|
||||
|
|
1
src/.npmrc
Normal file
1
src/.npmrc
Normal file
|
@ -0,0 +1 @@
|
|||
auto-install-peers=false
|
13
src/bin/doc/package-lock.json
generated
13
src/bin/doc/package-lock.json
generated
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"name": "node-doc-generator",
|
||||
"version": "0.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"marked": {
|
||||
"version": "12.0.0",
|
||||
"resolved": "https://registry.npmjs.org/marked/-/marked-12.0.0.tgz",
|
||||
"integrity": "sha512-Vkwtq9rLqXryZnWaQc86+FHLC6tr/fycMfYAhiOIXkrNmeGAyhSxjqu0Rs1i0bBqw5u0S7+lV9fdH2ZSVaoa0w=="
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
|
||||
"name": "node-doc-generator",
|
||||
"description": "Internal tool for generating Node.js API docs",
|
||||
"version": "0.0.0",
|
||||
"engines": {
|
||||
"node": ">=12.17.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"marked": "^12.0.0"
|
||||
},
|
||||
"devDependencies": {},
|
||||
"optionalDependencies": {},
|
||||
"bin": "./generate.js"
|
||||
}
|
|
@ -12,12 +12,12 @@ cd "${MY_DIR}/../.." || exit 1
|
|||
# Not checking io.js, default installation creates a symbolic link to node
|
||||
is_cmd node || fatal "Please install node.js ( https://nodejs.org )"
|
||||
|
||||
# Is npm installed?
|
||||
is_cmd npm || fatal "Please install npm ( https://npmjs.org )"
|
||||
# Is pnpm installed?
|
||||
is_cmd pnpm || fatal "Please install pnpm ( https://pnpmjs.org )"
|
||||
|
||||
# Check npm version
|
||||
require_minimal_version "npm" "$(get_program_version "npm")" \
|
||||
"$REQUIRED_NPM_MAJOR" "$REQUIRED_NPM_MINOR"
|
||||
# Check pnpm version
|
||||
require_minimal_version "pnpm" "$(get_program_version "pnpm")" \
|
||||
"$REQUIRED_pnpm_MAJOR" "$REQUIRED_pnpm_MINOR"
|
||||
|
||||
# Check node version
|
||||
require_minimal_version "nodejs" "$(get_program_version "node")" \
|
||||
|
@ -48,10 +48,10 @@ cd src
|
|||
|
||||
if [ -z "${ETHERPAD_PRODUCTION}" ]; then
|
||||
log "Installing dev dependencies"
|
||||
npm ci --no-optional --omit=optional --include=dev --lockfile-version 1 || exit 1
|
||||
pnpm ci --no-optional --omit=optional --include=dev --lockfile-version 1 || exit 1
|
||||
else
|
||||
log "Installing production dependencies"
|
||||
npm ci --no-optional --omit=optional --omit=dev --lockfile-version 1 --production || exit 1
|
||||
pnpm ci --no-optional --omit=optional --omit=dev --lockfile-version 1 --production || exit 1
|
||||
fi
|
||||
|
||||
# Remove all minified data to force node creating it new
|
||||
|
|
9809
src/package-lock.json
generated
9809
src/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -54,7 +54,6 @@
|
|||
"log4js": "^6.9.1",
|
||||
"measured-core": "^2.0.0",
|
||||
"mime-types": "^2.1.35",
|
||||
"npm": "^6.14.18",
|
||||
"openapi-backend": "^5.10.6",
|
||||
"proxy-addr": "^2.0.7",
|
||||
"rate-limiter-flexible": "^4.0.1",
|
||||
|
|
5418
src/pnpm-lock.yaml
generated
Normal file
5418
src/pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -47,7 +47,7 @@ const migratePluginsFromNodeModules = async () => {
|
|||
// * The `--no-production` flag is required (or the `NODE_ENV` environment variable must be
|
||||
// unset or set to `development`) because otherwise `npm ls` will not mention any packages
|
||||
// that are not included in `package.json` (which is expected to not exist).
|
||||
const cmd = ['npm', 'ls', '--long', '--json', '--depth=0', '--no-production'];
|
||||
const cmd = ['pnpm', 'ls', '--long', '--json', '--depth=0', '--no-production'];
|
||||
const {dependencies = {}} = JSON.parse(await runCmd(cmd, {stdio: [null, 'string']}));
|
||||
await Promise.all(Object.entries(dependencies).map(async ([pkg, info]) => {
|
||||
if (pkg.startsWith(plugins.prefix) && pkg !== 'ep_etherpad-lite') {
|
||||
|
|
|
@ -16,10 +16,10 @@ const logger = log4js.getLogger('plugins');
|
|||
// Log the version of npm at startup.
|
||||
(async () => {
|
||||
try {
|
||||
const version = await runCmd(['npm', '--version'], {stdio: [null, 'string']});
|
||||
logger.info(`npm --version: ${version}`);
|
||||
const version = await runCmd(['pnpm', '--version'], {stdio: [null, 'string']});
|
||||
logger.info(`pnpm --version: ${version}`);
|
||||
} catch (err) {
|
||||
logger.error(`Failed to get npm version: ${err.stack || err}`);
|
||||
logger.error(`Failed to get pnpm version: ${err.stack || err}`);
|
||||
// This isn't a fatal error so don't re-throw.
|
||||
}
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue