aboutsummaryrefslogtreecommitdiff
path: root/src/tools/json-diff/diff-viewer/diff-viewer.models.tsx
diff options
context:
space:
mode:
authorGravatar Corentin Thomasset <corentin.thomasset74@gmail.com> 2023-05-28 23:13:24 +0200
committerGravatar Corentin THOMASSET <corentin.thomasset74@gmail.com> 2023-05-28 23:29:14 +0200
commit33c9b6643f58a6930043f460d5bfdca4bc1f7222 (patch)
treef313935e30f7b90ea16e564e7171e2e72319ce29 /src/tools/json-diff/diff-viewer/diff-viewer.models.tsx
parent4d2b037dbe4e78aa90a4a6d9c7315dcf0a51fed9 (diff)
downloadit-tools-33c9b6643f58a6930043f460d5bfdca4bc1f7222.tar.gz
it-tools-33c9b6643f58a6930043f460d5bfdca4bc1f7222.tar.zst
it-tools-33c9b6643f58a6930043f460d5bfdca4bc1f7222.zip
chore(lint): switched to a better lint config
Diffstat (limited to 'src/tools/json-diff/diff-viewer/diff-viewer.models.tsx')
-rw-r--r--src/tools/json-diff/diff-viewer/diff-viewer.models.tsx42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/tools/json-diff/diff-viewer/diff-viewer.models.tsx b/src/tools/json-diff/diff-viewer/diff-viewer.models.tsx
index 5a19feb..d2117df 100644
--- a/src/tools/json-diff/diff-viewer/diff-viewer.models.tsx
+++ b/src/tools/json-diff/diff-viewer/diff-viewer.models.tsx
@@ -1,16 +1,16 @@
import _ from 'lodash';
+import type { ArrayDifference, Difference, ObjectDifference } from '../json-diff.types';
import { useCopy } from '@/composable/copy';
-import type { Difference, ArrayDifference, ObjectDifference } from '../json-diff.types';
-export const DiffRootViewer = ({ diff }: { diff: Difference }) => {
+export function DiffRootViewer({ diff }: { diff: Difference }) {
return (
<div class={'diffs-viewer'}>
<ul>{DiffViewer({ diff, showKeys: false })}</ul>
</div>
);
-};
+}
-const DiffViewer = ({ diff, showKeys = true }: { diff: Difference; showKeys?: boolean }) => {
+function DiffViewer({ diff, showKeys = true }: { diff: Difference; showKeys?: boolean }) {
const { type, status } = diff;
if (status === 'updated') {
@@ -26,9 +26,9 @@ const DiffViewer = ({ diff, showKeys = true }: { diff: Difference; showKeys?: bo
}
return LineDiffViewer({ diff, showKeys });
-};
+}
-const LineDiffViewer = ({ diff, showKeys }: { diff: Difference; showKeys?: boolean }) => {
+function LineDiffViewer({ diff, showKeys }: { diff: Difference; showKeys?: boolean }) {
const { value, key, status, oldValue } = diff;
const valueToDisplay = status === 'removed' ? oldValue : value;
@@ -46,9 +46,9 @@ const LineDiffViewer = ({ diff, showKeys }: { diff: Difference; showKeys?: boole
,
</li>
);
-};
+}
-const ComparisonViewer = ({ diff, showKeys }: { diff: Difference; showKeys?: boolean }) => {
+function ComparisonViewer({ diff, showKeys }: { diff: Difference; showKeys?: boolean }) {
const { value, key, oldValue } = diff;
return (
@@ -63,21 +63,21 @@ const ComparisonViewer = ({ diff, showKeys }: { diff: Difference; showKeys?: boo
{Value({ value, status: 'added' })},
</li>
);
-};
+}
-const ChildrenViewer = ({
+function ChildrenViewer({
diff,
openTag,
closeTag,
showKeys,
showChildrenKeys = true,
}: {
- diff: ArrayDifference | ObjectDifference;
- showKeys: boolean;
- showChildrenKeys?: boolean;
- openTag: string;
- closeTag: string;
-}) => {
+ diff: ArrayDifference | ObjectDifference
+ showKeys: boolean
+ showChildrenKeys?: boolean
+ openTag: string
+ closeTag: string
+}) {
const { children, key, status, type } = diff;
return (
@@ -91,12 +91,12 @@ const ChildrenViewer = ({
)}
{openTag}
- {children.length > 0 && <ul>{children.map((diff) => DiffViewer({ diff, showKeys: showChildrenKeys }))}</ul>}
- {closeTag + ','}
+ {children.length > 0 && <ul>{children.map(diff => DiffViewer({ diff, showKeys: showChildrenKeys }))}</ul>}
+ {`${closeTag},`}
</div>
</li>
);
-};
+}
function formatValue(value: unknown) {
if (_.isNull(value)) {
@@ -106,7 +106,7 @@ function formatValue(value: unknown) {
return JSON.stringify(value);
}
-const Value = ({ value, status }: { value: unknown; status: string }) => {
+function Value({ value, status }: { value: unknown; status: string }) {
const formatedValue = formatValue(value);
const { copy } = useCopy({ source: formatedValue });
@@ -116,4 +116,4 @@ const Value = ({ value, status }: { value: unknown; status: string }) => {
{formatedValue}
</span>
);
-};
+}
-prototyping Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/packages/integrations/lit/CHANGELOG.md (unfollow)
coding/text-decoder.test.js?h=dave/assert-double-is-valid&id=01d2cb5d98c6e90507d1dfba962276cf2edf9ad7&follow=1'>Prettier
AgeCommit message (Expand)AuthorFilesLines
Gravatar Jarred Sumner 1-11/+10
2023-09-20fix: add check to sqlite extension loading logic (#5773)Gravatar Liz 2-0/+9
The sqlite3 logic to dynamically load extensions can be disabled to save space, which macos does by default. sqlite3 provides a api to check for these compile time settings at runtime, we can use that to throw a js error rather then crashing. It is worth noting though that the api to check for these settings at runtime itself can be disabled through SQLITE_OMIT_COMPILEOPTION_DIAGS but this seams to be a edge case.
2023-09-20fix(console.log): change default depth from 8 to 2 (#5839)Gravatar Jibran Kalia 3-1/+22
This make it as the same default depth in Node. Source: https://github.com/nodejs/node/blob/480ab8c3a40451d5ea459dd35b4039679b26e195/doc/api/console.md?plain=1#L285
2023-09-20In http client, use .toOwnedSlice() instead of potentially re-using the ↵Gravatar Jarred Sumner 1-4/+7
WTFString here
2023-09-20fix(fetch): fix redirect in relative path location. (#5781)Gravatar Ai Hoshino 2-14/+106
* fix(fetch): fix redirect in relative path location. * fix utf-8 encoding * use server.reload * check buf size * add RedirectURLTooLong test
2023-09-20remove /test.js and git ignore it - sorryGravatar dave caruso 2-1/+1
2023-09-20docs(project): development fix Arch install-dependencies command (#5270)Gravatar saurabh 1-1/+1
sudo is required to run pacman if not root user
2023-09-20fix(run): interpret extensionless files as typescript (#5711)Gravatar dave caruso 13-19/+76
* test * gadsgsagdsa * add better err msg * r * oops * ok
2023-09-20fix(ffi) fix size limit for dlopen (#5516)Gravatar Ciro Spaciari 8-5016/+5306
* fix size limit * 63 * throw error * ffi.test.js * add macos tests * oops
2023-09-20feat(encoding): support BOM detection (#5550)Gravatar WingLim 5-8/+71
* fix(encoding): export `getIgnoreBOM` * feat(encoding): support ignoreBOM * fix(encoding): not replace BOM to 0xFFFD * chore: use strict equal
2023-09-20feat(node:dns): implement `dns.lookupService` (#5613)Gravatar Ai Hoshino 6-9/+492
* feat(node:dns): implement dns.lookupService Close: #4347 * fix flags * add `getSockaddr` * fix sockaddr size * flaky test
2023-09-20implement `Module.prototype._compile` (#5840)Gravatar dave caruso 4-2/+78
2023-09-20feat(runtime): implement `console._stdout` (#5842)Gravatar dave caruso 2-1/+59
* implement console._stdout * nonenum
2023-09-20Improve types for `test.each`, `describe.each` (#5838)Gravatar Colin McDonnell 2-10/+59
* Improve types for each * more * remove
2023-09-20Fix rendering of bun.lockb in vscode extensionGravatar Ashcon Partovi 5-114/+4
2023-09-20Run bun fmtGravatar Ashcon Partovi 2-12/+9
2023-09-20Update quickstartGravatar Colin McDonnell 1-0/+19
2023-09-20Update prisma guideGravatar Colin McDonnell 1-0/+6
2023-09-20Update env docGravatar Colin McDonnell 1-1/+1
2023-09-20Clarify hot modeGravatar Colin McDonnell 1-10/+9
2023-09-20[bun install] Add `-E` as alias of `--exact` (#5104)Gravatar Jonah Snider 2-2/+57
* [bun install] Add `-E` as alias of `--exact` * Add test for -E flag
2023-09-20feat: switch disableTelemetry to bunfig (#5690)Gravatar Lucas Coratger 3-1/+14
* feat: switch disableTelemetry to bunfig * feat: zig fmt * revert: the env variable and invert the logic of telemetry --------- Co-authored-by: MrPalixir <73360179+MrPalixir@users.noreply.github.com>
2023-09-20Treat `undefined` value as empty in expect.toThrow (#5788)Gravatar LongYinan 1-3/+3
Fix: https://github.com/napi-rs/napi-rs/blob/main/examples/napi/__tests__/test.framework.js#L16-L19
2023-09-20Fix various bugs in vscode extension (#5772)Gravatar JeremyFunk 3-9/+85
* Fix bugs * Fix bugs * Revert "Fix bugs" This reverts commit 608639eb2214fdf4310477051ce47d20702b5dd0.
2023-09-20add `emitDecoratorMetadata` (#5777)Gravatar Dylan Conway 19-110/+1884
* some progess * needs more tests * make tests easier to debug * get metadata for constructor arg decorators * fix some things * merge `emitDecoratorMetadata` option * remove `^` * bundler tests and get option from tsconfig earlier * remove spaces * fix tests
2023-09-20fix(doc): correct `server.reload` (#5799)Gravatar Ai Hoshino 1-1/+1
2023-09-20Call `Error.prepareStackTrace` on `new Error().stack` (#5802)Gravatar Jarred Sumner 6-155/+277
* Always call `Error.prepareStackTrace` * Support node:vm * Remove this * Handle more cases --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-20Fixes #5800Gravatar Jarred Sumner 1-1/+1
Fixes #5800
2023-09-20Fix path used in bunx (#5785)Gravatar Jarred Sumner 2-26/+51
* Fix path used in bunx * Add test * Use a different package --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-20Fix RedirectURLTooLong errors (#5786)Gravatar ggobbe 1-1/+1
The URL to download the manifest for Artifact Registry in Google is larger than 4092 bytes. cf. issue #4748
2023-09-19Show when a newer version is available in the install screen (#5780)Gravatar Jarred Sumner 3-14/+95
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-19Fix broken linksGravatar Colin McDonnell 4-4/+4