Merge branch 'main' into fix-lint

This commit is contained in:
Northword 2023-07-13 12:38:08 +08:00 committed by GitHub
commit 79e87f050b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 deletions

View File

@ -56,7 +56,7 @@
"eslint-config-prettier": "^8.8.0", "eslint-config-prettier": "^8.8.0",
"prettier": "^3.0.0", "prettier": "^3.0.0",
"release-it": "^16.1.0", "release-it": "^16.1.0",
"replace-in-file": "^6.3.5", "replace-in-file": "^7.0.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"zotero-types": "^1.0.16" "zotero-types": "^1.0.16"
} }

View File

@ -130,11 +130,11 @@ function replaceString() {
const optionsAddon = { const optionsAddon = {
files: [ files: [
path.join(buildDir, "**/*.xhtml"), `${buildDir}/addon/**/*.xhtml`,
path.join(buildDir, "**/*.json"), `${buildDir}/addon/**/*.json`,
path.join(buildDir, "addon/prefs.js"), `${buildDir}/addon/prefs.js`,
path.join(buildDir, "addon/manifest.json"), `${buildDir}/addon/manifest.json`,
path.join(buildDir, "addon/bootstrap.js"), `${buildDir}/addon/bootstrap.js`,
"update.json", "update.json",
], ],
from: replaceFrom, from: replaceFrom,
@ -148,7 +148,7 @@ function replaceString() {
const localeMessageMiss = new Set(); const localeMessageMiss = new Set();
const replaceResultFlt = replaceInFileSync({ const replaceResultFlt = replaceInFileSync({
files: [path.join(buildDir, "addon/**/*.ftl")], files: [`${buildDir}/addon/locale/**/*.ftl`],
processor: (fltContent) => { processor: (fltContent) => {
const lines = fltContent.split("\n"); const lines = fltContent.split("\n");
const prefixedLines = lines.map((line) => { const prefixedLines = lines.map((line) => {
@ -168,7 +168,7 @@ function replaceString() {
}); });
const replaceResultXhtml = replaceInFileSync({ const replaceResultXhtml = replaceInFileSync({
files: [path.join(buildDir, "addon/**/*.xhtml")], files: [`${buildDir}/addon/**/*.xhtml`],
processor: (input) => { processor: (input) => {
const matchs = [...input.matchAll(/(data-l10n-id)="(\S*)"/g)]; const matchs = [...input.matchAll(/(data-l10n-id)="(\S*)"/g)];
matchs.map((match) => { matchs.map((match) => {

View File

@ -56,7 +56,7 @@ if (existsSync(profilePath)) {
throw new Error("The given Zotero profile does not exist."); throw new Error("The given Zotero profile does not exist.");
} }
const startZotero = `"${zoteroBinPath}" --debugger --purgecaches -profile ${profilePath}`; const startZotero = `"${zoteroBinPath}" --debugger --purgecaches -profile "${profilePath}"`;
execSync(startZotero); execSync(startZotero);
exit(0); exit(0);