Skip to content

Commit d0dda42

Browse files
committed
chore: update package name to scoped @langdiff/langdiff
- Change package name from 'langdiff' to '@langdiff/langdiff' for better npm organization - Update all import statements and installation instructions in README - Improve package.json files configuration and repository information - Update npm badge and package references to match new scoped name
1 parent c68957d commit d0dda42

2 files changed

Lines changed: 14 additions & 11 deletions

File tree

ts/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ⚖️ LangDiff: Progressive UI from LLM
22

3-
[![npm](https://img.shields.io/npm/v/langdiff-ts.svg)](https://www.npmjs.com/package/langdiff-ts)
3+
[![npm](https://img.shields.io/npm/v/@langdiff/langdiff.svg)](https://www.npmjs.com/package/@langdiff/langdiff)
44
[![license](https://img.shields.io/github/license/globalaiplatform/langdiff.svg)](https://github.com/globalaiplatform/langdiff/blob/main/LICENSE)
55
[![Global AI Platform](https://img.shields.io/badge/made%20by-Global%20AI%20Platform-646EFF)](https://globalaiplatform.com/)
66

@@ -95,13 +95,13 @@ data: {"op": "append", "path": "/items/1", "value": "ags"}
9595
### Installation
9696

9797
```bash
98-
npm install langdiff
98+
npm install @langdiff/langdiff
9999
```
100100

101101
For yarn:
102102

103103
```bash
104-
yarn add langdiff
104+
yarn add @langdiff/langdiff
105105
```
106106

107107
### Streaming Parsing
@@ -115,7 +115,7 @@ then streaming each section's content as it's written.
115115
Start by defining model classes that specify your streaming structure:
116116

117117
```typescript
118-
import * as ld from 'langdiff';
118+
import * as ld from '@langdiff/langdiff';
119119

120120
const ArticleGenerationResponse = ld.object({
121121
sectionTitles: ld.array(ld.string()),
@@ -168,7 +168,7 @@ Create a streaming parser with `Parser` and feed token chunks from your LLM stre
168168
```typescript
169169
import OpenAI from 'openai';
170170
import { zodResponseFormat } from 'openai/helpers/zod';
171-
import { Parser } from 'langdiff';
171+
import { Parser } from '@langdiff/langdiff';
172172

173173
const client = new OpenAI();
174174

@@ -208,7 +208,7 @@ Access the accumulated changes using `diffBuf.flush()`:
208208

209209
```typescript
210210
import OpenAI from 'openai';
211-
import { Parser, trackChange } from 'langdiff';
211+
import { Parser, trackChange } from '@langdiff/langdiff';
212212

213213
const client = new OpenAI();
214214

ts/package.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
2-
"name": "langdiff",
2+
"name": "@langdiff/langdiff",
33
"version": "0.2.0",
44
"description": "LangDiff is a TypeScript library that solves the hard problems of streaming structured LLM outputs to frontends.",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
77
"files": [
8-
"dist"
8+
"dist/**/*",
9+
"README.md"
910
],
1011
"scripts": {
1112
"build": "tsc",
@@ -29,14 +30,16 @@
2930
],
3031
"author": "Global AI Platform <[email protected]>",
3132
"maintainers": [
32-
"Taeho Kim <[email protected]>"
33+
"Taeho Kim <[email protected]>",
34+
"Hanju Jo <[email protected]>"
3335
],
3436
"license": "Apache-2.0",
3537
"repository": {
3638
"type": "git",
37-
"url": "https://github.com/globalaiplatform/langdiff"
39+
"url": "https://github.com/globalaiplatform/langdiff",
40+
"directory": "ts"
3841
},
39-
"homepage": "https://github.com/globalaiplatform/langdiff",
42+
"homepage": "https://github.com/globalaiplatform/langdiff/tree/main/ts",
4043
"dependencies": {
4144
"@types/fast-json-patch": "^1.0.4",
4245
"fast-json-patch": "^3.1.1",

0 commit comments

Comments
 (0)