Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"global-require": "off",
"implicit-arrow-linebreak": "off",
"import/newline-after-import": "off",
"import/no-unresolved": ["error", { "ignore": ["^uuid$"] }], // uuid v9+ uses ES modules; eslint-plugin-import has trouble resolving it but it works fine at runtime
"import/order": "off",
"lines-between-class-members": "off",
"max-classes-per-file": "off",
Expand Down
2 changes: 1 addition & 1 deletion lib/data/briefcase.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
const { Transform } = require('stream');
const hparser = require('htmlparser2');
const { identity, last } = require('ramda');
const csv = require('csv-stringify');
const { stringify: csv } = require('csv-stringify');
const sanitize = require('sanitize-filename');
const { SchemaStack } = require('./schema');
const { rejectIfError } = require('../util/promise');
Expand Down
6 changes: 3 additions & 3 deletions lib/data/client-audits.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
// except according to the terms contained in the LICENSE file.

const { Transform } = require('stream');
const parse = require('csv-parse');
const csv = require('csv-stringify');
const { parse } = require('csv-parse');
const { stringify: csv } = require('csv-stringify');
const sanitize = require('sanitize-filename');
const { PartialPipe } = require('../util/stream');
const { zipPart } = require('../util/zip');

const headers = [ 'event', 'node', 'start', 'end', 'latitude', 'longitude', 'accuracy', 'old-value', 'new-value', 'user', 'change-reason' ];

// used by parseClientAudits below.
const parseOptions = { bom: true, trim: true, skip_empty_lines: true, relax_column_count: true, relax: true };
const parseOptions = { bom: true, trim: true, skip_empty_lines: true, relax_column_count: true, relax_quotes: true };
const headerLookup = {};
for (const header of headers) headerLookup[header] = true;

Expand Down
4 changes: 2 additions & 2 deletions lib/data/entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
// for dealing with the XForms XML schema and transforming submission XML into
// entities.

const csv = require('csv-stringify');
const { stringify: csv } = require('csv-stringify');
const { clone, path, mergeLeft } = require('ramda');
const { Transform } = require('stream');
const uuid = require('uuid').v4;
const { v4: uuid } = require('uuid');
const hparser = require('htmlparser2');
const { last } = require('ramda');
const { PartialPipe } = require('../util/stream');
Expand Down
2 changes: 1 addition & 1 deletion lib/data/odk-reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// including this file, may be copied, modified, propagated, or distributed
// except according to the terms contained in the LICENSE file.

const uuid = require('uuid').v4;
const { v4: uuid } = require('uuid');
const { encodeXML } = require('entities');

const metaWithUuidXml = () => {
Expand Down
2 changes: 1 addition & 1 deletion lib/data/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
const { always, equals, last, map } = require('ramda');
const ptr = last; // just rename to make it more relevant to our context.
const hparser = require('htmlparser2');
const parse = require('csv-parse/lib/sync');
const { parse } = require('csv-parse/sync');
const { decodeXML } = require('entities');
const semverSatisfies = require('semver/functions/satisfies');
const Option = require('../util/option');
Expand Down
2 changes: 1 addition & 1 deletion lib/model/frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

const { sql } = require('slonik');
const { pick, without, remove, indexOf } = require('ramda');
const uuid = require('uuid').v4;
const { v4: uuid } = require('uuid');
const { pickAll, noargs } = require('../util/util');
const Option = require('../util/option');
const { rejectIf } = require('../util/promise');
Expand Down
2 changes: 1 addition & 1 deletion lib/model/frames/submission.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// including this file, may be copied, modified, propagated, or distributed
// except according to the terms contained in the LICENSE file.

const uuid = require('uuid').v4;
const { v4: uuid } = require('uuid');
const { Frame, table, readable, writable, embedded, into } = require('../frame');
const { consumeAndBuffer } = require('../../util/stream');
const { resolve } = require('../../util/promise');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// except according to the terms contained in the LICENSE file.
//

const uuid = require('uuid').v4;
const { v4: uuid } = require('uuid');

/* eslint-disable */ // because eslint's indentation expectations here are insane.
const up = (db) =>
Expand Down
2 changes: 1 addition & 1 deletion lib/model/migrations/20180112-02-add-field-keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// except according to the terms contained in the LICENSE file.
//

const uuid = require('uuid').v4;
const { v4: uuid } = require('uuid');

const up = (knex) =>
knex.schema.createTable('field_keys', (fk) => {
Expand Down
2 changes: 1 addition & 1 deletion lib/model/migrations/20181206-01-add-projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// including this file, may be copied, modified, propagated, or distributed
// except according to the terms contained in the LICENSE file.

const uuid = require('uuid').v4;
const { v4: uuid } = require('uuid');

const up = async (db) => {
// first create the projects table itself.
Expand Down
2 changes: 1 addition & 1 deletion lib/model/query/actees.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// including this file, may be copied, modified, propagated, or distributed
// except according to the terms contained in the LICENSE file.

const uuid = require('uuid').v4;
const { v4: uuid } = require('uuid');
const { sql } = require('slonik');
const { Actee } = require('../frames');
const { construct } = require('../../util/util');
Expand Down
Loading