Skip to content

Commit d210ccc

Browse files
authored
Updating more challenging packages for 2025.4 (#1704)
* Upgrade fetch-cookie and how it is imported * Upgrade uuid, change import, add eslint ignore config and comment * Upgrade csv-parse from 4 to 6 * Upgrade csv-parse from 5 to 6 and change imports * Upgrade @playwright/test * Upgrade @redocly/cli * Upgrade @sinonjs/fake-timers * Upgrade luxon from 0 to 3
1 parent 37f962e commit d210ccc

23 files changed

+204
-301
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/briefcase.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const { Transform } = require('stream');
1111
const hparser = require('htmlparser2');
1212
const { WritableStream } = require('htmlparser2/WritableStream');
1313
const { identity, last } = require('ramda');
14-
const csv = require('csv-stringify');
14+
const { stringify: csv } = require('csv-stringify');
1515
const sanitize = require('sanitize-filename');
1616
const { SchemaStack } = require('./schema');
1717
const { rejectIfError } = require('../util/promise');

lib/data/client-audits.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@
88
// except according to the terms contained in the LICENSE file.
99

1010
const { Transform } = require('stream');
11-
const parse = require('csv-parse');
12-
const csv = require('csv-stringify');
11+
const { parse } = require('csv-parse');
12+
const { stringify: csv } = require('csv-stringify');
1313
const sanitize = require('sanitize-filename');
1414
const { PartialPipe } = require('../util/stream');
1515
const { zipPart } = require('../util/zip');
1616

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

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

lib/data/entity.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
// for dealing with the XForms XML schema and transforming submission XML into
1212
// entities.
1313

14-
const csv = require('csv-stringify');
14+
const { stringify: 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/data/schema.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
const { always, equals, last, map } = require('ramda');
2121
const ptr = last; // just rename to make it more relevant to our context.
2222
const hparser = require('htmlparser2');
23-
const parse = require('csv-parse/lib/sync');
23+
const { parse } = require('csv-parse/sync');
2424
const { decodeXML } = require('entities');
2525
const semverSatisfies = require('semver/functions/satisfies');
2626
const Option = require('../util/option');

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) => {

0 commit comments

Comments
 (0)