lichta 2.1.0 → 2.2.1
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.md +10 -9
- package/index.d.ts +1 -1
- package/index.js +1 -3
- package/package.json +2 -4
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# lichta (legacy)
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/lichta)
|
|
4
|
+
[](https://www.npmjs.com/package/@lichta/core)
|
|
5
5
|
|
|
6
6
|
🚀 **[Demo trực tiếp](https://lichta.zeneo.app/)**
|
|
7
7
|
|
|
@@ -11,19 +11,20 @@
|
|
|
11
11
|
|
|
12
12
|
Trước đây toàn bộ thư viện được publish dưới 1 package tên `lichta` duy nhất. Từ khi tách thành monorepo với các package scoped (`@lichta/core`, `@lichta/react`, `@lichta/vue`, `@lichta/svelte`, `@lichta/full-calendar`, `@lichta/event-calendar`, `@lichta/react-big-calendar`), package `lichta` được giữ lại làm cầu nối tương thích ngược cho những dự án đang cài `lichta` từ trước, tránh vỡ code đột ngột khi họ chạy `npm update`.
|
|
13
13
|
|
|
14
|
-
## Trạng thái hiện tại
|
|
14
|
+
## Trạng thái hiện tại (từ v2.2.0)
|
|
15
15
|
|
|
16
|
-
**Package này
|
|
16
|
+
**Package này giờ chỉ re-export `@lichta/core`** (vanilla JS/TS, không phụ thuộc framework nào):
|
|
17
17
|
|
|
18
18
|
```javascript
|
|
19
19
|
// index.js
|
|
20
|
-
|
|
21
|
-
export * from '@lichta/svelte';
|
|
20
|
+
export * from '@lichta/core';
|
|
22
21
|
```
|
|
23
22
|
|
|
24
23
|
Nghĩa là:
|
|
25
|
-
-
|
|
26
|
-
- Nếu bạn
|
|
24
|
+
- `import { LichTa } from 'lichta'` hoạt động tương đương `import { LichTa } from '@lichta/core'` — không kéo theo `react`/`vue`/`svelte` như một dependency dù bạn không dùng.
|
|
25
|
+
- Nếu bạn cần component UI (Calendar/DatePicker) cho React, Vue, hoặc Svelte — package này **không có đường dẫn tương thích cho bạn**, cài thẳng package framework tương ứng bên dưới.
|
|
26
|
+
|
|
27
|
+
> ⚠️ **Breaking change so với các bản trước v2.2.0**: trước đây `lichta` re-export `@lichta/svelte` (kèm cảnh báo deprecation). Nếu bạn đang dùng `import { Calendar } from 'lichta'` để lấy Svelte component, migrate sang `@lichta/svelte`.
|
|
27
28
|
|
|
28
29
|
## Nên làm gì
|
|
29
30
|
|
|
@@ -39,7 +40,7 @@ Nghĩa là:
|
|
|
39
40
|
| EventCalendar | [`@lichta/event-calendar`](https://www.npmjs.com/package/@lichta/event-calendar) |
|
|
40
41
|
| React Big Calendar | [`@lichta/react-big-calendar`](https://www.npmjs.com/package/@lichta/react-big-calendar) |
|
|
41
42
|
|
|
42
|
-
Nếu bạn đang cài `lichta` từ trước và dùng API core (`LichTa.toLunar()`, ...),
|
|
43
|
+
Nếu bạn đang cài `lichta` từ trước và dùng API core (`LichTa.toLunar()`, ...), không cần đổi gì — `lichta` giờ chính là `@lichta/core`. Khuyến nghị đổi tên import cho rõ ràng:
|
|
43
44
|
|
|
44
45
|
```diff
|
|
45
46
|
- import { LichTa } from 'lichta';
|
package/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@lichta/
|
|
1
|
+
export * from '@lichta/core';
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lichta",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "LichTa - Thư viện lịch Âm Dương Việt Nam (Tương thích ngược)",
|
|
5
5
|
"author": "Zeforc Labs | Stridev",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
|
-
"svelte": "./index.js",
|
|
9
8
|
"types": "./index.d.ts",
|
|
10
9
|
"exports": {
|
|
11
10
|
".": {
|
|
12
11
|
"types": "./index.d.ts",
|
|
13
|
-
"svelte": "./index.js",
|
|
14
12
|
"default": "./index.js"
|
|
15
13
|
}
|
|
16
14
|
},
|
|
@@ -20,7 +18,7 @@
|
|
|
20
18
|
"LICENSE"
|
|
21
19
|
],
|
|
22
20
|
"dependencies": {
|
|
23
|
-
"@lichta/
|
|
21
|
+
"@lichta/core": "2.2.1"
|
|
24
22
|
},
|
|
25
23
|
"repository": {
|
|
26
24
|
"type": "git",
|