Skip to content

Commit

Permalink
chore: bump version number
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjoDiaz committed May 16, 2023
1 parent 09796ab commit 19c9625
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 32 deletions.
15 changes: 8 additions & 7 deletions build.deno.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,22 @@ import {
writeFileSync,
} from "fs";

import pkgInfo from "./package.json" assert { type: "json" };

const denoXURL = `https://deno.land/x/streamparser_json@v${pkgInfo.version}`;

function copyReadme(src, dest) {
writeFileSync(
path.join(dest, "README.md"),
readFileSync("./README.md")
.toString()
.replace(
/import \{ (.*) \} from '@streamparser\/json';/gm,
'import { $1 } from "https://deno.land/x/[email protected]/index.ts";/'
`import { $1 } from "${denoXURL}/index.ts";/`
)
.replace(
/import { (.*) } from '@streamparser\/json\/(.*).js';/gm,
'import { $1 } from "https://deno.land/x/[email protected]/$2.ts)";/'
`import { $1 } from "${denoXURL}/$2.ts)";/`
)
);
}
Expand All @@ -42,13 +46,10 @@ function processDir(src, dest) {
readFileSync(currentPath)
.toString()
.replace(/from "(\.[.\\/-\w]+).js"/gm, 'from "$1.ts"')
.replace(
/from "@streamparser\/json"/gm,
'from "https://deno.land/x/[email protected]/index.ts"'
)
.replace(/from "@streamparser\/json"/gm, `from "${denoXURL}/index.ts"`)
.replace(
/from "@streamparser\/json\/(.*).js"/gm,
'from "https://deno.land/x/[email protected]/$1.ts"'
`from "${denoXURL}/$1.ts"`
)
);
});
Expand Down
12 changes: 7 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "streamparser-json",
"description": "Streaming JSON parser in Javascript for Node.js, Deno and the browser",
"version": "0.0.13",
"version": "0.0.14",
"type": "module",
"author": "Juanjo Diaz <[email protected]>",
"repository": {
Expand Down
14 changes: 7 additions & 7 deletions packages/plainjs/dist/deno/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Fast dependency-free library to parse a JSON stream using utf-8 encoding in Node
*tldr;*

```javascript
import { JSONParser } from "https://deno.land/x/[email protected].13/index.ts";/
import { JSONParser } from "https://deno.land/x/[email protected].14/index.ts";/

const parser = new JSONParser();
parser.onValue = ({ value }) => { /* process data */ };
Expand Down Expand Up @@ -51,7 +51,7 @@ If you are targeting browsers or systems in which these might be missing, you ne
A JSON compliant tokenizer that parses a utf-8 stream into JSON tokens

```javascript
import { Tokenizer } from "https://deno.land/x/[email protected].13/index.ts";/
import { Tokenizer } from "https://deno.land/x/[email protected].14/index.ts";/

const tokenizer = new Tokenizer(opts);
```
Expand Down Expand Up @@ -162,7 +162,7 @@ A drop-in replacement of `JSONparse` (with few ~~breaking changes~~ improvements


```javascript
import { JSONParser } from "https://deno.land/x/[email protected].13/index.ts";/
import { JSONParser } from "https://deno.land/x/[email protected].14/index.ts";/

const parser = new JSONParser();
```
Expand Down Expand Up @@ -222,7 +222,7 @@ You push data using the `write` method which takes a string or an array-like obj
You can subscribe to the resulting data using the

```javascript
import { JSONParser } from "https://deno.land/x/[email protected].13/index.ts";/
import { JSONParser } from "https://deno.land/x/[email protected].14/index.ts";/

const parser = new JSONParser({ stringBufferSize: undefined, paths: ['$'] });
parser.onValue = console.log;
Expand All @@ -240,7 +240,7 @@ parser.write('"');// logs "Hello world!"
Write is always a synchronous operation so any error during the parsing of the stream will be thrown during the write operation. After an error, the parser can't continue parsing.

```javascript
import { JSONParser } from "https://deno.land/x/[email protected].13/index.ts";/
import { JSONParser } from "https://deno.land/x/[email protected].14/index.ts";/

const parser = new JSONParser({ stringBufferSize: undefined });
parser.onValue = console.log;
Expand All @@ -255,7 +255,7 @@ try {
You can also handle errors using callbacks:

```javascript
import { JSONParser } from "https://deno.land/x/[email protected].13/index.ts";/
import { JSONParser } from "https://deno.land/x/[email protected].14/index.ts";/

const parser = new JSONParser({ stringBufferSize: undefined });
parser.onValue = console.log;
Expand Down Expand Up @@ -293,7 +293,7 @@ Imagine an endpoint that send a large amount of JSON objects one after the other
Imagine an endpoint that send a large amount of JSON objects one after the other (`[{"id":1},{"id":2},{"id":3},...]`).

```js
import { JSONParser } from "https://deno.land/x/[email protected].13/index.ts";/
import { JSONParser } from "https://deno.land/x/[email protected].14/index.ts";/

const jsonparser = new JSONParser({ stringBufferSize: undefined, paths: ['$.*'] });
jsonparser.onValue = ({ value, key, parent, stack }) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/plainjs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@streamparser/json",
"description": "Streaming JSON parser in Javascript for Node.js, Deno and the browser",
"version": "0.0.13",
"version": "0.0.14",
"main": "./dist/mjs/index.js",
"module": "./dist/mjs/index.js",
"browser": "./dist/mjs/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/whatwg/dist/deno/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export {
TokenParserMode,
type StackElement,
TokenType,
} from "https://deno.land/x/[email protected].13/index.ts";
} from "https://deno.land/x/[email protected].14/index.ts";
4 changes: 2 additions & 2 deletions packages/whatwg/dist/deno/jsonparser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { JSONParser, type JSONParserOptions } from "https://deno.land/x/[email protected].13/index.ts";
import type { ParsedElementInfo } from "https://deno.land/x/[email protected].13/utils/types/parsedElementInfo.ts";
import { JSONParser, type JSONParserOptions } from "https://deno.land/x/[email protected].14/index.ts";
import type { ParsedElementInfo } from "https://deno.land/x/[email protected].14/utils/types/parsedElementInfo.ts";
import { cloneParsedElementInfo } from "./utils.ts";

class JSONParserTransformer
Expand Down
4 changes: 2 additions & 2 deletions packages/whatwg/dist/deno/tokenizer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Tokenizer, {
type TokenizerOptions,
} from "https://deno.land/x/[email protected].13/tokenizer.ts";
import type { ParsedTokenInfo } from "https://deno.land/x/[email protected].13/utils/types/parsedTokenInfo.ts";
} from "https://deno.land/x/[email protected].14/tokenizer.ts";
import type { ParsedTokenInfo } from "https://deno.land/x/[email protected].14/utils/types/parsedTokenInfo.ts";

class TokenizerTransformer
extends Tokenizer
Expand Down
6 changes: 3 additions & 3 deletions packages/whatwg/dist/deno/tokenparser.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TokenParser, type TokenParserOptions } from "https://deno.land/x/[email protected].13/index.ts";
import type { ParsedTokenInfo } from "https://deno.land/x/[email protected].13/utils/types/parsedTokenInfo.ts";
import type { ParsedElementInfo } from "https://deno.land/x/[email protected].13/utils/types/parsedElementInfo.ts";
import { TokenParser, type TokenParserOptions } from "https://deno.land/x/[email protected].14/index.ts";
import type { ParsedTokenInfo } from "https://deno.land/x/[email protected].14/utils/types/parsedTokenInfo.ts";
import type { ParsedElementInfo } from "https://deno.land/x/[email protected].14/utils/types/parsedElementInfo.ts";
import { cloneParsedElementInfo } from "./utils.ts";

class TokenParserTransformer
Expand Down
2 changes: 1 addition & 1 deletion packages/whatwg/dist/deno/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ParsedElementInfo } from "https://deno.land/x/[email protected].13/utils/types/parsedElementInfo.ts";
import type { ParsedElementInfo } from "https://deno.land/x/[email protected].14/utils/types/parsedElementInfo.ts";

export function cloneParsedElementInfo(
parsedElementInfo: ParsedElementInfo
Expand Down
4 changes: 2 additions & 2 deletions packages/whatwg/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@streamparser/json-whatwg",
"description": "Streaming JSON parser in Javascript for Node.js, Deno and the browser",
"version": "0.0.13",
"version": "0.0.14",
"main": "./dist/mjs/index.js",
"module": "./dist/mjs/index.js",
"browser": "./dist/mjs/index.js",
Expand Down Expand Up @@ -42,6 +42,6 @@
"stream"
],
"dependencies": {
"@streamparser/json": "^0.0.13"
"@streamparser/json": "^0.0.14"
}
}

0 comments on commit 19c9625

Please sign in to comment.