@chronicle.app/linkedin 0.3.0 → 0.4.0

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.
@@ -1,4 +1,4 @@
1
- import { ArchiveExtractor, Extractor } from '@chronicle.app/etl';
1
+ import { ArchiveExtractor, Extractor, InputNotFound, fileError } from '@chronicle.app/etl';
2
2
  import { parse } from 'csv-parse/sync';
3
3
  import { readdir, readFile, stat } from 'node:fs/promises';
4
4
  import { join } from 'node:path';
@@ -173,8 +173,11 @@ export class LinkedInArchiveExtractor extends ArchiveExtractor {
173
173
  try {
174
174
  entries = await readdir(input);
175
175
  }
176
- catch {
177
- throw new Error(`Could not read the LinkedIn export directory ${input}`);
176
+ catch (error) {
177
+ const typed = fileError(error, input, 'LinkedIn export');
178
+ throw typed === error
179
+ ? new InputNotFound("Couldn't read the LinkedIn export", { path: input, cause: error })
180
+ : typed;
178
181
  }
179
182
  this.fileIndex = new Map(entries.map(name => [name.toLowerCase(), name]));
180
183
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chronicle.app/linkedin",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [
@@ -22,9 +22,9 @@
22
22
  "type": "module",
23
23
  "description": "Chronicle plugin for the LinkedIn member data export archive",
24
24
  "devDependencies": {
25
- "@chronicle.app/etl": "0.3.0",
26
- "@chronicle.app/schema": "0.3.0",
27
- "@chronicle.app/tsconfig": "0.3.0",
25
+ "@chronicle.app/etl": "0.4.0",
26
+ "@chronicle.app/schema": "0.4.0",
27
+ "@chronicle.app/tsconfig": "0.4.0",
28
28
  "@types/node": "^22.10.1",
29
29
  "typescript": "^5.7.2"
30
30
  },