@eslint-react/shared 1.14.2 → 1.14.3-beta.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.
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +5 -4
- package/dist/index.mjs +5 -4
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -552,7 +552,7 @@ type SchemaWithPipe<TPipe extends [
|
|
|
552
552
|
*
|
|
553
553
|
* @internal
|
|
554
554
|
*/
|
|
555
|
-
readonly _run: (dataset: Dataset<unknown, never>, config: Config<
|
|
555
|
+
readonly _run: (dataset: Dataset<unknown, never>, config: Config<BaseIssue<unknown>>) => Dataset<InferOutput<LastTupleItem<TPipe>>, InferIssue<TPipe[number]>>;
|
|
556
556
|
/**
|
|
557
557
|
* Input, output and issue type.
|
|
558
558
|
*
|
|
@@ -590,7 +590,7 @@ type SchemaWithPipeAsync<TPipe extends [
|
|
|
590
590
|
*
|
|
591
591
|
* @internal
|
|
592
592
|
*/
|
|
593
|
-
readonly _run: (dataset: Dataset<unknown, never>, config: Config<
|
|
593
|
+
readonly _run: (dataset: Dataset<unknown, never>, config: Config<BaseIssue<unknown>>) => Promise<Dataset<InferOutput<LastTupleItem<TPipe>>, InferIssue<TPipe[number]>>>;
|
|
594
594
|
/**
|
|
595
595
|
* Input, output and issue type.
|
|
596
596
|
*
|
|
@@ -704,7 +704,7 @@ interface BaseSchema<TInput, TOutput, TIssue extends BaseIssue<unknown>> {
|
|
|
704
704
|
*
|
|
705
705
|
* @internal
|
|
706
706
|
*/
|
|
707
|
-
readonly _run: (dataset: Dataset<unknown, never>, config: Config<
|
|
707
|
+
readonly _run: (dataset: Dataset<unknown, never>, config: Config<BaseIssue<unknown>>) => Dataset<TOutput, TIssue>;
|
|
708
708
|
/**
|
|
709
709
|
* Input, output and issue type.
|
|
710
710
|
*
|
|
@@ -738,7 +738,7 @@ interface BaseSchemaAsync<TInput, TOutput, TIssue extends BaseIssue<unknown>> ex
|
|
|
738
738
|
*
|
|
739
739
|
* @internal
|
|
740
740
|
*/
|
|
741
|
-
readonly _run: (dataset: Dataset<unknown, never>, config: Config<
|
|
741
|
+
readonly _run: (dataset: Dataset<unknown, never>, config: Config<BaseIssue<unknown>>) => Promise<Dataset<TOutput, TIssue>>;
|
|
742
742
|
}
|
|
743
743
|
|
|
744
744
|
/**
|
|
@@ -771,7 +771,7 @@ interface BaseTransformation<TInput, TOutput, TIssue extends BaseIssue<unknown>>
|
|
|
771
771
|
*
|
|
772
772
|
* @internal
|
|
773
773
|
*/
|
|
774
|
-
readonly _run: (dataset: TypedDataset<TInput, never>, config: Config<
|
|
774
|
+
readonly _run: (dataset: TypedDataset<TInput, never>, config: Config<BaseIssue<unknown>>) => Dataset<TOutput, TIssue>;
|
|
775
775
|
/**
|
|
776
776
|
* Input, output and issue type.
|
|
777
777
|
*
|
|
@@ -805,7 +805,7 @@ interface BaseTransformationAsync<TInput, TOutput, TIssue extends BaseIssue<unkn
|
|
|
805
805
|
*
|
|
806
806
|
* @internal
|
|
807
807
|
*/
|
|
808
|
-
readonly _run: (dataset: TypedDataset<TInput, never>, config: Config<
|
|
808
|
+
readonly _run: (dataset: TypedDataset<TInput, never>, config: Config<BaseIssue<unknown>>) => Promise<Dataset<TOutput, TIssue>>;
|
|
809
809
|
}
|
|
810
810
|
|
|
811
811
|
/**
|
|
@@ -842,7 +842,7 @@ interface BaseValidation<TInput, TOutput, TIssue extends BaseIssue<unknown>> {
|
|
|
842
842
|
*
|
|
843
843
|
* @internal
|
|
844
844
|
*/
|
|
845
|
-
readonly _run: (dataset: Dataset<TInput, BaseIssue<unknown>>, config: Config<
|
|
845
|
+
readonly _run: (dataset: Dataset<TInput, BaseIssue<unknown>>, config: Config<BaseIssue<unknown>>) => Dataset<TOutput, BaseIssue<unknown> | TIssue>;
|
|
846
846
|
/**
|
|
847
847
|
* Input, output and issue type.
|
|
848
848
|
*
|
|
@@ -876,7 +876,7 @@ interface BaseValidationAsync<TInput, TOutput, TIssue extends BaseIssue<unknown>
|
|
|
876
876
|
*
|
|
877
877
|
* @internal
|
|
878
878
|
*/
|
|
879
|
-
readonly _run: (dataset: Dataset<TInput, BaseIssue<unknown>>, config: Config<
|
|
879
|
+
readonly _run: (dataset: Dataset<TInput, BaseIssue<unknown>>, config: Config<BaseIssue<unknown>>) => Promise<Dataset<TOutput, BaseIssue<unknown> | TIssue>>;
|
|
880
880
|
}
|
|
881
881
|
|
|
882
882
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -552,7 +552,7 @@ type SchemaWithPipe<TPipe extends [
|
|
|
552
552
|
*
|
|
553
553
|
* @internal
|
|
554
554
|
*/
|
|
555
|
-
readonly _run: (dataset: Dataset<unknown, never>, config: Config<
|
|
555
|
+
readonly _run: (dataset: Dataset<unknown, never>, config: Config<BaseIssue<unknown>>) => Dataset<InferOutput<LastTupleItem<TPipe>>, InferIssue<TPipe[number]>>;
|
|
556
556
|
/**
|
|
557
557
|
* Input, output and issue type.
|
|
558
558
|
*
|
|
@@ -590,7 +590,7 @@ type SchemaWithPipeAsync<TPipe extends [
|
|
|
590
590
|
*
|
|
591
591
|
* @internal
|
|
592
592
|
*/
|
|
593
|
-
readonly _run: (dataset: Dataset<unknown, never>, config: Config<
|
|
593
|
+
readonly _run: (dataset: Dataset<unknown, never>, config: Config<BaseIssue<unknown>>) => Promise<Dataset<InferOutput<LastTupleItem<TPipe>>, InferIssue<TPipe[number]>>>;
|
|
594
594
|
/**
|
|
595
595
|
* Input, output and issue type.
|
|
596
596
|
*
|
|
@@ -704,7 +704,7 @@ interface BaseSchema<TInput, TOutput, TIssue extends BaseIssue<unknown>> {
|
|
|
704
704
|
*
|
|
705
705
|
* @internal
|
|
706
706
|
*/
|
|
707
|
-
readonly _run: (dataset: Dataset<unknown, never>, config: Config<
|
|
707
|
+
readonly _run: (dataset: Dataset<unknown, never>, config: Config<BaseIssue<unknown>>) => Dataset<TOutput, TIssue>;
|
|
708
708
|
/**
|
|
709
709
|
* Input, output and issue type.
|
|
710
710
|
*
|
|
@@ -738,7 +738,7 @@ interface BaseSchemaAsync<TInput, TOutput, TIssue extends BaseIssue<unknown>> ex
|
|
|
738
738
|
*
|
|
739
739
|
* @internal
|
|
740
740
|
*/
|
|
741
|
-
readonly _run: (dataset: Dataset<unknown, never>, config: Config<
|
|
741
|
+
readonly _run: (dataset: Dataset<unknown, never>, config: Config<BaseIssue<unknown>>) => Promise<Dataset<TOutput, TIssue>>;
|
|
742
742
|
}
|
|
743
743
|
|
|
744
744
|
/**
|
|
@@ -771,7 +771,7 @@ interface BaseTransformation<TInput, TOutput, TIssue extends BaseIssue<unknown>>
|
|
|
771
771
|
*
|
|
772
772
|
* @internal
|
|
773
773
|
*/
|
|
774
|
-
readonly _run: (dataset: TypedDataset<TInput, never>, config: Config<
|
|
774
|
+
readonly _run: (dataset: TypedDataset<TInput, never>, config: Config<BaseIssue<unknown>>) => Dataset<TOutput, TIssue>;
|
|
775
775
|
/**
|
|
776
776
|
* Input, output and issue type.
|
|
777
777
|
*
|
|
@@ -805,7 +805,7 @@ interface BaseTransformationAsync<TInput, TOutput, TIssue extends BaseIssue<unkn
|
|
|
805
805
|
*
|
|
806
806
|
* @internal
|
|
807
807
|
*/
|
|
808
|
-
readonly _run: (dataset: TypedDataset<TInput, never>, config: Config<
|
|
808
|
+
readonly _run: (dataset: TypedDataset<TInput, never>, config: Config<BaseIssue<unknown>>) => Promise<Dataset<TOutput, TIssue>>;
|
|
809
809
|
}
|
|
810
810
|
|
|
811
811
|
/**
|
|
@@ -842,7 +842,7 @@ interface BaseValidation<TInput, TOutput, TIssue extends BaseIssue<unknown>> {
|
|
|
842
842
|
*
|
|
843
843
|
* @internal
|
|
844
844
|
*/
|
|
845
|
-
readonly _run: (dataset: Dataset<TInput, BaseIssue<unknown>>, config: Config<
|
|
845
|
+
readonly _run: (dataset: Dataset<TInput, BaseIssue<unknown>>, config: Config<BaseIssue<unknown>>) => Dataset<TOutput, BaseIssue<unknown> | TIssue>;
|
|
846
846
|
/**
|
|
847
847
|
* Input, output and issue type.
|
|
848
848
|
*
|
|
@@ -876,7 +876,7 @@ interface BaseValidationAsync<TInput, TOutput, TIssue extends BaseIssue<unknown>
|
|
|
876
876
|
*
|
|
877
877
|
* @internal
|
|
878
878
|
*/
|
|
879
|
-
readonly _run: (dataset: Dataset<TInput, BaseIssue<unknown>>, config: Config<
|
|
879
|
+
readonly _run: (dataset: Dataset<TInput, BaseIssue<unknown>>, config: Config<BaseIssue<unknown>>) => Promise<Dataset<TOutput, BaseIssue<unknown> | TIssue>>;
|
|
880
880
|
}
|
|
881
881
|
|
|
882
882
|
/**
|
package/dist/index.js
CHANGED
|
@@ -258,7 +258,6 @@ function _addIssue(context, label, dataset, config2, other) {
|
|
|
258
258
|
expected,
|
|
259
259
|
received,
|
|
260
260
|
message: `Invalid ${label}: ${expected ? `Expected ${expected} but r` : "R"}eceived ${received}`,
|
|
261
|
-
// @ts-expect-error
|
|
262
261
|
requirement: context.requirement,
|
|
263
262
|
path: other?.path,
|
|
264
263
|
issues: other?.issues,
|
|
@@ -267,10 +266,12 @@ function _addIssue(context, label, dataset, config2, other) {
|
|
|
267
266
|
abortPipeEarly: config2.abortPipeEarly
|
|
268
267
|
};
|
|
269
268
|
const isSchema = context.kind === "schema";
|
|
270
|
-
const message =
|
|
271
|
-
context.message ?? getSpecificMessage(context.reference, issue.lang) ?? (isSchema ? getSchemaMessage(issue.lang) : null) ?? config2.message ?? getGlobalMessage(issue.lang);
|
|
269
|
+
const message = context.message ?? getSpecificMessage(context.reference, issue.lang) ?? (isSchema ? getSchemaMessage(issue.lang) : null) ?? config2.message ?? getGlobalMessage(issue.lang);
|
|
272
270
|
if (message) {
|
|
273
|
-
issue.message = typeof message === "function" ?
|
|
271
|
+
issue.message = typeof message === "function" ? (
|
|
272
|
+
// @ts-expect-error
|
|
273
|
+
message(issue)
|
|
274
|
+
) : message;
|
|
274
275
|
}
|
|
275
276
|
if (isSchema) {
|
|
276
277
|
dataset.typed = false;
|
package/dist/index.mjs
CHANGED
|
@@ -252,7 +252,6 @@ function _addIssue(context, label, dataset, config2, other) {
|
|
|
252
252
|
expected,
|
|
253
253
|
received,
|
|
254
254
|
message: `Invalid ${label}: ${expected ? `Expected ${expected} but r` : "R"}eceived ${received}`,
|
|
255
|
-
// @ts-expect-error
|
|
256
255
|
requirement: context.requirement,
|
|
257
256
|
path: other?.path,
|
|
258
257
|
issues: other?.issues,
|
|
@@ -261,10 +260,12 @@ function _addIssue(context, label, dataset, config2, other) {
|
|
|
261
260
|
abortPipeEarly: config2.abortPipeEarly
|
|
262
261
|
};
|
|
263
262
|
const isSchema = context.kind === "schema";
|
|
264
|
-
const message =
|
|
265
|
-
context.message ?? getSpecificMessage(context.reference, issue.lang) ?? (isSchema ? getSchemaMessage(issue.lang) : null) ?? config2.message ?? getGlobalMessage(issue.lang);
|
|
263
|
+
const message = context.message ?? getSpecificMessage(context.reference, issue.lang) ?? (isSchema ? getSchemaMessage(issue.lang) : null) ?? config2.message ?? getGlobalMessage(issue.lang);
|
|
266
264
|
if (message) {
|
|
267
|
-
issue.message = typeof message === "function" ?
|
|
265
|
+
issue.message = typeof message === "function" ? (
|
|
266
|
+
// @ts-expect-error
|
|
267
|
+
message(issue)
|
|
268
|
+
) : message;
|
|
268
269
|
}
|
|
269
270
|
if (isSchema) {
|
|
270
271
|
dataset.typed = false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/shared",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.3-beta.0",
|
|
4
4
|
"description": "ESLint React's Shared constants and functions.",
|
|
5
5
|
"homepage": "https://github.com/rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@typescript-eslint/utils": "^8.6.0",
|
|
39
39
|
"picomatch": "^4.0.2",
|
|
40
|
-
"@eslint-react/tools": "1.14.
|
|
40
|
+
"@eslint-react/tools": "1.14.3-beta.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/picomatch": "^3.0.1",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"micro-memoize": "^4.1.2",
|
|
46
46
|
"tsup": "^8.3.0",
|
|
47
47
|
"type-fest": "^4.26.1",
|
|
48
|
-
"valibot": "^0.42.
|
|
48
|
+
"valibot": "^0.42.1"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"build": "tsup --dts-resolve",
|