@flint.fyi/rule-tester 0.16.2 → 0.16.4
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/lib/RuleTester.js +2 -2
- package/lib/index.d.ts +1 -1
- package/lib/runTestCaseRule.d.ts +1 -1
- package/lib/runTestCaseRule.js +1 -1
- package/package.json +4 -4
package/lib/RuleTester.js
CHANGED
|
@@ -3,10 +3,10 @@ import { createReportSnapshot } from "./createReportSnapshot.js";
|
|
|
3
3
|
import { normalizeTestCase } from "./normalizeTestCase.js";
|
|
4
4
|
import { resolveReportedSuggestions } from "./resolveReportedSuggestions.js";
|
|
5
5
|
import { runTestCaseRule } from "./runTestCaseRule.js";
|
|
6
|
-
import { createDiskBackedLinterHost, createEphemeralLinterHost, createVFSLinterHost, parseOptions } from "@flint.fyi/core";
|
|
7
|
-
import { CachedFactory } from "cached-factory";
|
|
8
6
|
import assert from "node:assert/strict";
|
|
9
7
|
import path from "node:path";
|
|
8
|
+
import { CachedFactory } from "cached-factory";
|
|
9
|
+
import { createDiskBackedLinterHost, createEphemeralLinterHost, createVFSLinterHost, parseOptions } from "@flint.fyi/core";
|
|
10
10
|
//#region src/RuleTester.ts
|
|
11
11
|
var RuleTester = class {
|
|
12
12
|
#fileFactories;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { InvalidTestCase, TestCase, TestSuggestion, TestSuggestionFileCase, TestSuggestionForFile, TestSuggestionForFiles, ValidTestCase, ValidTestCaseObject } from "./types.js";
|
|
2
2
|
import { RuleTester } from "./RuleTester.js";
|
|
3
|
-
export { InvalidTestCase, RuleTester, TestCase, TestSuggestion, TestSuggestionFileCase, TestSuggestionForFile, TestSuggestionForFiles, ValidTestCase, ValidTestCaseObject };
|
|
3
|
+
export { type InvalidTestCase, RuleTester, type TestCase, type TestSuggestion, type TestSuggestionFileCase, type TestSuggestionForFile, type TestSuggestionForFiles, type ValidTestCase, type ValidTestCaseObject };
|
package/lib/runTestCaseRule.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type AnyLanguage, type AnyLanguageFileFactory, type AnyOptionalSchema, type AnyRule, type InferredOutputObject, type NormalizedReport, type RuleAbout, type VFSLinterHost } from "@flint.fyi/core";
|
|
2
1
|
import type { CachedFactory } from "cached-factory";
|
|
2
|
+
import { type AnyLanguage, type AnyLanguageFileFactory, type AnyOptionalSchema, type AnyRule, type InferredOutputObject, type NormalizedReport, type RuleAbout, type VFSLinterHost } from "@flint.fyi/core";
|
|
3
3
|
import type { TestCaseNormalized } from "./normalizeTestCase.ts";
|
|
4
4
|
export interface TestCaseRuleConfiguration<OptionsSchema extends AnyOptionalSchema | undefined> {
|
|
5
5
|
options?: InferredOutputObject<OptionsSchema | undefined>;
|
package/lib/runTestCaseRule.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { processRuleReport } from "@flint.fyi/core";
|
|
2
1
|
import assert from "node:assert/strict";
|
|
3
2
|
import path from "node:path";
|
|
3
|
+
import { processRuleReport } from "@flint.fyi/core";
|
|
4
4
|
import { normalizePath, pathKey } from "@flint.fyi/utils";
|
|
5
5
|
//#region src/runTestCaseRule.ts
|
|
6
6
|
async function runTestCaseRule(fileFactories, linterHost, { options, rule }, { code, fileName, files }) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flint.fyi/rule-tester",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.4",
|
|
4
4
|
"description": "[Experimental] Rule unit tests for Flint.",
|
|
5
5
|
"homepage": "https://flint.fyi",
|
|
6
6
|
"repository": {
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
},
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"author": {
|
|
13
|
-
"name": "
|
|
14
|
-
"
|
|
13
|
+
"name": "Flint Team",
|
|
14
|
+
"url": "https://flint.fyi/team"
|
|
15
15
|
},
|
|
16
16
|
"sideEffects": false,
|
|
17
17
|
"type": "module",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"cached-factory": "^0.2.0",
|
|
27
|
-
"@flint.fyi/core": "^0.
|
|
27
|
+
"@flint.fyi/core": "^0.23.0",
|
|
28
28
|
"@flint.fyi/utils": "^0.14.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|