zotero: 9.0.6 -> 10.0.0 (#555429)

This commit is contained in:
Peder Bergebakken Sundt
2026-08-24 20:55:36 +00:00
committed by GitHub
4 changed files with 53 additions and 64 deletions

View File

@@ -1,3 +1,17 @@
diff --git a/js-build/document-worker.js b/js-build/document-worker.js
index 52f81d2d83..8899b1644b 100644
--- a/js-build/document-worker.js
+++ b/js-build/document-worker.js
@@ -16,8 +16,7 @@ async function getDocumentWorker(signatures) {
const modulePath = path.join(__dirname, '..', 'document-worker');
const targetDir = path.join(__dirname, '..', 'build', 'resource', 'document-worker');
- const { stdout } = await exec('git rev-parse HEAD', { cwd: modulePath });
- const hash = stdout.trim();
+ const hash = '';
if (!('document-worker' in signatures)
|| signatures['document-worker'].hash !== hash
diff --git a/js-build/note-editor.js b/js-build/note-editor.js
index 1435730342..6eebb10c50 100644
--- a/js-build/note-editor.js
@@ -12,22 +26,8 @@ index 1435730342..6eebb10c50 100644
if (!('note-editor' in signatures) || signatures['note-editor'].hash !== hash) {
const targetDir = path.join(__dirname, '..', 'build', 'resource', 'note-editor');
diff --git a/js-build/pdf-worker.js b/js-build/pdf-worker.js
index b820304f3a..6bbd0708c9 100644
--- a/js-build/pdf-worker.js
+++ b/js-build/pdf-worker.js
@@ -12,8 +12,7 @@ async function getPDFWorker(signatures) {
const modulePath = path.join(__dirname, '..', 'pdf-worker');
- const { stdout } = await exec('git rev-parse HEAD', { cwd: modulePath });
- const hash = stdout.trim();
+ const hash = '';
if (!('pdf-worker' in signatures) || signatures['pdf-worker'].hash !== hash) {
const targetDir = path.join(__dirname, '..', 'build', 'chrome', 'content', 'zotero', 'xpcom', 'pdfWorker');
diff --git a/js-build/reader.js b/js-build/reader.js
index 67a02a3ad2..2127f680df 100644
index 12b5df6a92..4e76039695 100644
--- a/js-build/reader.js
+++ b/js-build/reader.js
@@ -12,8 +12,7 @@ async function getReader(signatures) {

View File

@@ -1,13 +0,0 @@
diff --git a/app/mac/set-channel-prefs-channel b/app/mac/set-channel-prefs-channel
index 2431837584..ab85d7e5c0 100755
--- a/app/mac/set-channel-prefs-channel
+++ b/app/mac/set-channel-prefs-channel
@@ -19,7 +19,7 @@ binary=$1
from_channel=$2
to_channel=$3
# `strings` has a 4-character minimum by default, but we need 3 for 'dev'
-strings_cmd="strings -n 3"
+strings_cmd="strings -n 3 -arch all"
if [ ${#to_channel} -gt 7 ]; then
echo "Channel length cannot exceed 7 characters -- aborting" >&2

View File

@@ -1,3 +1,17 @@
diff --git a/js-build/document-worker.js b/js-build/document-worker.js
index 52f81d2d83..4d3febfcce 100644
--- a/js-build/document-worker.js
+++ b/js-build/document-worker.js
@@ -44,9 +44,6 @@ async function getDocumentWorker(signatures) {
}
}
catch (e) {
- console.error(e);
- await exec('npm ci', { cwd: modulePath });
- await exec('npm run build', { cwd: modulePath });
await fs.copy(path.join(modulePath, 'build'), targetDir);
let missingFiles = await getMissingFiles(targetDir);
if (missingFiles.length) {
diff --git a/js-build/note-editor.js b/js-build/note-editor.js
index 1435730342..bfd552f863 100644
--- a/js-build/note-editor.js
@@ -12,20 +26,6 @@ index 1435730342..bfd552f863 100644
await fs.copy(path.join(modulePath, 'build', 'zotero'), targetDir);
}
signatures['note-editor'] = { hash };
diff --git a/js-build/pdf-worker.js b/js-build/pdf-worker.js
index b820304f3a..aafb6b1ef5 100644
--- a/js-build/pdf-worker.js
+++ b/js-build/pdf-worker.js
@@ -33,9 +33,6 @@ async function getPDFWorker(signatures) {
);
}
catch (e) {
- console.error(e);
- await exec('npm ci', { cwd: modulePath });
- await exec('npm run build', { cwd: modulePath });
await fs.copy(path.join(modulePath, 'build', 'worker.js'), path.join(targetDir, 'worker.js'));
}
signatures['pdf-worker'] = { hash };
diff --git a/js-build/reader.js b/js-build/reader.js
index 12b5df6a92..20c3f20a57 100644
--- a/js-build/reader.js

View File

@@ -12,6 +12,9 @@
xz,
gawk,
rsync,
pkg-config,
pango,
giflib,
firefox-esr-140-unwrapped,
makeDesktopItem,
copyDesktopItems,
@@ -30,25 +33,25 @@ let
nodejs = nodejs_22;
pname = "zotero";
version = "9.0.6";
version = "10.0.0";
src = fetchFromGitHub {
owner = "zotero";
repo = "zotero";
tag = version;
fetchSubmodules = true;
hash = "sha256-9Rku6iF7Sczqekw8ms8hluIc+B/5BE9zHlBqp7vGlY4=";
hash = "sha256-lNeujToTGzOTG7aKycoZfnyZawM9EQFWSdRJ4/KEPqQ=";
};
pdf-js = buildNpmPackage {
pname = "zotero-pdf-js";
inherit version nodejs;
src = "${src}/pdf-worker/pdf.js";
npmDepsHash = "sha256-KeYAY6EWBZVd3QucDEDtI6lwtTahCEFBFf2Ebib9HKg=";
src = "${src}/reader/pdfjs/pdf.js";
npmDepsHash = "sha256-xq0RhCruM22mFC3zkHpn4hX8YdO32Sn42fbSC0cQXFw=";
buildPhase = ''
runHook preBuild
npm exec gulp lib-legacy
npm exec gulp generic
npm exec gulp generic-legacy
npm exec gulp minified-legacy
@@ -91,7 +94,7 @@ let
pname = "zotero-pdf-reader";
inherit version nodejs;
src = "${src}/reader";
npmDepsHash = "sha256-8marAeBAW5cKDaJT3xbVsXyVfGa5ehZYUYijDzFng38=";
npmDepsHash = "sha256-/Szv0BWy9zHLrusRxo8XRtfyFmq/rS4GG1iO7NkV2BQ=";
patches = [
./pdf-reader-locales.patch
./pdf-reader-build-fix.patch
@@ -119,18 +122,19 @@ let
'';
};
pdf-worker = buildNpmPackage {
pname = "zotero-pdf-worker";
document-worker = buildNpmPackage {
pname = "zotero-document-worker";
inherit version nodejs;
src = "${src}/pdf-worker";
npmDepsHash = "sha256-TGuN1fZOClzm6xD2rmn5BAemN4mbyOVaLbSRyMeDIm8=";
src = "${src}/document-worker";
npmDepsHash = "sha256-dUGZ0RsmW+cAXPi78W9eX7kQnTiCVc8K9lPPtw8Cif0=";
nativeBuildInputs = [
rsync
pkg-config
];
buildInputs = [
pango
giflib
];
postPatch = ''
rm -rf pdf.js
cp -r ${pdf-js} pdf.js
'';
installPhase = ''
runHook preInstall
@@ -196,7 +200,6 @@ buildNpmPackage (finalAttrs: {
./js-build-fixes.patch
./avoid-xulrunner-fetch.patch
./build-fixes.patch
./fix-x86_64-darwin.patch
];
postPatch = ''
@@ -204,9 +207,9 @@ buildNpmPackage (finalAttrs: {
cp -r ${pdf-reader} reader
chmod -R u+w reader
rm -rf pdf-worker
cp -r ${pdf-worker} pdf-worker
chmod -R u+w pdf-worker
rm -rf document-worker
cp -r ${document-worker} document-worker
chmod -R u+w document-worker
rm -rf note-editor
cp -r ${note-editor} note-editor
@@ -215,15 +218,14 @@ buildNpmPackage (finalAttrs: {
patchShebangs --build app/ test/
# Skip some flaky/failing tests
rm test/tests/retractionsTest.js
rm test/tests/retractionsTest.js test/tests/debugTest.js
for test in \
"should use BrowserRequest for 403 when enforcing file type" \
"should use BrowserRequest for a JS redirect page" \
"should throw error on broken symlink" \
"should switch dialog from add note to add/edit citation" \
"should vacuum the database with force option" \
"should mark every selected collection as current for a multiple-collection selection" \
; do
sed -i "s|it(\"$test|it.skip(\"$test|" test/tests/*.js
sed -i -E "s|it(\([\"']$test.*[\"'])|it.skip\1|" test/tests/*.js
done
'';