zotero-plugin-scaffold 0.2.0-beta.8 → 0.2.0-beta.9

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.
@@ -5,7 +5,7 @@ import mime from 'mime';
5
5
  import { Octokit } from 'octokit';
6
6
  import { globSync, glob } from 'tinyglobby';
7
7
  import { isCI } from 'std-env';
8
- import { a as Base } from '../shared/zotero-plugin-scaffold.dc0b582a.mjs';
8
+ import { B as Base } from '../shared/zotero-plugin-scaffold.2ad7a023.mjs';
9
9
  import 'c12';
10
10
  import 'es-toolkit';
11
11
  import 'fs-extra/esm';
package/dist/cli.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import process, { exit, env } from 'node:process';
3
3
  import { Command } from '@commander-js/extra-typings';
4
- import updateNotifier from 'update-notifier';
5
- import { L as Log, C as Config, B as Build, S as Serve, T as Test, R as Release } from './shared/zotero-plugin-scaffold.dc0b582a.mjs';
4
+ import { L as Log, E as ExitSignals, C as Config, a as Build, S as Serve, T as Test, R as Release } from './shared/zotero-plugin-scaffold.2ad7a023.mjs';
5
+ import tinyUpdateNotifier from 'tiny-update-notifier';
6
6
  import 'c12';
7
7
  import 'es-toolkit';
8
8
  import 'fs-extra/esm';
@@ -30,7 +30,7 @@ import 'xvfb-ts';
30
30
 
31
31
  const name = "zotero-plugin-scaffold";
32
32
  const type = "module";
33
- const version = "0.2.0-beta.8";
33
+ const version = "0.2.0-beta.9";
34
34
  const packageManager = "pnpm@9.15.0";
35
35
  const description = "A scaffold for Zotero plugin development.";
36
36
  const author = "northword";
@@ -112,8 +112,8 @@ const dependencies = {
112
112
  mime: "^4.0.4",
113
113
  octokit: "^4.0.2",
114
114
  "std-env": "^3.8.0",
115
+ "tiny-update-notifier": "^2.0.0",
115
116
  tinyglobby: "^0.2.10",
116
- "update-notifier": "^7.3.1",
117
117
  "xvfb-ts": "^1.1.0"
118
118
  };
119
119
  const devDependencies = {
@@ -121,19 +121,11 @@ const devDependencies = {
121
121
  "@types/adm-zip": "^0.5.7",
122
122
  "@types/fs-extra": "^11.0.4",
123
123
  "@types/node": "^22.10.2",
124
- "@types/update-notifier": "^6.0.8",
125
124
  eslint: "^9.16.0",
126
125
  "eslint-plugin-format": "^0.1.3",
127
126
  typescript: "^5.7.2",
128
127
  unbuild: "^2.0.0"
129
128
  };
130
- const pnpm = {
131
- peerDependencyRules: {
132
- allowAny: [
133
- "node-fetch"
134
- ]
135
- }
136
- };
137
129
  const pkg = {
138
130
  name: name,
139
131
  type: type,
@@ -159,16 +151,29 @@ const pkg = {
159
151
  peerDependencies: peerDependencies,
160
152
  peerDependenciesMeta: peerDependenciesMeta,
161
153
  dependencies: dependencies,
162
- devDependencies: devDependencies,
163
- pnpm: pnpm
154
+ devDependencies: devDependencies
164
155
  };
165
156
 
157
+ const logger$1 = new Log();
158
+ function updateNotifier(name, version) {
159
+ tinyUpdateNotifier({ pkg: { name, version } }).then((update) => {
160
+ if (update) {
161
+ const notify = () => {
162
+ logger$1.newLine();
163
+ logger$1.info(`New version of ${update.name} available!`);
164
+ logger$1.info(`Update: ${update.current} \u2192 ${update.latest} (${update.type})`);
165
+ logger$1.newLine();
166
+ };
167
+ ExitSignals.forEach((sig) => process.once(sig, notify));
168
+ }
169
+ }).catch();
170
+ }
171
+
166
172
  const logger = new Log();
167
173
  async function main() {
168
174
  var _a;
169
175
  const { name, version } = pkg;
170
- updateNotifier({ pkg: { name, version } }).notify();
171
- process.removeAllListeners("SIGINT");
176
+ updateNotifier(name, version);
172
177
  (_a = env).NODE_ENV ?? (_a.NODE_ENV = "development");
173
178
  const cli = new Command();
174
179
  cli.version(version).usage("<command> [options]");
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { B as Build, C as Config, R as Release, S as Serve, T as Test, d as defineConfig } from './shared/zotero-plugin-scaffold.dc0b582a.mjs';
1
+ export { a as Build, C as Config, R as Release, S as Serve, T as Test, d as defineConfig } from './shared/zotero-plugin-scaffold.2ad7a023.mjs';
2
2
  import 'node:process';
3
3
  import 'c12';
4
4
  import 'es-toolkit';
@@ -736,6 +736,7 @@ function isRunning(query) {
736
736
  return false;
737
737
  }
738
738
  }
739
+ const ExitSignals = ["exit", "SIGABRT", "SIGALRM", "SIGHUP", "SIGINT", "SIGTERM"];
739
740
 
740
741
  const prefsCommon = {
741
742
  // Allow debug output via dump to be printed to the system console
@@ -2121,4 +2122,4 @@ const Config = {
2121
2122
  loadConfig
2122
2123
  };
2123
2124
 
2124
- export { Build as B, Config as C, Log as L, Release as R, Serve as S, Test as T, Base as a, defineConfig as d };
2125
+ export { Base as B, Config as C, ExitSignals as E, Log as L, Release as R, Serve as S, Test as T, Build as a, defineConfig as d };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zotero-plugin-scaffold",
3
3
  "type": "module",
4
- "version": "0.2.0-beta.8",
4
+ "version": "0.2.0-beta.9",
5
5
  "description": "A scaffold for Zotero plugin development.",
6
6
  "author": "northword",
7
7
  "license": "AGPL-3.0-or-later",
@@ -73,8 +73,8 @@
73
73
  "mime": "^4.0.4",
74
74
  "octokit": "^4.0.2",
75
75
  "std-env": "^3.8.0",
76
+ "tiny-update-notifier": "^2.0.0",
76
77
  "tinyglobby": "^0.2.10",
77
- "update-notifier": "^7.3.1",
78
78
  "xvfb-ts": "^1.1.0"
79
79
  },
80
80
  "devDependencies": {
@@ -82,7 +82,6 @@
82
82
  "@types/adm-zip": "^0.5.7",
83
83
  "@types/fs-extra": "^11.0.4",
84
84
  "@types/node": "^22.10.2",
85
- "@types/update-notifier": "^6.0.8",
86
85
  "eslint": "^9.16.0",
87
86
  "eslint-plugin-format": "^0.1.3",
88
87
  "typescript": "^5.7.2",