@fsvreddit/fsv-devvit-web-helpers 0.1.9 → 0.1.10

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.
@@ -69,12 +69,18 @@ const handleUpgradeNotifier = async (c) => {
69
69
  message.push({ p: "Here's what's new:" });
70
70
  message.push({ ul: update.whatsNewBullets });
71
71
  }
72
+ if (update.generalNotes) {
73
+ for (const line of update.generalNotes.split("\n").filter(line => line.trim() !== "")) {
74
+ message.push({ p: line });
75
+ }
76
+ }
72
77
  message.push({ p: `To install this update, or to disable these notifications, visit the [**${request.data.appFriendlyName ?? "App"} configuration page**](https://developers.reddit.com/r/${server_1.context.subredditName}/apps/${server_1.context.appSlug}) for /r/${server_1.context.subredditName}.` });
73
78
  await server_1.reddit.modMail.createModNotification({
74
79
  subredditId: server_1.context.subredditId,
75
80
  subject: `New update available for ${request.data.appFriendlyName ?? server_1.context.appSlug}: v${update.version}`,
76
81
  bodyMarkdown: (0, json2md_1.default)(message),
77
82
  });
83
+ await server_1.redis.set(redisKey, update.version);
78
84
  return c.json({ message: "upgrade notifier handled" }, 200);
79
85
  };
80
86
  exports.handleUpgradeNotifier = handleUpgradeNotifier;
package/package.json CHANGED
@@ -1,11 +1,9 @@
1
1
  {
2
2
  "name": "@fsvreddit/fsv-devvit-web-helpers",
3
- "version": "0.1.9",
4
- "description": "Helper functions and utilities for Devvit apps on Reddit",
3
+ "version": "0.1.10",
4
+ "description": "Helper functions and utilities for Devvit Web apps on Reddit",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
7
- "test": "npm run test:unit",
8
- "test:unit": "vitest --run",
9
7
  "lint": "eslint . --ext .ts",
10
8
  "build": "tsc --project tsconfig.build.json",
11
9
  "prepare": "npm run build"
@@ -33,8 +31,7 @@
33
31
  "@types/lodash-es": "^4.17.12",
34
32
  "@types/semver": "^7.7.1",
35
33
  "eslint": "^10.0.2",
36
- "typescript": "^5.8.3",
37
- "vitest": "^4.0.15"
34
+ "typescript": "^5.8.3"
38
35
  },
39
36
  "keywords": [
40
37
  "reddit",