Skip to content

Commit

Permalink
deps: update to wabac.js 2.14.0 (#143)
Browse files Browse the repository at this point in the history
deps: also includes update to wombat 3.4.2, warcio 2.0.1
ci: fix yarn flags, add --ignore-engines to electron build
build: update banner copyright text to use current year
fidelity fixes:  including better location and ESM module rewriting (via wabac.js and wombat)
reduce size of sw.js by ~40k
bump to 1.7.9
  • Loading branch information
ikreymer authored Dec 17, 2022
1 parent bcc0faf commit 7d0866a
Show file tree
Hide file tree
Showing 8 changed files with 127 additions and 203 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/buildapp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '18'

- name: Cache Dirs
uses: actions/cache@v2
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder:14-wine-05.22 \
/bin/bash -c "yarn --link-duplicates --pure-lockfile && yarn install && yarn run $YARN_BUILD_CMD --linux --x64"
/bin/bash -c "yarn --link-duplicates --pure-lockfile --ignore-engines install && yarn run $YARN_BUILD_CMD --linux --x64"
else
#mkdir -p plugins-win;
#pushd plugins-win;
Expand All @@ -87,7 +87,7 @@ jobs:
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder:14-wine-05.22 \
/bin/bash -c "yarn --link-duplicates --pure-lockfile && yarn install && yarn run $YARN_BUILD_CMD --win --x64 --ia32"
/bin/bash -c "yarn --link-duplicates --pure-lockfile --ignore-engines install && yarn run $YARN_BUILD_CMD --win --x64 --ia32"
fi
else
#mkdir -p plugins-mac;
Expand All @@ -96,7 +96,7 @@ jobs:
#unzip PepperFlashPlayer.plugin.zip;
#rm PepperFlashPlayer.plugin.zip;
#popd;
yarn install
yarn --link-duplicates --pure-lockfile --ignore-engines install
yarn run $YARN_BUILD_CMD
fi
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## CHANGES

v1.7.9
- Fidelity: Various fidelity improvements via new wabac.js / wombat
- Dependencies: Update to wabac.js 2.14.0, wombat 3.4.2, warcio 2.0.1

v1.7.8
- Electron App: simplified IPFS loading in app, can connect to default IPFS Desktop or IPFS in Brave automatically
- Electron App: clean up unused code, old ipfs loading paths from app, streamlined file loading
Expand Down
6 changes: 2 additions & 4 deletions _data/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "replaywebpage",
"productName": "ReplayWeb.page",
"version": "1.7.8",
"version": "1.7.9",
"description": "Serverless Web Archive Replay",
"repository": "https://github.com/webrecorder/replayweb.page",
"homepage": "https://replayweb.page/",
"author": "Webrecorder Software",
"license": "AGPL-3.0-or-later",
"dependencies": {
"@fortawesome/fontawesome-free": "^5.15.4",
"@webrecorder/wabac": "^2.13.15",
"@webrecorder/wabac": "^2.14.0",
"bulma": "^0.9.3",
"electron-log": "^4.4.1",
"electron-updater": "^5.3.0",
Expand All @@ -23,7 +23,6 @@
"node-fetch": "^3.3.0",
"pretty-bytes": "^5.6.0",
"process": "^0.11.10",
"querystring-es3": "^0.2.1",
"register-service-worker": "^1.7.2",
"split.js": "^1.6.4",
"stream-browserify": "^3.0.0"
Expand All @@ -42,7 +41,6 @@
"sass-loader": "^12.1.0",
"style-loader": "^3.2.1",
"svg-inline-loader": "^0.8.2",
"url": "^0.11.0",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1",
"webpack-dev-server": "^4.11.1"
Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "replaywebpage",
"productName": "ReplayWeb.page",
"version": "1.7.8",
"version": "1.7.9",
"description": "Serverless Web Archive Replay",
"repository": "https://github.com/webrecorder/replayweb.page",
"homepage": "https://replayweb.page/",
"author": "Webrecorder Software",
"license": "AGPL-3.0-or-later",
"dependencies": {
"@fortawesome/fontawesome-free": "^5.15.4",
"@webrecorder/wabac": "^2.13.15",
"@webrecorder/wabac": "^2.14.0",
"bulma": "^0.9.3",
"electron-log": "^4.4.1",
"electron-updater": "^5.3.0",
Expand All @@ -23,7 +23,6 @@
"node-fetch": "^3.3.0",
"pretty-bytes": "^5.6.0",
"process": "^0.11.10",
"querystring-es3": "^0.2.1",
"register-service-worker": "^1.7.2",
"split.js": "^1.6.4",
"stream-browserify": "^3.0.0"
Expand All @@ -42,7 +41,6 @@
"sass-loader": "^12.1.0",
"style-loader": "^3.2.1",
"svg-inline-loader": "^0.8.2",
"url": "^0.11.0",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1",
"webpack-dev-server": "^4.11.1"
Expand Down
29 changes: 10 additions & 19 deletions sw.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions ui.js

Large diffs are not rendered by default.

41 changes: 13 additions & 28 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,7 @@ const HELPER_PROXY = "https://helper-proxy.webrecorder.workers.dev";
const GDRIVE_CLIENT_ID = "160798412227-tko4c82uopud11q105b2lvbogsj77hlg.apps.googleusercontent.com";

// Copyright banner text
const BANNER_TEXT = "'[name].js is part of ReplayWeb.page (https://replayweb.page) Copyright (C) 2020-2021, Webrecorder Software. Licensed under the Affero General Public License v3.'";

const fallback = {
"stream": require.resolve("stream-browserify"),
"querystring": require.resolve("querystring-es3"),
"url": require.resolve("url/"),
"buffer": false,
"process": false
};
const BANNER_TEXT = `'[name].js is part of ReplayWeb.page (https://replayweb.page) Copyright (C) 2020-${new Date().getFullYear()}, Webrecorder Software. Licensed under the Affero General Public License v3.'`;

const optimization = {
minimize: true,
Expand All @@ -43,14 +35,6 @@ const electronMainConfig = (/*env, argv*/) => {
"electron": "./src/electron-main.js",
},
optimization,
resolve: {
alias: {
"abort-controller": "abort-controller/dist/abort-controller.js",
"dlv": "dlv/dist/dlv.js",
"bignumber.js": "bignumber.js/bignumber.js",
//"multiformats/hashes/sha2": "multiformats/cjs/src/hashes/sha2.js"
}
},
output: {
path: path.join(__dirname, "dist"),
filename: "[name].js",
Expand All @@ -70,13 +54,7 @@ const electronMainConfig = (/*env, argv*/) => {
{ from: "build/extra_prebuilds/", to: "prebuilds" }
],
}),
//new webpack.NormalModuleReplacementPlugin(/\.\/http\/fetch/, "./http/fetch.node"),
//new webpack.NormalModuleReplacementPlugin(/\.\.\/fetch$/, "electron-fetch"),
],
externals: {
"bufferutil": "bufferutil",
"utf-8-validate": "utf-8-validate"
}
};
};

Expand All @@ -88,6 +66,7 @@ const electronPreloadConfig = (/*env, argv*/) => {
entry: {
"preload": "./src/electron-preload.js",
},

optimization,
plugins: [
new webpack.BannerPlugin(BANNER_TEXT),
Expand All @@ -107,7 +86,6 @@ const browserConfig = (/*env, argv*/) => {
},

optimization,
resolve: {fallback},

output: {
path: path.join(__dirname),
Expand All @@ -117,10 +95,6 @@ const browserConfig = (/*env, argv*/) => {
publicPath: "/"
},

externals: {
electron: "electron",
},

devServer: {
compress: true,
port: 9990,
Expand All @@ -130,6 +104,17 @@ const browserConfig = (/*env, argv*/) => {
},

plugins: [
new webpack.NormalModuleReplacementPlugin(
/^node:*/,
(resource) => {
switch (resource.request) {
case "node:stream":
resource.request = "stream-browserify";
break;
}
},
),

new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1,
}),
Expand Down
Loading

0 comments on commit 7d0866a

Please sign in to comment.