Skip to content

Commit d020014

Browse files
authored
Merge pull request #34 from ProverCoderAI/renovate/all
fix(deps): update all dependencies
2 parents 586936c + 2d75c06 commit d020014

13 files changed

Lines changed: 1018 additions & 907 deletions

File tree

.github/actions/setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ inputs:
44
node-version:
55
description: The version of Node.js to install
66
required: true
7-
default: 20.16.0
7+
default: 20.19.0
88

99
runs:
1010
using: composite

.github/workflows/check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
- name: Run Next.js E2E tests
8787
run: pnpm --filter frontend-nextjs test:e2e
8888
- name: Upload test results
89-
uses: actions/upload-artifact@v6
89+
uses: actions/upload-artifact@v7
9090
if: always()
9191
with:
9292
name: nextjs-e2e-results

.github/workflows/checking-dependencies.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v6
15-
- uses: pnpm/action-setup@v4
15+
- uses: pnpm/action-setup@v5
1616
- uses: actions/setup-node@v6
1717
with:
18-
node-version: 24.13.1
18+
node-version: 24.14.1
1919
cache: pnpm
2020

2121
- run: pnpm install --frozen-lockfile

.github/workflows/snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
npm pack --silent --pack-destination ../../artifacts
4949
- name: Upload snapshot artifacts
5050
if: steps.snapshot.outputs.success != 'true'
51-
uses: actions/upload-artifact@v6
51+
uses: actions/upload-artifact@v7
5252
with:
5353
name: context-doc-snapshot
5454
path: artifacts/*.tgz

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.0.0",
44
"private": true,
55
"description": "Monorepo workspace for effect-template",
6-
"packageManager": "pnpm@10.30.1",
6+
"packageManager": "pnpm@10.33.0",
77
"workspaces": [
88
"packages/*"
99
],
@@ -23,8 +23,8 @@
2323
"start": "pnpm --filter @prover-coder-ai/component-tagger start"
2424
},
2525
"devDependencies": {
26-
"@changesets/changelog-github": "^0.5.2",
27-
"@changesets/cli": "^2.29.8"
26+
"@changesets/changelog-github": "^0.6.0",
27+
"@changesets/cli": "^2.30.0"
2828
},
2929
"repository": {
3030
"type": "git",

packages/app/package.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -55,45 +55,45 @@
5555
"url": "https://github.com/ProverCoderAI/effect-template/issues"
5656
},
5757
"homepage": "https://github.com/ProverCoderAI/effect-template#readme",
58-
"packageManager": "pnpm@10.30.1",
58+
"packageManager": "pnpm@10.33.0",
5959
"dependencies": {
6060
"@babel/core": "^7.29.0",
61-
"@effect/platform": "^0.94.5",
62-
"@effect/platform-node": "^0.104.1",
63-
"effect": "^3.19.18"
61+
"@effect/platform": "^0.96.0",
62+
"@effect/platform-node": "^0.106.0",
63+
"effect": "^3.21.0"
6464
},
6565
"peerDependencies": {
66-
"vite": "^7.3.1"
66+
"vite": "^8.0.3"
6767
},
6868
"devDependencies": {
6969
"@types/babel__core": "^7.20.5",
70-
"@biomejs/biome": "^2.4.4",
70+
"@biomejs/biome": "^2.4.9",
7171
"@effect/eslint-plugin": "^0.3.2",
7272
"@effect/language-service": "latest",
73-
"@effect/vitest": "^0.27.0",
74-
"@eslint-community/eslint-plugin-eslint-comments": "^4.6.0",
75-
"@eslint/compat": "2.0.2",
76-
"@eslint/eslintrc": "3.3.3",
73+
"@effect/vitest": "^0.29.0",
74+
"@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
75+
"@eslint/compat": "2.0.3",
76+
"@eslint/eslintrc": "3.3.5",
7777
"@eslint/js": "10.0.1",
7878
"@prover-coder-ai/eslint-plugin-suggest-members": "^0.0.25",
7979
"@ton-ai-core/vibecode-linter": "^1.0.11",
80-
"@types/node": "^24.10.13",
81-
"@typescript-eslint/eslint-plugin": "^8.56.0",
82-
"@typescript-eslint/parser": "^8.56.0",
83-
"typescript-eslint": "^8.56.0",
84-
"@vitest/coverage-v8": "^4.0.18",
85-
"eslint": "^10.0.1",
80+
"@types/node": "^24.12.0",
81+
"@typescript-eslint/eslint-plugin": "^8.57.2",
82+
"@typescript-eslint/parser": "^8.57.2",
83+
"typescript-eslint": "^8.57.2",
84+
"@vitest/coverage-v8": "^4.1.2",
85+
"eslint": "^10.1.0",
8686
"eslint-import-resolver-typescript": "^4.4.4",
8787
"eslint-plugin-codegen": "0.34.1",
8888
"eslint-plugin-import": "^2.32.0",
8989
"eslint-plugin-simple-import-sort": "^12.1.1",
90-
"eslint-plugin-sonarjs": "^4.0.0",
90+
"eslint-plugin-sonarjs": "^4.0.2",
9191
"eslint-plugin-sort-destructure-keys": "^3.0.0",
9292
"eslint-plugin-unicorn": "^63.0.0",
93-
"@vitest/eslint-plugin": "^1.6.9",
94-
"globals": "^17.3.0",
93+
"@vitest/eslint-plugin": "^1.6.13",
94+
"globals": "^17.4.0",
9595
"jscpd": "^4.0.8",
96-
"typescript": "^5.9.3",
97-
"vitest": "^4.0.18"
96+
"typescript": "^6.0.2",
97+
"vitest": "^4.1.2"
9898
}
9999
}

packages/app/src/shell/component-tagger.ts

Lines changed: 38 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { type PluginObj, transformAsync, types as t } from "@babel/core"
22
import type { Path } from "@effect/platform/Path"
33
import { Effect, pipe } from "effect"
4-
import type { PluginOption } from "vite"
4+
import type { Plugin } from "vite"
55

66
import { babelPluginName, componentPathAttributeName, isJsxFile, normalizeModuleId } from "../core/component-path.js"
77
import { createJsxTaggerVisitor, type JsxTaggerContext } from "../core/jsx-tagger.js"
@@ -20,9 +20,11 @@ export type ComponentTaggerOptions = {
2020

2121
type BabelTransformResult = Awaited<ReturnType<typeof transformAsync>>
2222

23+
type BabelSourceMap = NonNullable<NonNullable<BabelTransformResult>["map"]>
24+
2325
type ViteTransformResult = {
2426
readonly code: string
25-
readonly map: NonNullable<BabelTransformResult>["map"] | null
27+
readonly map: string | null
2628
}
2729

2830
class ComponentTaggerError extends Error {
@@ -33,16 +35,35 @@ class ComponentTaggerError extends Error {
3335
}
3436
}
3537

36-
const toViteResult = (result: BabelTransformResult): ViteTransformResult | null => {
37-
if (result === null || result.code === null || result.code === undefined) {
38+
const toSourceMapInput = (map: BabelSourceMap | null | undefined): string | null => {
39+
if (map === null || map === undefined) {
3840
return null
3941
}
4042

43+
return JSON.stringify({
44+
file: map.file,
45+
mappings: map.mappings,
46+
names: map.names,
47+
sources: map.sources,
48+
version: map.version,
49+
...(map.sourceRoot === undefined ? {} : { sourceRoot: map.sourceRoot }),
50+
...(map.sourcesContent === undefined ? {} : { sourcesContent: map.sourcesContent })
51+
})
52+
}
53+
54+
const toViteResult = (result: BabelTransformResult, originalCode: string): ViteTransformResult => {
55+
if (result === null || result.code === null || result.code === undefined) {
56+
return {
57+
code: originalCode,
58+
map: null
59+
}
60+
}
61+
4162
const { code } = result
4263

4364
return {
4465
code,
45-
map: result.map ?? null
66+
map: toSourceMapInput(result.map)
4667
}
4768
}
4869

@@ -73,7 +94,7 @@ const makeBabelTagger = (relativeFilename: string, attributeName: string): Plugi
7394
*
7495
* @param code - Source code to transform.
7596
* @param id - Vite module id for the source code.
76-
* @returns Vite-compatible transform result or null when no output is produced.
97+
* @returns Vite-compatible transform result.
7798
*
7899
* @pure false
79100
* @effect Babel transform
@@ -85,17 +106,17 @@ const makeBabelTagger = (relativeFilename: string, attributeName: string): Plugi
85106
// QUOTE(TZ): "Сам компонент должен быть в текущем app но вот что бы его протестировать надо создать ещё один проект который наш текущий апп будет подключать"
86107
// REF: user-2026-01-14-frontend-consumer
87108
// SOURCE: n/a
88-
// FORMAT THEOREM: forall c in Code: transform(c) = r -> r is tagged or null
109+
// FORMAT THEOREM: forall c in Code: transform(c) = r -> r is tagged
89110
// PURITY: SHELL
90-
// EFFECT: Effect<ViteTransformResult | null, ComponentTaggerError, never>
111+
// EFFECT: Effect<ViteTransformResult, ComponentTaggerError, never>
91112
// INVARIANT: errors are surfaced as ComponentTaggerError only
92113
// COMPLEXITY: O(n)/O(1)
93114
const runTransform = (
94115
code: string,
95116
id: string,
96117
rootDir: string,
97118
attributeName: string
98-
): Effect.Effect<ViteTransformResult | null, ComponentTaggerError, Path> => {
119+
): Effect.Effect<ViteTransformResult, ComponentTaggerError, Path> => {
99120
const cleanId = normalizeModuleId(id)
100121

101122
return pipe(
@@ -120,15 +141,15 @@ const runTransform = (
120141
}
121142
})
122143
),
123-
Effect.map((result) => toViteResult(result))
144+
Effect.map((result) => toViteResult(result, code))
124145
)
125146
}
126147

127148
/**
128149
* Creates a Vite plugin that injects a single component-path data attribute.
129150
*
130151
* @param options - Configuration options for the plugin.
131-
* @returns Vite PluginOption for pre-transform tagging.
152+
* @returns Vite plugin for pre-transform tagging.
132153
*
133154
* @pure false
134155
* @effect Babel transform through Effect
@@ -143,26 +164,28 @@ const runTransform = (
143164
// SOURCE: n/a
144165
// FORMAT THEOREM: forall id: isJsxFile(id) -> transform(id) adds specified attribute
145166
// PURITY: SHELL
146-
// EFFECT: Effect<ViteTransformResult | null, ComponentTaggerError, never>
167+
// EFFECT: Effect<ViteTransformResult, ComponentTaggerError, never>
147168
// INVARIANT: no duplicate attributes with the same name
148169
// COMPLEXITY: O(n)/O(1)
149-
export const componentTagger = (options?: ComponentTaggerOptions): PluginOption => {
170+
export const componentTagger = (options?: ComponentTaggerOptions): Plugin => {
150171
const attributeName = options?.attributeName ?? componentPathAttributeName
151172
let resolvedRoot = process.cwd()
152173

153-
return {
174+
const plugin: Plugin = {
154175
name: "component-path-tagger",
155176
enforce: "pre",
156177
apply: "serve",
157178
configResolved(config) {
158179
resolvedRoot = config.root
159180
},
160-
transform(code, id) {
181+
transform(code, id, _options) {
161182
if (!isJsxFile(id)) {
162183
return null
163184
}
164185

165186
return Effect.runPromise(pipe(runTransform(code, id, resolvedRoot, attributeName), Effect.provide(NodePathLayer)))
166187
}
167188
}
189+
190+
return plugin
168191
}

packages/app/tests/shell/component-tagger.test.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { describe, expect, it } from "@effect/vitest"
22
import { Effect } from "effect"
3-
import type { Plugin } from "vite"
43

54
import { componentTagger } from "../../src/shell/component-tagger.js"
65

@@ -19,36 +18,36 @@ describe("component-tagger (Vite plugin)", () => {
1918
describe("componentTagger", () => {
2019
it.effect("returns a Vite plugin with correct name", () =>
2120
Effect.sync(() => {
22-
const plugin = componentTagger() as Plugin
21+
const plugin = componentTagger()
2322

2423
expect(plugin).toBeDefined()
2524
expect(plugin.name).toBe("component-path-tagger")
2625
}))
2726

2827
it.effect("has enforce: pre configuration", () =>
2928
Effect.sync(() => {
30-
const plugin = componentTagger() as Plugin
29+
const plugin = componentTagger()
3130

3231
expect(plugin.enforce).toBe("pre")
3332
}))
3433

3534
it.effect("applies only in serve mode", () =>
3635
Effect.sync(() => {
37-
const plugin = componentTagger() as Plugin
36+
const plugin = componentTagger()
3837

3938
expect(plugin.apply).toBe("serve")
4039
}))
4140

4241
it.effect("has transform hook", () =>
4342
Effect.sync(() => {
44-
const plugin = componentTagger() as Plugin
43+
const plugin = componentTagger()
4544

4645
expect(plugin.transform).toBeDefined()
4746
}))
4847

4948
it.effect("has configResolved hook", () =>
5049
Effect.sync(() => {
51-
const plugin = componentTagger() as Plugin
50+
const plugin = componentTagger()
5251

5352
expect(plugin.configResolved).toBeDefined()
5453
}))

packages/app/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"compilerOptions": {
44
"rootDir": ".",
55
"outDir": "dist",
6+
"ignoreDeprecations": "6.0",
67
"types": ["vitest"],
78
"baseUrl": ".",
89
"paths": {

packages/frontend-nextjs/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212
},
1313
"dependencies": {
1414
"@prover-coder-ai/component-tagger": "workspace:*",
15-
"next": "^16.1.6",
15+
"next": "^16.2.1",
1616
"react": "^19.2.4",
1717
"react-dom": "^19.2.4"
1818
},
1919
"devDependencies": {
2020
"@babel/core": "^7.29.0",
2121
"@playwright/test": "^1.58.2",
22-
"@types/node": "^24.10.13",
22+
"@types/node": "^24.12.0",
2323
"@types/react": "^19.2.14",
2424
"@types/react-dom": "^19.2.3",
25-
"typescript": "^5.9.3"
25+
"typescript": "^6.0.2"
2626
}
2727
}

0 commit comments

Comments
 (0)