ep_webrtc 2.5.56 → 2.5.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/backend-tests.yml +15 -2
- package/.github/workflows/frontend-tests.yml +15 -1
- package/.github/workflows/lint.yml +1 -1
- package/.github/workflows/npmpublish.yml +6 -6
- package/package.json +1 -1
- package/static/css/styles.css +11 -2
- package/static/tests/backend/specs/inlined_font.js +25 -0
- package/static/tests/frontend-new/specs/screenshare.spec.ts +46 -0
|
@@ -11,8 +11,20 @@ jobs:
|
|
|
11
11
|
if: |
|
|
12
12
|
(github.event_name != 'pull_request')
|
|
13
13
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
|
14
|
-
name: with Plugins
|
|
14
|
+
name: with Plugins (Node ${{ matrix.node }} / core ${{ matrix.core_ref || 'develop' }})
|
|
15
15
|
runs-on: ubuntu-latest
|
|
16
|
+
strategy:
|
|
17
|
+
fail-fast: false
|
|
18
|
+
# Plugin floor stays engines.node >=22, but current Etherpad core
|
|
19
|
+
# requires >=24 (engineStrict) and this plugin's tests use features
|
|
20
|
+
# that the last Node 22 core (v2.7.3) lacks, so test Node 24 / 26
|
|
21
|
+
# against current develop only.
|
|
22
|
+
matrix:
|
|
23
|
+
include:
|
|
24
|
+
- node: '24'
|
|
25
|
+
core_ref: ''
|
|
26
|
+
- node: '26'
|
|
27
|
+
core_ref: ''
|
|
16
28
|
steps:
|
|
17
29
|
-
|
|
18
30
|
name: Install libreoffice
|
|
@@ -25,11 +37,12 @@ jobs:
|
|
|
25
37
|
uses: actions/checkout@v7
|
|
26
38
|
with:
|
|
27
39
|
repository: ether/etherpad-lite
|
|
40
|
+
ref: ${{ matrix.core_ref }}
|
|
28
41
|
path: etherpad-lite
|
|
29
42
|
- uses: actions/setup-node@v7
|
|
30
43
|
name: Install Node.js
|
|
31
44
|
with:
|
|
32
|
-
node-version:
|
|
45
|
+
node-version: ${{ matrix.node }}
|
|
33
46
|
- uses: pnpm/action-setup@v6.1.1
|
|
34
47
|
name: Install pnpm
|
|
35
48
|
with:
|
|
@@ -8,6 +8,19 @@ on:
|
|
|
8
8
|
jobs:
|
|
9
9
|
test-frontend:
|
|
10
10
|
runs-on: ubuntu-latest
|
|
11
|
+
name: Playwright (Node ${{ matrix.node }} / core ${{ matrix.core_ref || 'develop' }})
|
|
12
|
+
strategy:
|
|
13
|
+
fail-fast: false
|
|
14
|
+
# Plugin floor stays engines.node >=22, but current Etherpad core
|
|
15
|
+
# requires >=24 (engineStrict) and this plugin's tests use features
|
|
16
|
+
# that the last Node 22 core (v2.7.3) lacks, so test Node 24 / 26
|
|
17
|
+
# against current develop only.
|
|
18
|
+
matrix:
|
|
19
|
+
include:
|
|
20
|
+
- node: '24'
|
|
21
|
+
core_ref: ''
|
|
22
|
+
- node: '26'
|
|
23
|
+
core_ref: ''
|
|
11
24
|
|
|
12
25
|
steps:
|
|
13
26
|
-
|
|
@@ -15,11 +28,12 @@ jobs:
|
|
|
15
28
|
uses: actions/checkout@v7
|
|
16
29
|
with:
|
|
17
30
|
repository: ether/etherpad-lite
|
|
31
|
+
ref: ${{ matrix.core_ref }}
|
|
18
32
|
path: etherpad-lite
|
|
19
33
|
- uses: actions/setup-node@v7
|
|
20
34
|
name: Install Node.js
|
|
21
35
|
with:
|
|
22
|
-
node-version:
|
|
36
|
+
node-version: ${{ matrix.node }}
|
|
23
37
|
- uses: pnpm/action-setup@v6.1.1
|
|
24
38
|
name: Install pnpm
|
|
25
39
|
with:
|
|
@@ -20,12 +20,12 @@ jobs:
|
|
|
20
20
|
steps:
|
|
21
21
|
- uses: actions/setup-node@v7
|
|
22
22
|
with:
|
|
23
|
-
# OIDC trusted publishing needs npm >= 11.5.1. Node
|
|
24
|
-
# line
|
|
25
|
-
#
|
|
26
|
-
#
|
|
27
|
-
#
|
|
28
|
-
node-version:
|
|
23
|
+
# OIDC trusted publishing needs npm >= 11.5.1. Node 26 is the
|
|
24
|
+
# Active LTS line and bundles npm 11.x, so the pinned upgrade below
|
|
25
|
+
# stays on the same npm major. Avoid odd non-LTS lines (Node 25):
|
|
26
|
+
# npm 12 requires ^22.22.2 || ^24.15.0 || >=26.0.0 and the upgrade
|
|
27
|
+
# step dies there with EBADENGINE.
|
|
28
|
+
node-version: 26
|
|
29
29
|
registry-url: https://registry.npmjs.org/
|
|
30
30
|
# Pinned to a range rather than @latest: the next npm major dropping
|
|
31
31
|
# this Node line would silently break publishing fleet-wide again.
|
package/package.json
CHANGED
package/static/css/styles.css
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: "fontawesome-ep_webrtc";
|
|
3
|
-
/* License: ../fonts/fontello/LICENSE.txt
|
|
4
|
-
|
|
3
|
+
/* License: ../fonts/fontello/LICENSE.txt
|
|
4
|
+
*
|
|
5
|
+
* Inlined copy of ../fonts/fontello/font/fontawesome-custom.woff2 (~3 KB).
|
|
6
|
+
* A relative url() here breaks in production: Etherpad's CSS minifier
|
|
7
|
+
* (3.3.12+) rebased it through the plugin_packages/.versions symlink to
|
|
8
|
+
* /static/plugins/.versions/ep_webrtc@x.y.z/..., which 404s, so the
|
|
9
|
+
* screen-share, warning and resize glyphs rendered blank. A data URI has
|
|
10
|
+
* no path to rewrite. Regenerate with:
|
|
11
|
+
* base64 -w0 static/fonts/fontello/font/fontawesome-custom.woff2
|
|
12
|
+
*/
|
|
13
|
+
src: url("data:font/woff2;base64,d09GMgABAAAAAAwgAA8AAAAAGcAAAAvJAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACDKggOCZwMEQgKhkyFXwsMAAE2AiQDFAQgBYZFB3QMgRwbQRgjEcLGARAR2xlFyVADZX+VYJPhdD9UHYqsYQHFYCjnMuS5jzHtJklCmHY/NF8x+IHbEZLMwvNUc/2fW1XdEUwHRhqCSTAPYjISLAMjrsu3WRg8893zxVLU/mdgXoHbTsILaKD3ZCOjkMz0IT88j7rUKQwTkApf/QWS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/IAcq+IqE5VdMVrjoZDp/gAzyd022COMw2cg/N9lLPg/uH0YcL6IR4wFWeQ8mCxlSNVkRKbOkkb9CBvn3JlskyjrZyH9jspcJ+fagMLJU838Zd1tznd/9u+zpeP6ytAi8ERxfmsCnbBHc4Imlp2NV4dOp/Evbt9Dawg5/FneMkiL/kU3enjfwyPFQ6dGjy8/KBjvyDnxrD38ubBOdXptWDnCQUxxmhRC7OYpDDq3k4lCKP28vwWF+k5xDFoWJuv0E2auDHDssdx+kI2gP4LA8ov2EljZpb6+LWCjD+w7pICe4PLKrlygM6dhIHq3RiE0hHPNeghym3nacJgR1kyt0596hhCL8XKxT7ueUQWtCi34wN+l4oEs5KnLZYnkYRnPosH25w8HDtCq0oGSRh+koObpaiin2VULRXwAvT2GJEi1GLLGJCx1eOVj45Hyw8N8pHXxgf3Bvyj//igf3vdQhC78CqXN/aO9S4bMZQdfzBMGImSHPtDd4ZDfQ+zxvjoR1kfvTa3IPY+2D67ha1iEvm9N78AtAWO2OL6ChbT1Dbg5PrQVuTm3CYk7OiufdVAbQNp26nl27yYvui4gJ3FwY24v9y68Tmfe8bMDcW1fzgU9ZizZtbQA=") format("woff2");
|
|
5
14
|
font-weight: normal;
|
|
6
15
|
font-style: normal;
|
|
7
16
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// styles.css inlines fontawesome-custom.woff2 as a data URI (a relative url()
|
|
4
|
+
// broke under Etherpad's production CSS minifier). Keep the inlined copy in
|
|
5
|
+
// sync with the source font so regenerating the icon set can't leave the
|
|
6
|
+
// stylesheet serving a stale glyph set.
|
|
7
|
+
|
|
8
|
+
const assert = require('assert').strict;
|
|
9
|
+
const fsp = require('fs').promises;
|
|
10
|
+
const path = require('path');
|
|
11
|
+
|
|
12
|
+
const root = path.join(__dirname, '../../../..');
|
|
13
|
+
|
|
14
|
+
describe(__filename, function () {
|
|
15
|
+
it('inlined @font-face matches fontawesome-custom.woff2', async function () {
|
|
16
|
+
const css = await fsp.readFile(path.join(root, 'static/css/styles.css'), 'utf8');
|
|
17
|
+
const m = /url\("data:font\/woff2;base64,([A-Za-z0-9+/=]+)"\)/.exec(css);
|
|
18
|
+
assert(m, 'expected an inlined woff2 data URI in static/css/styles.css');
|
|
19
|
+
const font = await fsp.readFile(
|
|
20
|
+
path.join(root, 'static/fonts/fontello/font/fontawesome-custom.woff2'));
|
|
21
|
+
assert(Buffer.from(m[1], 'base64').equals(font),
|
|
22
|
+
'inlined font differs from fontawesome-custom.woff2; regenerate with ' +
|
|
23
|
+
'`base64 -w0 static/fonts/fontello/font/fontawesome-custom.woff2`');
|
|
24
|
+
});
|
|
25
|
+
});
|
|
@@ -103,4 +103,50 @@ test.describe('screen share button', () => {
|
|
|
103
103
|
});
|
|
104
104
|
expect(after).toEqual({videoOff: true, screenshareOff: true});
|
|
105
105
|
});
|
|
106
|
+
|
|
107
|
+
test('renders a visible icon glyph', async ({page}) => {
|
|
108
|
+
// Regression: in production mode Etherpad's CSS minifier rewrote the
|
|
109
|
+
// icon font's relative url() to /static/plugins/.versions/..., which
|
|
110
|
+
// 404s. The button kept its size but its glyph rendered blank.
|
|
111
|
+
const btn = page.locator('#rtcbox .screenshare-btn');
|
|
112
|
+
await expect(btn).toBeVisible();
|
|
113
|
+
const glyph = await btn.evaluate(async (el) => {
|
|
114
|
+
const before = getComputedStyle(el, '::before');
|
|
115
|
+
// Rejects with a NetworkError when the font 404s; the status check below reports it.
|
|
116
|
+
await document.fonts.load(`${before.fontSize} fontawesome-ep_webrtc`, '\uf109')
|
|
117
|
+
.catch(() => {});
|
|
118
|
+
const faces = [...document.fonts].filter((f) => f.family.replace(/"/g, '') === 'fontawesome-ep_webrtc');
|
|
119
|
+
return {
|
|
120
|
+
content: before.content,
|
|
121
|
+
fontFamily: before.fontFamily,
|
|
122
|
+
faceStatuses: faces.map((f) => f.status),
|
|
123
|
+
};
|
|
124
|
+
});
|
|
125
|
+
expect(glyph.content).toBe('"\uf109"');
|
|
126
|
+
expect(glyph.fontFamily).toContain('fontawesome-ep_webrtc');
|
|
127
|
+
expect(glyph.faceStatuses).toContain('loaded');
|
|
128
|
+
expect(glyph.faceStatuses).not.toContain('error');
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
test('icon font does not depend on a rewritable relative URL', async ({page}) => {
|
|
132
|
+
// CI serves CSS unminified, where a relative url() still works, so also
|
|
133
|
+
// pin that the @font-face source is self-contained (a data: URI) and
|
|
134
|
+
// cannot be broken by the host's minifier or a symlinked install path.
|
|
135
|
+
const srcs = await page.evaluate(() => {
|
|
136
|
+
const out: string[] = [];
|
|
137
|
+
for (const sheet of [...document.styleSheets]) {
|
|
138
|
+
let rules: CSSRuleList;
|
|
139
|
+
try { rules = sheet.cssRules; } catch { continue; }
|
|
140
|
+
for (const r of [...rules]) {
|
|
141
|
+
if (r instanceof CSSFontFaceRule &&
|
|
142
|
+
r.style.getPropertyValue('font-family').replace(/"/g, '') === 'fontawesome-ep_webrtc') {
|
|
143
|
+
out.push(r.style.getPropertyValue('src'));
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return out;
|
|
148
|
+
});
|
|
149
|
+
expect(srcs.length).toBeGreaterThan(0);
|
|
150
|
+
for (const src of srcs) expect(src).toMatch(/^url\("data:font\/woff2;base64,/);
|
|
151
|
+
});
|
|
106
152
|
});
|