zotero-plugin-scaffold 0.0.7 → 0.0.8

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.
@@ -249,7 +249,7 @@ export default class Release extends Base {
249
249
  } | null;
250
250
  }>;
251
251
  uploadUpdateJSON(): Promise<void>;
252
- getChangelog(): Promise<unknown>;
252
+ getChangelog(): Promise<string>;
253
253
  getClient(): Octokit;
254
254
  get owner(): string;
255
255
  get repo(): string;
@@ -65,7 +65,7 @@ export default class Release extends Base {
65
65
  repo: this.repo,
66
66
  tag_name: `v${this.version}`,
67
67
  name: `Release v${this.version}`,
68
- bofy: await this.getChangelog(),
68
+ body: await this.getChangelog(),
69
69
  prerelease: this.version.includes("-"),
70
70
  make_latest: "true",
71
71
  });
@@ -127,12 +127,17 @@ export default class Release extends Base {
127
127
  owner: this.owner,
128
128
  repo: this.repo,
129
129
  tag_name: "release",
130
- name: "Release Manifest",
131
- body: `This release is used to host \`update.json\`, please do not delete or modify it! \n Updated in UTC ${new Date().toISOString()} for version ${this.version}`,
132
- make_latest: "false",
133
130
  }));
134
131
  if (!release)
135
132
  throw new Error("Get or create 'release' failed.");
133
+ await this.client.repos.updateRelease({
134
+ owner: this.owner,
135
+ repo: this.repo,
136
+ release_id: release.id,
137
+ name: "Release Manifest",
138
+ body: `This release is used to host \`update.json\`, please do not delete or modify it! \n Updated in UTC ${new Date().toISOString()} for version ${this.version}`,
139
+ make_latest: "false",
140
+ });
136
141
  const existAssets = await this.client.repos
137
142
  .listReleaseAssets({
138
143
  owner: this.owner,
@@ -163,6 +168,7 @@ export default class Release extends Base {
163
168
  changelog += chunk.toString();
164
169
  })
165
170
  .on("end", () => {
171
+ this.logger.debug("changelog:", changelog);
166
172
  resolve(changelog);
167
173
  })
168
174
  .on("error", (err) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zotero-plugin-scaffold",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "A scaffold for Zotero plugin development.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {