Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjoDiaz committed Jul 28, 2023
1 parent 3d1bcaa commit bfb882e
Show file tree
Hide file tree
Showing 67 changed files with 1,195 additions and 878 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"rules": {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": ["warn"],
"@typescript-eslint/ban-ts-comment": ["error", { "ts-ignore": "allow-with-description" } ],
"prettier/prettier": ["error", { "endOfLine": "auto" }]
}
Expand Down
10 changes: 5 additions & 5 deletions build.deno.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ function copyReadme(src, dest) {
.toString()
.replace(
/import \{ (.*) \} from '@streamparser\/json';/gm,
`import { $1 } from "${denoXURL}/index.ts";/`
`import { $1 } from "${denoXURL}/index.ts";/`,
)
.replace(
/import { (.*) } from '@streamparser\/json\/(.*).js';/gm,
`import { $1 } from "${denoXURL}/$2.ts)";/`
)
`import { $1 } from "${denoXURL}/$2.ts)";/`,
),
);
}

Expand All @@ -49,8 +49,8 @@ function processDir(src, dest) {
.replace(/from "@streamparser\/json"/gm, `from "${denoXURL}/index.ts"`)
.replace(
/from "@streamparser\/json\/(.*).js"/gm,
`from "${denoXURL}/$1.ts"`
)
`from "${denoXURL}/$1.ts"`,
),
);
});
}
Expand Down
1,678 changes: 993 additions & 685 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
"bugs": "https://github.com/juanjoDiaz/streamparser-json/issues",
"devDependencies": {
"@types/jest": "^29.2.3",
"@typescript-eslint/eslint-plugin": "^5.25.0",
"@typescript-eslint/parser": "^5.25.0",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "6.2.0",
"eslint": "^8.16.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-prettier": "^5.0.0",
"jest": "^29.3.1",
"prettier": "^2.6.2",
"prettier": "^3.0.0",
"ts-jest": "^29.0.3",
"ts-node": "^10.9.1",
"typescript": "^5.0.3"
Expand Down
4 changes: 2 additions & 2 deletions packages/node/dist/deno/jsonparser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default class JSONParserTransform extends Transform {
transformOpts: Omit<
TransformOptions,
"readableObjectMode" | "writableObjectMode"
> = {}
> = {},
) {
super({
...transformOpts,
Expand Down Expand Up @@ -41,7 +41,7 @@ export default class JSONParserTransform extends Transform {
override _transform(
chunk: any,
encoding: BufferEncoding,
done: TransformCallback
done: TransformCallback,
) {
try {
this.jsonParser.write(chunk);
Expand Down
4 changes: 2 additions & 2 deletions packages/node/dist/deno/tokenizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default class TokenizerTransform extends Transform {
transformOpts: Omit<
TransformOptions,
"readableObjectMode" | "writableObjectMode"
> = {}
> = {},
) {
super({
...transformOpts,
Expand Down Expand Up @@ -43,7 +43,7 @@ export default class TokenizerTransform extends Transform {
override _transform(
chunk: any,
encoding: BufferEncoding,
done: TransformCallback
done: TransformCallback,
) {
try {
this.tokenizer.write(chunk);
Expand Down
4 changes: 2 additions & 2 deletions packages/node/dist/deno/tokenparser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default class TokenParserTransform extends Transform {
transformOpts: Omit<
TransformOptions,
"readableObjectMode" | "writableObjectMode"
> = {}
> = {},
) {
super({
...transformOpts,
Expand Down Expand Up @@ -41,7 +41,7 @@ export default class TokenParserTransform extends Transform {
override _transform(
chunk: any,
encoding: BufferEncoding,
done: TransformCallback
done: TransformCallback,
) {
try {
this.tokenParser.write(chunk);
Expand Down
2 changes: 1 addition & 1 deletion packages/node/dist/deno/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ParsedElementInfo } from "https://deno.land/x/[email protected]/utils/types/parsedElementInfo.ts";

export function cloneParsedElementInfo(
parsedElementInfo: ParsedElementInfo
parsedElementInfo: ParsedElementInfo,
): ParsedElementInfo {
const { value, key, parent, stack } = parsedElementInfo;
return { value, key, parent: clone(parent), stack: clone(stack) };
Expand Down
4 changes: 2 additions & 2 deletions packages/node/src/jsonparser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default class JSONParserTransform extends Transform {
transformOpts: Omit<
TransformOptions,
"readableObjectMode" | "writableObjectMode"
> = {}
> = {},
) {
super({
...transformOpts,
Expand Down Expand Up @@ -41,7 +41,7 @@ export default class JSONParserTransform extends Transform {
override _transform(
chunk: any,
encoding: BufferEncoding,
done: TransformCallback
done: TransformCallback,
) {
try {
this.jsonParser.write(chunk);
Expand Down
4 changes: 2 additions & 2 deletions packages/node/src/tokenizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default class TokenizerTransform extends Transform {
transformOpts: Omit<
TransformOptions,
"readableObjectMode" | "writableObjectMode"
> = {}
> = {},
) {
super({
...transformOpts,
Expand Down Expand Up @@ -43,7 +43,7 @@ export default class TokenizerTransform extends Transform {
override _transform(
chunk: any,
encoding: BufferEncoding,
done: TransformCallback
done: TransformCallback,
) {
try {
this.tokenizer.write(chunk);
Expand Down
4 changes: 2 additions & 2 deletions packages/node/src/tokenparser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default class TokenParserTransform extends Transform {
transformOpts: Omit<
TransformOptions,
"readableObjectMode" | "writableObjectMode"
> = {}
> = {},
) {
super({
...transformOpts,
Expand Down Expand Up @@ -41,7 +41,7 @@ export default class TokenParserTransform extends Transform {
override _transform(
chunk: any,
encoding: BufferEncoding,
done: TransformCallback
done: TransformCallback,
) {
try {
this.tokenParser.write(chunk);
Expand Down
2 changes: 1 addition & 1 deletion packages/node/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ParsedElementInfo } from "@streamparser/json/utils/types/parsedElementInfo.js";

export function cloneParsedElementInfo(
parsedElementInfo: ParsedElementInfo
parsedElementInfo: ParsedElementInfo,
): ParsedElementInfo {
const { value, key, parent, stack } = parsedElementInfo;
return { value, key, parent: clone(parent), stack: clone(stack) };
Expand Down
2 changes: 1 addition & 1 deletion packages/node/test/inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe("inputs", () => {
await runJSONParserTest(
new JSONParser(),
[quote, value, quote],
({ value }) => expect(value).toEqual(expected)
({ value }) => expect(value).toEqual(expected),
);
});
});
Expand Down
2 changes: 1 addition & 1 deletion packages/node/test/keepStack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe("keepStack", () => {
({ parent }) => {
if (parent === undefined) return;
expect(Object.keys(parent).length).toEqual(0);
}
},
);
});
});
Expand Down
2 changes: 1 addition & 1 deletion packages/node/test/offset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ test("offset", async () => {
expect(offset).toEqual(offsets[i][0]);
expect(token).toEqual(offsets[i][1]);
i += 1;
}
},
);
});
2 changes: 1 addition & 1 deletion packages/node/test/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe("selectors", () => {
({ value }) => {
expect(value).toEqual(expected[i]);
i += 1;
}
},
);
});
});
Expand Down
6 changes: 3 additions & 3 deletions packages/node/test/separator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe("separator", () => {
({ value }) => {
expect(value).toEqual(expected[i]);
i += 1;
}
},
);
});
});
Expand All @@ -45,7 +45,7 @@ describe("separator", () => {
await runJSONParserTest(new JSONParser({ separator: "abc" }), ["abe"]);
} catch (err: any) {
expect(err.message).toEqual(
'Unexpected "e" at position "2" in state SEPARATOR'
'Unexpected "e" at position "2" in state SEPARATOR',
);
}
});
Expand All @@ -71,7 +71,7 @@ describe("separator", () => {
fail("Error expected on invalid selector");
} catch (err: any) {
expect(err.message).toEqual(
'Unexpected SEPARATOR ("\\r\\n") in state SEPARATOR'
'Unexpected SEPARATOR ("\\r\\n") in state SEPARATOR',
);
}
});
Expand Down
4 changes: 2 additions & 2 deletions packages/node/test/types/arrays.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe("arrays", () => {

expect([keys, value]).toEqual(expected[i]);
i += 1;
}
},
);
});

Expand All @@ -89,7 +89,7 @@ describe("arrays", () => {

expect([keys, value]).toEqual(expected[i]);
i += 1;
}
},
);
});
});
Expand Down
2 changes: 1 addition & 1 deletion packages/node/test/types/booleans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe("boolean", () => {
(stringValue as string).split(""),
({ value }) => {
expect(value).toEqual(JSON.parse(stringValue));
}
},
);
});
});
Expand Down
2 changes: 1 addition & 1 deletion packages/node/test/types/null.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe("null", () => {
(stringValue as string).split(""),
({ value }) => {
expect(value).toEqual(JSON.parse(stringValue));
}
},
);
});
});
Expand Down
4 changes: 2 additions & 2 deletions packages/node/test/types/numbers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe("number", () => {
[stringValue],
({ value }) => {
expect(value).toEqual(JSON.parse(stringValue));
}
},
);
});

Expand All @@ -71,7 +71,7 @@ describe("number", () => {
(stringValue as string).split(""),
({ value }) => {
expect(value).toEqual(JSON.parse(stringValue));
}
},
);
});
});
Expand Down
8 changes: 4 additions & 4 deletions packages/node/test/types/objects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe("objects", () => {

expect([keys, value]).toEqual(expected[i]);
i += 1;
}
},
);
});

Expand All @@ -90,14 +90,14 @@ describe("objects", () => {

expect([keys, value]).toEqual(expected[i]);
i += 1;
}
},
);
});
});

test("complex object", async () => {
const stringifiedJson = readFileSync(
`${__dirname}/../../../../samplejson/basic.json`
`${__dirname}/../../../../samplejson/basic.json`,
).toString();

await runJSONParserTest(
Expand All @@ -107,7 +107,7 @@ describe("objects", () => {
if (stack.length === 0) {
expect(value).toEqual(JSON.parse(stringifiedJson));
}
}
},
);
});

Expand Down
Loading

0 comments on commit bfb882e

Please sign in to comment.