ep_email_notifications 11.0.28 → 11.0.30

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.
@@ -16,7 +16,7 @@ jobs:
16
16
  steps:
17
17
  -
18
18
  name: Install libreoffice
19
- uses: awalsh128/cache-apt-pkgs-action@v1.6.1
19
+ uses: awalsh128/cache-apt-pkgs-action@v1.6.3
20
20
  with:
21
21
  packages: libreoffice libreoffice-pdfimport
22
22
  version: 1.0
@@ -26,11 +26,11 @@ jobs:
26
26
  with:
27
27
  repository: ether/etherpad-lite
28
28
  path: etherpad-lite
29
- - uses: actions/setup-node@v6
29
+ - uses: actions/setup-node@v7
30
30
  name: Install Node.js
31
31
  with:
32
32
  node-version: 25
33
- - uses: pnpm/action-setup@v6
33
+ - uses: pnpm/action-setup@v6.1.0
34
34
  name: Install pnpm
35
35
  with:
36
36
  package_json_file: ./etherpad-lite/package.json
@@ -16,11 +16,11 @@ jobs:
16
16
  with:
17
17
  repository: ether/etherpad-lite
18
18
  path: etherpad-lite
19
- - uses: actions/setup-node@v6
19
+ - uses: actions/setup-node@v7
20
20
  name: Install Node.js
21
21
  with:
22
22
  node-version: 25
23
- - uses: pnpm/action-setup@v6
23
+ - uses: pnpm/action-setup@v6.1.0
24
24
  name: Install pnpm
25
25
  with:
26
26
  package_json_file: ./etherpad-lite/package.json
@@ -0,0 +1,39 @@
1
+ name: Lint
2
+
3
+ on:
4
+ workflow_call:
5
+
6
+ jobs:
7
+ lint:
8
+ name: ESLint
9
+ runs-on: ubuntu-latest
10
+ # `eslint .` executes .eslintrc.cjs and every installed ESLint plugin, so
11
+ # don't hand it the caller's contents:write / id-token:write token.
12
+ permissions:
13
+ contents: read
14
+ steps:
15
+ - name: Check out plugin repository
16
+ uses: actions/checkout@v7
17
+ - uses: actions/setup-node@v7
18
+ name: Install Node.js
19
+ with:
20
+ node-version: 25
21
+ - uses: pnpm/action-setup@v6.1.0
22
+ name: Install pnpm
23
+ with:
24
+ version: 10
25
+ run_install: false
26
+ - name: Get pnpm store directory
27
+ shell: bash
28
+ run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
29
+ - uses: actions/cache@v6
30
+ name: Setup pnpm cache
31
+ with:
32
+ path: ${{ env.STORE_PATH }}
33
+ key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
34
+ restore-keys: |
35
+ ${{ runner.os }}-pnpm-store-
36
+ - name: Install dependencies
37
+ run: pnpm install --ignore-scripts
38
+ - name: Run ESLint
39
+ run: pnpm run lint
@@ -18,20 +18,24 @@ jobs:
18
18
  contents: write # for the atomic version-bump push (branch + tag)
19
19
  id-token: write # for npm OIDC trusted publishing
20
20
  steps:
21
- - uses: actions/setup-node@v6
21
+ - uses: actions/setup-node@v7
22
22
  with:
23
- # OIDC trusted publishing needs npm >= 11.5.1, which requires
24
- # Node >= 20.17.0. setup-node's `20` resolves to the latest
25
- # 20.x, which satisfies that.
26
- node-version: 25
23
+ # OIDC trusted publishing needs npm >= 11.5.1. Node 24 is an LTS
24
+ # line that every npm 11.x and 12.x supports; Node 25 is not —
25
+ # npm 12 requires ^22.22.2 || ^24.15.0 || >=26.0.0, so on Node 25
26
+ # the upgrade step below died with EBADENGINE and no plugin could
27
+ # publish.
28
+ node-version: 24
27
29
  registry-url: https://registry.npmjs.org/
30
+ # Pinned to a range rather than @latest: the next npm major dropping
31
+ # this Node line would silently break publishing fleet-wide again.
28
32
  - name: Upgrade npm to >=11.5.1 (required for trusted publishing)
