zotero-plugin 2.0.13 → 2.0.15

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/bin/release.js CHANGED
@@ -63,7 +63,7 @@ async function announce(issue_number, release) {
63
63
  const link = `[${build}](https://github.com/${owner}/${repo}/releases/download/${release.data.tag_name}/${pkg.name}-${version_1.default}.xpi)`;
64
64
  if (!continuous_integration_1.ContinuousIntegration.tag) {
65
65
  reason = ` (${JSON.stringify(continuous_integration_1.ContinuousIntegration.commit_message)})`;
66
- reason += `\n\nInstall in Zotero by downloading ${link}, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".`;
66
+ reason += `\n\nThis update may name other issues, but the build just dropped here is for you; it just means problems already fixed in other issues have been folded into the work we are doing here. Install in Zotero by downloading ${link}, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".`;
67
67
  }
68
68
  const body = `:robot: this is your friendly neighborhood build bot announcing ${link}${reason}`;
69
69
  report(body);
package/debug-log.js CHANGED
@@ -3,8 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.DebugLog = void 0;
5
5
  const tslib_1 = require("tslib");
6
- const tar_js_1 = tslib_1.__importDefault(require("tar-js"));
7
- const pako_1 = require("pako");
6
+ const UZip = tslib_1.__importStar(require("uzip"));
8
7
  class DebugLogSender {
9
8
  constructor() {
10
9
  this.id = {
@@ -77,20 +76,23 @@ class DebugLogSender {
77
76
  }
78
77
  async sendAsync(plugin, preferences) {
79
78
  await Zotero.Schema.schemaUpdatePromise;
80
- const tape = new tar_js_1.default;
79
+ const files = {};
80
+ const enc = new TextEncoder();
81
81
  const key = Zotero.Utilities.generateObjectKey();
82
82
  const log = [
83
83
  await this.info(preferences),
84
84
  Zotero.getErrors(true).join('\n\n'),
85
85
  Zotero.Debug.getConsoleViewerOutput().slice(-250000).join('\n'), // eslint-disable-line no-magic-numbers
86
86
  ].filter((txt) => txt).join('\n\n').trim();
87
- let out = tape.append(`${key}/debug.txt`, log);
87
+ files[`${key}/debug.txt`] = enc.encode(log);
88
88
  const rdf = await this.rdf();
89
89
  if (rdf)
90
- out = tape.append(`${key}/items.rdf`, rdf);
91
- const blob = new Blob([(0, pako_1.gzip)(out)], { type: 'application/zip' });
90
+ files[`${key}/items.rdf`] = enc.encode(rdf);
91
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
92
+ const zip = new Uint8Array(UZip.encode(files));
93
+ const blob = new Blob([zip], { type: 'application/zip' });
92
94
  const formData = new FormData();
93
- formData.append('file', blob, `${key}.tgz`);
95
+ formData.append('file', blob, `${key}.zip`);
94
96
  const response = await this.post('https://file.io', formData);
95
97
  this.alert(`Debug log ID for ${plugin}`, `${key}-fio-${response.key}`);
96
98
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zotero-plugin",
3
- "version": "2.0.13",
3
+ "version": "2.0.15",
4
4
  "description": "Zotero plugin builder",
5
5
  "homepage": "https://github.com/retorquere/zotero-plugin/wiki",
6
6
  "bin": {
@@ -27,42 +27,39 @@
27
27
  "test": "test"
28
28
  },
29
29
  "dependencies": {
30
- "@octokit/rest": "^20.0.2",
30
+ "@octokit/rest": "^20.1.1",
31
31
  "@rgrove/parse-xml": "^4.1.0",
32
- "@types/node": "^20.10.6",
33
- "@types/pako": "^2.0.3",
34
- "@types/tar-js": "^0.3.5",
35
- "@typescript-eslint/eslint-plugin": "^6.16.0",
36
- "@typescript-eslint/parser": "^6.16.0",
32
+ "@types/node": "^20.12.12",
33
+ "@typescript-eslint/eslint-plugin": "^7.9.0",
34
+ "@typescript-eslint/parser": "^7.9.0",
37
35
  "@xmldom/xmldom": "^0.8.10",
38
- "ajv": "^8.12.0",
36
+ "ajv": "^8.13.0",
39
37
  "ajv-keywords": "^5.1.0",
40
- "archiver": "^6.0.1",
38
+ "archiver": "^7.0.1",
41
39
  "clp": "^4.0.12",
42
40
  "current-git-branch": "^1.1.0",
43
- "dotenv": "^16.3.1",
44
- "ejs": "^3.1.9",
41
+ "dotenv": "^16.4.5",
42
+ "ejs": "^3.1.10",
45
43
  "eslint": "^8.56.0",
46
44
  "eslint-plugin-import": "^2.29.1",
47
45
  "eslint-plugin-prefer-arrow": "^1.2.3",
48
46
  "fs-extra": "^11.2.0",
49
- "glob": "^10.3.10",
47
+ "glob": "^10.3.15",
50
48
  "jsesc": "^3.0.2",
51
49
  "lodash": "^4.17.21",
52
50
  "moment": "^2.30.1",
53
- "pako": "^2.1.0",
54
- "peggy": "^3.0.2",
51
+ "peggy": "^4.0.2",
55
52
  "properties-reader": "^2.3.0",
56
53
  "pug": "^3.0.2",
57
- "rimraf": "^5.0.5",
54
+ "rimraf": "^5.0.7",
58
55
  "shell-quote": "^1.8.1",
59
56
  "shelljs": "^0.8.5",
60
57
  "string-to-arraybuffer": "^1.0.2",
61
- "tar-js": "^0.3.0",
62
58
  "ts-node": "^10.9.2",
63
59
  "tslib": "^2.6.2",
64
- "typescript": "^5.3.3",
60
+ "typescript": "^5.4.5",
65
61
  "uri-templates": "^0.2.0",
62
+ "uzip": "^0.20201231.0",
66
63
  "xml-parser": "^1.2.1",
67
64
  "xpath": "^0.0.34"
68
65
  },