Skip to content

Commit

Permalink
chore: update root level dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
garethbowen authored Oct 9, 2023
1 parent 4ff307d commit dcafa05
Show file tree
Hide file tree
Showing 15 changed files with 21,536 additions and 16,928 deletions.
38,291 changes: 21,460 additions & 16,831 deletions package-lock.json

Large diffs are not rendered by default.

85 changes: 42 additions & 43 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,89 +58,88 @@
"devDependencies": {
"@angular-builders/custom-webpack": "^16.0.1",
"@angular-devkit/build-angular": "^16.2.1",
"@angular-eslint/builder": "^16.1.1",
"@angular-eslint/eslint-plugin": "^16.1.1",
"@angular-eslint/eslint-plugin-template": "^16.1.1",
"@angular-eslint/schematics": "^16.1.1",
"@angular-eslint/template-parser": "^16.1.1",
"@angular/cli": "^16.2.1",
"@angular/compiler": "^16.2.3",
"@angular/compiler-cli": "^16.2.3",
"@angular/localize": "^16.2.3",
"@faker-js/faker": "^6.1.2",
"@angular-eslint/builder": "^16.1.2",
"@angular-eslint/eslint-plugin": "^16.1.2",
"@angular-eslint/eslint-plugin-template": "^16.1.2",
"@angular-eslint/schematics": "^16.1.2",
"@angular-eslint/template-parser": "^16.1.2",
"@angular/cli": "^16.2.2",
"@angular/compiler": "^16.2.5",
"@angular/compiler-cli": "^16.2.5",
"@angular/localize": "^16.2.5",
"@faker-js/faker": "^8.0.2",
"@medic/eslint-config": "^1.1.0",
"@types/chai": "^4.3.4",
"@types/chai-as-promised": "^7.1.5",
"@types/jquery": "^3.5.6",
"@types/lodash": "^4.14.175",
"@types/lodash-es": "^4.17.6",
"@types/chai": "^4.3.6",
"@types/chai-as-promised": "^7.1.6",
"@types/jquery": "^3.5.19",
"@types/lodash": "^4.14.198",
"@types/lodash-es": "^4.17.9",
"@types/mocha": "^10.0.1",
"@types/node": "^14.18.34",
"@types/node": "^20.6.2",
"@types/pouchdb": "^6.4.0",
"@types/sinon": "^10.0.11",
"@typescript-eslint/eslint-plugin": "5.43",
"@typescript-eslint/parser": "5.43",
"@types/sinon": "^10.0.16",
"@typescript-eslint/eslint-plugin": "^6.7.0",
"@typescript-eslint/parser": "^6.7.0",
"@wdio/allure-reporter": "^8.3.0",
"@wdio/cli": "^8.3.3",
"@wdio/devtools-service": "^8.3.3",
"@wdio/local-runner": "^8.3.3",
"@wdio/mocha-framework": "^8.3.0",
"@wdio/spec-reporter": "^8.3.0",
"allure-commandline": "^2.20.1",
"allure-commandline": "^2.24.0",
"angular-jsdoc": "^1.5.1",
"angular-mocks": "^1.8.3",
"bikram-sambat": "^1.7.0",
"browserify": "^17.0.0",
"browserify-ngannotate": "^2.0.0",
"chai": "^4.3.7",
"chai": "^4.3.8",
"chai-as-promised": "^7.1.1",
"chai-exclude": "^2.1.0",
"chai-shallow-deep-equal": "^1.4.6",
"cht-conf": "^3.18.3",
"clean-css-cli": "^5.6.2",
"couchdb-compile": "^1.11.2",
"csv-writer": "^1.6.0",
"deep-equal-in-any-order": "^1.1.15",
"deep-equal-in-any-order": "^2.0.6",
"doctoc": "^2.2.1",
"eslint": "^7.32.0",
"eslint": "^8.49.0",
"eslint-plugin-angular": "^4.1.0",
"eslint-plugin-async": "^0.1.1",
"eslint-plugin-compat": "^3.13.0",
"eslint-plugin-compat": "^4.2.0",
"eslint-plugin-couchdb": "^0.2.0",
"eslint-plugin-jasmine": "^4.1.3",
"eslint-plugin-json": "^3.1.0",
"eslint-plugin-no-only-tests": "^2.6.0",
"eslint-plugin-no-only-tests": "^3.1.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.2.0",
"eslint-plugin-promise": "^6.1.1",
"eurodigit": "^3.1.3",
"express": "^4.18.2",
"faker": "^5.5.3",
"flat": "^5.0.2",
"flat": "^6.0.0",
"gaze": "^1.1.3",
"husky": "^8.0.0",
"jasmine-spec-reporter": "^7.0.0",
"jsdoc": "^4.0.2",
"jsverify": "^0.8.4",
"karma": "^6.4.1",
"karma-chrome-launcher": "^3.1.1",
"karma-coverage": "^2.2.0",
"karma": "^6.4.2",
"karma-chrome-launcher": "^3.2.0",
"karma-coverage": "^2.2.1",
"karma-firefox-launcher": "^2.1.2",
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-ng-html2js-preprocessor": "^1.0.0",
"karma-spec-reporter": "0.0.32",
"less": "^4.1.3",
"karma-spec-reporter": "^0.0.36",
"less": "^4.2.0",
"lodash": "^4.17.21",
"loose-envify": "^1.4.0",
"medic-conf": "^3.2.1",
"mocha": "^10.2.0",
"module-alias": "^2.2.2",
"module-alias": "^2.2.3",
"moment": "^2.29.4",
"moment-locales-webpack-plugin": "^1.2.0",
"mustache": "^4.2.0",
"nodemon": "^2.0.20",
"patch-package": "^7.0.2",
"postcss": "^8.4.20",
"nodemon": "^3.0.1",
"patch-package": "^8.0.0",
"postcss": "^8.4.29",
"pouchdb-adapter-http": "^7.3.1",
"pouchdb-adapter-memory": "^7.3.1",
"pouchdb-core": "^7.3.1",
Expand All @@ -150,15 +149,15 @@
"request-promise-native": "^1.0.9",
"rewire": "^5.0.0",
"rosie": "^2.1.0",
"sass": "^1.57.1",
"semver": "^7.3.8",
"sass": "^1.67.0",
"semver": "^7.5.4",
"sinon": "^11.1.2",
"tail": "^2.2.4",
"tail": "^2.2.6",
"typescript": "^5.1.6",
"uglify-js": "^3.17.4",
"uuid": "^8.3.2",
"webpack-bundle-analyzer": "^4.7.0",
"zone.js": "^0.11.8"
"uuid": "^9.0.1",
"webpack-bundle-analyzer": "^4.9.1",
"zone.js": "^0.13.3"
},
"overrides": {
"minimist": ">=1.2.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export class FastActionButtonComponent implements OnInit, OnDestroy {

trackById: TrackByFunction<FastAction> = (idx, action: FastAction) => {
return action.id;
}
};
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ export class FacilityFilterComponent implements OnInit, AfterViewInit, AbstractF
@Input() inline;
@Input() fieldId;
@Output() search: EventEmitter<any> = new EventEmitter();
@ViewChild(MultiDropdownFilterComponent)
dropdownFilter = new MultiDropdownFilter(); // initialize variable to avoid change detection errors

