lombok-typescript 0.1.0 → 0.3.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.md CHANGED
@@ -1,51 +1,39 @@
1
1
  # lombok-typescript
2
2
 
3
- [![CI](https://github.com/A-Dev-Kit/lombok-typescript/actions/workflows/ci.yml/badge.svg)](https://github.com/A-Dev-Kit/lombok-typescript/actions/workflows/ci.yml)
4
- [![Docs](https://github.com/A-Dev-Kit/lombok-typescript/actions/workflows/docs.yml/badge.svg)](https://a-dev-kit.github.io/lombok-typescript/)
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)
6
- [![npm version](https://img.shields.io/npm/v/lombok-typescript.svg?label=npm)](https://www.npmjs.com/package/lombok-typescript)
7
- [![coverage](https://img.shields.io/codecov/c/github/A-Dev-Kit/lombok-typescript/main?label=coverage)](https://codecov.io/gh/A-Dev-Kit/lombok-typescript)
8
- [![Node](https://img.shields.io/badge/node-%E2%89%A522-brightgreen)](https://nodejs.org/)
9
- [![TypeScript](https://img.shields.io/badge/TypeScript-%E2%89%A55.0-blue?logo=typescript)](https://www.typescriptlang.org/)
10
-
11
- A TypeScript port of Java's [Project Lombok](https://projectlombok.org/) with Gang-of-Four design patterns as decorators. Legacy `experimentalDecorators` and Stage 3 ECMAScript decorators are supported side-by-side.
12
-
13
- ## Status
14
-
15
- **Version `0.1.0` — code-complete, not on npm yet.** Batch publish is deferred until the full release queue is ready. See [CHANGELOG.md](./CHANGELOG.md).
16
-
17
- Phase 1 decorators are implemented: `@NonNull`, `@ToString`, `@Builder`, `@Data`, `@Singleton`, `@Prototype`, `@Factory`, `@Memoize`.
18
-
19
- Documentation site: [a-dev-kit.github.io/lombok-typescript](https://a-dev-kit.github.io/lombok-typescript/) (after GitHub Pages deploy).
3
+ TypeScript decorators inspired by Project Lombok and common design patterns.
20
4
 
21
5
  ## Install
22
6
 
23
- ```bash
24
- # Not on npm yet — clone and link locally:
25
- git clone https://github.com/A-Dev-Kit/lombok-typescript.git
26
- cd lombok-typescript && pnpm install && pnpm build && pnpm link --global
7
+ To install the current stable release:
27
8
 
28
- # When published (preview tag):
29
- npm install lombok-typescript@preview
9
+ ```bash
10
+ npm install lombok-typescript
30
11
  ```
31
12
 
32
- ## Pick a decorator standard
33
-
34
- ### Legacy (`lombok-typescript/legacy`)
13
+ To try the next preview release (one version ahead during backfill):
35
14
 
36
- For NestJS, TypeORM, and most existing decorator-based projects.
37
-
38
- ```jsonc
39
- { "compilerOptions": { "experimentalDecorators": true, "emitDecoratorMetadata": true } }
15
+ ```bash
16
+ npm install lombok-typescript@preview
40
17
  ```
41
18
 
42
- ### Stage 3 (`lombok-typescript/stage3`)
43
-
44
- For TS 5.0+ projects without `experimentalDecorators`.
45
-
46
- ```jsonc
47
- { "compilerOptions": { "experimentalDecorators": false } }
48
- ```
19
+ ## Decorators in this release
20
+
21
+ - @NonNull
22
+ - @ToString
23
+ - @Builder
24
+ - @Data
25
+ - @Singleton
26
+ - @Prototype
27
+ - @Factory
28
+ - @Memoize
29
+ - @Value
30
+ - @With
31
+ - @Equals
32
+ - @Getter
33
+ - @Setter
34
+ - @Log
35
+ - @Accessors
36
+ - @UtilityClass
49
37
 
50
38
  ## Quick start
51
39
 
@@ -55,44 +43,25 @@ npx lombok-ts generate
55
43
  ```
56
44
 
57
45
  ```ts
58
- import { Data, Builder, NonNull, Memoize, Singleton } from 'lombok-typescript/legacy';
46
+ import { Data, Builder, NonNull } from 'lombok-typescript/legacy';
59
47
 
60
48
  @Data
61
49
  @Builder
62
50
  class User {
63
51
  @NonNull name!: string;
64
- age!: number;
65
- }
66
-
67
- @Singleton
68
- class Cache {
69
- @Memoize()
70
- get(key: string) {
71
- return key;
72
- }
73
52
  }
74
53
  ```
75
54
 
76
- After codegen, import and call `applyAllGenerated` from the `.lombok/` companion file. See [docs-site/guide/getting-started.md](./docs-site/guide/getting-started.md).
55
+ Full setup, codegen, and framework guides: [https://a-dev-kit.github.io/lombok-typescript/](https://a-dev-kit.github.io/lombok-typescript/)
77
56
 
78
57
  ## CLI
79
58
 
80
- | Command | Description |
81
- | -------------------- | --------------------------------------------- |
82
- | `lombok-ts generate` | Emit `.lombok.ts` + `.lombok.d.ts` companions |
83
- | `lombok-ts init` | Create `lombok.config.ts` |
84
- | `lombok-ts clean` | Remove `.lombok/`, `dist/`, `coverage/` |
85
- | `lombok-ts watch` | Phase 2 stub |
86
-
87
- ## Examples
88
-
89
- - [examples/plain-ts](./examples/plain-ts/) — legacy backend + codegen
90
- - [examples/nestjs](./examples/nestjs/) — `@Injectable()` with `@Singleton`, `@Factory`, `@Memoize`
91
-
92
- ## Contributing
93
-
94
- See [CONTRIBUTING.md](./CONTRIBUTING.md). Tests require **95%+** coverage on changed code.
59
+ | Command | Description |
60
+ | -------------------- | --------------------------------------------------------- |
61
+ | `lombok-ts generate` | Generate companion TypeScript files for decorated classes |
62
+ | `lombok-ts init` | Add lombok configuration to your project |
63
+ | `lombok-ts clean` | Remove generated lombok output from your project |
95
64
 
96
65
  ## License
97
66
 
98
- [MIT](./LICENSE)
67
+ MIT