zotero-plugin-scaffold 0.0.13 → 0.0.14

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/dist/cli.mjs CHANGED
@@ -23,14 +23,14 @@ import 'chokidar';
23
23
  import 'process';
24
24
 
25
25
  const name = "zotero-plugin-scaffold";
26
- const version = "0.0.13";
26
+ const version = "0.0.14";
27
27
  const description = "A scaffold for Zotero plugin development.";
28
28
  const scripts = {
29
29
  dev: "unbuild --stub",
30
30
  build: "tsc --noEmit && unbuild",
31
31
  lint: "eslint --max-warnings=0 . && prettier --check .",
32
32
  "lint:fix": "eslint --fix . && prettier --write .",
33
- release: "release-it --only-version --preReleaseId=beta",
33
+ release: "bumpp --commit \"chore(release): publish v%s\"",
34
34
  test: "echo \"Error: no test specified\" && exit 1"
35
35
  };
36
36
  const type = "module";
@@ -110,7 +110,6 @@ const devDependencies = {
110
110
  eslint: "8.57.0",
111
111
  "eslint-config-prettier": "9.1.0",
112
112
  prettier: "3.2.5",
113
- "release-it": "17.1.1",
114
113
  typescript: "5.4.3",
115
114
  unbuild: "2.0.0"
116
115
  };
@@ -145,19 +144,7 @@ const pkg = {
145
144
  packageManager: packageManager,
146
145
  dependencies: dependencies,
147
146
  devDependencies: devDependencies,
148
- pnpm: pnpm,
149
- "release-it": {
150
- git: {
151
- commitMessage: "chore(publish): release v${version}",
152
- tagName: "v${version}"
153
- },
154
- npm: {
155
- publish: false
156
- },
157
- github: {
158
- release: false
159
- }
160
- }
147
+ pnpm: pnpm
161
148
  };
162
149
 
163
150
  async function main() {
package/dist/index.d.mts CHANGED
@@ -341,6 +341,7 @@ interface UserConfig extends RecursivePartial<Config$1> {
341
341
  }
342
342
  interface Context extends Config$1 {
343
343
  pkgUser: any;
344
+ xpiName: string;
344
345
  version: string;
345
346
  hooks: Hookable<Hooks>;
346
347
  templateDate: {
@@ -375,7 +376,7 @@ declare abstract class Base {
375
376
  get namespace(): string;
376
377
  get updateLink(): string;
377
378
  get updateURL(): string;
378
- get xpiName(): unknown;
379
+ get xpiName(): string;
379
380
  }
380
381
 
381
382
  declare class Build extends Base {
package/dist/index.d.ts CHANGED
@@ -341,6 +341,7 @@ interface UserConfig extends RecursivePartial<Config$1> {
341
341
  }
342
342
  interface Context extends Config$1 {
343
343
  pkgUser: any;
344
+ xpiName: string;
344
345
  version: string;
345
346
  hooks: Hookable<Hooks>;
346
347
  templateDate: {
@@ -375,7 +376,7 @@ declare abstract class Base {
375
376
  get namespace(): string;
376
377
  get updateLink(): string;
377
378
  get updateURL(): string;
378
- get xpiName(): unknown;
379
+ get xpiName(): string;
379
380
  }
380
381
 
381
382
  declare class Build extends Base {
package/dist/index.mjs CHANGED
@@ -71,6 +71,7 @@ function resolveConfig(config) {
71
71
  const ctx = {
72
72
  ...config,
73
73
  pkgUser: pkg,
74
+ xpiName: dash(config.name),
74
75
  version: pkg.version,
75
76
  hooks: createHooks(),
76
77
  templateDate: data
@@ -212,7 +213,7 @@ class Base {
212
213
  return this.ctx.updateURL;
213
214
  }
214
215
  get xpiName() {
215
- return this.ctx.build.define.xpiName;
216
+ return this.ctx.xpiName;
216
217
  }
217
218
  }
218
219
 
@@ -399,7 +400,7 @@ class Build extends Base {
399
400
  `${this.dist}/addon/manifest.json`
400
401
  ), min = manifest.applications?.zotero?.strict_min_version, max = manifest.applications?.zotero?.strict_max_version;
401
402
  const updateHash = generateHashSync(
402
- path.join(this.dist, `${this.ctx.templateDate.xpiName}.xpi`),
403
+ path.join(this.dist, `${this.xpiName}.xpi`),
403
404
  "sha512"
404
405
  );
405
406
  const data = {
@@ -434,7 +435,7 @@ class Build extends Base {
434
435
  await webext.cmd.build({
435
436
  sourceDir: `${this.dist}/addon`,
436
437
  artifactsDir: this.dist,
437
- filename: `${this.ctx.templateDate.xpiName}.xpi`,
438
+ filename: `${this.xpiName}.xpi`,
438
439
  overwriteDest: true
439
440
  });
440
441
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zotero-plugin-scaffold",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "description": "A scaffold for Zotero plugin development.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -79,28 +79,15 @@
79
79
  "eslint": "8.57.0",
80
80
  "eslint-config-prettier": "9.1.0",
81
81
  "prettier": "3.2.5",
82
- "release-it": "17.1.1",
83
82
  "typescript": "5.4.3",
84
83
  "unbuild": "2.0.0"
85
84
  },
86
- "release-it": {
87
- "git": {
88
- "commitMessage": "chore(publish): release v${version}",
89
- "tagName": "v${version}"
90
- },
91
- "npm": {
92
- "publish": false
93
- },
94
- "github": {
95
- "release": false
96
- }
97
- },
98
85
  "scripts": {
99
86
  "dev": "unbuild --stub",
100
87
  "build": "tsc --noEmit && unbuild",
101
88
  "lint": "eslint --max-warnings=0 . && prettier --check .",
102
89
  "lint:fix": "eslint --fix . && prettier --write .",
103
- "release": "release-it --only-version --preReleaseId=beta",
90
+ "release": "bumpp --commit \"chore(release): publish v%s\"",
104
91
  "test": "echo \"Error: no test specified\" && exit 1"
105
92
  }
106
93
  }