@fluojs/vite 1.0.7 → 2.0.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/README.ko.md +12 -2
- package/README.md +12 -2
- package/dist/decorators-plugin.d.ts.map +1 -1
- package/dist/decorators-plugin.js +1 -0
- package/package.json +3 -3
package/README.ko.md
CHANGED
|
@@ -4,11 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
fluo 프로젝트를 위한 Vite 플러그인과 빌드 유틸리티입니다.
|
|
6
6
|
|
|
7
|
+
Coordinated Node 24 릴리스를 준비한다면 패키지 업그레이드 전에 [소비자 마이그레이션 가이드](../../docs/getting-started/migrate-node24.ko.md)를 따르세요.
|
|
8
|
+
|
|
7
9
|
## 목차
|
|
8
10
|
|
|
9
11
|
- [설치](#설치)
|
|
10
12
|
- [사용 시점](#사용-시점)
|
|
11
13
|
- [런타임 및 peer 계약](#런타임-및-peer-계약)
|
|
14
|
+
- [지원 Vite 매트릭스](#지원-vite-매트릭스)
|
|
12
15
|
- [빠른 시작](#빠른-시작)
|
|
13
16
|
- [데코레이터 변환 경계](#데코레이터-변환-경계)
|
|
14
17
|
- [공개 API](#공개-api)
|
|
@@ -31,10 +34,14 @@ npm install --save-dev @fluojs/vite vite @babel/core @babel/plugin-proposal-deco
|
|
|
31
34
|
|
|
32
35
|
## 런타임 및 peer 계약
|
|
33
36
|
|
|
34
|
-
`@fluojs/vite`는 `engines.node` 하한을 `>=
|
|
37
|
+
`@fluojs/vite`는 `engines.node` 하한을 `>=24.0.0 <27`으로 두는 Node.js 패키지입니다. 생성된 non-Deno starter는 이제 Vite `^8.2.2`, Vitest와 `@vitest/coverage-v8` `^4.1.11`, 그리고 위에 나열한 Babel peer를 선언합니다. 배포된 Vite `>=6.2.0` peer 범위는 바뀌지 않습니다. 생성된 ESM config는 `build.rolldownOptions`를 사용하고, Babel이 Rolldown/Oxc보다 먼저 애플리케이션 데코레이터를 변환하며, `@fluojs/testing/vitest`가 별도 test transform boundary를 유지합니다. Direct Oxc/esbuild decorator processing은 지원하지 않습니다.
|
|
35
38
|
|
|
36
39
|
패키지 root는 Babel이 설치되거나 해석되기 전에 import해도 안전합니다. `@fluojs/vite`를 import하거나 `fluoDecoratorsPlugin()`을 생성해도 `@babel/core`를 로드하지 않습니다. Babel은 eligible 애플리케이션 `.ts` 파일에 대한 Vite `transform` hook에서만 lazy load되며, 누락된 Babel peer도 plugin 생성 시점이 아니라 이 transform 경계에서 보고됩니다.
|
|
37
40
|
|
|
41
|
+
## 지원 Vite 매트릭스
|
|
42
|
+
|
|
43
|
+
배포된 peer 범위는 `vite >=6.2.0`을 유지합니다. 패키지 suite는 워크스페이스에 고정된 Vite 8.2.2 Rolldown/Oxc pipeline에서 실행됩니다. Integration gate는 plugin이 normal-stage transform보다 먼저 실행되고 field-decorator binding metadata를 보존하는지 검증하며, `enforce: 'pre'`를 회귀시키면 실패합니다. Vite 8을 선택하는 consumer는 Vite 자체 Node.js engine 범위도 충족해야 합니다.
|
|
44
|
+
|
|
38
45
|
## 빠른 시작
|
|
39
46
|
|
|
40
47
|
```ts
|
|
@@ -45,7 +52,7 @@ export default defineConfig({
|
|
|
45
52
|
plugins: [fluoDecoratorsPlugin()],
|
|
46
53
|
build: {
|
|
47
54
|
ssr: 'src/main.ts',
|
|
48
|
-
target: '
|
|
55
|
+
target: 'node24',
|
|
49
56
|
},
|
|
50
57
|
});
|
|
51
58
|
```
|
|
@@ -60,6 +67,9 @@ export default defineConfig({
|
|
|
60
67
|
2. Vite 플러그인은 query suffix를 제거하고 애플리케이션 `.ts` 파일만 허용하며, 첫 eligible transform 시점에 Babel을 lazy load한 뒤 `@babel/plugin-proposal-decorators`의 `{ version: '2023-11' }` 설정과 `@babel/preset-typescript`를 실행합니다.
|
|
61
68
|
3. `vitest.config.ts`는 `@fluojs/testing/vitest`에서 `fluoBabelDecoratorsPlugin()`을 import하므로 `*.test.ts`와 `*.spec.ts` 파일은 testing-specific transform 경로에 남습니다.
|
|
62
69
|
|
|
70
|
+
React SSR + Vite starter는 데코레이터가 있는 애플리케이션 선언을 `src/app.ts`에 두고,
|
|
71
|
+
`src/page.tsx` 같은 `.tsx` 모듈에는 JSX 렌더링을 유지합니다.
|
|
72
|
+
|
|
63
73
|
생성 프로젝트를 커스터마이즈할 때도 이 경계를 분리하세요. `experimentalDecorators`를 다시 활성화하거나, direct esbuild decorator handling에 의존하거나, 테스트 파일을 Vite 애플리케이션 transform으로 보내는 방식은 문서화된 fluo 지원 계약 밖에 있습니다.
|
|
64
74
|
|
|
65
75
|
## 공개 API
|
package/README.md
CHANGED
|
@@ -4,11 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
Vite plugin and build utilities for fluo projects.
|
|
6
6
|
|
|
7
|
+
Preparing for the coordinated Node 24 release? Follow the [consumer migration guide](../../docs/getting-started/migrate-node24.md) before upgrading packages.
|
|
8
|
+
|
|
7
9
|
## Table of Contents
|
|
8
10
|
|
|
9
11
|
- [Installation](#installation)
|
|
10
12
|
- [When to Use](#when-to-use)
|
|
11
13
|
- [Runtime and Peer Contract](#runtime-and-peer-contract)
|
|
14
|
+
- [Supported Vite Matrix](#supported-vite-matrix)
|
|
12
15
|
- [Quick Start](#quick-start)
|
|
13
16
|
- [Decorator Transform Boundary](#decorator-transform-boundary)
|
|
14
17
|
- [Public API](#public-api)
|
|
@@ -31,10 +34,14 @@ npm install --save-dev @fluojs/vite vite @babel/core @babel/plugin-proposal-deco
|
|
|
31
34
|
|
|
32
35
|
## Runtime and Peer Contract
|
|
33
36
|
|
|
34
|
-
`@fluojs/vite` is a Node.js package with an `engines.node` floor of `>=
|
|
37
|
+
`@fluojs/vite` is a Node.js package with an `engines.node` floor of `>=24.0.0 <27`. Generated non-Deno starters now declare Vite `^8.2.2`, Vitest and `@vitest/coverage-v8` `^4.1.11`, and the Babel peers listed above. The published Vite `>=6.2.0` peer range is unchanged. Generated ESM configs use `build.rolldownOptions`, with Babel transforming application decorators before Rolldown/Oxc and `@fluojs/testing/vitest` retaining the separate test transform boundary; direct Oxc/esbuild decorator processing is unsupported.
|
|
35
38
|
|
|
36
39
|
The package root is safe to import before Babel is installed or resolved: importing `@fluojs/vite` and creating `fluoDecoratorsPlugin()` do not load `@babel/core`. Babel is loaded lazily only from Vite's `transform` hook for eligible application `.ts` files, and missing Babel peers are reported from that transform boundary instead of plugin creation.
|
|
37
40
|
|
|
41
|
+
## Supported Vite Matrix
|
|
42
|
+
|
|
43
|
+
The published peer range remains `vite >=6.2.0`. The package suite runs under the workspace-pinned Vite 8.2.2 Rolldown/Oxc pipeline. Its integration gate verifies the plugin runs before normal-stage transforms and preserves field-decorator binding metadata; regressing `enforce: 'pre'` makes the gate fail. Consumers selecting Vite 8 must also satisfy Vite's own Node.js engine range.
|
|
44
|
+
|
|
38
45
|
## Quick Start
|
|
39
46
|
|
|
40
47
|
```ts
|
|
@@ -45,7 +52,7 @@ export default defineConfig({
|
|
|
45
52
|
plugins: [fluoDecoratorsPlugin()],
|
|
46
53
|
build: {
|
|
47
54
|
ssr: 'src/main.ts',
|
|
48
|
-
target: '
|
|
55
|
+
target: 'node24',
|
|
49
56
|
},
|
|
50
57
|
});
|
|
51
58
|
```
|
|
@@ -60,6 +67,9 @@ The plugin transforms `.ts` application files with Babel using the `2023-11` dec
|
|
|
60
67
|
2. The Vite plugin strips query suffixes, accepts only application `.ts` files, lazily loads Babel on the first eligible transform, and runs `@babel/plugin-proposal-decorators` with `{ version: '2023-11' }` plus `@babel/preset-typescript`.
|
|
61
68
|
3. `vitest.config.ts` imports `fluoBabelDecoratorsPlugin()` from `@fluojs/testing/vitest`, so `*.test.ts` and `*.spec.ts` files stay on the testing-specific transform path.
|
|
62
69
|
|
|
70
|
+
The React SSR + Vite starter keeps its decorator-bearing application declarations in `src/app.ts`;
|
|
71
|
+
JSX rendering remains in `.tsx` modules such as `src/page.tsx`.
|
|
72
|
+
|
|
63
73
|
Keep those boundaries separate when customizing generated projects. Re-enabling `experimentalDecorators`, relying on direct esbuild decorator handling, or routing test files through the Vite application transform is outside the documented fluo support contract.
|
|
64
74
|
|
|
65
75
|
## Public API
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorators-plugin.d.ts","sourceRoot":"","sources":["../src/decorators-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAkB,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"decorators-plugin.d.ts","sourceRoot":"","sources":["../src/decorators-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAkB,MAAM,MAAM,CAAC;AAkJnD;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C"}
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"babel",
|
|
9
9
|
"build-tooling"
|
|
10
10
|
],
|
|
11
|
-
"version": "
|
|
11
|
+
"version": "2.0.0",
|
|
12
12
|
"private": false,
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"repository": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"directory": "packages/vite"
|
|
18
18
|
},
|
|
19
19
|
"engines": {
|
|
20
|
-
"node": ">=
|
|
20
|
+
"node": ">=24.0.0 <27"
|
|
21
21
|
},
|
|
22
22
|
"publishConfig": {
|
|
23
23
|
"access": "public"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"vite": ">=6.2.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"vitest": "^
|
|
44
|
+
"vitest": "^4.1.11"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"prebuild": "node ../../tooling/scripts/clean-dist.mjs",
|