29
- run: npm install -g npm@latest
33
+ run: npm install -g npm@^11.5.1
30
34
  - name: Check out Etherpad core
31
35
  uses: actions/checkout@v7
32
36
  with:
33
37
  repository: ether/etherpad-lite
34
- - uses: pnpm/action-setup@v6
38
+ - uses: pnpm/action-setup@v6.1.0
35
39
  name: Install pnpm
36
40
  with:
37
41
  run_install: false
@@ -73,7 +77,7 @@ jobs:
73
77
  # `pnpm version patch` bumps package.json, makes a commit, and creates
74
78
  # a `v<new-version>` tag. Capture the new tag name from package.json
75
79
  # rather than parsing pnpm's output, which has historically varied.
76
- # Bump the patch component directly with Node. pnpm/action-setup@v6
80
+ # Bump the patch component directly with Node. pnpm/action-setup@v6.0.10
77
81
  # sometimes installs pnpm 11 pre-releases even when version: 10.x is
78
82
  # requested (pnpm/action-setup#225); those pre-releases either skip
79
83
  # the git commit/tag or reject --no-git-tag-version as unknown.
@@ -14,6 +14,9 @@ permissions:
14
14
  id-token: write
15
15
 
16
16
  jobs:
17
+ lint:
18
+ uses: ./.github/workflows/lint.yml
19
+ secrets: inherit
17
20
  backend:
18
21
  uses: ./.github/workflows/backend-tests.yml
19
22
  secrets: inherit
@@ -23,6 +26,7 @@ jobs:
23
26
  release:
24
27
  if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' }}
25
28
  needs:
29
+ - lint
26
30
  - backend
27
31
  - frontend
28
32
  permissions:
