@engine9-io/input-tools 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -3,7 +3,7 @@ import path from 'node:path';
3
3
  import dayjs from 'dayjs';
4
4
  import debug$0 from 'debug';
5
5
  import unzipper from 'unzipper';
6
- import uuid from 'uuid';
6
+ import { v4 as uuidv4, v5 as uuidv5, v7 as uuidv7, validate as uuidIsValid } from 'uuid';
7
7
  import archiver from 'archiver';
8
8
  import handlebars from 'handlebars';
9
9
  import FileUtilities from './file/FileUtilities.js';
@@ -11,7 +11,7 @@ import tools from './file/tools.js';
11
11
  import ForEachEntry from './ForEachEntry.js';
12
12
  import { TIMELINE_ENTRY_TYPES } from './timelineTypes.js';
13
13
  const debug = debug$0('@engine9/input-tools');
14
- const { v4: uuidv4, v5: uuidv5, v7: uuidv7, validate: uuidIsValid } = uuid;
14
+
15
15
  const {
16
16
  appendPostfix,
17
17
  bool,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@engine9-io/input-tools",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "type": "module",
5
5
  "description": "Tools for dealing with Engine9 inputs",
6
6
  "main": "index.js",
package/test/file.js CHANGED
@@ -16,8 +16,8 @@ it('Should list a directory', async () => {
16
16
  });
17
17
  it('Should be able to analyze CSV files with and without header lines', async () => {
18
18
  const futil = new FileUtilities({ accountId: 'test' });
19
- const f1 = await futil.columns({ filename: __dirname + '/sample/fileWithHead.csv' });
19
+ const f1 = await futil.columns({ filename: import.meta.dirname + '/sample/fileWithHead.csv' });
20
20
  assert.equal(f1.likelyHeaderLines, 1, 'Number of header lines should be 1');
21
- const f2 = await futil.columns({ filename: __dirname + '/sample/fileWithoutHead.csv' });
21
+ const f2 = await futil.columns({ filename: import.meta.dirname + '/sample/fileWithoutHead.csv' });
22
22
  assert.equal(f2.likelyHeaderLines, 0, 'Number of header lines should be 1');
23
23
  });