@rdfx/fs 0.0.52 → 0.0.54

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,7 +1,7 @@
1
1
  import type { DatasetCore, Stream } from "@rdfjs/types";
2
2
  import type { PrefixMap } from "@rdfx/collection";
3
+ import { type Logger } from "@rdfx/logger";
3
4
  import { type Either } from "purify-ts";
4
- import { type Logger } from "ts-log";
5
5
  import type { FileSystem } from "./FileSystem.js";
6
6
  import { RdfFile } from "./RdfFile.js";
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  import path from "node:path";
2
+ import { nopLogger } from "@rdfx/logger";
2
3
  import { iterableToStream } from "@rdfx/stream";
3
4
  import { EitherAsync } from "purify-ts";
4
- import { dummyLogger } from "ts-log";
5
5
  import { NodeFileSystem } from "./NodeFileSystem.js";
6
6
  import { RdfFile } from "./RdfFile.js";
7
7
  /**
@@ -14,7 +14,7 @@ export class RdfDirectory {
14
14
  constructor(path, options) {
15
15
  this.path = path;
16
16
  this.fileSystem = options?.fileSystem ?? NodeFileSystem.instance;
17
- this.logger = options?.logger ?? dummyLogger;
17
+ this.logger = options?.logger ?? nopLogger;
18
18
  }
19
19
  async *files(options) {
20
20
  const statEither = await this.fileSystem.stat(this.path);
@@ -1,7 +1,7 @@
1
1
  import type { DatasetCore, Stream } from "@rdfjs/types";
2
2
  import { GraphIdentifier, type GraphStore } from "@rdfx/graph-store";
3
+ import { type Logger } from "@rdfx/logger";
3
4
  import { Either, Maybe } from "purify-ts";
4
- import { type Logger } from "ts-log";
5
5
  import type { FileSystem } from "./FileSystem.js";
6
6
  /**
7
7
  * A GraphStore implementation backed by files in a directory.
@@ -4,10 +4,10 @@ import { datasetFactory } from "@rdfx/collection";
4
4
  import dataFactory from "@rdfx/data-factory";
5
5
  import { RdfFormat, uncompressedRdfFormatsByMimeType } from "@rdfx/format";
6
6
  import { GraphIdentifier } from "@rdfx/graph-store";
7
+ import { nopLogger } from "@rdfx/logger";
7
8
  import parsers from "@rdfx/parser";
8
9
  import { NTriplesTerm } from "@rdfx/string";
9
10
  import { Either, EitherAsync, Left, Maybe } from "purify-ts";
10
- import { dummyLogger } from "ts-log";
11
11
  import { NodeFileSystem } from "./NodeFileSystem.js";
12
12
  import { RdfDirectory } from "./RdfDirectory.js";
13
13
  /**
@@ -21,7 +21,7 @@ export class RdfDirectoryGraphStore {
21
21
  constructor(path, options) {
22
22
  this.path = path;
23
23
  this.fileSystem = options?.fileSystem ?? NodeFileSystem.instance;
24
- this.logger = options?.logger ?? dummyLogger;
24
+ this.logger = options?.logger ?? nopLogger;
25
25
  }
26
26
  async clear() {
27
27
  return EitherAsync(async ({ liftEither }) => {
package/dist/RdfFile.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import type { DatasetCore, Stream } from "@rdfjs/types";
2
2
  import type { PrefixMap } from "@rdfx/collection";
3
3
  import { RdfFormat } from "@rdfx/format";
4
+ import { type Logger } from "@rdfx/logger";
4
5
  import type serializers from "@rdfx/serializer";
5
6
  import { Either } from "purify-ts";
6
- import { type Logger } from "ts-log";
7
7
  import type { FileSystem } from "./FileSystem.js";
8
8
  export declare class RdfFile {
9
9
  readonly path: string;
package/dist/RdfFile.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { RdfFormat, uncompressedRdfFormatsByMimeType } from "@rdfx/format";
2
+ import { nopLogger } from "@rdfx/logger";
2
3
  import { Either, EitherAsync, Left } from "purify-ts";
3
- import { dummyLogger } from "ts-log";
4
4
  import { CompressedRdfStream } from "./CompressedRdfStream.js";
5
5
  import { NodeFileSystem } from "./NodeFileSystem.js";
6
6
  export class RdfFile {
@@ -14,7 +14,7 @@ export class RdfFile {
14
14
  this.format =
15
15
  options?.format ??
16
16
  uncompressedRdfFormatsByMimeType["application/n-quads"];
17
- this.logger = options?.logger ?? dummyLogger;
17
+ this.logger = options?.logger ?? nopLogger;
18
18
  }
19
19
  static fromPath(filePath, options) {
20
20
  return RdfFormat.fromFileName(filePath).map((format) => new RdfFile(filePath, {
@@ -38,7 +38,7 @@ export class RdfFile {
38
38
  for (const [existingPrefix, existingPrefixNode,] of prefixMap.entries()) {
39
39
  if (existingPrefix === prefix) {
40
40
  if (!prefixNode.equals(existingPrefixNode)) {
41
- this.logger.warn("conflicting prefix %s: %s vs. %s", prefixNode.value, existingPrefixNode.value);
41
+ this.logger.warn("conflicting prefix %s: %s vs. %s", prefix, prefixNode.value, existingPrefixNode.value);
42
42
  return;
43
43
  }
44
44
  }
@@ -2,8 +2,8 @@ import type { DatasetCore, Stream } from "@rdfjs/types";
2
2
  import { type PrefixMap } from "@rdfx/collection";
3
3
  import { RdfFormat } from "@rdfx/format";
4
4
  import { type GraphIdentifier, type GraphStore } from "@rdfx/graph-store";
5
+ import { type Logger } from "@rdfx/logger";
5
6
  import { Either, type Maybe } from "purify-ts";
6
- import { type Logger } from "ts-log";
7
7
  import type { FileSystem } from "./FileSystem.js";
8
8
  /**
9
9
  * A GraphStore implementation backed by a single RdfFile.
@@ -7,9 +7,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { datasetFactory } from "@rdfx/collection";
8
8
  import { RdfFormat } from "@rdfx/format";
9
9
  import { RdfjsDatasetGraphStore, } from "@rdfx/graph-store";
10
+ import { nopLogger } from "@rdfx/logger";
10
11
  import { iterableToStream } from "@rdfx/stream";
11
12
  import { Either, EitherAsync, Left } from "purify-ts";
12
- import { dummyLogger } from "ts-log";
13
13
  import { Memoize } from "typescript-memoize";
14
14
  import { isErrnoException } from "./ErrnoException.js";
15
15
  import { NodeFileSystem } from "./NodeFileSystem.js";
@@ -28,7 +28,7 @@ export class RdfFileGraphStore {
28
28
  this.fileSystem = options?.fileSystem ?? NodeFileSystem.instance;
29
29
  this.format =
30
30
  options?.format ?? RdfFormat.fromFileName(path).unsafeCoerce();
31
- this.logger = options?.logger ?? dummyLogger;
31
+ this.logger = options?.logger ?? nopLogger;
32
32
  this.prefixMap = options?.prefixMap;
33
33
  }
34
34
  get rdfFile() {
@@ -69,7 +69,7 @@ export class RdfFileGraphStore {
69
69
  return (await EitherAsync(async ({ liftEither }) => {
70
70
  this.logger.debug("parsing dataset from %s", this.path);
71
71
  const dataset = await liftEither(await this.rdfFile.parseInto(datasetFactory.dataset()));
72
- this.logger.debug("parsed %d quads from %d", dataset.size, this.path);
72
+ this.logger.debug("parsed %d quads from %s", dataset.size, this.path);
73
73
  return dataset;
74
74
  })).chainLeft((error) => {
75
75
  if (isErrnoException(error) && error.code === "ENOENT") {
@@ -1,5 +1,5 @@
1
+ import type { Logger } from "@rdfx/logger";
1
2
  import { type Either } from "purify-ts";
2
- import type { Logger } from "ts-log";
3
3
  import type { FileSystem } from "./FileSystem.js";
4
4
  import { RdfDirectory } from "./RdfDirectory.js";
5
5
  import { RdfFile } from "./RdfFile.js";
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "dependencies": {
3
- "@rdfx/collection": "0.0.52",
4
- "@rdfx/data-factory": "0.0.52",
5
- "@rdfx/format": "0.0.52",
6
- "@rdfx/graph-store": "0.0.52",
7
- "@rdfx/parser": "0.0.52",
8
- "@rdfx/serializer": "0.0.52",
9
- "@rdfx/stream": "0.0.52",
10
- "@rdfx/string": "0.0.52",
3
+ "@rdfx/collection": "0.0.54",
4
+ "@rdfx/data-factory": "0.0.54",
5
+ "@rdfx/format": "0.0.54",
6
+ "@rdfx/graph-store": "0.0.54",
7
+ "@rdfx/logger": "0.0.54",
8
+ "@rdfx/parser": "0.0.54",
9
+ "@rdfx/serializer": "0.0.54",
10
+ "@rdfx/stream": "0.0.54",
11
+ "@rdfx/string": "0.0.54",
11
12
  "@rdfjs/types": "~2.0.1",
12
13
  "@types/node": "^24",
13
14
  "@types/unbzip2-stream": "~1.4.3",
14
15
  "purify-ts": "~2.1.4",
15
- "ts-log": "~3.0.2",
16
16
  "typescript-memoize": "~1.1.1",
17
17
  "unbzip2-stream": "~1.4.3"
18
18
  },
19
19
  "devDependencies": {
20
- "@rdfx/testing": "0.0.52"
20
+ "@rdfx/testing": "0.0.54"
21
21
  },
22
22
  "files": [
23
23
  "LICENSE",
@@ -42,5 +42,5 @@
42
42
  },
43
43
  "type": "module",
44
44
  "types": "./dist/index.d.ts",
45
- "version": "0.0.52"
45
+ "version": "0.0.54"
46
46
  }