Skip to content

Commit 88a8755

Browse files
committed
autofixes from Etherpad checkPlugin.js
1 parent 387672f commit 88a8755

File tree

5 files changed

+192
-193
lines changed

5 files changed

+192
-193
lines changed

.github/workflows/backend-tests.yml

Lines changed: 76 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -14,73 +14,79 @@ jobs:
1414
name: with Plugins
1515
runs-on: ubuntu-latest
1616
steps:
17-
-
18-
name: Install libreoffice
19-
uses: awalsh128/[email protected]
20-
with:
21-
packages: libreoffice libreoffice-pdfimport
22-
version: 1.0
23-
-
24-
name: Install etherpad core
25-
uses: actions/checkout@v3
26-
with:
27-
repository: ether/etherpad-lite
28-
path: etherpad-lite
29-
- uses: pnpm/action-setup@v3
30-
name: Install pnpm
31-
with:
32-
version: 8
33-
run_install: false
34-
- name: Get pnpm store directory
35-
shell: bash
36-
run: |
37-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
38-
- uses: actions/cache@v4
39-
name: Setup pnpm cache
40-
with:
41-
path: ${{ env.STORE_PATH }}
42-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
43-
restore-keys: |
44-
${{ runner.os }}-pnpm-store-
45-
-
46-
name: Checkout plugin repository
47-
uses: actions/checkout@v3
48-
with:
49-
path: plugin
50-
-
51-
name: Determine plugin name
52-
id: plugin_name
53-
working-directory: ./plugin
54-
run: |
55-
npx -c 'printf %s\\n "::set-output name=plugin_name::${npm_package_name}"'
56-
-
57-
name: Link plugin directory
58-
working-directory: ./plugin
59-
run: |
60-
pnpm link --global
61-
- name: Remove tests
62-
working-directory: ./etherpad-lite
63-
run: rm -rf ./src/tests/backend/specs
64-
-
65-
name: Install Etherpad core dependencies
66-
working-directory: ./etherpad-lite
67-
run: bin/installDeps.sh
68-
- name: Link plugin to etherpad-lite
69-
working-directory: ./etherpad-lite
70-
run: |
71-
pnpm link --global $PLUGIN_NAME
72-
pnpm run install-plugins --path ../../plugin
73-
env:
74-
PLUGIN_NAME: ${{ steps.plugin_name.outputs.plugin_name }}
75-
- name: Link ep_etherpad-lite
76-
working-directory: ./etherpad-lite/src
77-
run: |
78-
pnpm link --global
79-
- name: Link etherpad to plugin
80-
working-directory: ./plugin
81-
run: |
82-
pnpm link --global ep_etherpad-lite
83-
-
84-
name: Run the backend tests
85-
working-directory: ./etherpad-lite
86-
run: pnpm run test
17+
-
18+
name: Install libreoffice
19+
uses: awalsh128/[email protected]
20+
with:
21+
packages: libreoffice libreoffice-pdfimport
22+
version: 1.0
23+
-
24+
name: Install etherpad core
25+
uses: actions/checkout@v3
26+
with:
27+
repository: ether/etherpad-lite
28+
path: etherpad-lite
29+
- uses: pnpm/action-setup@v3
30+
name: Install pnpm
31+
with:
32+
version: 8
33+
run_install: false
34+
- name: Get pnpm store directory
35+
shell: bash
36+
run: |
37+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
38+
- uses: actions/cache@v4
39+
name: Setup pnpm cache
40+
with:
41+
path: ${{ env.STORE_PATH }}
42+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
43+
restore-keys: |
44+
${{ runner.os }}-pnpm-store-
45+
-
46+
name: Checkout plugin repository
47+
uses: actions/checkout@v3
48+
with:
49+
path: plugin
50+
-
51+
name: Determine plugin name
52+
id: plugin_name
53+
working-directory: ./plugin
54+
run: |
55+
npx -c 'printf %s\\n "::set-output name=plugin_name::${npm_package_name}"'
56+
-
57+
name: Link plugin directory
58+
working-directory: ./plugin
59+
run: |
60+
pnpm link --global
61+
- name: Remove tests
62+
working-directory: ./etherpad-lite
63+
run: rm -rf ./src/tests/backend/specs
64+
-
65+
name: Install Etherpad core dependencies
66+
working-directory: ./etherpad-lite
67+
run: bin/installDeps.sh
68+
- name: Link plugin to etherpad-lite
69+
working-directory: ./etherpad-lite
70+
run: |
71+
pnpm link --global $PLUGIN_NAME
72+
pnpm run install-plugins --path ../../plugin
73+
env:
74+
PLUGIN_NAME: ${{ steps.plugin_name.outputs.plugin_name }}
75+
- name: Link ep_etherpad-lite
76+
working-directory: ./etherpad-lite/src
77+
run: |
78+
pnpm link --global
79+
- name: Link etherpad to plugin
80+
working-directory: ./plugin
81+
run: |
82+
pnpm link --global ep_etherpad-lite
83+
-
84+
name: Run the backend tests
85+
working-directory: ./etherpad-lite
86+
run: |
87+
res=$(find .. -path "./node_modules/ep_*/static/tests/backend/specs/**" | wc -l)
88+
if [ $res -eq 0 ]; then
89+
echo "No backend tests found"
90+
else
91+
pnpm run test
92+
fi

.github/workflows/npmpublish.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88

99
jobs:
1010
publish-npm:
11-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1211
runs-on: ubuntu-latest
1312
steps:
1413
- uses: actions/setup-node@v4
@@ -68,8 +67,8 @@ jobs:
6867
run: pnpm publish
6968
env:
7069
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
71-
-
72-
name: Add package to etherpad organization
73-
run: pnpm access grant read-write etherpad:developers
74-
env:
75-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
70+
#-
71+
# name: Add package to etherpad organization
72+
# run: pnpm access grant read-write etherpad:developers
73+
# env:
74+
# NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.github/workflows/test-and-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
uses: ./.github/workflows/frontend-tests.yml
1111
secrets: inherit
1212
release:
13-
if: ${{ github.ref == 'refs/heads/master'|| github.ref == 'refs/heads/main' }}
13+
if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' }}
1414
needs:
15-
- backend
16-
- frontend
15+
- backend
16+
- frontend
1717
uses: ./.github/workflows/npmpublish.yml
1818
secrets: inherit

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"deprecated": false,
1212
"description": "Add support for different Fonts",
1313
"engines": {
14-
"node": ">=12.17.0"
14+
"node": ">=18.0.0"
1515
},
1616
"homepage": "https://github.com/ether/ep_subscript_and_superscript#readme",
1717
"license": "Apache-2.0",
@@ -20,14 +20,15 @@
2020
"type": "git",
2121
"url": "git+https://github.com/ether/ep_subscript_and_superscript.git"
2222
},
23-
"version": "0.3.2",
23+
"version": "0.3.3",
2424
"funding": {
2525
"type": "individual",
2626
"url": "https://etherpad.org/"
2727
},
2828
"devDependencies": {
2929
"eslint": "^8.57.0",
30-
"eslint-config-etherpad": "^3.0.22"
30+
"eslint-config-etherpad": "^4.0.4",
31+
"typescript": "^5.4.2"
3132
},
3233
"scripts": {
3334
"lint": "eslint .",

0 commit comments

Comments
 (0)