Skip to content

Commit

Permalink
chore(#621): update non-breaking dependencies (#623)
Browse files Browse the repository at this point in the history
* upgrade non-breaking dev dependencies

* why rewire...

* forgot .only

* upgrade prod dependencies

* silence grandpa eslint who cannot resolve a `require`

* not sure why test is passing locally but failing in CI

* .only

* debug CI

* debug CI - try force color in diff

* debug CI colors

* debug CI colors

* okay that fixed it, revert test back and remove logs

* .only

* remove unnecessary `{ color: true }` parameter

* comment eslint ignore

* sonar

* will this space make sonar happy?

* will this?

* this should.

* clamp `@parcel/watcher` to v2.1.0 because more recent versions either have incompatibilities with npm 10.4 (see parcel-bundler/watcher#156) or the watcher hangs ~5% of the time when unsubscribing (see #623 (comment))

* remove todos
  • Loading branch information
m5r authored Jul 22, 2024
1 parent d692bb1 commit 22b0d53
Show file tree
Hide file tree
Showing 8 changed files with 10,665 additions and 10,986 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ jobs:
build:
name: Build for Node version ${{ matrix.node-version }}
runs-on: ubuntu-22.04
env:
FORCE_COLOR: 1

strategy:
matrix:
Expand Down
21,578 changes: 10,622 additions & 10,956 deletions package-lock.json

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,25 @@
},
"homepage": "https://github.com/medic/cht-conf#readme",
"dependencies": {
"@medic/translation-checker": "^1.0.1",
"@parcel/watcher": "^2.0.5",
"@medic/translation-checker": "^1.1.0",
"@parcel/watcher": "^2.1.0",
"@xmldom/xmldom": "^0.8.10",
"async-retry": "^1.3.3",
"canonical-json": "0.0.4",
"csv-parse": "^4.16.0",
"csv-parse": "^5.5.6",
"dom-compare": "^0.6.0",
"eslint": "^6.8.0",
"eslint-loader": "^3.0.4",
"googleapis": "^84.0.0",
"iso-639-1": "^3.1.0",
"joi": "^17.11.0",
"json-diff": "^0.5.4",
"iso-639-1": "^3.1.2",
"joi": "^17.13.3",
"json-diff": "^1.0.6",
"json-stringify-safe": "^5.0.1",
"json2csv": "^4.5.4",
"mime-types": "^2.1.35",
"minimist": "^1.2.8",
"mkdirp": "^1.0.4",
"open": "^7.4.2",
"mkdirp": "^3.0.1",
"open": "^8.4.2",
"pluralize": "^8.0.0",
"pouchdb-adapter-http": "^7.2.2",
"pouchdb-core": "^7.2.2",
Expand All @@ -66,16 +66,16 @@
"redact-basic-auth": "^1.0.1",
"request": "^2.88.2",
"request-promise-native": "^1.0.9",
"semver": "^6.1.1",
"svgo": "^1.3.2",
"semver": "^7.6.2",
"svgo": "^3.3.2",
"terser-webpack-plugin": "^1.4.3",
"uuid": "^8.3.2",
"uuid": "^10.0.0",
"webpack": "^4.46.0",
"xpath": "0.0.33"
},
"devDependencies": {
"@commitlint/cli": "^13.2.0",
"@commitlint/config-conventional": "^13.2.0",
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"body-parser": "^1.20.2",
Expand All @@ -85,15 +85,15 @@
"chai-shallow-deep-equal": "^1.4.6",
"chai-xml": "^0.4.1",
"eslint-plugin-node": "^11.1.0",
"express": "^4.18.2",
"express": "^4.19.2",
"express-pouchdb": "^4.2.0",
"fs-extra": "8.1.0",
"husky": "^7.0.2",
"mocha": "^6.2.3",
"nyc": "^15.1.0",
"fs-extra": "11.2.0",
"husky": "^9.0.11",
"mocha": "^10.6.0",
"nyc": "^17.0.0",
"pouchdb-adapter-memory": "^7.2.2",
"rewire": "^5.0.0",
"semantic-release": "^18.0.0",
"sinon": "^8.1.1"
"rewire": "^7.0.0",
"semantic-release": "^22.0.0",
"sinon": "^18.0.0"
}
}
3 changes: 1 addition & 2 deletions src/fn/compress-svgs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ const environment = require('../lib/environment');
const fs = require('../lib/sync-fs');
const { info, trace, warn } = require('../lib/log');

