signalk-tides 2.0.0 → 2.1.1

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.
@@ -0,0 +1,41 @@
1
+ name: Release
2
+
3
+ on:
4
+ release:
5
+ types: [created]
6
+
7
+ jobs:
8
+ publish:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ id-token: write # npm trusted publishing
12
+ contents: write # commit the version bump
13
+ steps:
14
+ - uses: actions/checkout@v7
15
+ with:
16
+ ref: ${{ github.event.release.target_commitish }}
17
+
18
+ - uses: actions/setup-node@v6
19
+ with:
20
+ node-version: 24 # npm >= 11.5.1 for trusted publishing
21
+ registry-url: https://registry.npmjs.org
22
+
23
+ - name: Install dependencies
24
+ run: npm install
25
+
26
+ - name: Set version to release tag
27
+ run: npm version "${TAG#v}" --no-git-tag-version --allow-same-version
28
+ env:
29
+ TAG: ${{ github.event.release.tag_name }}
30
+
31
+ - name: Publish to npm
32
+ run: npm publish # prepack runs the build
33
+
34
+ # Only after a successful publish, so a failed release never mutates the repo
35
+ - name: Commit version bump
36
+ run: |
37
+ git config user.name "github-actions[bot]"
38
+ git config user.email "github-actions[bot]@users.noreply.github.com"
39
+ git diff --quiet || { git commit -am "Release ${TAG#v}" && git push; }
40
+ env:
41
+ TAG: ${{ github.event.release.tag_name }}
@@ -58,8 +58,19 @@ export function withVesselPosition(router, getPosition, getDefaultStationId) {
58
58
  }
59
59
  const pos = getPosition();
60
60
  if (pos) {
61
- req.query.latitude = String(pos.latitude);
62
- req.query.longitude = String(pos.longitude);
61
+ // Express 5 makes `req.query` a read-only getter, so assigning to its
62
+ // properties is silently lost. Shadow it with an own data property,
63
+ // which behaves identically on Express 4 and 5.
64
+ Object.defineProperty(req, "query", {
65
+ value: {
66
+ ...req.query,
67
+ latitude: String(pos.latitude),
68
+ longitude: String(pos.longitude),
69
+ },
70
+ writable: true,
71
+ configurable: true,
72
+ enumerable: true,
73
+ });
63
74
  }
64
75
  }
65
76
  router(req, res, next);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signalk-tides",
3
- "version": "2.0.0",
3
+ "version": "2.1.1",
4
4
  "description": "Tidal predictions for the vessel's position, powered by Neaps.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -34,10 +34,10 @@
34
34
  ],
35
35
  "license": "Apache-2.0",
36
36
  "dependencies": {
37
- "@neaps/api": "^0.5.1",
38
- "@neaps/react": "^0.1.0",
37
+ "@neaps/api": "^0.6.0",
38
+ "@neaps/react": "^0.1.1",
39
39
  "@signalk/server-api": "^2.28.0",
40
- "express": "^4.0",
40
+ "express": "^5.2.1",
41
41
  "neaps": "^0.7.0",
42
42
  "react": "^19.1.0",
43
43
  "react-dom": "^19.1.0"
@@ -48,8 +48,8 @@
48
48
  "@testing-library/dom": "^10.4.1",
49
49
  "@testing-library/react": "^16.3.2",
50
50
  "@testing-library/user-event": "^14.6.1",
51
- "@types/express": "^4.0",
52
- "@types/node": "^25.0.3",
51
+ "@types/express": "^5.0.6",
52
+ "@types/node": "^26.0.1",
53
53
  "@types/react": "^19.0.12",
54
54
  "@types/react-dom": "^19.0.4",
55
55
  "@types/supertest": "^7.2.0",
@@ -76,7 +76,7 @@
76
76
  },
77
77
  "repository": {
78
78
  "type": "git",
79
- "url": "git+https://github.com/bkeepers/signalk-tides.git"
79
+ "url": "git+https://github.com/openwatersio/signalk-tides.git"
80
80
  },
81
81
  "signalk-plugin-enabled-by-default": true,
82
82
  "signalk": {