// initialize variable to avoid change detection errors
@ViewChild(MultiDropdownFilterComponent) dropdownFilter = new MultiDropdownFilter();

constructor(
private store:Store,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ export class FormTypeFilterComponent implements OnDestroy, OnInit, AbstractFilte
@Input() inline;
@Input() fieldId;
@Output() search: EventEmitter<any> = new EventEmitter();
@ViewChild(MultiDropdownFilterComponent)
dropdownFilter = new MultiDropdownFilter(); // initialize variable to avoid change detection errors

// initialize variable to avoid change detection errors
@ViewChild(MultiDropdownFilterComponent) dropdownFilter = new MultiDropdownFilter();

constructor(
private store:Store,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export class StatusFilterComponent implements AbstractFilter {
@Input() fieldId;
@Output() search: EventEmitter<any> = new EventEmitter();

@ViewChild(MultiDropdownFilterComponent)
dropdownFilter = new MultiDropdownFilter(); // initialize variable to avoid change detection errors
// initialize variable to avoid change detection errors
@ViewChild(MultiDropdownFilterComponent) dropdownFilter = new MultiDropdownFilter();

constructor(
private store: Store,
Expand Down
3 changes: 1 addition & 2 deletions webapp/src/ts/components/search-bar/search-bar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ export class SearchBarComponent implements AfterContentInit, AfterViewInit, OnDe
activeFilters: number = 0;
openSearch = false;

@ViewChild(FreetextFilterComponent)
freetextFilter: FreetextFilterComponent;
@ViewChild(FreetextFilterComponent) freetextFilter: FreetextFilterComponent;

constructor(
private store: Store,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ export class EditUserSettingsComponent implements OnInit {
email?;
phone?;
language: { code? };
} = {
language: {}
};
} = { language: {} };

static id = 'edit-user-settings-modal';
processing = false;
Expand Down
3 changes: 1 addition & 2 deletions webapp/src/ts/modules/contacts/contacts-filters.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ export class ContactsFiltersComponent {
@Input() sortDirection;
@Input() lastVisitedDateExtras;

@ViewChild(FreetextFilterComponent)
freetextFilter:FreetextFilterComponent;
@ViewChild(FreetextFilterComponent) freetextFilter:FreetextFilterComponent;

applyFilters() {
this.search.emit();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class ContactsReportComponent implements OnInit, OnDestroy, AfterViewInit
};

subscription: Subscription = new Subscription();
enketoEdited
enketoEdited;
enketoStatus;
enketoSaving;
enketoError;
Expand Down
19 changes: 5 additions & 14 deletions webapp/src/ts/modules/reports/reports-filters.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,11 @@ export class ReportsFiltersComponent implements AfterViewInit, OnDestroy {
@Output() search: EventEmitter<any> = new EventEmitter();
@Input() reset;

@ViewChild(FormTypeFilterComponent)
formTypeFilter:FormTypeFilterComponent;

@ViewChild(FacilityFilterComponent)
facilityFilter:FacilityFilterComponent;

@ViewChild(DateFilterComponent)
dateFilter:DateFilterComponent;

@ViewChild(FreetextFilterComponent)
freetextFilter:FreetextFilterComponent;

@ViewChild(StatusFilterComponent)
statusFilter:StatusFilterComponent;
@ViewChild(FormTypeFilterComponent) formTypeFilter:FormTypeFilterComponent;
@ViewChild(FacilityFilterComponent) facilityFilter:FacilityFilterComponent;
@ViewChild(DateFilterComponent) dateFilter:DateFilterComponent;
@ViewChild(FreetextFilterComponent) freetextFilter:FreetextFilterComponent;
@ViewChild(StatusFilterComponent) statusFilter:StatusFilterComponent;

ngAfterViewInit() {
this.searchFiltersService.init(this.freetextFilter);
Expand Down
19 changes: 5 additions & 14 deletions webapp/src/ts/modules/reports/reports-sidebar-filter.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,11 @@ export class ReportsSidebarFilterComponent implements AfterViewInit, OnDestroy {
@Output() search: EventEmitter<any> = new EventEmitter();
@Input() disabled;

@ViewChild(FormTypeFilterComponent)
formTypeFilter: FormTypeFilterComponent;

@ViewChild(FacilityFilterComponent)
facilityFilter: FacilityFilterComponent;

@ViewChild('fromDate')
fromDateFilter: DateFilterComponent;

@ViewChild('toDate')
toDateFilter: DateFilterComponent;

@ViewChild(StatusFilterComponent)
statusFilter: StatusFilterComponent;
@ViewChild(FormTypeFilterComponent) formTypeFilter: FormTypeFilterComponent;
@ViewChild(FacilityFilterComponent) facilityFilter: FacilityFilterComponent;
@ViewChild('fromDate') fromDateFilter: DateFilterComponent;
@ViewChild('toDate') toDateFilter: DateFilterComponent;
@ViewChild(StatusFilterComponent) statusFilter: StatusFilterComponent;

private globalActions;
private filters: FilterComponent[] = [];
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/ts/services/session.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { LocationService } from '@mm-services/location.service';
providedIn: 'root'
})
export class SessionService {
userCtxCookieValue: any = null
userCtxCookieValue: any = null;
httpOptions = { headers: new HttpHeaders({ Accept: 'application/json' }) };

constructor(
Expand Down
15 changes: 8 additions & 7 deletions webapp/tests/karma/ts/services/telemetry.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ describe('TelemetryService', () => {
expect(telemetryDb.query.called).to.be.false; // NO telemetry aggregation has
expect(metaDb.put.callCount).to.equal(0); // been recorded yet

clock = sinon.useFakeTimers(moment(NOW).add(1, 'minutes').valueOf()); // 1 min later ...
clock.tick('01:00'); // 1 min later ...
await service.record('test', 5);

expect(telemetryDb.post.callCount).to.equal(2); // second call
Expand All @@ -274,7 +274,7 @@ describe('TelemetryService', () => {

let postCalledAfterQuery = false;
telemetryDb.post.callsFake(async () => postCalledAfterQuery = telemetryDb.query.called);
clock = sinon.useFakeTimers(moment(NOW).add(1, 'days').valueOf()); // 1 day later ...
clock.tick('24:00:00'); // 1 day later ...
await service.record('test', 2);

expect(telemetryDb.post.callCount).to.equal(3); // third call
Expand Down Expand Up @@ -302,14 +302,14 @@ describe('TelemetryService', () => {
expect(telemetryDb.post.callCount).to.equal(1);
expect(metaDb.put.callCount).to.equal(0); // NO telemetry has been recorded yet

clock = sinon.useFakeTimers(moment(NOW).add(1, 'minutes').valueOf()); // 1 min later ...
clock.tick('01:00'); // 1 min later ...
await service.record('another.datapoint');

expect(telemetryDb.post.callCount).to.equal(2); // second call
expect(metaDb.put.callCount).to.equal(0); // still NO telemetry has been recorded (same day)

storageGetItemStub.withArgs('medic-greg-telemetry-date').returns(sameDay());
clock = sinon.useFakeTimers(moment(NOW).add(2, 'days').valueOf()); // 2 days later ...
clock.tick('48:00:00'); // 2 days later ...
await service.record('test', 2);

expect(telemetryDb.post.callCount).to.equal(3); // third call
Expand All @@ -319,18 +319,19 @@ describe('TelemetryService', () => {
expect(aggregatedDoc._id).to.match(/^telemetry-2018-11-10-greg-[\w-]+$/); // Today 2018-11-12 but aggregation is
expect(telemetryDb.destroy.callCount).to.equal(1); // from from 2 days ago (not Yesterday)

storageGetItemStub.withArgs('medic-greg-telemetry-date').returns(sameDay()); // same day now is 2 days ahead
storageGetItemStub.withArgs('medic-greg-telemetry-date').returns(sameDay()); // same day now is 2 days ahead

clock = sinon.useFakeTimers(moment(NOW).add(7, 'days').valueOf()); // 7 days later ...
clock.tick(5 * 24 * 60 * 60 * 1000); // 5 more days later ...
await service.record('point.a', 1);

expect(telemetryDb.post.callCount).to.equal(4); // 4th call
expect(metaDb.put.callCount).to.equal(2); // Telemetry IS recorded again
aggregatedDoc = metaDb.put.args[1][0];
expect(aggregatedDoc._id).to.match(/^telemetry-2018-11-12-greg-[\w-]+$/); // Now is Nov 19 but agg. is from Nov 12
storageGetItemStub.withArgs('medic-greg-telemetry-date').returns(sameDay()); // same day now is 7 days ahead

// A new record is added ...
clock = sinon.useFakeTimers(moment(NOW).add(2, 'hours').valueOf()); // ... 2 hours later ...
clock.tick('02:00:00'); // 2 hours later ...
await service.record('point.b', 0); // 1 record added
// ...the aggregation count is the same because
// the aggregation was already performed 2 hours ago within the same day
Expand Down
5 changes: 2 additions & 3 deletions webapp/tests/mocha/unit/initial-replication.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ const sinon = require('sinon');
require('chai').use(require('chai-as-promised'));
const rewire = require('rewire');
const { expect } = require('chai');
const initialReplication = rewire('../../../src/js/bootstrapper/initial-replication');
const utils = require('../../../src/js/bootstrapper/utils');

let initialReplication = rewire('../../../src/js/bootstrapper/initial-replication');
let localDb;
let remoteDb;
let userCtx;
Expand Down Expand Up @@ -132,7 +132,6 @@ describe('Initial replication', () => {
get: sinon.stub().resolves({}),
};
userCtx = { name: 'Skagen' };

await expect(initialReplication.isReplicationNeeded(localDb, userCtx)).to.be.rejectedWith(Error, 'boom');
});

Expand All @@ -148,7 +147,6 @@ describe('Initial replication', () => {
get: sinon.stub().rejects(new Error('and its gone')),
};
userCtx = { name: 'Skagen' };

expect(await initialReplication.isReplicationNeeded(localDb, userCtx)).to.equal(false);
});
});
Expand All @@ -169,6 +167,7 @@ describe('Initial replication', () => {
bulkGet: sinon.stub(),
};
clock = sinon.useFakeTimers();
initialReplication = rewire('../../../src/js/bootstrapper/initial-replication');
});

it('should perform initial replication', async () => {
Expand Down

0 comments on commit dcafa05

Please sign in to comment.