Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes node 16 #7440

Closed
wants to merge 50 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
6f8a295
(bluefox) add npmignore
GermanBluefox Jul 29, 2019
1ce3b0b
Make it runnable as npm package
GermanBluefox Jul 30, 2019
6727428
(bluefox) use absolute path for static folder
GermanBluefox Jul 31, 2019
94be928
Merge remote-tracking branch 'remotes/nightscout/master'
GermanBluefox Aug 3, 2019
5f222b7
Allow start not only from cgm-remote-monitor
GermanBluefox Aug 3, 2019
5afbdd4
(bluefox) add polling option to make it possible the communication wi…
GermanBluefox Aug 6, 2019
60b40d1
0.12.3-2
GermanBluefox Aug 6, 2019
8d06b40
(bluefox) fix errors
GermanBluefox Aug 6, 2019
409b6a5
(bluefox) fix clock with authentication
GermanBluefox Aug 6, 2019
0a2dcbe
(bluefox) fix clock
GermanBluefox Aug 6, 2019
b523419
Merge remote-tracking branch 'remotes/nightscout/dev'
GermanBluefox Aug 6, 2019
007cea4
fix time
GermanBluefox Aug 6, 2019
11aff8a
Formatting
GermanBluefox Aug 6, 2019
3c25914
Fix clock if authentication is enabled
GermanBluefox Aug 6, 2019
baa613f
Merge branch 'dev'
GermanBluefox Aug 6, 2019
366d10c
Add time to clock view back
GermanBluefox Aug 6, 2019
bb5fe99
Merge branch 'dev'
GermanBluefox Aug 6, 2019
3a52cac
Formatting
GermanBluefox Aug 6, 2019
ce21b4e
Merge branch 'dev'
GermanBluefox Aug 6, 2019
d2d82dd
Fix authentication dialog
GermanBluefox Aug 7, 2019
d61e8f9
Select browser language for authentication dialog
GermanBluefox Aug 7, 2019
7bb7289
Merge branch 'dev'
GermanBluefox Aug 7, 2019
050808d
Update hashauth.js
GermanBluefox Aug 7, 2019
ccad081
Update hashauth.js
GermanBluefox Aug 7, 2019
293ac55
Update hashauth.js
GermanBluefox Aug 7, 2019
afbe6a3
Update hashauth.js
GermanBluefox Aug 7, 2019
fa442ae
(bluefox) fix chart if no latestSGV defined
GermanBluefox Aug 10, 2019
d361a72
Select language from localStorage
GermanBluefox Aug 10, 2019
22474e2
Fix language selection
GermanBluefox Aug 10, 2019
bd42ad8
Merge branch 'dev' into dev
GermanBluefox Aug 23, 2019
db1febb
Charts were fixed if no latestSGV value found
GermanBluefox Aug 23, 2019
7f22ad4
Merge remote-tracking branch 'remotes/nightscout/dev' into dev
GermanBluefox Aug 23, 2019
2c935ee
Merge branch 'dev' of https://github.com/GermanBluefox/cgm-remote-mon…
GermanBluefox Aug 23, 2019
88c6d16
Merge branch 'dev'
GermanBluefox Aug 23, 2019
6baf359
Remove .npmignore
GermanBluefox Aug 23, 2019
beed799
Merge branch 'master' into dev
GermanBluefox Aug 23, 2019
f4e07fb
Some code formatting. No relevant changes
GermanBluefox Aug 23, 2019
042ebc2
Add .npmignore to master
GermanBluefox Aug 23, 2019
07b14d7
Show "-?-" in clock mode if no measured value found.
GermanBluefox Aug 23, 2019
8c1c762
(bluefox) revoke changes
GermanBluefox Sep 14, 2019
563a3f3
Small fix
GermanBluefox Sep 14, 2019
8d86479
Fix error with profiles[0].store
GermanBluefox Mar 30, 2020
f16fae8
Bump version
GermanBluefox Mar 30, 2020
8b5d7c2
NO tests by publish
GermanBluefox Mar 30, 2020
8215173
Bump version
GermanBluefox Apr 8, 2020
6ed211c
Merge branch 'master' into bluefox-master
GermanBluefox May 25, 2022
960045e
Merge with master
GermanBluefox May 25, 2022
fc7d246
Tested nightscout under node-16 and these changes are required
GermanBluefox May 25, 2022
1170276
Sync with master
GermanBluefox May 25, 2022
54175b9
Merge remote-tracking branch 'remotes/origin/dev' into fixes-node-16
GermanBluefox May 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/client/hashauth.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ hashauth.init = function init (client, $) {
client.browserUtils.reload();
}

