Skip to content

Commit a5a787b

Browse files
committed
Upgrade uuid, change import, add eslint ignore config
1 parent e04a8e6 commit a5a787b

19 files changed

+26
-25
lines changed

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"global-require": "off",
2020
"implicit-arrow-linebreak": "off",
2121
"import/newline-after-import": "off",
22+
"import/no-unresolved": ["error", { "ignore": ["^uuid$"] }], // uuid v9+ uses ES modules; eslint-plugin-import has trouble resolving it but it works fine at runtime
2223
"import/order": "off",
2324
"lines-between-class-members": "off",
2425
"max-classes-per-file": "off",

lib/data/entity.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
const csv = require('csv-stringify');
1515
const { clone, path, mergeLeft } = require('ramda');
1616
const { Transform } = require('stream');
17-
const uuid = require('uuid').v4;
17+
const { v4: uuid } = require('uuid');
1818
const hparser = require('htmlparser2');
1919
const { last } = require('ramda');
2020
const { PartialPipe } = require('../util/stream');

lib/data/odk-reporter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// including this file, may be copied, modified, propagated, or distributed
88
// except according to the terms contained in the LICENSE file.
99

10-
const uuid = require('uuid').v4;
10+
const { v4: uuid } = require('uuid');
1111
const { encodeXML } = require('entities');
1212

1313
const metaWithUuidXml = () => {

lib/model/frame.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
const { sql } = require('slonik');
1111
const { pick, without, remove, indexOf } = require('ramda');
12-
const uuid = require('uuid').v4;
12+
const { v4: uuid } = require('uuid');
1313
const { pickAll, noargs } = require('../util/util');
1414
const Option = require('../util/option');
1515
const { rejectIf } = require('../util/promise');

lib/model/frames/submission.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// including this file, may be copied, modified, propagated, or distributed
88
// except according to the terms contained in the LICENSE file.
99

10-
const uuid = require('uuid').v4;
10+
const { v4: uuid } = require('uuid');
1111
const { Frame, table, readable, writable, embedded, into } = require('../frame');
1212
const { consumeAndBuffer } = require('../../util/stream');
1313
const { resolve } = require('../../util/promise');

lib/model/migrations/20171030-01-add-default-authz-records.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// except according to the terms contained in the LICENSE file.
99
//
1010

11-
const uuid = require('uuid').v4;
11+
const { v4: uuid } = require('uuid');
1212

1313
/* eslint-disable */ // because eslint's indentation expectations here are insane.
1414
const up = (db) =>

lib/model/migrations/20180112-02-add-field-keys.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// except according to the terms contained in the LICENSE file.
99
//
1010

11-
const uuid = require('uuid').v4;
11+
const { v4: uuid } = require('uuid');
1212

1313
const up = (knex) =>
1414
knex.schema.createTable('field_keys', (fk) => {

lib/model/migrations/20181206-01-add-projects.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// including this file, may be copied, modified, propagated, or distributed
88
// except according to the terms contained in the LICENSE file.
99

10-
const uuid = require('uuid').v4;
10+
const { v4: uuid } = require('uuid');
1111

1212
const up = async (db) => {
1313
// first create the projects table itself.

lib/model/query/actees.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// including this file, may be copied, modified, propagated, or distributed
88
// except according to the terms contained in the LICENSE file.
99

10-
const uuid = require('uuid').v4;
10+
const { v4: uuid } = require('uuid');
1111
const { sql } = require('slonik');
1212
const { Actee } = require('../frames');
1313
const { construct } = require('../../util/util');

package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)