const SVGO = require('svgo');
const svgo = new SVGO();
const svgo = require('svgo');

module.exports = {
requiresInstance: false,
Expand Down
5 changes: 3 additions & 2 deletions src/fn/create-users.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const csvParse = require('csv-parse/lib/sync');
// eslint-disable-next-line node/no-missing-require
const { parse: csvParse } = require('csv-parse/sync');
const userPrompt = require('../../src/lib/user-prompt');

const api = require('../lib/api');
Expand Down Expand Up @@ -90,4 +91,4 @@ const execute = async () => {
module.exports = {
requiresInstance: true,
execute
};
};
3 changes: 2 additions & 1 deletion src/lib/sync-fs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const csvParse = require('csv-parse/lib/sync');
// eslint-disable-next-line node/no-missing-require
const { parse: csvParse } = require('csv-parse/sync');
const fs = require('fs');
const mkdirp = require('mkdirp').sync;
const os = require('os');
Expand Down
10 changes: 8 additions & 2 deletions test/fn/upload-docs.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const sinon = require('sinon');

const api = require('../api-stub');
const environment = require('../../src/lib/environment');
const uploadDocs = rewire('../../src/fn/upload-docs');
let uploadDocs = rewire('../../src/fn/upload-docs');
const userPrompt = rewire('../../src/lib/user-prompt');
let readLine = { keyInYN: () => true };
userPrompt.__set__('readline', readLine);
Expand Down Expand Up @@ -72,7 +72,9 @@ describe('upload-docs', function() {
.onCall(0).throws({ error: 'timeout' })
.returns(Promise.resolve([{}]));
fs.recurseFiles = () => new Array(10).fill('').map((x, i) => `${i}.doc.json`);
sinon.useFakeTimers(0);
const clock = sinon.useFakeTimers(0);
uploadDocs = rewire('../../src/fn/upload-docs');
uploadDocs.__set__('userPrompt', userPrompt);

const imported_date = new Date(0).toISOString();
return uploadDocs.__with__({
Expand Down Expand Up @@ -102,6 +104,10 @@ describe('upload-docs', function() {
{ _id: '2', imported_date },
{ _id: '3', imported_date },
]);

clock.restore();
uploadDocs = rewire('../../src/fn/upload-docs');
uploadDocs.__set__('userPrompt', userPrompt);
});
});

Expand Down
8 changes: 6 additions & 2 deletions test/nools/task-emitter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ describe('task-emitter', () => {
});

it('given contact without reported_date, dueDate defaults to now', () => {
sinon.useFakeTimers();
const clock = sinon.useFakeTimers();

// given
const config = {
Expand All @@ -387,6 +387,8 @@ describe('task-emitter', () => {
const expected = new Date();
expected.setHours(0, 0, 0, 0);
expect(emitted[0].date.getTime()).to.eq(expected.getTime());

clock.restore();
});

it('dueDate function is invoked with expected data', () => {
Expand Down Expand Up @@ -672,7 +674,7 @@ describe('task-emitter', () => {

describe('defaultResolvedIf', () => {
it('given task definition without resolvedIf, it defaults to defaultResolvedIf', () => {
sinon.useFakeTimers();
const clock = sinon.useFakeTimers();

// given
const config = {
Expand All @@ -689,6 +691,8 @@ describe('task-emitter', () => {
// then
expect(utilsMock.isFormSubmittedInWindow.callCount).to.equal(1);
expect(emitted[0].resolved).to.be.true;

clock.restore();
});

it('this.definition.defaultResolvedIf can be used inside resolvedIf', () => {
Expand Down

0 comments on commit 22b0d53

Please sign in to comment.