Skip to content

note to self update to latest Nightscout#1

Open
bewest wants to merge 5617 commits intobewest:masterfrom
nightscout:master
Open

note to self update to latest Nightscout#1
bewest wants to merge 5617 commits intobewest:masterfrom
nightscout:master

Conversation

@bewest
Copy link
Owner

@bewest bewest commented Sep 3, 2015

Hooray

bewest pushed a commit that referenced this pull request Feb 18, 2021
bewest pushed a commit that referenced this pull request Feb 18, 2021
bewest pushed a commit that referenced this pull request Jun 30, 2022
sulkaharo and others added 27 commits January 1, 2023 12:57
* This commit updates the uuid and socket.io packages to latest versions and enables compression over websocket

* Drop the compression threshold down to 512 bytes

* Enable http compression down to 512 bytes and request long poll transport only, as per current release

* Add the socket.io-client back in

* Use polling with the NS client

* Update express to latest in 4.x line, fix tests
* check if d1 is not nil before call getTime

Co-authored-by: Sulka Haro <sulka@sulka.net>
* Use 'forwarded' always

Getting the remote IP from the socket doesn't work behind a reverse proxy. 'Forwarded' is there to fix there, but wasn't used here.

* Consistently use getRemoteIP() throughout

Stay in line with other modules that do this

* Use getRemoteIP consistently

One more missing case; in this file it isn't helpful, but it is consistent with other files.

Co-authored-by: Sulka Haro <sulka@sulka.net>
* Experimental branch that replaces momentjs with dayjs in the client

* Revert unintentional change

* feat

* Turns out dayjs is a no-go, but this has some good restructuring so submitting that
* Fixes a bug introduced in #7273

* Oops somehow managed to commit a wrong file version

* Cleaner code based on feedback from Ben
* Allow DELETE via PATCH/UPDATE operation too

* rollback wrong commit

Co-authored-by: Milos Kozak <m.kozak@sysop.cz>
Co-authored-by: Sulka Haro <sulka@sulka.net>
)

* Delete v3 api identifiers when cloning a record

* Refactored to use lodash omit

* Move cleaning logic to correct function, add _id to list of cleaned properties

* Add back a line that was accidentally deleted

* profileeditor: add created_at, srvModified too on save to simulate API v3

Co-authored-by: Milos Kozak <m.kozak@sysop.cz>
* rollback compatibility issues for tests

Revert "Bump jsonwebtoken from 8.5.1 to 9.0.0 (#7787)"

This rolls back changes to node_modules via package-lock.json as a
result of new dependencies.  More work is needed before involving these
changes.  Without this rollback, the tests do consistently complete within
the allowed time in a reproducible way.

* Test Github Actions with jsdom 11.11.0

* Upgrade github actions as requested by the actions runner

* Lock generated using 6.14.18

* Upgrade actions/checkout@v2 to v3

* restore jsonwebtoken upgrade

Co-authored-by: Ben West <bewest@gmail.com>
* Change runtime cache to support item timestamp be defined in either mills or date field.

* Fix typo

* Return mills in v1 api when returning data from cache

* Also parse created_at in the cache

* Fix copy paste error
Midnight for the profile should always be at the start of the
day (midnight) for the chart.
This more closely mirrors logic in loopalyzer, as well as the intent from the
surrounding code in reportclient.js.
This fixes the label on the days in the daytoday charts.  Passing a moment
object that is already zoned prevents toLocaleDateString from reinterpreting
the zone information when the date is already relative to the profile.

This also ensures that the datefilter is adjusted to the profile's zone rather
than truncating the time to the end or beginning of the day.  This should
prevent incorrectly wrapping arounnd the dateline.
To illustrate the difference, I used chrome "sensors" feature to change my
timezone to one that spans the dateline.

    > moment.tz('2023-01-19', 'America/Los_Angeles').endOf('day').format( )
    '2023-01-19T23:59:59-08:00'
    > moment.tz(moment('2023-01-19'), 'America/Los_Angeles').endOf('day').format( )
    '2023-01-18T23:59:59-08:00'

