zotero-plugin 2.0.15 → 2.0.17

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/.eslintrc.js CHANGED
@@ -274,6 +274,7 @@ module.exports = {
274
274
  ],
275
275
  "use-isnan": "error",
276
276
  "valid-typeof": "off",
277
- "yoda": "error"
277
+ "yoda": "error",
278
+ "@typescript-eslint/prefer-regexp-exec": "off"
278
279
  }
279
280
  };
package/.ncurc.js ADDED
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ reject: ['eslint']
3
+ }
package/debug-log.js CHANGED
@@ -61,8 +61,12 @@ class DebugLogSender {
61
61
  (_b = doc.querySelector('#debug-log-sender-menu')) === null || _b === void 0 ? void 0 : _b.remove();
62
62
  }
63
63
  alert(title, body) {
64
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
65
- const ps = Components.classes['@mozilla.org/embedcomp/prompt-service;1'].getService(Components.interfaces.nsIPromptService);
64
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
65
+ const ps = Zotero.platformMajorVersion >= 102
66
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
67
+ ? Services.prompt
68
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
69
+ : Components.classes['@mozilla.org/embedcomp/prompt-service;1'].getService(Components.interfaces.nsIPromptService);
66
70
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
67
71
  ps.alert(null, title, body);
68
72
  }
@@ -91,7 +95,8 @@ class DebugLogSender {
91
95
  // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
92
96
  const zip = new Uint8Array(UZip.encode(files));
93
97
  const blob = new Blob([zip], { type: 'application/zip' });
94
- const formData = new FormData();
98
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
99
+ const formData = (new (Zotero.getMainWindow().FormData));
95
100
  formData.append('file', blob, `${key}.zip`);
96
101
  const response = await this.post('https://file.io', formData);
97
102
  this.alert(`Debug log ID for ${plugin}`, `${key}-fio-${response.key}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zotero-plugin",
3
- "version": "2.0.15",
3
+ "version": "2.0.17",
4
4
  "description": "Zotero plugin builder",
5
5
  "homepage": "https://github.com/retorquere/zotero-plugin/wiki",
6
6
  "bin": {
@@ -21,7 +21,7 @@
21
21
  "build": "tsc && chmod +x bin/*.js",
22
22
  "pack": "npm test && npm pack",
23
23
  "prepublishOnly": "npm install && npm run build",
24
- "ncu": "ncu -u && npm i && git add package.json package-lock.json && git commit -m ncu"
24
+ "ncu": "ncu -u -x '*eslint*' && npm i && git add package.json package-lock.json && git commit -m ncu"
25
25
  },
26
26
  "directories": {
27
27
  "test": "test"
@@ -29,11 +29,11 @@
29
29
  "dependencies": {
30
30
  "@octokit/rest": "^20.1.1",
31
31
  "@rgrove/parse-xml": "^4.1.0",
32
- "@types/node": "^20.12.12",
33
- "@typescript-eslint/eslint-plugin": "^7.9.0",
34
- "@typescript-eslint/parser": "^7.9.0",
32
+ "@types/node": "^20.14.2",
33
+ "@typescript-eslint/eslint-plugin": "^7.12.0",
34
+ "@typescript-eslint/parser": "^7.12.0",
35
35
  "@xmldom/xmldom": "^0.8.10",
36
- "ajv": "^8.13.0",
36
+ "ajv": "^8.16.0",
37
37
  "ajv-keywords": "^5.1.0",
38
38
  "archiver": "^7.0.1",
39
39
  "clp": "^4.0.12",
@@ -44,19 +44,19 @@
44
44
  "eslint-plugin-import": "^2.29.1",
45
45
  "eslint-plugin-prefer-arrow": "^1.2.3",
46
46
  "fs-extra": "^11.2.0",
47
- "glob": "^10.3.15",
47
+ "glob": "^10.4.1",
48
48
  "jsesc": "^3.0.2",
49
49
  "lodash": "^4.17.21",
50
50
  "moment": "^2.30.1",
51
51
  "peggy": "^4.0.2",
52
52
  "properties-reader": "^2.3.0",
53
- "pug": "^3.0.2",
53
+ "pug": "^3.0.3",
54
54
  "rimraf": "^5.0.7",
55
55
  "shell-quote": "^1.8.1",
56
56
  "shelljs": "^0.8.5",
57
57
  "string-to-arraybuffer": "^1.0.2",
58
58
  "ts-node": "^10.9.2",
59
- "tslib": "^2.6.2",
59
+ "tslib": "^2.6.3",
60
60
  "typescript": "^5.4.5",
61
61
  "uri-templates": "^0.2.0",
62
62
  "uzip": "^0.20201231.0",
@@ -99,6 +99,7 @@
99
99
  "root.d.ts",
100
100
  "root.js",
101
101
  ".eslintrc.js",
102
+ ".ncurc.js",
102
103
  "update.rdf.pug",
103
104
  "version.d.ts",
104
105
  "version.js",