// clear eveything just in case
// clear everything just in case
hashauth.apisecret = null;
hashauth.apisecrethash = null;
hashauth.authenticated = false;
Expand Down
2 changes: 2 additions & 0 deletions lib/server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ function resolvePath(filePath) {
if (fs.existsSync(p)) return p;
p = path.join(process.cwd(), filePath);
if (fs.existsSync(p)) return p;
p = path.join(__dirname, '../../', filePath);
if (fs.existsSync(p)) return p;

return require.resolve(filePath);
}
Expand Down
6 changes: 3 additions & 3 deletions lib/server/bootevent.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ function boot (env, language) {
var nodeVersion = process.version;

const isLTS = process.release.lts ? true : false;
if (isLTS && (semver.satisfies(nodeVersion, '^14.0.0') || semver.satisfies(nodeVersion, '^12.0.0') || semver.satisfies(nodeVersion, '^10.0.0'))) {

if (isLTS && (semver.satisfies(nodeVersion, '^16.0.0') || semver.satisfies(nodeVersion, '^14.0.0') || semver.satisfies(nodeVersion, '^12.0.0') || semver.satisfies(nodeVersion, '^10.0.0'))) {
//Latest Node 10 LTS and Node 12 LTS are recommended and supported.
//Require at least Node 8 LTS and Node 10 LTS without known security issues
console.debug('Node LTS version ' + nodeVersion + ' is supported');
Expand Down Expand Up @@ -266,7 +266,7 @@ function boot (env, language) {
function setupListeners (ctx, next) {

console.log('Executing setupListeners');

if (hasBootErrors(ctx)) {
return next();
}
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nightscout",
"version": "14.2.6",
"description": "Nightscout acts as a web-based CGM (Continuous Glucose Montinor) to allow multiple caregivers to remotely view a patients glucose data in realtime.",
"description": "Nightscout acts as a web-based CGM (Continuous Glucose Monitor) to allow multiple caregivers to remotely view a patients glucose data in realtime.",
"license": "AGPL-3.0",
"author": "Nightscout Team",
"homepage": "http://nightscout.github.io/",
Expand Down Expand Up @@ -157,6 +157,7 @@
"webpack-bundle-analyzer": "^4.4.0",
"webpack-dev-middleware": "^4.1.0",
"webpack-hot-middleware": "^2.25.0",
"vm-browserify": "^1.1.2",
"xml2js": "^0.4.23"
},
"browserslist": "> 0.25%, not dead, ios_saf 10"
Expand Down
9 changes: 8 additions & 1 deletion webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ pluginArray.push(new webpack.ProvidePlugin({
process: 'process/browser',
}));

pluginArray.push(new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}));

// limit Timezone data from Moment

pluginArray.push(new MomentTimezoneDataPlugin({
Expand Down Expand Up @@ -106,7 +110,7 @@ const rules = [
loader: 'file-loader',
options: {
outputPath: 'images'
//the images will be emmited to public/assets/images/ folder
//the images will be emitted to public/assets/images/ folder
//the images will be put in the DOM <style> tag as eg. background: url(assets/images/image.png);
},
exclude: /node_modules/
Expand Down Expand Up @@ -165,6 +169,9 @@ module.exports = {
stream: 'stream-browserify',
crypto: 'crypto-browserify',
buffer: 'buffer',
},
fallback: {
'vm': require.resolve('vm-browserify'),
}
}
};