The old code uses a string replacement, which is equivalent to the first
test.  This causes the dates on the reports to be off by one, as well as
risks the data wrapping around the dateline so it can't be seen.  For example,
replacing "23:59:59" with "00:00:00" in the first example doesn't correctly
wrap around the dateline.

The patch introduces a way to parse the dates requested in the browser's
time zone, and then translates them to the profile's timezone.  The
difference is shown in the second example above.  With this change, the
correct date label should be rendered, and the data should start at
midnight without wrapping around the dateline.
Ensure that the test fixtures will return; the previous changes
correctly forward the time to end of day across zones and
datelines.  One side effect  is that the date formatted for the end
of the day uses all the microseconds for the day as well.  This
changes the query from the form of 23:59:59.000Z to 23:59:59.999Z.
This also ensures that anything that happens during that one second
will be included rather than excluded.
…nd reports (#7833)

* * Change profile editor so it works when client uploads profiles where string case doesn't match editor expectations
* Re-enable culling down time zone data sent to client

* Add a workaround to fix Loop uploading non-ISO compliant time zone identifier
bewest and others added 30 commits May 23, 2025 10:06
hide tooltip by display attribute instead of opacity
References:
- [National Institute of Standards and Technology](https://webbook.nist.gov/cgi/cbook.cgi?ID=C50997&Mask=40)
- [National Institute of Health](https://pubchem.ncbi.nlm.nih.gov/compound/D-Glucose)
Signed-off-by: Ingo Reitz <9l@9lo.re>
Signed-off-by: Ingo Reitz <9l@9lo.re>
- share2nightscout-bridge: 0.2.9 → 0.2.10 (Node 22 support)
- minimed-connect-to-nightscout: 1.5.5 → 1.5.6 (Node 22 support)

Both packages now allow Node 18/20/22+ in their engines field.
This is a prerequisite for the Node 22 upgrade (PR #8357).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- share2nightscout-bridge: 0.2.9 → 0.2.10 (Node 22 support)
- minimed-connect-to-nightscout: 1.5.5 → 1.5.6 (Node 22 support)

Both packages now allow Node 18/20/22+ in their engines field.
This is a prerequisite for the Node 22 upgrade (PR #8357).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Change engines.node from '^22.x || ^20.x' to '>=16.x'
- Change engines.npm from '>=10.x' to '>=8.x'
- Update runtime checkNodeVersion to allow Node 16+
- Creates overlap with previous release (^16.x || ^14.x)

This allows users on Node 16/18 to upgrade smoothly while
recommending Node 20 or 22 LTS for best support.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove lts/* (redundant with explicit versions)
- Add Node 16 for backwards compatibility testing
- Skip Node 18 (flaky tests, will be fixed in MongoDB PR)
- Keep MongoDB 4.4, 5.0, 6.0 matrix

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use npm ci with --omit=optional to skip optional dependencies like
fsevents (darwin-only) that were causing build failures on Linux
platforms including Heroku and local Docker builds on Mac.
Both bridge packages now have clean shrinkwraps without devDependencies,
eliminating the fsevents (darwin-only) entries that caused Heroku build failures.
Node 16 EOL was September 2023. Docker image uses Node 22.
Reduces CI matrix from 9 to 6 jobs.
npm ci fails with EBADPLATFORM when lockfile contains darwin-only
packages (fsevents), even with --omit=optional. The --force flag
bypasses this check.
Dockerfile: Add --force to bypass platform check
Post release 15.0.5, we will develop branch for 15.0.6.
These changes remove shrinkwrap from including dev dependencies for production
use.  This is intended to solve errors in production environments like heroku
incorrectly pulling in darwin based chokidar and related mocha dependencies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.