Merge pull request #2399 from balena-os/dependency-updates

Dependency updates
This commit is contained in:
flowzone-app[bot] 2025-02-10 22:50:54 +00:00 committed by GitHub
commit e901c38df0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 1290 additions and 807 deletions

2012
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -39,13 +39,14 @@
"npm": ">=10"
},
"devDependencies": {
"@balena/compose": "^3.2.1",
"@balena/compose": "^6.0.0",
"@balena/contrato": "^0.12.0",
"@balena/es-version": "^1.0.3",
"@balena/lint": "^8.0.2",
"@balena/sbvr-types": "^9.1.0",
"@types/bluebird": "^3.5.42",
"@types/chai": "^4.3.14",
"@types/chai-as-promised": "^7.1.8",
"@types/chai": "^4.3.20",
"@types/chai-as-promised": "^8.0.1",
"@types/chai-like": "^1.1.3",
"@types/chai-things": "0.0.38",
"@types/common-tags": "^1.8.4",
@ -70,68 +71,69 @@
"@types/webpack": "^5.28.5",
"@types/yargs": "^17.0.32",
"balena-auth": "^6.0.1",
"balena-register-device": "^9.0.2",
"balena-request": "^13.3.1",
"balena-register-device": "^9.0.4",
"balena-request": "^14.0.1",
"blinking": "^1.0.1",
"bluebird": "^3.7.2",
"chai": "^4.3.4",
"chai-as-promised": "^7.1.1",
"chai-like": "^1.1.1",
"chai": "^4.5.0",
"chai-as-promised": "^8.0.1",
"chai-like": "^1.1.3",
"chai-things": "^0.2.0",
"chokidar": "^3.5.1",
"chokidar": "^4.0.3",
"common-tags": "^1.8.0",
"copy-webpack-plugin": "^12.0.0",
"deep-object-diff": "^1.1.0",
"deep-object-diff": "1.1.0",
"docker-delta": "^4.1.0",
"docker-progress": "^5.2.3",
"dockerode": "^4.0.2",
"duration-js": "^4.0.0",
"express": "^4.17.1",
"express": "^4.21.2",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"fp-ts": "^2.16.5",
"got": "14.4.1",
"husky": "^9.0.11",
"io-ts": "^2.2.20",
"husky": "^9.1.7",
"io-ts": "2.2.20",
"io-ts-reporters": "^2.0.1",
"json-mask": "^2.0.0",
"JSONStream": "^1.3.5",
"knex": "^3.1.0",
"lint-staged": "^15.2.2",
"lint-staged": "^15.4.3",
"livepush": "^3.5.1",
"lodash": "^4.17.21",
"mdns-resolver": "1.1.0",
"memoizee": "^0.4.14",
"mocha": "^10.4.0",
"mocha-pod": "^2.0.5",
"mocha-pod": "^2.0.10",
"morgan": "^1.10.0",
"network-checker": "^0.1.1",
"nock": "^13.1.2",
"node-loader": "^2.0.0",
"nodemon": "^3.1.0",
"pinejs-client-request": "^7.3.5",
"network-checker": "^1.0.2",
"nock": "^13.5.6",
"node-loader": "^2.1.0",
"nodemon": "^3.1.9",
"pinejs-client-core": "^7.2.0",
"pinejs-client-request": "^8.0.1",
"pretty-ms": "^7.0.1",
"request": "^2.88.2",
"resumable-request": "^2.0.1",
"rewire": "^7.0.0",
"rimraf": "^5.0.0",
"rimraf": "^5.0.10",
"rwlock": "^5.0.0",
"semver": "7.6.3",
"shell-quote": "^1.7.2",
"shell-quote": "^1.8.2",
"sinon": "^18.0.0",
"sinon-chai": "^3.7.0",
"strict-event-emitter-types": "^2.0.0",
"supertest": "^7.0.0",
"systeminformation": "^5.22.7",
"systeminformation": "^5.25.11",
"tar-stream": "^3.1.7",
"terser-webpack-plugin": "^5.3.6",
"ts-loader": "^9.4.0",
"terser-webpack-plugin": "^5.3.11",
"ts-loader": "^9.5.2",
"ts-node": "^10.0.0",
"tsconfig-paths": "^4.1.0",
"tsconfig-paths": "^4.2.0",
"typed-error": "^3.2.1",
"typescript": "^5.5.4",
"webpack": "^5.74.0",
"webpack-cli": "^5.0.0",
"winston": "^3.3.3",
"typescript": "^5.7.3",
"webpack": "^5.97.1",
"webpack-cli": "^5.1.4",
"winston": "^3.17.0",
"yargs": "^17.7.2"
},
"versionist": {

View File

@ -1,6 +1,7 @@
import _ from 'lodash';
import { promises as fs, watch } from 'fs';
import networkCheck from 'network-checker';
import { checkHost as checkNetHost, monitor } from 'network-checker';
import type { ConnectOptions, MonitorChangeFunction } from 'network-checker';
import os from 'os';
import url from 'url';
@ -20,21 +21,16 @@ const networkPattern = {
let isConnectivityCheckPaused = false;
let isConnectivityCheckEnabled = true;
function checkHost(
opts: networkCheck.ConnectOptions,
): boolean | PromiseLike<boolean> {
async function checkHost(opts: ConnectOptions): Promise<boolean> {
return (
!isConnectivityCheckEnabled ||
isConnectivityCheckPaused ||
networkCheck.checkHost(opts)
(await checkNetHost(opts))
);
}
function customMonitor(
options: networkCheck.ConnectOptions,
fn: networkCheck.MonitorChangeFunction,
) {
return networkCheck.monitor(checkHost, options, fn);
function customMonitor(options: ConnectOptions, fn: MonitorChangeFunction) {
return monitor(checkHost, options, fn);
}
export function enableCheck(enable: boolean) {
@ -60,7 +56,7 @@ export const startConnectivityCheck = _.once(
async (
apiEndpoint: string,
enable: boolean,
onChangeCallback?: networkCheck.MonitorChangeFunction,
onChangeCallback?: MonitorChangeFunction,
) => {
enableConnectivityCheck(enable);
if (!apiEndpoint) {

View File

@ -1,5 +1,4 @@
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
import sinonChai from 'sinon-chai';
import chaiThings from 'chai-things';
import chaiLike from 'chai-like';
@ -14,9 +13,11 @@ import chaiLike from 'chai-like';
* If unsure whether to add to global fixtures, refer to the chart above.
* Also, avoid setting global mutable variables here.
*/
export const mochaGlobalSetup = function () {
export const mochaGlobalSetup = async function () {
console.log('Setting up global fixtures for tests...');
const { default: chaiAsPromised } = await import('chai-as-promised');
/* Setup chai assertion plugins */
chai.use(chaiAsPromised);
chai.use(sinonChai);