Skip to content

Commit 2bca66e

Browse files
authored
2.3.14 release (#437)
- update to wabac.js 2.23.4 to make hashing optional, not require wasm - add tests with CSP policy in place
1 parent 05d117f commit 2bca66e

File tree

6 files changed

+268
-131
lines changed

6 files changed

+268
-131
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22

33
## CHANGES
44

5+
v2.3.14
6+
- Loading: Make hash check optional, don't requires wasm to load (via wabac.js 2.23.4)
7+
58
v2.3.13
69
- Loading: Fix regression in loading s3:// URLs
710
- Rewrite: Fix rewrite of HLS when only available bandwidth exceeds max (via wabac.js 2.23.3)
11+
- Loading: Fix for AppImage
812

913
v2.3.12
1014

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"dependencies": {
2323
"@fortawesome/fontawesome-free": "^5.15.4",
2424
"@shoelace-style/shoelace": "~2.15.1",
25-
"@webrecorder/wabac": "^2.23.3",
25+
"@webrecorder/wabac": "^2.23.4",
2626
"bulma": "^0.9.3",
2727
"electron-log": "^4.4.1",
2828
"electron-updater": "^6.6.2",
@@ -60,7 +60,6 @@
6060
"eslint-config-prettier": "^9.1.0",
6161
"eslint-plugin-lit": "^1.11.0",
6262
"eslint-plugin-wc": "^2.0.4",
63-
"http-server": "^13.0.2",
6463
"husky": "^8.0.0",
6564
"lint-staged": "^14.0.0",
6665
"mini-css-extract-plugin": "^2.3.0",
@@ -69,6 +68,7 @@
6968
"raw-loader": "^4.0.2",
7069
"sass-embedded": "^1.70.0",
7170
"sass-loader": "^13.3.2",
71+
"serve": "^14.2.4",
7272
"style-loader": "^3.2.1",
7373
"ts-lit-plugin": "^2.0.0-pre.1",
7474
"ts-loader": "^9.4.4",
@@ -94,13 +94,14 @@
9494
"build": "webpack --mode production && ./adblock/fetch-adblock.sh",
9595
"build-dev": "webpack --mode development",
9696
"build-docs": "yarn run build && cd mkdocs && ./copy-site.sh && mkdocs build",
97-
"start-prod": "http-server -p 9990 --cors",
98-
"start-docs-prod": "yarn run build-docs && cd mkdocs/_genhtml && http-server -p 9990 --cors",
97+
"start-prod": "serve -l 9990 --cors",
98+
"start-docs-prod": "yarn run build-docs && cd mkdocs/_genhtml && serve -l 9990 --cors",
9999
"start-dev": "webpack serve --mode development",
100100
"start-docs": "yarn run build-dev && cd mkdocs && ./copy-site.sh && mkdocs serve",
101101
"start-electron": "NODE_ENV=development electron ./dist/electron.js $1",
102-
"test-start-embed": "cp tests/embed/iframe-test.html mkdocs/_genhtml/; cd tests/embed; http-server -p 8020",
103-
"test-start-sandbox": "cd tests/embed/sandbox; http-server -p 8030",
102+
"test-start-prod": "yarn run build-docs; cp tests/embed/test-serve.json mkdocs/_genhtml/serve.json; cd mkdocs/_genhtml; serve -l 9990 --cors",
103+
"test-start-embed": "cp tests/embed/iframe-test.html mkdocs/_genhtml/; cd tests/embed; serve -l 8020",
104+
"test-start-sandbox": "cd tests/embed/sandbox; serve -l 8030",
104105
"update-ruffle": "./ruffle/download-latest-ruffle.sh",
105106
"pack": "CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --publish never",
106107
"pack-signed": "electron-builder",

playwright.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default defineConfig({
1919
],
2020
webServer: [
2121
{
22-
command: "yarn run start-docs-prod",
22+
command: "yarn run test-start-prod",
2323
url: "http://127.0.0.1:9990",
2424
timeout: 120 * 1000,
2525
reuseExistingServer: !process.env.CI,

tests/embed/test-serve.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"cleanUrls": false,
3+
"headers": [{
4+
"source": "*",
5+
"headers": [{
6+
"key": "Content-Security-Policy",
7+
"value": "default-src 'self' 'unsafe-inline' data: blob:"
8+
}]
9+
}]
10+
}

tests/embeds.spec.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import { test, expect } from "@playwright/test";
22

33
test("same-domain embed is loading", async ({ page }) => {
4+
page.on("response", async (response) => {
5+
if (response.url() === "http://localhost:9990/embed.html") {
6+
expect(await response.headerValue("Content-Security-Policy")).toBe("default-src 'self' 'unsafe-inline' data: blob:");
7+
}
8+
});
9+
410
await page.goto("http://localhost:9990/embed.html");
511

612
const res = page
@@ -15,7 +21,7 @@ test("same-domain embed is loading", async ({ page }) => {
1521
});
1622

1723
test("docs page embed is loading", async ({ page }) => {
18-
await page.goto("http://localhost:9990/docs/embedding/");
24+
await page.goto("http://localhost:9990/docs/embedding/index.html");
1925

2026
const res = page
2127
.locator("replay-web-page")

0 commit comments

Comments
 (0)