package/handleMessage.js CHANGED
@@ -42,7 +42,7 @@ exports.handleMessage = async (hookName, context) => {
42
42
  const userInfo = context.message.data.userInfo;
43
43
  if (!userInfo || !userInfo.email || !userInfo.email_option) return;
44
44
  if (!pluginSettings) {
45
- context.socket.emit("message", {
45
+ context.socket.emit('message', {
46
46
  type: 'COLLABROOM',
47
47
  data: {
48
48
  type: 'emailNotificationMissingParams',
@@ -147,7 +147,7 @@ const subscriptionEmail = async (context, email, emailFound, userInfo, padId) =>
147
147
  await setAuthorEmailRegistered(userInfo, userInfo.userId, subscribeId, padId);
148
148
 
149
149
  console.debug('emailSubSucc');
150
- context.socket.emit("message", {
150
+ context.socket.emit('message', {
151
151
  type: 'COLLABROOM',
152
152
  data: {
153
153
  type: 'emailSubscriptionSuccess',
@@ -176,7 +176,7 @@ const subscriptionEmail = async (context, email, emailFound, userInfo, padId) =>
176
176
  } else if (!validatesAsEmail) {
177
177
  // Subscription -> failed coz mail malformed.. y'know in general fuck em!
178
178
  console.debug('Dropped email subscription due to malformed email address');
179
- context.socket.emit("message", {
179
+ context.socket.emit('message', {
180
180
  type: 'COLLABROOM',
181
181
  data: {
182
182
  type: 'emailSubscriptionSuccess',
@@ -192,7 +192,7 @@ const subscriptionEmail = async (context, email, emailFound, userInfo, padId) =>
192
192
  console.debug('email ', context.message.data.userInfo.email,
193
193
  'already subscribed to ', context.message.data.padId, ' so sending message to client');
194
194
 
195
- context.socket.emit("message", {
195
+ context.socket.emit('message', {
196
196
  type: 'COLLABROOM',
197
197
  data: {
198
198
  type: 'emailSubscriptionSuccess',
@@ -219,7 +219,7 @@ const unsubscriptionEmail = async (context, emailFound, userInfo, padId) => {
219
219
 
220
220
  await unsetAuthorEmailRegistered(userInfo, userInfo.userId, unsubscribeId, padId);
221
221
 
222
- context.socket.emit("message", {
222
+ context.socket.emit('message', {
223
223
  type: 'COLLABROOM',
224
224
  data: {
225
225
  type: 'emailUnsubscriptionSuccess',
@@ -250,7 +250,7 @@ const unsubscriptionEmail = async (context, emailFound, userInfo, padId) => {
250
250
  console.debug(
251
251
  'Unsubscription: Send client a negative response ', context.message.data.userInfo.email);
252
252
 
253
- context.socket.emit("message", {
253
+ context.socket.emit('message', {
254
254
  type: 'COLLABROOM',
255
255
  data: {
256
256
  type: 'emailUnsubscriptionSuccess',
@@ -270,7 +270,7 @@ const sendUserInfo = (context, emailFound, email, userInfo) => {
270
270
  const {onStart = true, onEnd = false} = userInfo;
271
271
  if (emailFound) {
272
272
  // We send back the options associated to this userId
273
- context.socket.emit("message", {
273
+ context.socket.emit('message', {
274
274
  type: 'COLLABROOM',
275
275
  data: {
276
276
  type: 'emailNotificationGetUserInfo',
@@ -285,7 +285,7 @@ const sendUserInfo = (context, emailFound, email, userInfo) => {
285
285
  });
286
286
  } else {
287
287
  // No options set for this userId
288
- context.socket.emit("message", {
288
+ context.socket.emit('message', {
289
289
  type: 'COLLABROOM',
290
290
  data: {
291
291
  type: 'emailNotificationGetUserInfo',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ep_email_notifications",
3
3
  "description": "Subscribe to a pad and receive an email when someone edits your pad",
4
- "version": "11.0.28",
4
+ "version": "11.0.30",
5
5
  "author": {
6
6
  "name": "John Mclear",
7
7
  "email": "john@mclear.co.uk",
@@ -15,11 +15,11 @@
15
15
  }
16
16
  ],
17
17
  "dependencies": {
18
- "emailjs": "5.0.1",
18
+ "emailjs": "5.0.3",
19
19
  "validator": "13.15.35"
20
20
  },
21
21
  "engines": {
22
- "node": ">=18.0.0"
22
+ "node": ">=22.0.0"
23
23
  },
24
24
  "repository": {
25
25
  "type": "git",
@@ -37,8 +37,8 @@
37
37
  },
38
38
  "devDependencies": {
39
39
  "eslint": "^8.57.1",
40
- "eslint-config-etherpad": "^4.0.5",
41
- "typescript": "^6.0.3"
40
+ "eslint-config-etherpad": "^5.0.0",
41
+ "typescript": "~6.0.3"
42
42
  },
43
43
  "scripts": {
44
44
  "lint": "eslint .",
@@ -0,0 +1,10 @@
1
+ # js-yaml and brace-expansion arrive only as transitive dev dependencies (via
2
+ # eslint and minimatch@3), so `pnpm update` cannot move them. The selectors are
3
+ # scoped to the affected major line: an unbounded range would drag minimatch@3
4
+ # onto brace-expansion 5.x and eslint onto js-yaml 5.x.
5
+ #
6
+ # pnpm 11 no longer reads `pnpm.overrides` from package.json — these must live
7
+ # here or the lockfile and the install disagree (ERR_PNPM_LOCKFILE_CONFIG_MISMATCH).
8
+ overrides:
9
+ js-yaml: '^4.3.2'
10
+ brace-expansion@1: '^1.1.16'
@@ -85,7 +85,6 @@ exports.handleClientMessage_emailSubscriptionSuccess = (hook, context) => {
85
85
  $('.ep_email_settings').slideToggle();
86
86
  $('#options-emailNotifications').prop('checked', false);
87
87
  }
88
-
89
88
  }
90
89
  };
91
90
 
@@ -105,7 +104,6 @@ exports.handleClientMessage_emailUnsubscriptionSuccess = (hook, context) => {
105
104
  $('.ep_email_settings').slideToggle();
106
105
  $('#options-emailNotifications').prop('checked', false);
107
106
  }
108
-
109
107
  }
110
108
  };
111
109