@prover-coder-ai/component-tagger 1.0.6 → 1.0.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prover-coder-ai/component-tagger",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Component tagger Vite plugin for JSX metadata",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -46,9 +46,9 @@
46
46
  "@prover-coder-ai/eslint-plugin-suggest-members": "^0.0.13",
47
47
  "@ton-ai-core/vibecode-linter": "^1.0.6",
48
48
  "@types/node": "^24.10.9",
49
- "@typescript-eslint/eslint-plugin": "^8.53.0",
50
- "@typescript-eslint/parser": "^8.53.0",
51
- "typescript-eslint": "^8.53.0",
49
+ "@typescript-eslint/eslint-plugin": "^8.53.1",
50
+ "@typescript-eslint/parser": "^8.53.1",
51
+ "typescript-eslint": "^8.53.1",
52
52
  "@vitest/coverage-v8": "^4.0.17",
53
53
  "eslint": "^9.39.2",
54
54
  "eslint-import-resolver-typescript": "^4.4.4",
@@ -66,15 +66,16 @@
66
66
  "vitest": "^4.0.17"
67
67
  },
68
68
  "scripts": {
69
- "build": "tsc -p tsconfig.json --outDir dist --declaration --declarationMap false",
70
- "dev": "tsc -p tsconfig.json --watch --outDir dist --declaration --declarationMap false",
69
+ "prebuild": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",
70
+ "build": "tsc -p tsconfig.build.json",
71
+ "dev": "tsc -p tsconfig.build.json --watch",
71
72
  "lint": "npx @ton-ai-core/vibecode-linter src/",
72
73
  "lint:tests": "npx @ton-ai-core/vibecode-linter tests/",
73
74
  "lint:effect": "npx eslint --config eslint.effect-ts-check.config.mjs .",
74
75
  "check": "pnpm run typecheck",
75
76
  "prestart": "pnpm run build",
76
77
  "start": "node dist/index.js",
77
- "test": "pnpm run lint:tests && vitest run",
78
+ "test": "pnpm run build && pnpm run lint:tests && vitest run",
78
79
  "typecheck": "tsc --noEmit"
79
80
  }
80
81
  }
@@ -1 +0,0 @@
1
- export {};
@@ -1,17 +0,0 @@
1
- import { describe, expect, it } from "@effect/vitest";
2
- import { Effect } from "effect";
3
- import { componentPathAttributeName, formatComponentPathValue, isJsxFile } from "../../src/core/component-path.js";
4
- describe("component-path", () => {
5
- it.effect("exposes the path attribute name", () => Effect.sync(() => {
6
- expect(componentPathAttributeName).toBe("path");
7
- }));
8
- it.effect("formats the component path payload", () => Effect.sync(() => {
9
- const result = formatComponentPathValue("src/App.tsx", 12, 3);
10
- expect(result).toBe("src/App.tsx:12:3");
11
- }));
12
- it.effect("detects JSX/TSX module ids", () => Effect.sync(() => {
13
- expect(isJsxFile("src/App.tsx")).toBe(true);
14
- expect(isJsxFile("src/App.jsx?import")).toBe(true);
15
- expect(isJsxFile("src/App.ts")).toBe(false);
16
- }));
17
- });
@@ -1,2 +0,0 @@
1
- declare const _default: import("vite").UserConfig;
2
- export default _default;
@@ -1,67 +0,0 @@
1
- // CHANGE: Migrate from Jest to Vitest with mathematical equivalence
2
- // WHY: Faster execution, native ESM, Effect integration via @effect/vitest
3
- // QUOTE(ТЗ): "Проект использует Effect + функциональную парадигму"
4
- // REF: Migration from jest.config.mjs
5
- // PURITY: SHELL (configuration only)
6
- // INVARIANT: ∀ test: behavior_jest ≡ behavior_vitest
7
- // EFFECT: Effect<TestReport, never, TestEnvironment>
8
- // COMPLEXITY: O(n) test execution where n = |test_files|
9
- import { defineConfig } from "vitest/config";
10
- export default defineConfig({
11
- test: {
12
- // CHANGE: Native ESM support without experimental flags
13
- // WHY: Vitest designed for ESM, no need for --experimental-vm-modules
14
- // INVARIANT: Deterministic test execution without side effects
15
- globals: false, // IMPORTANT: Use explicit imports for type safety
16
- environment: "node",
17
- // CHANGE: Match Jest's test file patterns
18
- // INVARIANT: Same test discovery as Jest
19
- include: ["tests/**/*.{test,spec}.ts"],
20
- exclude: ["node_modules", "dist", "dist-test"],
21
- // CHANGE: Coverage with 100% threshold for CORE (same as Jest)
22
- // WHY: CORE must maintain mathematical guarantees via complete coverage
23
- // INVARIANT: coverage_vitest ≥ coverage_jest ∧ ∀ f ∈ CORE: coverage(f) = 100%
24
- coverage: {
25
- provider: "v8", // Faster than babel (istanbul), native V8 coverage
26
- reporter: ["text", "json", "html"],
27
- include: ["src/**/*.ts"],
28
- exclude: [
29
- "src/**/*.test.ts",
30
- "src/**/*.spec.ts",
31
- "src/**/__tests__/**",
32
- "scripts/**/*.ts"
33
- ],
34
- // CHANGE: Maintain exact same thresholds as Jest
35
- // WHY: Enforce 100% coverage for CORE, 10% minimum for SHELL
36
- // INVARIANT: ∀ f ∈ src/core/**/*.ts: all_metrics(f) = 100%
37
- // NOTE: Vitest v8 provider collects coverage for all matched files by default
38
- thresholds: {
39
- "src/core/**/*.ts": {
40
- branches: 100,
41
- functions: 100,
42
- lines: 100,
43
- statements: 100
44
- },
45
- global: {
46
- branches: 10,
47
- functions: 10,
48
- lines: 10,
49
- statements: 10
50
- }
51
- }
52
- },
53
- // CHANGE: Faster test execution via thread pooling
54
- // WHY: Vitest uses worker threads by default (faster than Jest's processes)
55
- // COMPLEXITY: O(n/k) where n = tests, k = worker_count
56
- // NOTE: Vitest runs tests in parallel by default, no additional config needed
57
- // CHANGE: Clear mocks between tests (Jest equivalence)
58
- // WHY: Prevent test contamination, ensure test independence
59
- // INVARIANT: ∀ test_i, test_j: independent(test_i, test_j) ⇒ no_shared_state
60
- clearMocks: true,
61
- mockReset: true,
62
- restoreMocks: true
63
- // CHANGE: Disable globals to enforce explicit imports
64
- // WHY: Type safety, explicit dependencies, functional purity
65
- // NOTE: Tests must import { describe, it, expect } from "vitest"
66
- }
67
- });
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes