@shaclmate/compiler 4.0.87 → 4.0.89

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,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 { Generator } from "./generators/Generator.js";
4
4
  import type { ShapesGraph } from "./input/ShapesGraph.js";
5
5
  export declare class Compiler {
@@ -1,7 +1,7 @@
1
1
  import type { BlankNode, NamedNode } from "@rdfjs/types";
2
2
  import { TermMap } from "@rdfx/collection";
3
+ import type { Logger } from "@rdfx/logger";
3
4
  import { Either } from "purify-ts";
4
- import type { Logger } from "ts-log";
5
5
  import type * as ast from "./ast/index.js";
6
6
  import type * as input from "./input/index.js";
7
7
  export declare class ShapesGraphToAstTransformer {
@@ -3,6 +3,9 @@ import { AbstractTypedLiteralType } from "./AbstractTypedLiteralType.js";
3
3
  import { type Code } from "./ts-poet-wrapper.js";
4
4
  export declare abstract class AbstractDateType extends AbstractTypedLiteralType<Date> {
5
5
  protected readonly inlineExpression: Code;
6
+ /**
7
+ * Date has no conversion function to avoid source type overlap with other types (e.g., string).
8
+ */
6
9
  readonly conversionFunction: Maybe<AbstractTypedLiteralType.ConversionFunction>;
7
10
  readonly equalsFunction: Code;
8
11
  readonly filterFunction: Code;
@@ -3,6 +3,9 @@ import { AbstractTypedLiteralType } from "./AbstractTypedLiteralType.js";
3
3
  import { code, literalOf } from "./ts-poet-wrapper.js";
4
4
  export class AbstractDateType extends AbstractTypedLiteralType {
5
5
  inlineExpression = code `Date`;
6
+ /**
7
+ * Date has no conversion function to avoid source type overlap with other types (e.g., string).
8
+ */
6
9
  conversionFunction = Maybe.empty();
7
10
  equalsFunction = code `${this.reusables.snippets.dateEquals}`;
8
11
  filterFunction = code `${this.reusables.snippets.filterDate}`;
@@ -1,5 +1,5 @@
1
+ import type { Logger } from "@rdfx/logger";
1
2
  import type { Maybe } from "purify-ts";
2
- import type { Logger } from "ts-log";
3
3
  import type { ObjectDiscriminatedUnionType } from "./ObjectDiscriminatedUnionType.js";
4
4
  import type { ObjectType } from "./ObjectType.js";
5
5
  import type { Reusables } from "./Reusables.js";
@@ -7,6 +7,11 @@ import { type Code } from "./ts-poet-wrapper.js";
7
7
  * Abstract base class of typed literals whose datatype corresponds to a JavaScript primitive type.
8
8
  */
9
9
  export declare abstract class AbstractPrimitiveType<ValueT extends Primitive> extends AbstractTypedLiteralType<ValueT> {
10
+ /**
11
+ * Primitive types have no conversion functions to avoid source type overlap with other primitive types.
12
+ *
13
+ * A property that can take on multiple primitive types should be a union.
14
+ */
10
15
  readonly conversionFunction: Maybe<AbstractLiteralType.ConversionFunction>;
11
16
  readonly equalsFunction: Code;
12
17
  protected get inlineExpression(): Code;
@@ -13,6 +13,11 @@ import { arrayOf, code, joinCode } from "./ts-poet-wrapper.js";
13
13
  * Abstract base class of typed literals whose datatype corresponds to a JavaScript primitive type.
14
14
  */
15
15
  export class AbstractPrimitiveType extends AbstractTypedLiteralType {
16
+ /**
17
+ * Primitive types have no conversion functions to avoid source type overlap with other primitive types.
18
+ *
19
+ * A property that can take on multiple primitive types should be a union.
20
+ */
16
21
  conversionFunction = Maybe.empty();
17
22
  equalsFunction = code `${this.reusables.snippets.strictEquals}`;
18
23
  get inlineExpression() {
@@ -1,6 +1,6 @@
1
1
  import type { BlankNode, NamedNode } from "@rdfjs/types";
2
+ import type { Logger } from "@rdfx/logger";
2
3
  import { Maybe } from "purify-ts";
3
- import type { Logger } from "ts-log";
4
4
  import { AbstractType_ConversionFunction } from "./_AbstractType/AbstractType_ConversionFunction.js";
5
5
  import type { AbstractType_DiscriminantProperty } from "./_AbstractType/AbstractType_DiscriminantProperty.js";
6
6
  import { AbstractType_GraphqlType } from "./_AbstractType/AbstractType_GraphqlType.js";
@@ -6,6 +6,9 @@ import { AbstractTypedLiteralType } from "./AbstractTypedLiteralType.js";
6
6
  import { type Code } from "./ts-poet-wrapper.js";
7
7
  export declare class BigDecimalType extends AbstractTypedLiteralType<Decimal> {
8
8
  protected readonly inlineExpression: Code;
9
+ /**
10
+ * BigDecimal has no conversion function to avoid source type overlap with other types (e.g., string).
11
+ */
9
12
  readonly conversionFunction: Maybe<AbstractLiteralType.ConversionFunction>;
10
13
  readonly filterFunction: Code;
11
14
  readonly filterType: Code;
@@ -11,6 +11,9 @@ import { AbstractTypedLiteralType } from "./AbstractTypedLiteralType.js";
11
11
  import { code, literalOf } from "./ts-poet-wrapper.js";
12
12
  export class BigDecimalType extends AbstractTypedLiteralType {
13
13
  inlineExpression = code `${this.reusables.imports.BigDecimal}`;
14
+ /**
15
+ * BigDecimal has no conversion function to avoid source type overlap with other types (e.g., string).
16
+ */
14
17
  conversionFunction = Maybe.empty();
15
18
  filterFunction = code `${this.reusables.snippets.filterBigDecimal}`;
16
19
  filterType = code `${this.reusables.snippets.NumericFilter}<${this.reusables.imports.BigDecimal}>`;
@@ -1,4 +1,4 @@
1
- import type { Logger } from "ts-log";
1
+ import type { Logger } from "@rdfx/logger";
2
2
  import type { ObjectDiscriminatedUnionType } from "./ObjectDiscriminatedUnionType.js";
3
3
  import type { ObjectType } from "./ObjectType.js";
4
4
  import type { Reusables } from "./Reusables.js";
@@ -11,7 +11,7 @@ declare const Super: (abstract new ({ partialType, resolveType, ...superParamete
11
11
  comment: Maybe<string>;
12
12
  configuration: import("./TsGenerator.js").TsGenerator.Configuration;
13
13
  label: Maybe<string>;
14
- logger: import("ts-log").Logger;
14
+ logger: import("@rdfx/logger").Logger;
15
15
  reusables: import("./Reusables.js").Reusables;
16
16
  shapeIdentifier: import("@rdfjs/types").BlankNode | import("@rdfjs/types").NamedNode;
17
17
  }) => AbstractLazyType<OptionType<AbstractLazyType.ItemTypeConstraint>, OptionType<AbstractLazyType.ItemTypeConstraint>>) & {
@@ -1,4 +1,4 @@
1
- import type { Logger } from "ts-log";
1
+ import type { Logger } from "@rdfx/logger";
2
2
  import { Imports } from "./Imports.js";
3
3
  import { Snippets } from "./Snippets.js";
4
4
  import type { TsGenerator } from "./TsGenerator.js";
@@ -1,5 +1,5 @@
1
1
  import type { BlankNode, Literal, NamedNode, Variable } from "@rdfjs/types";
2
- import type { Logger } from "ts-log";
2
+ import type { Logger } from "@rdfx/logger";
3
3
  import type { Imports } from "./Imports.js";
4
4
  import type { Snippet } from "./Snippet.js";
5
5
  import type { Snippets } from "./Snippets.js";
@@ -1,4 +1,4 @@
1
- import type { Logger } from "ts-log";
1
+ import type { Logger } from "@rdfx/logger";
2
2
  import type { Imports } from "./Imports.js";
3
3
  import type { Snippet } from "./Snippet.js";
4
4
  import type { TsGenerator } from "./TsGenerator.js";
@@ -1,4 +1,4 @@
1
- import type { Logger } from "ts-log";
1
+ import type { Logger } from "@rdfx/logger";
2
2
  import type * as ast from "../../ast/index.js";
3
3
  import type { Generator } from "../Generator.js";
4
4
  import type { TsFeature } from "./TsFeature.js";
@@ -1,5 +1,5 @@
1
1
  import type { Literal, NamedNode } from "@rdfjs/types";
2
- import type { Logger } from "ts-log";
2
+ import type { Logger } from "@rdfx/logger";
3
3
  import * as ast from "../../ast/index.js";
4
4
  import { DiscriminatedUnionType } from "./DiscriminatedUnionType.js";
5
5
  import { ObjectDiscriminatedUnionType } from "./ObjectDiscriminatedUnionType.js";
@@ -1,5 +1,5 @@
1
+ import type { Logger } from "@rdfx/logger";
1
2
  import { Maybe } from "purify-ts";
2
- import type { Logger } from "ts-log";
3
3
  import type { ObjectType } from "./ObjectType.js";
4
4
  import type { Reusables } from "./Reusables.js";
5
5
  import type { TsGenerator } from "./TsGenerator.js";
@@ -1,4 +1,4 @@
1
- import type { Logger } from "ts-log";
1
+ import type { Logger } from "@rdfx/logger";
2
2
  import type * as ast from "../../ast/index.js";
3
3
  import type { Generator } from "../Generator.js";
4
4
  export declare class ZodGenerator implements Generator {
@@ -1,5 +1,5 @@
1
+ import type { Logger } from "@rdfx/logger";
1
2
  import type { Maybe } from "purify-ts";
2
- import type { Logger } from "ts-log";
3
3
  import type { Reusables } from "../Reusables.js";
4
4
  import { rdfjsTermExpression } from "../rdfjsTermExpression.js";
5
5
  import type { TsGenerator } from "../TsGenerator.js";
@@ -1,5 +1,5 @@
1
1
  import type { BlankNode, Literal, NamedNode, Variable } from "@rdfjs/types";
2
- import type { Logger } from "ts-log";
2
+ import type { Logger } from "@rdfx/logger";
3
3
  import type { Imports } from "./Imports.js";
4
4
  import type { Snippets } from "./Snippets.js";
5
5
  import { type Code } from "./ts-poet-wrapper.js";
@@ -1,8 +1,8 @@
1
1
  import type { DatasetCore } from "@rdfjs/types";
2
2
  import type { PrefixMap } from "@rdfx/collection";
3
+ import type { Logger } from "@rdfx/logger";
3
4
  import { AbstractShapesGraph } from "@shaclmate/shacl-ast";
4
5
  import type { Either } from "purify-ts";
5
- import type { Logger } from "ts-log";
6
6
  import type { Ast } from "../ast/Ast.js";
7
7
  import type { Generator } from "../generators/Generator.js";
8
8
  import * as generated from "./input.shaclmate.js";
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "dependencies": {
3
- "@shaclmate/shacl-ast": "4.0.87",
3
+ "@shaclmate/shacl-ast": "4.0.89",
4
4
  "@rdfjs/types": "~2.0.1",
5
- "@rdfx/collection": "0.0.50",
6
- "@rdfx/data-factory": "0.0.50",
7
- "@rdfx/literal": "0.0.50",
8
- "@rdfx/resource": "0.0.50",
5
+ "@rdfx/collection": "0.0.56",
6
+ "@rdfx/data-factory": "0.0.56",
7
+ "@rdfx/literal": "0.0.56",
8
+ "@rdfx/logger": "0.0.56",
9
+ "@rdfx/resource": "0.0.56",
9
10
  "@sindresorhus/base62": "~0.1.0",
10
11
  "@tpluscode/rdf-ns-builders": "~4.3.0",
11
12
  "change-case": "~5.4.4",
@@ -14,13 +15,12 @@
14
15
  "purify-ts": "~2.1.4",
15
16
  "reserved-identifiers": "~1.0.0",
16
17
  "ts-invariant": "~0.10.3",
17
- "ts-log": "~3.0.2",
18
18
  "ts-poet": "~6.12.0",
19
19
  "typescript-memoize": "~1.1.1"
20
20
  },
21
21
  "devDependencies": {
22
- "@rdfx/fs": "0.0.50",
23
- "@rdfx/serializers": "0.0.50"
22
+ "@rdfx/fs": "0.0.56",
23
+ "@rdfx/serializer": "0.0.56"
24
24
  },
25
25
  "files": [
26
26
  "dist/Compiler.d.ts",
@@ -733,5 +733,5 @@
733
733
  },
734
734
  "type": "module",
735
735
  "types": "./dist/index.d.ts",
736
- "version": "4.0.87"
736
+ "version": "4.0.89"
737
737
  }