Skip to content

Commit a1ed669

Browse files
docs: change npm package name
1 parent 581a115 commit a1ed669

File tree

11 files changed

+60
-60
lines changed

11 files changed

+60
-60
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
[![Tests](https://github.com/formkit/jsonreader/actions/workflows/tests.yml/badge.svg)](https://github.com/formkit/jsonreader/actions/workflows/tests.yml)
44

5-
This is a monorepo for the `jsonreader` package and its documentation site.
5+
This is a monorepo for the `@formkit/jsonreader` package and its documentation site.
66

77
## About jsonreader
88

9-
`jsonreader` is a specialized utility for processing JSON data from streams in real-time. Unlike traditional JSON parsers that require the entire payload before processing, `jsonreader` allows you to:
9+
`@formkit/jsonreader` is a specialized utility for processing JSON data from streams in real-time. Unlike traditional JSON parsers that require the entire payload before processing, `@formkit/jsonreader` allows you to:
1010

1111
- Process JSON progressively as it arrives from a stream
1212
- Extract specific properties as soon as they become available
@@ -37,7 +37,7 @@ Each commercial project requires a separate license. See the [documentation](htt
3737
## Quick Start
3838

3939
```typescript
40-
import { jsonReader, jsonPathReader } from 'jsonreader';
40+
import { jsonReader, jsonPathReader } from '@formkit/jsonreader';
4141

4242
// Get a stream reader (e.g. from fetch API)
4343
const response = await fetch('https://api.example.com/large-data.json');

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"name": "jsonreader-monorepo",
33
"version": "1.0.1",
44
"private": true,
5-
"description": "A monorepo for the jsonreader package and its documentation",
5+
"description": "A monorepo for the @formkit/jsonreader package and its documentation",
66
"scripts": {
77
"build": "pnpm -r build",
88
"dev:docs": "pnpm --filter docs dev",
9-
"dev:jsonreader": "pnpm --filter jsonreader dev",
9+
"dev:jsonreader": "pnpm --filter @formkit/jsonreader dev",
1010
"test": "pnpm -r test",
1111
"lint": "pnpm -r lint",
1212
"release": "pnpm build && bumpp -r && cd packages/jsonreader && pnpm publish"

packages/docs/components/DocFooter.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
</li>
5050
<li>
5151
<a
52-
href="https://www.npmjs.com/package/jsonreader"
52+
href="https://www.npmjs.com/package/@formkit/jsonreader"
5353
target="_blank"
5454
class="text-gray-600 hover:text-accent-1 transition-colors"
5555
>npm Package</a
@@ -60,7 +60,7 @@
6060
<div class="fade-in">
6161
<h3 class="text-xl font-bold text-black mb-6">About</h3>
6262
<p class="text-gray-600 mb-6">
63-
jsonreader is a utility for processing JSON data from streams in
63+
@formkit/jsonreader is a utility for processing JSON data from streams in
6464
real-time, optimized for AI tool calls and large API responses.
6565
</p>
6666
<div class="flex items-center space-x-4">

packages/docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
"vue-router": "^4.2.5"
2525
},
2626
"dependencies": {
27-
"jsonreader": "workspace:*"
27+
"@formkit/jsonreader": "workspace:*"
2828
}
2929
}

packages/docs/pages/docs/api-reference.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<pre
2929
class="text-white overflow-x-auto font-mono text-sm leading-relaxed text-left"
3030
>
31-
<span class="text-accent">import</span> { jsonReader } <span class="text-accent">from</span> <span class="text-white">'jsonreader'</span>;
31+
<span class="text-accent">import</span> { jsonReader } <span class="text-accent">from</span> <span class="text-white">'@formkit/jsonreader'</span>;
3232

3333
<span class="text-accent">for</span> <span class="text-accent">await</span> (<span class="text-accent">const</span> partialData <span class="text-accent">of</span> jsonReader(reader)) {
3434
<span class="text-gray-400">// Process the partial data</span>
@@ -184,7 +184,7 @@
184184
<pre
185185
class="text-white overflow-x-auto font-mono text-sm leading-relaxed text-left"
186186
>
187-
<span class="text-accent">import</span> { jsonReader } <span class="text-accent">from</span> <span class="text-white">'jsonreader'</span>;
187+
<span class="text-accent">import</span> { jsonReader } <span class="text-accent">from</span> <span class="text-white">'@formkit/jsonreader'</span>;
188188

189189
<span class="text-accent">for</span> <span class="text-accent">await</span> (<span class="text-accent">const</span> partialData <span class="text-accent">of</span> jsonReader(reader, {
190190
<span class="text-gray-400">// Only yield when these properties are present</span>
@@ -231,7 +231,7 @@
231231
<pre
232232
class="text-white overflow-x-auto font-mono text-sm leading-relaxed text-left"
233233
>
234-
<span class="text-accent">import</span> { jsonPathReader } <span class="text-accent">from</span> <span class="text-white">'jsonreader'</span>;
234+
<span class="text-accent">import</span> { jsonPathReader } <span class="text-accent">from</span> <span class="text-white">'@formkit/jsonreader'</span>;
235235

236236
<span class="text-accent">const</span> reader = response.body.getReader();
237237
<span class="text-accent">const</span> paths = [
@@ -404,7 +404,7 @@
404404
<pre
405405
class="text-white overflow-x-auto font-mono text-sm leading-relaxed text-left"
406406
>
407-
<span class="text-accent">import</span> { jsonPathReader } <span class="text-accent">from</span> <span class="text-white">'jsonreader'</span>;
407+
<span class="text-accent">import</span> { jsonPathReader } <span class="text-accent">from</span> <span class="text-white">'@formkit/jsonreader'</span>;
408408

409409
<span class="text-accent">async</span> <span class="text-accent">function</span> <span class="text-white">searchWithRealtimeResults</span>() {
410410
<span class="text-accent">const</span> response = <span class="text-accent">await</span> fetch(<span class="text-white">'https://api.search-service.com/search?q=jsonreader'</span>);

packages/docs/pages/docs/examples.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</div>
2727
<div>
2828
<p class="text-black">
29-
Practical examples showing how to use jsonreader in real-world
29+
Practical examples showing how to use @formkit/jsonreader in real-world
3030
scenarios.
3131
</p>
3232
</div>
@@ -37,9 +37,9 @@
3737
<h2 class="doc-heading-2 fade-in-delayed">Processing AI Tool Calls</h2>
3838

3939
<p class="doc-text fade-in-delayed">
40-
One of the most powerful use cases for jsonreader is processing JSON
40+
One of the most powerful use cases for @formkit/jsonreader is processing JSON
4141
responses from AI services. These responses can be large and take time
42-
to generate, but with jsonreader, you can start processing the data as
42+
to generate, but with @formkit/jsonreader, you can start processing the data as
4343
it arrives.
4444
</p>
4545

@@ -65,7 +65,7 @@
6565
<pre
6666
class="text-white overflow-x-auto font-mono text-sm leading-relaxed text-left"
6767
>
68-
<span class="text-accent">import</span> { jsonReader } <span class="text-accent">from</span> <span class="text-white">'jsonreader'</span>;
68+
<span class="text-accent">import</span> { jsonReader } <span class="text-accent">from</span> <span class="text-white">'@formkit/jsonreader'</span>;
6969

7070
<span class="text-accent">async</span> <span class="text-accent">function</span> <span class="text-white">processAIFunctionCall</span>() {
7171
<span class="text-gray-400">// Call an AI model with function calling enabled</span>
@@ -158,7 +158,7 @@
158158
<pre
159159
class="text-white overflow-x-auto font-mono text-sm leading-relaxed text-left"
160160
>
161-
<span class="text-accent">import</span> { jsonPathReader } <span class="text-accent">from</span> <span class="text-white">'jsonreader'</span>;
161+
<span class="text-accent">import</span> { jsonPathReader } <span class="text-accent">from</span> <span class="text-white">'@formkit/jsonreader'</span>;
162162

163163
<span class="text-accent">async</span> <span class="text-accent">function</span> <span class="text-white">progressiveProfileLoader</span>() {
164164
<span class="text-accent">const</span> response = <span class="text-accent">await</span> fetch(<span class="text-white">'/api/user/profile'</span>);
@@ -218,7 +218,7 @@
218218
<h2 class="doc-heading-2">Processing Large Files</h2>
219219

220220
<p class="doc-text">
221-
jsonreader is great for processing large JSON files without loading
221+
@formkit/jsonreader is great for processing large JSON files without loading
222222
them entirely into memory:
223223
</p>
224224

@@ -238,7 +238,7 @@
238238
class="text-white overflow-x-auto font-mono text-sm leading-relaxed text-left"
239239
>
240240
<span class="text-accent">import</span> { createReadStream } <span class="text-accent">from</span> <span class="text-white">'fs'</span>;
241-
<span class="text-accent">import</span> { jsonReader } <span class="text-accent">from</span> <span class="text-white">'jsonreader'</span>;
241+
<span class="text-accent">import</span> { jsonReader } <span class="text-accent">from</span> <span class="text-white">'@formkit/jsonreader'</span>;
242242

243243
<span class="text-accent">async</span> <span class="text-accent">function</span> <span class="text-white">processLargeJsonFile</span>(filePath) {
244244
<span class="text-gray-400">// Create a file stream</span>

packages/docs/pages/docs/getting-started.vue

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="absolute inset-0 noise-bg opacity-40"></div>
44
<div class="relative z-10">
55
<h1 class="doc-heading-1 shimmer-effect">
6-
Getting Started with jsonreader
6+
Getting Started with @formkit/jsonreader
77
</h1>
88

99
<div
@@ -28,7 +28,7 @@
2828
</div>
2929
<div>
3030
<p class="text-black">
31-
jsonreader is a specialized utility for processing JSON data from
31+
@formkit/jsonreader is a specialized utility for processing JSON data from
3232
streams in real-time, with a particular focus on handling
3333
responses from AI tool calls efficiently.
3434
</p>
@@ -39,7 +39,7 @@
3939
<h2 class="doc-heading-2 fade-in">Installation</h2>
4040

4141
<p class="doc-text fade-in-delayed">
42-
Add jsonreader to your project using your preferred package manager:
42+
Add @formkit/jsonreader to your project using your preferred package manager:
4343
</p>
4444

4545
<div
@@ -59,22 +59,22 @@
5959
class="text-white overflow-x-auto font-mono text-sm leading-relaxed text-left"
6060
>
6161
<span class="text-gray-400"># Using npm</span>
62-
npm install jsonreader
62+
npm install @formkit/jsonreader
6363

6464
<span class="text-gray-400"># Using yarn</span>
65-
yarn add jsonreader
65+
yarn add @formkit/jsonreader
6666

6767
<span class="text-gray-400"># Using pnpm</span>
68-
pnpm add jsonreader</pre>
68+
pnpm add @formkit/jsonreader</pre>
6969
</div>
7070
</div>
7171

7272
<h2 class="doc-heading-2 fade-in-delayed" style="animation-delay: 0.3s">
73-
Why Use jsonreader?
73+
Why Use @formkit/jsonreader?
7474
</h2>
7575

7676
<p class="doc-text fade-in-delayed" style="animation-delay: 0.4s">
77-
When working with AI tool calls or any large JSON responses, jsonreader
77+
When working with AI tool calls or any large JSON responses, @formkit/jsonreader
7878
provides several key advantages:
7979
</p>
8080

@@ -107,7 +107,7 @@ pnpm add jsonreader</pre>
107107
</h3>
108108

109109
<p class="doc-text fade-in-delayed" style="animation-delay: 0.8s">
110-
The simplest way to use jsonreader is to process JSON data as it streams
110+
The simplest way to use @formkit/jsonreader is to process JSON data as it streams
111111
in:
112112
</p>
113113

@@ -127,7 +127,7 @@ pnpm add jsonreader</pre>
127127
<pre
128128
class="text-white overflow-x-auto font-mono text-sm leading-relaxed text-left"
129129
>
130-
<span class="text-accent">import</span> { jsonReader } <span class="text-accent">from</span> <span class="text-white">'jsonreader'</span>;
130+
<span class="text-accent">import</span> { jsonReader } <span class="text-accent">from</span> <span class="text-white">'@formkit/jsonreader'</span>;
131131

132132
<span class="text-accent">async</span> <span class="text-accent">function</span> <span class="text-white">processStreamingData</span>() {
133133
<span class="text-gray-400">// Get a stream from somewhere (e.g., fetch API)</span>
@@ -172,7 +172,7 @@ pnpm add jsonreader</pre>
172172
<pre
173173
class="text-white overflow-x-auto font-mono text-sm leading-relaxed text-left"
174174
>
175-
<span class="text-accent">import</span> { jsonReader } <span class="text-accent">from</span> <span class="text-white">'jsonreader'</span>;
175+
<span class="text-accent">import</span> { jsonReader } <span class="text-accent">from</span> <span class="text-white">'@formkit/jsonreader'</span>;
176176

177177
<span class="text-accent">async</span> <span class="text-accent">function</span> <span class="text-white">processToolResults</span>() {
178178
<span class="text-accent">const</span> response = <span class="text-accent">await</span> fetch(<span class="text-white">'https://api.ai-service.com/v1/generate'</span>);
@@ -219,7 +219,7 @@ pnpm add jsonreader</pre>
219219
<pre
220220
class="text-white overflow-x-auto font-mono text-sm leading-relaxed text-left"
221221
>
222-
<span class="text-accent">import</span> { jsonPathReader } <span class="text-accent">from</span> <span class="text-white">'jsonreader'</span>;
222+
<span class="text-accent">import</span> { jsonPathReader } <span class="text-accent">from</span> <span class="text-white">'@formkit/jsonreader'</span>;
223223

224224
<span class="text-gray-400">// Define paths to extract</span>
225225
<span class="text-accent">const</span> paths = [
@@ -253,7 +253,7 @@ pnpm add jsonreader</pre>
253253

254254
<h2 class="doc-heading-2">Error Handling</h2>
255255

256-
<p class="doc-text">JSONReader will throw an error when parsing fails:</p>
256+
<p class="doc-text">@formkit/jsonreader will throw an error when parsing fails:</p>
257257

258258
<div class="code-block card-noise">
259259
<div class="code-window-header flex justify-between items-center">

packages/docs/pages/index.vue

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
<pre
7878
class="text-white overflow-x-auto font-mono text-sm leading-relaxed"
7979
>
80-
<span class="text-accent">import</span> { jsonReader } <span class="text-accent">from</span> <span class="text-white">'jsonreader'</span>;
80+
<span class="text-accent">import</span> { jsonReader } <span class="text-accent">from</span> <span class="text-white">'@formkit/jsonreader'</span>;
8181

8282
<span class="text-gray-400">// Get a reader from a streaming response</span>
8383
<span class="text-accent">const</span> reader = response.body.getReader();
@@ -345,7 +345,7 @@
345345
</h4>
346346
</div>
347347
<p class="text-gray-600 mb-8 flex-grow">
348-
Use jsonreader in your personal projects, open source
348+
Use @formkit/jsonreader in your personal projects, open source
349349
contributions, and learning experiences at no cost.
350350
</p>
351351
<div class="flex items-end justify-between mt-auto">
@@ -446,13 +446,13 @@
446446
class="text-white overflow-x-auto font-mono text-sm leading-relaxed text-left"
447447
>
448448
<span class="text-gray-400"># Using npm</span>
449-
npm install jsonreader
449+
npm install @formkit/jsonreader
450450

451451
<span class="text-gray-400"># Using yarn</span>
452-
yarn add jsonreader
452+
yarn add @formkit/jsonreader
453453

454454
<span class="text-gray-400"># Using pnpm</span>
455-
pnpm add jsonreader</pre>
455+
pnpm add @formkit/jsonreader</pre>
456456
</div>
457457
</div>
458458

@@ -468,7 +468,7 @@ pnpm add jsonreader</pre>
468468
<div class="navigation-card fade-in-delayed mb-16">
469469
<div class="card-content">
470470
<p class="text-black mb-6">
471-
The <code class="inline-code">jsonreader</code> utility parses
471+
The <code class="inline-code">@formkit/jsonreader</code> utility parses
472472
JSON data character by character as it arrives from a stream. It
473473
builds up a syntactically valid JSON structure as data comes in,
474474
closing any unclosed objects or arrays to create valid partial
@@ -541,7 +541,7 @@ pnpm add jsonreader</pre>
541541
</h3>
542542

543543
<p class="doc-text mb-6">
544-
The simplest way to use jsonreader is to process JSON data as it
544+
The simplest way to use @formkit/jsonreader is to process JSON data as it
545545
streams in:
546546
</p>
547547

@@ -558,7 +558,7 @@ pnpm add jsonreader</pre>
558558
<pre
559559
class="text-white overflow-x-auto font-mono text-sm leading-relaxed text-left"
560560
>
561-
<span class="text-accent">import</span> { jsonReader } <span class="text-accent">from</span> <span class="text-white">'jsonreader'</span>;
561+
<span class="text-accent">import</span> { jsonReader } <span class="text-accent">from</span> <span class="text-white">'@formkit/jsonreader'</span>;
562562

563563
<span class="text-accent">async</span> <span class="text-accent">function</span> <span class="text-white">processStreamingData</span>() {
564564
<span class="text-gray-400">// Get a stream from somewhere (e.g., fetch API)</span>
@@ -595,7 +595,7 @@ pnpm add jsonreader</pre>
595595
class="bg-gray-50 p-6 mb-8 rounded-lg border border-gray-200 card-noise"
596596
>
597597
<p class="text-black mb-6">
598-
jsonreader provides three powerful configuration options to control
598+
@formkit/jsonreader provides three powerful configuration options to control
599599
how streaming data is processed:
600600
</p>
601601

@@ -651,7 +651,7 @@ pnpm add jsonreader</pre>
651651
<pre
652652
class="text-white overflow-x-auto font-mono text-sm leading-relaxed text-left"
653653
>
654-
<span class="text-accent">import</span> { jsonReader } <span class="text-accent">from</span> <span class="text-white">'jsonreader'</span>;
654+
<span class="text-accent">import</span> { jsonReader } <span class="text-accent">from</span> <span class="text-white">'@formkit/jsonreader'</span>;
655655

656656
<span class="text-accent">for</span> <span class="text-accent">await</span> (<span class="text-accent">const</span> data <span class="text-accent">of</span> jsonReader(reader, {
657657
<span class="text-gray-400">// Won't yield anything until 'metadata' is complete</span>
@@ -703,7 +703,7 @@ pnpm add jsonreader</pre>
703703
<pre
704704
class="text-white overflow-x-auto font-mono text-sm leading-relaxed text-left"
705705
>
706-
<span class="text-accent">import</span> { jsonPathReader } <span class="text-accent">from</span> <span class="text-white">'jsonreader'</span>;
706+
<span class="text-accent">import</span> { jsonPathReader } <span class="text-accent">from</span> <span class="text-white">'@formkit/jsonreader'</span>;
707707

708708
<span class="text-accent">for</span> <span class="text-accent">await</span> (<span class="text-accent">const</span> [value, path] <span class="text-accent">of</span> jsonPathReader(reader, [
709709
<span class="text-white">'results'</span>,

0 commit comments

Comments
 (0)