From d8e8c798e9541aecac00b4ca2da03bee50691499 Mon Sep 17 00:00:00 2001 From: J XD Date: Tue, 14 Dec 2021 15:16:27 +0800 Subject: [PATCH 01/11] initial commit --- modules.json | 7 +- src/bundles/unittest/asserts.ts | 128 ++++++++++ src/bundles/unittest/functions.ts | 82 +++++++ src/bundles/unittest/index.ts | 41 ++++ src/bundles/unittest/list.ts | 372 ++++++++++++++++++++++++++++++ src/bundles/unittest/mocks.ts | 32 +++ src/bundles/unittest/types.ts | 29 +++ src/tabs/UnitTest/index.tsx | 128 ++++++++++ 8 files changed, 818 insertions(+), 1 deletion(-) create mode 100644 src/bundles/unittest/asserts.ts create mode 100644 src/bundles/unittest/functions.ts create mode 100644 src/bundles/unittest/index.ts create mode 100644 src/bundles/unittest/list.ts create mode 100644 src/bundles/unittest/mocks.ts create mode 100644 src/bundles/unittest/types.ts create mode 100644 src/tabs/UnitTest/index.tsx diff --git a/modules.json b/modules.json index c978ca4997..1d8af8b0f3 100644 --- a/modules.json +++ b/modules.json @@ -59,5 +59,10 @@ "tabs": [ "SoundMatrix" ] + }, + "unittest": { + "tabs": [ + "UnitTest" + ] } -} +} \ No newline at end of file diff --git a/src/bundles/unittest/asserts.ts b/src/bundles/unittest/asserts.ts new file mode 100644 index 0000000000..204f023c38 --- /dev/null +++ b/src/bundles/unittest/asserts.ts @@ -0,0 +1,128 @@ +import { is_pair, head, tail, is_list, is_null, member, length } from './list'; + +/** + * Asserts the equality (===) of the two parameters. + * @param expected The expected value. + * @param received The given value. + * @returns + */ +export function assert_equals(expected: any, received: any) { + if (expected !== received) { + throw new Error(`Expected \`${expected}\`, got \`${received}\`!`); + } +} + +/** + * Asserts the inequality (!==) of the two parameters. + * @param expected The expected value. + * @param received The given value. + * @returns + */ +export function assert_not_equals(expected: any, received: any) { + if (expected === received) { + throw new Error(`Expected not equal \`${expected}\`!`); + } +} + +/** + * Asserts the inequality (!==) of the two parameters. + * @param expected The expected value. + * @param received The given value. + * @returns + */ +export function assert_approx_equals(expected: number, received: number) { + if (Math.abs(expected - received) > 0.001) { + throw new Error(`Expected \`${expected}\` to approx. \`${received}\`!`); + } +} + +/** + * Asserts that `expected` > `received`. + * @param expected + * @param received + */ +export function assert_greater(expected: number, received: number) { + if (expected <= received) { + throw new Error(`Expected \`${expected}\` > \`${received}\`!`); + } +} + +/** + * Asserts that `expected` >= `received`. + * @param expected + * @param received + */ +export function assert_greater_equals(expected: number, received: number) { + if (expected < received) { + throw new Error(`Expected \`${expected}\` >= \`${received}\`!`); + } +} + +/** + * Asserts that `expected` < `received`. + * @param expected + * @param received + */ +export function assert_lesser(expected: number, received: number) { + if (expected >= received) { + throw new Error(`Expected \`${expected}\` < \`${received}\`!`); + } +} + +/** + * Asserts that `expected` <= `received`. + * @param expected + * @param received + */ +export function assert_lesser_equals(expected: number, received: number) { + if (expected > received) { + throw new Error(`Expected \`${expected}\` <= \`${received}\`!`); + } +} + +/** + * Asserts that `xs` contains `toContain`. + * @param xs The list to assert. + * @param toContain The element that `xs` is expected to contain. + */ +export function assert_contains(xs: any, toContain: any) { + const fail = () => { + throw new Error(`Expected \`${xs}\` to contain \`${toContain}\`.`); + }; + + if (is_null(xs)) { + fail(); + } else if (is_list(xs)) { + if (is_null(member(toContain, xs))) { + fail(); + } + } else if (is_pair(xs)) { + if (head(xs) === toContain || tail(xs) === toContain) { + return; + } + + // check the head, if it fails, checks the tail, if that fails, fail. + try { + assert_contains(head(xs), toContain); + return; + } catch (_) { + try { + assert_contains(tail(xs), toContain); + return; + } catch (__) { + fail(); + } + } + } else { + throw new Error(`First argument must be a list or a pair, got \`${xs}\`.`); + } +} + +/** + * Asserts that the given list has length `len`. + * @param list The list to assert. + * @param len The expected length of the list. + */ +export function assert_length(list: any, len: number) { + assert_equals(length(list), len); +} diff --git a/src/bundles/unittest/functions.ts b/src/bundles/unittest/functions.ts new file mode 100644 index 0000000000..38ba819fbb --- /dev/null +++ b/src/bundles/unittest/functions.ts @@ -0,0 +1,82 @@ +import { TestContext, TestSuite, Test } from './types'; + +const handleErr = (err: any) => { + if (err.error && err.error.message) { + return (err.error as Error).message; + } + if (err.message) { + return (err as Error).message; + } + throw err; +}; + +export const context: TestContext = { + describe: (msg: string, suite: TestSuite) => { + const starttime = performance.now(); + context.suiteResults = { + name: msg, + results: [], + total: 0, + passed: 0, + }; + + suite(); + + context.allResults.results.push(context.suiteResults); + + const endtime = performance.now(); + context.runtime += endtime - starttime; + return context.allResults; + }, + + it: (msg: string, test: Test) => { + const name = `${msg}`; + let error = ''; + context.suiteResults.total += 1; + + try { + test(); + } catch (err: any) { + error = handleErr(err); + } + + context.suiteResults.passed += 1; + context.suiteResults.results.push({ + name, + error, + }); + }, + + suiteResults: { + name: '', + results: [], + total: 0, + passed: 0, + }, + + allResults: { + results: [], + toReplString: () => + `${context.allResults.results.length} suites completed in ${context.runtime} ms.`, + }, + + runtime: 0, +}; + +/** + * Defines a single test. + * @param str Description for this test. + * @param func Function containing tests. + */ +export function it(msg: string, func: Test) { + context.it(msg, func); +} + +/** + * Describes a test suite. + * @param str Description for this test. + * @param func Function containing tests. + */ +export function describe(msg: string, func: TestSuite) { + return context.describe(msg, func); +} diff --git a/src/bundles/unittest/index.ts b/src/bundles/unittest/index.ts new file mode 100644 index 0000000000..ae85ec80d0 --- /dev/null +++ b/src/bundles/unittest/index.ts @@ -0,0 +1,41 @@ +import { it, describe } from './functions'; +import { + assert_equals, + assert_not_equals, + assert_contains, + assert_approx_equals, + assert_greater, + assert_greater_equals, + assert_length, +} from './asserts'; +import { mock_fn } from './mocks'; + +/** + * Collection of unit-testing tools for Source. + * @author Jia Xiaodong + */ + +/** + * Increment a number by a value of 1. + * @param x the number to be incremented + * @returns the incremented value of the number + */ +function sample_function(x: number) { + return x + 1; +} + +// Un-comment the next line if your bundle requires the use of variables +// declared in cadet-frontend or js-slang. +export default () => ({ + sample_function, + it, + describe, + assert_equals, + assert_not_equals, + assert_contains, + assert_greater, + assert_greater_equals, + assert_approx_equals, + assert_length, + mock_fn, +}); diff --git a/src/bundles/unittest/list.ts b/src/bundles/unittest/list.ts new file mode 100644 index 0000000000..e5205937c1 --- /dev/null +++ b/src/bundles/unittest/list.ts @@ -0,0 +1,372 @@ +/* eslint-disable @typescript-eslint/naming-convention, no-else-return, prefer-template, no-param-reassign, no-plusplus, operator-assignment, no-lonely-if */ +/* prettier-ignore */ +// list.js: Supporting lists in the Scheme style, using pairs made +// up of two-element JavaScript array (vector) + +// Author: Martin Henz + +// Note: this library is used in the externalLibs of cadet-frontend. +// It is distinct from the LISTS library of Source ยง2, which contains +// primitive and predeclared functions from Chapter 2 of SICP JS. + +// array test works differently for Rhino and +// the Firefox environment (especially Web Console) +export function array_test(x) : boolean { + if (Array.isArray === undefined) { + return x instanceof Array + } else { + return Array.isArray(x) + } +} + +// pair constructs a pair using a two-element array +// LOW-LEVEL FUNCTION, NOT SOURCE +export function pair(x, xs): [any, any] { + return [x, xs]; +} + +// is_pair returns true iff arg is a two-element array +// LOW-LEVEL FUNCTION, NOT SOURCE +export function is_pair(x): boolean { + return array_test(x) && x.length === 2; +} + +// head returns the first component of the given pair, +// throws an exception if the argument is not a pair +// LOW-LEVEL FUNCTION, NOT SOURCE +export function head(xs): any { + if (is_pair(xs)) { + return xs[0]; + } else { + throw new Error( + 'head(xs) expects a pair as argument xs, but encountered ' + xs + ); + } +} + +// tail returns the second component of the given pair +// throws an exception if the argument is not a pair +// LOW-LEVEL FUNCTION, NOT SOURCE +export function tail(xs) { + if (is_pair(xs)) { + return xs[1]; + } else { + throw new Error( + 'tail(xs) expects a pair as argument xs, but encountered ' + xs + ); + } +} + +// is_null returns true if arg is exactly null +// LOW-LEVEL FUNCTION, NOT SOURCE +export function is_null(xs) { + return xs === null; +} + +// is_list recurses down the list and checks that it ends with the empty list [] +// does not throw Value exceptions +// LOW-LEVEL FUNCTION, NOT SOURCE +export function is_list(xs) { + for (; ; xs = tail(xs)) { + if (is_null(xs)) { + return true; + } else if (!is_pair(xs)) { + return false; + } + } +} + +// list makes a list out of its arguments +// LOW-LEVEL FUNCTION, NOT SOURCE +export function list(...args) { + let the_list: any = null; + for (let i = args.length - 1; i >= 0; i--) { + the_list = pair(args[i], the_list); + } + return the_list; +} + +// list_to_vector returns vector that contains the elements of the argument list +// in the given order. +// list_to_vector throws an exception if the argument is not a list +// LOW-LEVEL FUNCTION, NOT SOURCE +export function list_to_vector(lst) { + const vector: any[] = []; + while (!is_null(lst)) { + vector.push(head(lst)); + lst = tail(lst); + } + return vector; +} + +// vector_to_list returns a list that contains the elements of the argument vector +// in the given order. +// vector_to_list throws an exception if the argument is not a vector +// LOW-LEVEL FUNCTION, NOT SOURCE +export function vector_to_list(vector) { + let result: any = null; + for (let i = vector.length - 1; i >= 0; i = i - 1) { + result = pair(vector[i], result); + } + return result; +} + +// returns the length of a given argument list +// throws an exception if the argument is not a list +export function length(xs) { + let i = 0; + while (!is_null(xs)) { + i += 1; + xs = tail(xs); + } + return i; +} + +// map applies first arg f to the elements of the second argument, +// assumed to be a list. +// f is applied element-by-element: +// map(f,[1,[2,[]]]) results in [f(1),[f(2),[]]] +// map throws an exception if the second argument is not a list, +// and if the second argument is a non-empty list and the first +// argument is not a function. +// tslint:disable-next-line:ban-types +export function map(f, xs) { + return is_null(xs) ? null : pair(f(head(xs)), map(f, tail(xs))); +} + +// build_list takes a non-negative integer n as first argument, +// and a function fun as second argument. +// build_list returns a list of n elements, that results from +// applying fun to the numbers from 0 to n-1. +// tslint:disable-next-line:ban-types +export function build_list(n, fun) { + if (typeof n !== 'number' || n < 0 || Math.floor(n) !== n) { + throw new Error( + 'build_list(n, fun) expects a positive integer as ' + + 'argument n, but encountered ' + + n + ); + } + + // tslint:disable-next-line:ban-types + function build(i, alreadyBuilt) { + if (i < 0) { + return alreadyBuilt; + } else { + return build(i - 1, pair(fun(i), alreadyBuilt)); + } + } + + return build(n - 1, null); +} + +// for_each applies first arg fun to the elements of the list passed as +// second argument. fun is applied element-by-element: +// for_each(fun,[1,[2,[]]]) results in the calls fun(1) and fun(2). +// for_each returns true. +// for_each throws an exception if the second argument is not a list, +// and if the second argument is a non-empty list and the +// first argument is not a function. +// tslint:disable-next-line:ban-types +export function for_each(fun, xs) { + if (!is_list(xs)) { + throw new Error( + 'for_each expects a list as argument xs, but encountered ' + xs + ); + } + for (; !is_null(xs); xs = tail(xs)) { + fun(head(xs)); + } + return true; +} + +// reverse reverses the argument list +// reverse throws an exception if the argument is not a list. +export function reverse(xs) { + if (!is_list(xs)) { + throw new Error( + 'reverse(xs) expects a list as argument xs, but encountered ' + xs + ); + } + let result: any = null; + for (; !is_null(xs); xs = tail(xs)) { + result = pair(head(xs), result); + } + return result; +} + +// append first argument list and second argument list. +// In the result, the [] at the end of the first argument list +// is replaced by the second argument list +// append throws an exception if the first argument is not a list +export function append(xs, ys) { + if (is_null(xs)) { + return ys; + } else { + return pair(head(xs), append(tail(xs), ys)); + } +} + +// member looks for a given first-argument element in a given +// second argument list. It returns the first postfix sublist +// that starts with the given element. It returns [] if the +// element does not occur in the list +export function member(v, xs) { + for (; !is_null(xs); xs = tail(xs)) { + if (head(xs) === v) { + return xs; + } + } + return null; +} + +// removes the first occurrence of a given first-argument element +// in a given second-argument list. Returns the original list +// if there is no occurrence. +export function remove(v, xs) { + if (is_null(xs)) { + return null; + } else { + if (v === head(xs)) { + return tail(xs); + } else { + return pair(head(xs), remove(v, tail(xs))); + } + } +} + +// Similar to remove. But removes all instances of v instead of just the first +export function remove_all(v, xs) { + if (is_null(xs)) { + return null; + } else { + if (v === head(xs)) { + return remove_all(v, tail(xs)); + } else { + return pair(head(xs), remove_all(v, tail(xs))); + } + } +} + +// for backwards-compatibility +// equal computes the structural equality +// over its arguments +export function equal(item1, item2) { + if (is_pair(item1) && is_pair(item2)) { + return equal(head(item1), head(item2)) && equal(tail(item1), tail(item2)); + } else { + return item1 === item2; + } +} + +// assoc treats the second argument as an association, +// a list of (index,value) pairs. +// assoc returns the first (index,value) pair whose +// index equal (using structural equality) to the given +// first argument v. Returns false if there is no such +// pair +export function assoc(v, xs) { + if (is_null(xs)) { + return false; + } else if (equal(v, head(head(xs)))) { + return head(xs); + } else { + return assoc(v, tail(xs)); + } +} + +// filter returns the sublist of elements of given list xs +// for which the given predicate function returns true. +// tslint:disable-next-line:ban-types +export function filter(pred, xs) { + if (is_null(xs)) { + return xs; + } else { + if (pred(head(xs))) { + return pair(head(xs), filter(pred, tail(xs))); + } else { + return filter(pred, tail(xs)); + } + } +} + +// enumerates numbers starting from start, +// using a step size of 1, until the number +// exceeds end. +export function enum_list(start, end) { + if (typeof start !== 'number') { + throw new Error( + 'enum_list(start, end) expects a number as argument start, but encountered ' + + start + ); + } + if (typeof end !== 'number') { + throw new Error( + 'enum_list(start, end) expects a number as argument start, but encountered ' + + end + ); + } + if (start > end) { + return null; + } else { + return pair(start, enum_list(start + 1, end)); + } +} + +// Returns the item in list lst at index n (the first item is at position 0) +export function list_ref(xs, n) { + if (typeof n !== 'number' || n < 0 || Math.floor(n) !== n) { + throw new Error( + 'list_ref(xs, n) expects a positive integer as argument n, but encountered ' + + n + ); + } + for (; n > 0; --n) { + xs = tail(xs); + } + return head(xs); +} + +// accumulate applies given operation op to elements of a list +// in a right-to-left order, first apply op to the last element +// and an initial element, resulting in r1, then to the +// second-last element and r1, resulting in r2, etc, and finally +// to the first element and r_n-1, where n is the length of the +// list. +// accumulate(op,zero,list(1,2,3)) results in +// op(1, op(2, op(3, zero))) +export function accumulate(op, initial, sequence) { + if (is_null(sequence)) { + return initial; + } else { + return op(head(sequence), accumulate(op, initial, tail(sequence))); + } +} + +// set_head(xs,x) changes the head of given pair xs to be x, +// throws an exception if the argument is not a pair +// LOW-LEVEL FUNCTION, NOT SOURCE +export function set_head(xs, x) { + if (is_pair(xs)) { + xs[0] = x; + return undefined; + } else { + throw new Error( + 'set_head(xs,x) expects a pair as argument xs, but encountered ' + xs + ); + } +} + +// set_tail(xs,x) changes the tail of given pair xs to be x, +// throws an exception if the argument is not a pair +// LOW-LEVEL FUNCTION, NOT SOURCE +export function set_tail(xs, x) { + if (is_pair(xs)) { + xs[1] = x; + return undefined; + } else { + throw new Error( + 'set_tail(xs,x) expects a pair as argument xs, but encountered ' + xs + ); + } +} diff --git a/src/bundles/unittest/mocks.ts b/src/bundles/unittest/mocks.ts new file mode 100644 index 0000000000..139f06aa9c --- /dev/null +++ b/src/bundles/unittest/mocks.ts @@ -0,0 +1,32 @@ +import { pair, list, vector_to_list } from './list'; +/* eslint-disable import/prefer-default-export */ + +/** + * Mocks a function `fun`. + * @param fun The function to mock. + * @returns A pair whose head is the mocked function, and whose tail is another + * function that returns a list with details about the mocked function. + */ +export function mock_fn(fun: any) { + function details(count, retvals, arglist) { + return list( + 'times called', + count, + 'Return values', + retvals, + 'Arguments', + arglist + ); + } + let count = 0; + let retvals: any = null; + let arglist: any = null; + function fn(...args) { + count += 1; + const retval = fun.apply(fun, args); + retvals = pair(retval, retvals); + arglist = pair(vector_to_list(args), arglist); + return retval; + } + return pair(fn, () => details(count, retvals, arglist)); +} diff --git a/src/bundles/unittest/types.ts b/src/bundles/unittest/types.ts new file mode 100644 index 0000000000..0f9558c37d --- /dev/null +++ b/src/bundles/unittest/types.ts @@ -0,0 +1,29 @@ +export type ErrorLogger = ( + error: string | string[], + isSlangError?: boolean +) => void; +export type Test = () => void; +export type TestSuite = () => void; +export type TestContext = { + describe: (msg: string, tests: TestSuite) => Results; + it: (msg: string, test: Test) => void; + // This holds the result of a single suite and is cleared on every run + suiteResults: SuiteResult; + // This holds the results of the entire suite + allResults: Results; + runtime: number; +}; +export type TestResult = { + name: string; + error: string; +}; +export type SuiteResult = { + name: string; + results: TestResult[]; + total: number; + passed: number; +}; +export type Results = { + results: SuiteResult[]; + toReplString: () => string; +}; diff --git a/src/tabs/UnitTest/index.tsx b/src/tabs/UnitTest/index.tsx new file mode 100644 index 0000000000..87890d62dd --- /dev/null +++ b/src/tabs/UnitTest/index.tsx @@ -0,0 +1,128 @@ +import React from 'react'; +import { Results, SuiteResult } from '../../bundles/unittest/types'; + +/** + * Tab for unit tests. + * @author Jia Xiaodong + */ + +type Props = { + result: any; +}; + +class UnitTests extends React.PureComponent { + /** + * Converts the results of a test suite run into a table format in its own div. + */ + private static suiteResultToDiv(suiteResult: any) { + const { name, results, total, passed } = suiteResult as SuiteResult; + const colfixed = { + border: '1px solid gray', + overflow: 'hidden', + width: 200, + }; + const colauto = { + border: '1px solid gray', + overflow: 'hidden', + width: 'auto', + }; + + const rows = results.map(({ name: testname, error }, index) => ( + // eslint-disable-next-line react/no-array-index-key + + {testname} + {error || 'Passed.'} + + )); + + const tablestyle = { + 'table-layout': 'fixed', + width: '100%', + }; + const table = ( + + + + + + + + {rows} +
Test caseMessages
+ ); + + const suitestyle = { + border: '1px solid white', + padding: 5, + margin: 5, + }; + return ( +
+

+ {name} +

+

+ Passed testcases: {passed}/{total} +

+ {table} +
+ ); + } + + public render() { + const { result: res } = this.props; + const block = res.results.map((suiteresult: SuiteResult) => + UnitTests.suiteResultToDiv(suiteresult) + ); + + return ( +
+

The following is a report of your tests.

+ {block} +
+ ); + } +} + +export default { + /** + * This function will be called to determine if the component will be + * rendered. + * @param {DebuggerContext} context + * @returns {boolean} + */ + toSpawn: (context: any): boolean => { + function valid(value: any): value is Results { + try { + return ( + value instanceof Object && + Array.isArray(value.results) && + Array.isArray(value.results[0].results) + ); + } catch (e) { + return false; + } + } + return valid(context.result.value); + }, + + /** + * This function will be called to render the module tab in the side contents + * on Source Academy frontend. + * @param {DebuggerContext} context + */ + // eslint-disable-next-line react/destructuring-assignment + body: (context: any) => , + + /** + * The Tab's icon tooltip in the side contents on Source Academy frontend. + */ + label: 'Unit Tests', + + /** + * BlueprintJS IconName element's name, used to render the icon which will be + * displayed in the side contents panel. + * @see https://blueprintjs.com/docs/#icons + */ + iconName: 'lab-test', +}; From d9b1127bad0b977b7061da8c440921205f526fd7 Mon Sep 17 00:00:00 2001 From: J XD Date: Mon, 28 Feb 2022 16:36:01 +0800 Subject: [PATCH 02/11] fixes and add test --- modules.json | 4 +-- src/bundles/testing/__tests__/index.ts | 34 +++++++++++++++++++ src/bundles/{unittest => testing}/asserts.ts | 0 .../{unittest => testing}/functions.ts | 2 +- src/bundles/{unittest => testing}/index.ts | 0 src/bundles/{unittest => testing}/list.ts | 0 src/bundles/{unittest => testing}/mocks.ts | 0 src/bundles/{unittest => testing}/types.ts | 0 src/tabs/{UnitTest => Testing}/index.tsx | 14 ++++---- 9 files changed, 44 insertions(+), 10 deletions(-) create mode 100644 src/bundles/testing/__tests__/index.ts rename src/bundles/{unittest => testing}/asserts.ts (100%) rename src/bundles/{unittest => testing}/functions.ts (97%) rename src/bundles/{unittest => testing}/index.ts (100%) rename src/bundles/{unittest => testing}/list.ts (100%) rename src/bundles/{unittest => testing}/mocks.ts (100%) rename src/bundles/{unittest => testing}/types.ts (100%) rename src/tabs/{UnitTest => Testing}/index.tsx (83%) diff --git a/modules.json b/modules.json index 89479304d3..5496063dbf 100644 --- a/modules.json +++ b/modules.json @@ -55,9 +55,9 @@ "SoundMatrix" ] }, - "unittest": { + "testing": { "tabs": [ - "UnitTest" + "Testing" ] } } \ No newline at end of file diff --git a/src/bundles/testing/__tests__/index.ts b/src/bundles/testing/__tests__/index.ts new file mode 100644 index 0000000000..01dc9e7945 --- /dev/null +++ b/src/bundles/testing/__tests__/index.ts @@ -0,0 +1,34 @@ +import * as testing from '../functions'; +import * as asserts from '../asserts'; + +beforeAll(() => { + testing.context.suiteResults = { + name: '', + results: [], + total: 0, + passed: 0, + }; + testing.context.allResults.results = []; + testing.context.runtime = 0; +}); + +test('Test context is created correctly', () => { + const mockTestFn = jest.fn(); + testing.describe('Testing 321', () => { + testing.it('Testing 123', mockTestFn); + }); + expect(testing.context.suiteResults.passed).toEqual(1); + expect(mockTestFn).toHaveBeenCalled(); +}); + +test('Test context fails correctly', () => { + testing.describe('Testing 123', () => { + testing.it('This test fails!', () => asserts.assert_equals(0, 1)); + }); + expect(testing.context.suiteResults.passed).toEqual(0); + expect(testing.context.suiteResults.total).toEqual(1); +}); + +test('Assert equal works', () => { + expect(() => asserts.assert_equals(0, 1)).toThrow('Expected'); +}); diff --git a/src/bundles/unittest/asserts.ts b/src/bundles/testing/asserts.ts similarity index 100% rename from src/bundles/unittest/asserts.ts rename to src/bundles/testing/asserts.ts diff --git a/src/bundles/unittest/functions.ts b/src/bundles/testing/functions.ts similarity index 97% rename from src/bundles/unittest/functions.ts rename to src/bundles/testing/functions.ts index 38ba819fbb..bb28f108f4 100644 --- a/src/bundles/unittest/functions.ts +++ b/src/bundles/testing/functions.ts @@ -36,11 +36,11 @@ export const context: TestContext = { try { test(); + context.suiteResults.passed += 1; } catch (err: any) { error = handleErr(err); } - context.suiteResults.passed += 1; context.suiteResults.results.push({ name, error, diff --git a/src/bundles/unittest/index.ts b/src/bundles/testing/index.ts similarity index 100% rename from src/bundles/unittest/index.ts rename to src/bundles/testing/index.ts diff --git a/src/bundles/unittest/list.ts b/src/bundles/testing/list.ts similarity index 100% rename from src/bundles/unittest/list.ts rename to src/bundles/testing/list.ts diff --git a/src/bundles/unittest/mocks.ts b/src/bundles/testing/mocks.ts similarity index 100% rename from src/bundles/unittest/mocks.ts rename to src/bundles/testing/mocks.ts diff --git a/src/bundles/unittest/types.ts b/src/bundles/testing/types.ts similarity index 100% rename from src/bundles/unittest/types.ts rename to src/bundles/testing/types.ts diff --git a/src/tabs/UnitTest/index.tsx b/src/tabs/Testing/index.tsx similarity index 83% rename from src/tabs/UnitTest/index.tsx rename to src/tabs/Testing/index.tsx index 87890d62dd..62df40cc56 100644 --- a/src/tabs/UnitTest/index.tsx +++ b/src/tabs/Testing/index.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Results, SuiteResult } from '../../bundles/unittest/types'; +import { Results, SuiteResult } from '../../bundles/testing/types'; /** * Tab for unit tests. @@ -10,12 +10,12 @@ type Props = { result: any; }; -class UnitTests extends React.PureComponent { +class TestSuitesTab extends React.PureComponent { /** * Converts the results of a test suite run into a table format in its own div. */ - private static suiteResultToDiv(suiteResult: any) { - const { name, results, total, passed } = suiteResult as SuiteResult; + private static suiteResultToDiv(suiteResult: SuiteResult) { + const { name, results, total, passed } = suiteResult; const colfixed = { border: '1px solid gray', overflow: 'hidden', @@ -72,7 +72,7 @@ class UnitTests extends React.PureComponent { public render() { const { result: res } = this.props; const block = res.results.map((suiteresult: SuiteResult) => - UnitTests.suiteResultToDiv(suiteresult) + TestSuitesTab.suiteResultToDiv(suiteresult) ); return ( @@ -112,12 +112,12 @@ export default { * @param {DebuggerContext} context */ // eslint-disable-next-line react/destructuring-assignment - body: (context: any) => , + body: (context: any) => , /** * The Tab's icon tooltip in the side contents on Source Academy frontend. */ - label: 'Unit Tests', + label: 'Test suites', /** * BlueprintJS IconName element's name, used to render the icon which will be From 3ce2b22b0cc9d5f4de6cef7f81ad2067de0e12b9 Mon Sep 17 00:00:00 2001 From: J XD Date: Mon, 28 Feb 2022 16:40:56 +0800 Subject: [PATCH 03/11] add more test --- src/bundles/testing/__tests__/index.ts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/bundles/testing/__tests__/index.ts b/src/bundles/testing/__tests__/index.ts index 01dc9e7945..0d4891cffe 100644 --- a/src/bundles/testing/__tests__/index.ts +++ b/src/bundles/testing/__tests__/index.ts @@ -1,5 +1,6 @@ import * as testing from '../functions'; import * as asserts from '../asserts'; +import { pair, list } from '../list'; beforeAll(() => { testing.context.suiteResults = { @@ -29,6 +30,23 @@ test('Test context fails correctly', () => { expect(testing.context.suiteResults.total).toEqual(1); }); -test('Assert equal works', () => { +test('assert_equals works', () => { + expect(() => asserts.assert_equals(1, 1)).not.toThrow(); expect(() => asserts.assert_equals(0, 1)).toThrow('Expected'); }); + +test('assert_not_equals works', () => { + expect(() => asserts.assert_not_equals(0, 1)).not.toThrow(); + expect(() => asserts.assert_not_equals(1, 1)).toThrow('Expected not'); +}); + +test('assert_greater works', () => { + expect(() => asserts.assert_equals(1, 1)).not.toThrow(); + expect(() => asserts.assert_equals(1, 0)).toThrow('Expected'); +}); + +test('assert_contains works', () => { + const list1 = list(1, 2, 3); + expect(() => asserts.assert_contains(list1, 2)).not.toThrow(); + expect(() => asserts.assert_contains(list1, 10)).toThrow(); +}); \ No newline at end of file From feed8a171a35874332d5b53dc55b7e2fd33bc63a Mon Sep 17 00:00:00 2001 From: J XD Date: Fri, 18 Mar 2022 11:43:18 +0800 Subject: [PATCH 04/11] remove redundant asserts and make a general one --- src/bundles/testing/__tests__/index.ts | 20 +++--- src/bundles/testing/asserts.ts | 85 +++++++------------------- 2 files changed, 29 insertions(+), 76 deletions(-) diff --git a/src/bundles/testing/__tests__/index.ts b/src/bundles/testing/__tests__/index.ts index 0d4891cffe..6a025e2c84 100644 --- a/src/bundles/testing/__tests__/index.ts +++ b/src/bundles/testing/__tests__/index.ts @@ -1,6 +1,6 @@ import * as testing from '../functions'; import * as asserts from '../asserts'; -import { pair, list } from '../list'; +import { list } from '../list'; beforeAll(() => { testing.context.suiteResults = { @@ -30,23 +30,19 @@ test('Test context fails correctly', () => { expect(testing.context.suiteResults.total).toEqual(1); }); -test('assert_equals works', () => { - expect(() => asserts.assert_equals(1, 1)).not.toThrow(); - expect(() => asserts.assert_equals(0, 1)).toThrow('Expected'); -}); - -test('assert_not_equals works', () => { - expect(() => asserts.assert_not_equals(0, 1)).not.toThrow(); - expect(() => asserts.assert_not_equals(1, 1)).toThrow('Expected not'); +test('assert works', () => { + expect(() => asserts.assert(() => true)).not.toThrow(); + expect(() => asserts.assert(() => false)).toThrow('Assert failed'); }); -test('assert_greater works', () => { +test('assert_equals works', () => { expect(() => asserts.assert_equals(1, 1)).not.toThrow(); - expect(() => asserts.assert_equals(1, 0)).toThrow('Expected'); + expect(() => asserts.assert_equals(0, 1)).toThrow('Expected'); + expect(() => asserts.assert_equals(1.00000000001, 1)).not.toThrow(); }); test('assert_contains works', () => { const list1 = list(1, 2, 3); expect(() => asserts.assert_contains(list1, 2)).not.toThrow(); expect(() => asserts.assert_contains(list1, 10)).toThrow(); -}); \ No newline at end of file +}); diff --git a/src/bundles/testing/asserts.ts b/src/bundles/testing/asserts.ts index 204f023c38..bacf7920b7 100644 --- a/src/bundles/testing/asserts.ts +++ b/src/bundles/testing/asserts.ts @@ -1,82 +1,39 @@ import { is_pair, head, tail, is_list, is_null, member, length } from './list'; /** - * Asserts the equality (===) of the two parameters. - * @param expected The expected value. - * @param received The given value. + * Asserts that a predicate returns true. + * @param pred An predicate function that returns true/false. * @returns */ -export function assert_equals(expected: any, received: any) { - if (expected !== received) { - throw new Error(`Expected \`${expected}\`, got \`${received}\`!`); +export function assert(pred: () => boolean) { + if (!pred()) { + throw new Error(`Assert failed!`); } } /** - * Asserts the inequality (!==) of the two parameters. + * Asserts the equality (===) of two parameters. * @param expected The expected value. * @param received The given value. * @returns */ -export function assert_not_equals(expected: any, received: any) { - if (expected === received) { - throw new Error(`Expected not equal \`${expected}\`!`); - } -} - -/** - * Asserts the inequality (!==) of the two parameters. - * @param expected The expected value. - * @param received The given value. - * @returns - */ -export function assert_approx_equals(expected: number, received: number) { - if (Math.abs(expected - received) > 0.001) { - throw new Error(`Expected \`${expected}\` to approx. \`${received}\`!`); - } -} - -/** - * Asserts that `expected` > `received`. - * @param expected - * @param received - */ -export function assert_greater(expected: number, received: number) { - if (expected <= received) { - throw new Error(`Expected \`${expected}\` > \`${received}\`!`); - } -} - -/** - * Asserts that `expected` >= `received`. - * @param expected - * @param received - */ -export function assert_greater_equals(expected: number, received: number) { - if (expected < received) { - throw new Error(`Expected \`${expected}\` >= \`${received}\`!`); +export function assert_equals(expected: any, received: any) { + const fail = () => { + throw new Error(`Expected \`${expected}\`, got \`${received}\`!`); + }; + if (typeof expected !== typeof received) { + fail(); } -} - -/** - * Asserts that `expected` < `received`. - * @param expected - * @param received - */ -export function assert_lesser(expected: number, received: number) { - if (expected >= received) { - throw new Error(`Expected \`${expected}\` < \`${received}\`!`); + // approx checking for floats + if (typeof expected === 'number' && !Number.isInteger(expected)) { + if (Math.abs(expected - received) > 0.001) { + fail(); + } else { + return; + } } -} - -/** - * Asserts that `expected` <= `received`. - * @param expected - * @param received - */ -export function assert_lesser_equals(expected: number, received: number) { - if (expected > received) { - throw new Error(`Expected \`${expected}\` <= \`${received}\`!`); + if (expected !== received) { + fail(); } } From a67e302a3e8a2149ae0326ba4b3535fb19a24fd4 Mon Sep 17 00:00:00 2001 From: Richard Dominick <34370238+RichDom2185@users.noreply.github.com> Date: Tue, 9 Apr 2024 02:07:41 +0800 Subject: [PATCH 05/11] Fix auto-fixable lint problems --- src/bundles/testing/__tests__/index.ts | 6 +++--- src/bundles/testing/asserts.ts | 2 +- src/bundles/testing/index.ts | 2 +- src/bundles/testing/list.ts | 4 ++-- src/bundles/testing/types.ts | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/bundles/testing/__tests__/index.ts b/src/bundles/testing/__tests__/index.ts index 6a025e2c84..b1da9e1345 100644 --- a/src/bundles/testing/__tests__/index.ts +++ b/src/bundles/testing/__tests__/index.ts @@ -1,5 +1,5 @@ -import * as testing from '../functions'; import * as asserts from '../asserts'; +import * as testing from '../functions'; import { list } from '../list'; beforeAll(() => { @@ -13,7 +13,7 @@ beforeAll(() => { testing.context.runtime = 0; }); -test('Test context is created correctly', () => { +test('context is created correctly', () => { const mockTestFn = jest.fn(); testing.describe('Testing 321', () => { testing.it('Testing 123', mockTestFn); @@ -22,7 +22,7 @@ test('Test context is created correctly', () => { expect(mockTestFn).toHaveBeenCalled(); }); -test('Test context fails correctly', () => { +test('context fails correctly', () => { testing.describe('Testing 123', () => { testing.it('This test fails!', () => asserts.assert_equals(0, 1)); }); diff --git a/src/bundles/testing/asserts.ts b/src/bundles/testing/asserts.ts index bacf7920b7..75c1531b1e 100644 --- a/src/bundles/testing/asserts.ts +++ b/src/bundles/testing/asserts.ts @@ -7,7 +7,7 @@ import { is_pair, head, tail, is_list, is_null, member, length } from './list'; */ export function assert(pred: () => boolean) { if (!pred()) { - throw new Error(`Assert failed!`); + throw new Error('Assert failed!'); } } diff --git a/src/bundles/testing/index.ts b/src/bundles/testing/index.ts index ae85ec80d0..9caa27c148 100644 --- a/src/bundles/testing/index.ts +++ b/src/bundles/testing/index.ts @@ -1,4 +1,3 @@ -import { it, describe } from './functions'; import { assert_equals, assert_not_equals, @@ -8,6 +7,7 @@ import { assert_greater_equals, assert_length, } from './asserts'; +import { it, describe } from './functions'; import { mock_fn } from './mocks'; /** diff --git a/src/bundles/testing/list.ts b/src/bundles/testing/list.ts index e5205937c1..fdc49241e4 100644 --- a/src/bundles/testing/list.ts +++ b/src/bundles/testing/list.ts @@ -13,9 +13,9 @@ // the Firefox environment (especially Web Console) export function array_test(x) : boolean { if (Array.isArray === undefined) { - return x instanceof Array + return x instanceof Array; } else { - return Array.isArray(x) + return Array.isArray(x); } } diff --git a/src/bundles/testing/types.ts b/src/bundles/testing/types.ts index 0f9558c37d..0d8102ccfc 100644 --- a/src/bundles/testing/types.ts +++ b/src/bundles/testing/types.ts @@ -1,5 +1,5 @@ export type ErrorLogger = ( - error: string | string[], + error: string[] | string, isSlangError?: boolean ) => void; export type Test = () => void; From fbf05c95eccfc912c92c29eb5de4f945601ad89b Mon Sep 17 00:00:00 2001 From: Richard Dominick <34370238+RichDom2185@users.noreply.github.com> Date: Tue, 9 Apr 2024 02:13:17 +0800 Subject: [PATCH 06/11] Fix type import --- src/tabs/Testing/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tabs/Testing/index.tsx b/src/tabs/Testing/index.tsx index 62df40cc56..2c9d70ce32 100644 --- a/src/tabs/Testing/index.tsx +++ b/src/tabs/Testing/index.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Results, SuiteResult } from '../../bundles/testing/types'; +import type { Results, SuiteResult } from '../../bundles/testing/types'; /** * Tab for unit tests. From 08c30ecd9dddbef4c79580d2586e268d85943e62 Mon Sep 17 00:00:00 2001 From: Richard Dominick <34370238+RichDom2185@users.noreply.github.com> Date: Wed, 26 Feb 2025 08:38:53 +0800 Subject: [PATCH 07/11] Add react ESLint plugin --- package.json | 4 +- yarn.lock | 754 ++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 753 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f7074a9d66..e3a88a57fc 100644 --- a/package.json +++ b/package.json @@ -75,6 +75,7 @@ "eslint-plugin-import": "^2.29.1", "eslint-plugin-jest": "^27.9.0", "eslint-plugin-jsx-a11y": "^6.5.1", + "eslint-plugin-react": "^7.37.4", "eslint-plugin-react-hooks": "^4.4.0", "globals": "^15.11.0", "http-server": "^0.12.3", @@ -134,5 +135,6 @@ }, "resolutions": { "**/gl": "^8.0.2" - } + }, + "packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610" } diff --git a/yarn.lock b/yarn.lock index aaf045abb0..0a2806ab66 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2149,6 +2149,14 @@ array-buffer-byte-length@^1.0.1: call-bind "^1.0.5" is-array-buffer "^3.0.4" +array-buffer-byte-length@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz#384d12a37295aec3769ab022ad323a18a51ccf8b" + integrity sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw== + dependencies: + call-bound "^1.0.3" + is-array-buffer "^3.0.5" + array-includes@^3.1.6, array-includes@^3.1.8: version "3.1.8" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.8.tgz#5e370cbe172fdd5dd6530c1d4aadda25281ba97d" @@ -2171,6 +2179,18 @@ array-unique@^0.3.2: resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" integrity sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ== +array.prototype.findlast@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz#3e4fbcb30a15a7f5bf64cf2faae22d139c2e4904" + integrity sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-shim-unscopables "^1.0.2" + array.prototype.findlastindex@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz#8c35a755c72908719453f87145ca011e39334d0d" @@ -2203,6 +2223,27 @@ array.prototype.flatmap@^1.3.2: es-abstract "^1.22.1" es-shim-unscopables "^1.0.0" +array.prototype.flatmap@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz#712cc792ae70370ae40586264629e33aab5dd38b" + integrity sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg== + dependencies: + call-bind "^1.0.8" + define-properties "^1.2.1" + es-abstract "^1.23.5" + es-shim-unscopables "^1.0.2" + +array.prototype.tosorted@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz#fe954678ff53034e717ea3352a03f0b0b86f7ffc" + integrity sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.3" + es-errors "^1.3.0" + es-shim-unscopables "^1.0.2" + arraybuffer.prototype.slice@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz#097972f4255e41bc3425e37dc3f6421cf9aefde6" @@ -2217,6 +2258,19 @@ arraybuffer.prototype.slice@^1.0.3: is-array-buffer "^3.0.4" is-shared-array-buffer "^1.0.2" +arraybuffer.prototype.slice@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz#9d760d84dbdd06d0cbf92c8849615a1a7ab3183c" + integrity sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ== + dependencies: + array-buffer-byte-length "^1.0.1" + call-bind "^1.0.8" + define-properties "^1.2.1" + es-abstract "^1.23.5" + es-errors "^1.3.0" + get-intrinsic "^1.2.6" + is-array-buffer "^3.0.4" + assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" @@ -2548,6 +2602,14 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" +call-bind-apply-helpers@^1.0.0, call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6" + integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" @@ -2559,6 +2621,24 @@ call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: get-intrinsic "^1.2.4" set-function-length "^1.2.1" +call-bind@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.8.tgz#0736a9660f537e3388826f440d5ec45f744eaa4c" + integrity sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww== + dependencies: + call-bind-apply-helpers "^1.0.0" + es-define-property "^1.0.0" + get-intrinsic "^1.2.4" + set-function-length "^1.2.2" + +call-bound@^1.0.2, call-bound@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/call-bound/-/call-bound-1.0.3.tgz#41cfd032b593e39176a71533ab4f384aa04fd681" + integrity sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA== + dependencies: + call-bind-apply-helpers "^1.0.1" + get-intrinsic "^1.2.6" + callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -2937,6 +3017,15 @@ data-view-buffer@^1.0.1: es-errors "^1.3.0" is-data-view "^1.0.1" +data-view-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.2.tgz#211a03ba95ecaf7798a8c7198d79536211f88570" + integrity sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ== + dependencies: + call-bound "^1.0.3" + es-errors "^1.3.0" + is-data-view "^1.0.2" + data-view-byte-length@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz#90721ca95ff280677eb793749fce1011347669e2" @@ -2946,6 +3035,15 @@ data-view-byte-length@^1.0.1: es-errors "^1.3.0" is-data-view "^1.0.1" +data-view-byte-length@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz#9e80f7ca52453ce3e93d25a35318767ea7704735" + integrity sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ== + dependencies: + call-bound "^1.0.3" + es-errors "^1.3.0" + is-data-view "^1.0.2" + data-view-byte-offset@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz#5e0bbfb4828ed2d1b9b400cd8a7d119bca0ff18a" @@ -2955,6 +3053,15 @@ data-view-byte-offset@^1.0.0: es-errors "^1.3.0" is-data-view "^1.0.1" +data-view-byte-offset@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz#068307f9b71ab76dbbe10291389e020856606191" + integrity sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + is-data-view "^1.0.1" + dayjs@^1.10.4: version "1.11.13" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.13.tgz#92430b0139055c3ebb60150aa13e860a4b5a366c" @@ -3032,7 +3139,7 @@ define-data-property@^1.0.1, define-data-property@^1.1.4: es-errors "^1.3.0" gopd "^1.0.1" -define-properties@^1.2.0, define-properties@^1.2.1: +define-properties@^1.1.3, define-properties@^1.2.0, define-properties@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== @@ -3159,6 +3266,15 @@ dtype@^2.0.0: resolved "https://registry.yarnpkg.com/dtype/-/dtype-2.0.0.tgz#cd052323ce061444ecd2e8f5748f69a29be28434" integrity sha512-s2YVcLKdFGS0hpFqJaTwscsyt0E8nNFdmo73Ocd81xNPj4URI4rj6D60A+vFMIw7BXWlb4yRkEwfBqcZzPGiZg== +dunder-proto@^1.0.0, dunder-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" + integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== + dependencies: + call-bind-apply-helpers "^1.0.1" + es-errors "^1.3.0" + gopd "^1.2.0" + duplexify@^4.1.1: version "4.1.3" resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.1.3.tgz#a07e1c0d0a2c001158563d32592ba58bddb0236f" @@ -3247,6 +3363,63 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" +es-abstract@^1.17.5, es-abstract@^1.23.5, es-abstract@^1.23.6, es-abstract@^1.23.9: + version "1.23.9" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.9.tgz#5b45994b7de78dada5c1bebf1379646b32b9d606" + integrity sha512-py07lI0wjxAC/DcfK1S6G7iANonniZwTISvdPzk9hzeH0IZIshbuuFxLIU96OyF89Yb9hiqWn8M/bY83KY5vzA== + dependencies: + array-buffer-byte-length "^1.0.2" + arraybuffer.prototype.slice "^1.0.4" + available-typed-arrays "^1.0.7" + call-bind "^1.0.8" + call-bound "^1.0.3" + data-view-buffer "^1.0.2" + data-view-byte-length "^1.0.2" + data-view-byte-offset "^1.0.1" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-set-tostringtag "^2.1.0" + es-to-primitive "^1.3.0" + function.prototype.name "^1.1.8" + get-intrinsic "^1.2.7" + get-proto "^1.0.0" + get-symbol-description "^1.1.0" + globalthis "^1.0.4" + gopd "^1.2.0" + has-property-descriptors "^1.0.2" + has-proto "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + internal-slot "^1.1.0" + is-array-buffer "^3.0.5" + is-callable "^1.2.7" + is-data-view "^1.0.2" + is-regex "^1.2.1" + is-shared-array-buffer "^1.0.4" + is-string "^1.1.1" + is-typed-array "^1.1.15" + is-weakref "^1.1.0" + math-intrinsics "^1.1.0" + object-inspect "^1.13.3" + object-keys "^1.1.1" + object.assign "^4.1.7" + own-keys "^1.0.1" + regexp.prototype.flags "^1.5.3" + safe-array-concat "^1.1.3" + safe-push-apply "^1.0.0" + safe-regex-test "^1.1.0" + set-proto "^1.0.0" + string.prototype.trim "^1.2.10" + string.prototype.trimend "^1.0.9" + string.prototype.trimstart "^1.0.8" + typed-array-buffer "^1.0.3" + typed-array-byte-length "^1.0.3" + typed-array-byte-offset "^1.0.4" + typed-array-length "^1.0.7" + unbox-primitive "^1.1.0" + which-typed-array "^1.1.18" + es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.1, es-abstract@^1.23.2, es-abstract@^1.23.3: version "1.23.3" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.3.tgz#8f0c5a35cd215312573c5a27c87dfd6c881a0aa0" @@ -3306,6 +3479,11 @@ es-define-property@^1.0.0: dependencies: get-intrinsic "^1.2.4" +es-define-property@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" + integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== + es-errors@^1.2.1, es-errors@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" @@ -3331,6 +3509,28 @@ es-iterator-helpers@^1.1.0: iterator.prototype "^1.1.3" safe-array-concat "^1.1.2" +es-iterator-helpers@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.2.1.tgz#d1dd0f58129054c0ad922e6a9a1e65eef435fe75" + integrity sha512-uDn+FE1yrDzyC0pCo961B2IHbdM8y/ACZsKD4dG6WqrjV53BADjwa7D+1aom2rsNVfLyDgU/eigvlJGJ08OQ4w== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + define-properties "^1.2.1" + es-abstract "^1.23.6" + es-errors "^1.3.0" + es-set-tostringtag "^2.0.3" + function-bind "^1.1.2" + get-intrinsic "^1.2.6" + globalthis "^1.0.4" + gopd "^1.2.0" + has-property-descriptors "^1.0.2" + has-proto "^1.2.0" + has-symbols "^1.1.0" + internal-slot "^1.1.0" + iterator.prototype "^1.1.4" + safe-array-concat "^1.1.3" + es-object-atoms@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941" @@ -3338,6 +3538,13 @@ es-object-atoms@^1.0.0: dependencies: es-errors "^1.3.0" +es-object-atoms@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1" + integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA== + dependencies: + es-errors "^1.3.0" + es-set-tostringtag@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz#8bb60f0a440c2e4281962428438d58545af39777" @@ -3347,6 +3554,16 @@ es-set-tostringtag@^2.0.3: has-tostringtag "^1.0.2" hasown "^2.0.1" +es-set-tostringtag@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz#f31dbbe0c183b00a6d26eb6325c810c0fd18bd4d" + integrity sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA== + dependencies: + es-errors "^1.3.0" + get-intrinsic "^1.2.6" + has-tostringtag "^1.0.2" + hasown "^2.0.2" + es-shim-unscopables@^1.0.0, es-shim-unscopables@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" @@ -3363,6 +3580,15 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es-to-primitive@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.3.0.tgz#96c89c82cc49fd8794a24835ba3e1ff87f214e18" + integrity sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g== + dependencies: + is-callable "^1.2.7" + is-date-object "^1.0.5" + is-symbol "^1.0.4" + esbuild@^0.21.3: version "0.21.5" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.21.5.tgz#9ca301b120922959b766360d8ac830da0d02997d" @@ -3529,6 +3755,30 @@ eslint-plugin-react-hooks@^4.4.0: resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz#c829eb06c0e6f484b3fbb85a97e57784f328c596" integrity sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ== +eslint-plugin-react@^7.37.4: + version "7.37.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.37.4.tgz#1b6c80b6175b6ae4b26055ae4d55d04c414c7181" + integrity sha512-BGP0jRmfYyvOyvMoRX/uoUeW+GqNj9y16bPQzqAHf3AYII/tDs+jMN0dBVkl88/OZwNGwrVFxE7riHsXVfy/LQ== + dependencies: + array-includes "^3.1.8" + array.prototype.findlast "^1.2.5" + array.prototype.flatmap "^1.3.3" + array.prototype.tosorted "^1.1.4" + doctrine "^2.1.0" + es-iterator-helpers "^1.2.1" + estraverse "^5.3.0" + hasown "^2.0.2" + jsx-ast-utils "^2.4.1 || ^3.0.0" + minimatch "^3.1.2" + object.entries "^1.1.8" + object.fromentries "^2.0.8" + object.values "^1.2.1" + prop-types "^15.8.1" + resolve "^2.0.0-next.5" + semver "^6.3.1" + string.prototype.matchall "^4.0.12" + string.prototype.repeat "^1.0.0" + eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -4003,6 +4253,18 @@ function.prototype.name@^1.1.6: es-abstract "^1.22.1" functions-have-names "^1.2.3" +function.prototype.name@^1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.8.tgz#e68e1df7b259a5c949eeef95cdbde53edffabb78" + integrity sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + define-properties "^1.2.1" + functions-have-names "^1.2.3" + hasown "^2.0.2" + is-callable "^1.2.7" + functions-have-names@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" @@ -4029,11 +4291,35 @@ get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.3, get-intrinsic@ has-symbols "^1.0.3" hasown "^2.0.0" +get-intrinsic@^1.2.5, get-intrinsic@^1.2.6, get-intrinsic@^1.2.7: + version "1.3.0" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01" + integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ== + dependencies: + call-bind-apply-helpers "^1.0.2" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.1.1" + function-bind "^1.1.2" + get-proto "^1.0.1" + gopd "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + math-intrinsics "^1.1.0" + get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== +get-proto@^1.0.0, get-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1" + integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== + dependencies: + dunder-proto "^1.0.1" + es-object-atoms "^1.0.0" + get-stream@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -4062,6 +4348,15 @@ get-symbol-description@^1.0.2: es-errors "^1.3.0" get-intrinsic "^1.2.4" +get-symbol-description@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.1.0.tgz#7bdd54e0befe8ffc9f3b4e203220d9f1e881b6ee" + integrity sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg== + dependencies: + call-bound "^1.0.3" + es-errors "^1.3.0" + get-intrinsic "^1.2.6" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -4199,6 +4494,11 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" +gopd@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" + integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== + gpu-mock.js@^1.3.0: version "1.3.1" resolved "https://registry.yarnpkg.com/gpu-mock.js/-/gpu-mock.js-1.3.1.tgz#f7deaa09da3f672762eda944ecf948fd2c4b1490" @@ -4252,11 +4552,23 @@ has-proto@^1.0.1, has-proto@^1.0.3: resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== +has-proto@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.2.0.tgz#5de5a6eabd95fdffd9818b43055e8065e39fe9d5" + integrity sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ== + dependencies: + dunder-proto "^1.0.0" + has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== +has-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" + integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== + has-tostringtag@^1.0.0, has-tostringtag@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" @@ -4498,6 +4810,15 @@ internal-slot@^1.0.7: hasown "^2.0.0" side-channel "^1.0.4" +internal-slot@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.1.0.tgz#1eac91762947d2f7056bc838d93e13b2e9604961" + integrity sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw== + dependencies: + es-errors "^1.3.0" + hasown "^2.0.2" + side-channel "^1.1.0" + ip-address@^9.0.5: version "9.0.5" resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-9.0.5.tgz#117a960819b08780c3bd1f14ef3c1cc1d3f3ea5a" @@ -4521,6 +4842,15 @@ is-array-buffer@^3.0.4: call-bind "^1.0.2" get-intrinsic "^1.2.1" +is-array-buffer@^3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.5.tgz#65742e1e687bd2cc666253068fd8707fe4d44280" + integrity sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + get-intrinsic "^1.2.6" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" @@ -4545,6 +4875,13 @@ is-bigint@^1.0.1: dependencies: has-bigints "^1.0.1" +is-bigint@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.1.0.tgz#dda7a3445df57a42583db4228682eba7c4170672" + integrity sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ== + dependencies: + has-bigints "^1.0.2" + is-blob@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-blob/-/is-blob-1.0.0.tgz#a3d7d96fe1c3ff065ec7ce27c2c21e6ba92c1832" @@ -4563,6 +4900,14 @@ is-boolean-object@^1.1.0: call-bind "^1.0.2" has-tostringtag "^1.0.0" +is-boolean-object@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.2.2.tgz#7067f47709809a393c71ff5bb3e135d8a9215d9e" + integrity sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A== + dependencies: + call-bound "^1.0.3" + has-tostringtag "^1.0.2" + is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" @@ -4606,6 +4951,15 @@ is-data-view@^1.0.1: dependencies: is-typed-array "^1.1.13" +is-data-view@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-data-view/-/is-data-view-1.0.2.tgz#bae0a41b9688986c2188dda6657e56b8f9e63b8e" + integrity sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw== + dependencies: + call-bound "^1.0.2" + get-intrinsic "^1.2.6" + is-typed-array "^1.1.13" + is-date-object@^1.0.1, is-date-object@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" @@ -4613,6 +4967,14 @@ is-date-object@^1.0.1, is-date-object@^1.0.5: dependencies: has-tostringtag "^1.0.0" +is-date-object@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.1.0.tgz#ad85541996fc7aa8b2729701d27b7319f95d82f7" + integrity sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg== + dependencies: + call-bound "^1.0.2" + has-tostringtag "^1.0.2" + is-descriptor@^0.1.0: version "0.1.7" resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.7.tgz#2727eb61fd789dcd5bdf0ed4569f551d2fe3be33" @@ -4658,6 +5020,13 @@ is-finalizationregistry@^1.0.2: dependencies: call-bind "^1.0.2" +is-finalizationregistry@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz#eefdcdc6c94ddd0674d9c85887bf93f944a97c90" + integrity sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg== + dependencies: + call-bound "^1.0.3" + is-fullwidth-code-point@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" @@ -4704,6 +5073,14 @@ is-number-object@^1.0.4: dependencies: has-tostringtag "^1.0.0" +is-number-object@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.1.1.tgz#144b21e95a1bc148205dcc2814a9134ec41b2541" + integrity sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw== + dependencies: + call-bound "^1.0.3" + has-tostringtag "^1.0.2" + is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" @@ -4746,6 +5123,16 @@ is-regex@^1.1.4: call-bind "^1.0.2" has-tostringtag "^1.0.0" +is-regex@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.2.1.tgz#76d70a3ed10ef9be48eb577887d74205bf0cad22" + integrity sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g== + dependencies: + call-bound "^1.0.2" + gopd "^1.2.0" + has-tostringtag "^1.0.2" + hasown "^2.0.2" + is-set@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.3.tgz#8ab209ea424608141372ded6e0cb200ef1d9d01d" @@ -4758,6 +5145,13 @@ is-shared-array-buffer@^1.0.2, is-shared-array-buffer@^1.0.3: dependencies: call-bind "^1.0.7" +is-shared-array-buffer@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz#9b67844bd9b7f246ba0708c3a93e34269c774f6f" + integrity sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A== + dependencies: + call-bound "^1.0.3" + is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -4775,6 +5169,14 @@ is-string@^1.0.5, is-string@^1.0.7: dependencies: has-tostringtag "^1.0.0" +is-string@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.1.1.tgz#92ea3f3d5c5b6e039ca8677e5ac8d07ea773cbb9" + integrity sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA== + dependencies: + call-bound "^1.0.3" + has-tostringtag "^1.0.2" + is-symbol@^1.0.2, is-symbol@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" @@ -4782,6 +5184,15 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" +is-symbol@^1.0.4, is-symbol@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.1.1.tgz#f47761279f532e2b05a7024a7506dbbedacd0634" + integrity sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w== + dependencies: + call-bound "^1.0.2" + has-symbols "^1.1.0" + safe-regex-test "^1.1.0" + is-typed-array@^1.1.13: version "1.1.13" resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.13.tgz#d6c5ca56df62334959322d7d7dd1cca50debe229" @@ -4789,6 +5200,13 @@ is-typed-array@^1.1.13: dependencies: which-typed-array "^1.1.14" +is-typed-array@^1.1.14, is-typed-array@^1.1.15: + version "1.1.15" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.15.tgz#4bfb4a45b61cee83a5a46fba778e4e8d59c0ce0b" + integrity sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ== + dependencies: + which-typed-array "^1.1.16" + is-typedarray@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -4806,6 +5224,13 @@ is-weakref@^1.0.2: dependencies: call-bind "^1.0.2" +is-weakref@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.1.1.tgz#eea430182be8d64174bd96bffbc46f21bf3f9293" + integrity sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew== + dependencies: + call-bound "^1.0.3" + is-weakset@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.3.tgz#e801519df8c0c43e12ff2834eead84ec9e624007" @@ -4927,6 +5352,18 @@ iterator.prototype@^1.1.3: reflect.getprototypeof "^1.0.4" set-function-name "^2.0.1" +iterator.prototype@^1.1.4: + version "1.1.5" + resolved "https://registry.yarnpkg.com/iterator.prototype/-/iterator.prototype-1.1.5.tgz#12c959a29de32de0aa3bbbb801f4d777066dae39" + integrity sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g== + dependencies: + define-data-property "^1.1.4" + es-object-atoms "^1.0.0" + get-intrinsic "^1.2.6" + get-proto "^1.0.0" + has-symbols "^1.1.0" + set-function-name "^2.0.2" + its-fine@^1.0.6: version "1.2.5" resolved "https://registry.yarnpkg.com/its-fine/-/its-fine-1.2.5.tgz#5466c287f86a0a73e772c8d8d515626c97195dc9" @@ -5544,7 +5981,7 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" -jsx-ast-utils@^3.3.5: +"jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.3.5: version "3.3.5" resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz#4766bd05a8e2a11af222becd19e15575e52a853a" integrity sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ== @@ -5775,6 +6212,11 @@ marked@^4.3.0: resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== +math-intrinsics@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" + integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== + merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -6184,6 +6626,11 @@ object-inspect@^1.13.1: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff" integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g== +object-inspect@^1.13.3: + version "1.13.4" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.4.tgz#8375265e21bc20d0fa582c22e1b13485d6e00213" + integrity sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew== + object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" @@ -6206,6 +6653,27 @@ object.assign@^4.1.4, object.assign@^4.1.5: has-symbols "^1.0.3" object-keys "^1.1.1" +object.assign@^4.1.7: + version "4.1.7" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.7.tgz#8c14ca1a424c6a561b0bb2a22f66f5049a945d3d" + integrity sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + has-symbols "^1.1.0" + object-keys "^1.1.1" + +object.entries@^1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.8.tgz#bffe6f282e01f4d17807204a24f8edd823599c41" + integrity sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + object.fromentries@^2.0.8: version "2.0.8" resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.8.tgz#f7195d8a9b97bd95cbc1999ea939ecd1a2b00c65" @@ -6241,6 +6709,16 @@ object.values@^1.1.6, object.values@^1.2.0: define-properties "^1.2.1" es-object-atoms "^1.0.0" +object.values@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.2.1.tgz#deed520a50809ff7f75a7cfd4bc64c7a038c6216" + integrity sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -6290,6 +6768,15 @@ os@^0.1.2: resolved "https://registry.yarnpkg.com/os/-/os-0.1.2.tgz#f29a50c62908516ba42652de42f7038600cadbc2" integrity sha512-ZoXJkvAnljwvc56MbvhtKVWmSkzV712k42Is2mA0+0KTSRakq5XXuXpjZjgAt9ctzl51ojhQWakQQpmOvXWfjQ== +own-keys@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/own-keys/-/own-keys-1.0.1.tgz#e4006910a2bf913585289676eebd6f390cf51358" + integrity sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg== + dependencies: + get-intrinsic "^1.2.6" + object-keys "^1.1.1" + safe-push-apply "^1.0.0" + p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" @@ -6608,7 +7095,7 @@ prompts@^2.0.1: kleur "^3.0.3" sisteransi "^1.0.5" -prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.7.2: +prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -6810,6 +7297,20 @@ reflect.getprototypeof@^1.0.4: globalthis "^1.0.3" which-builtin-type "^1.1.3" +reflect.getprototypeof@^1.0.6, reflect.getprototypeof@^1.0.9: + version "1.0.10" + resolved "https://registry.yarnpkg.com/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz#c629219e78a3316d8b604c765ef68996964e7bf9" + integrity sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw== + dependencies: + call-bind "^1.0.8" + define-properties "^1.2.1" + es-abstract "^1.23.9" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + get-intrinsic "^1.2.7" + get-proto "^1.0.1" + which-builtin-type "^1.2.1" + regenerator-runtime@^0.14.0: version "0.14.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" @@ -6833,6 +7334,18 @@ regexp.prototype.flags@^1.5.2: es-errors "^1.3.0" set-function-name "^2.0.2" +regexp.prototype.flags@^1.5.3: + version "1.5.4" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz#1ad6c62d44a259007e55b3970e00f746efbcaa19" + integrity sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA== + dependencies: + call-bind "^1.0.8" + define-properties "^1.2.1" + es-errors "^1.3.0" + get-proto "^1.0.1" + gopd "^1.2.0" + set-function-name "^2.0.2" + regl@2.1.0, regl@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/regl/-/regl-2.1.0.tgz#7dae71e9ff20f29c4f42f510c70cd92ebb6b657c" @@ -6909,6 +7422,15 @@ resolve@^1.20.0, resolve@^1.22.4: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +resolve@^2.0.0-next.5: + version "2.0.0-next.5" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.5.tgz#6b0ec3107e671e52b68cd068ef327173b90dc03c" + integrity sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" @@ -7005,11 +7527,30 @@ safe-array-concat@^1.1.2: has-symbols "^1.0.3" isarray "^2.0.5" +safe-array-concat@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.3.tgz#c9e54ec4f603b0bbb8e7e5007a5ee7aecd1538c3" + integrity sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.2" + get-intrinsic "^1.2.6" + has-symbols "^1.1.0" + isarray "^2.0.5" + safe-buffer@^5.0.1, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +safe-push-apply@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/safe-push-apply/-/safe-push-apply-1.0.0.tgz#01850e981c1602d398c85081f360e4e6d03d27f5" + integrity sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA== + dependencies: + es-errors "^1.3.0" + isarray "^2.0.5" + safe-regex-test@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.3.tgz#a5b4c0f06e0ab50ea2c395c14d8371232924c377" @@ -7019,6 +7560,15 @@ safe-regex-test@^1.0.3: es-errors "^1.3.0" is-regex "^1.1.4" +safe-regex-test@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.1.0.tgz#7f87dfb67a3150782eaaf18583ff5d1711ac10c1" + integrity sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + is-regex "^1.2.1" + safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" @@ -7118,7 +7668,7 @@ sentence-case@^3.0.4: tslib "^2.0.3" upper-case-first "^2.0.2" -set-function-length@^1.2.1: +set-function-length@^1.2.1, set-function-length@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== @@ -7140,6 +7690,15 @@ set-function-name@^2.0.1, set-function-name@^2.0.2: functions-have-names "^1.2.3" has-property-descriptors "^1.0.2" +set-proto@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/set-proto/-/set-proto-1.0.0.tgz#0760dbcff30b2d7e801fd6e19983e56da337565e" + integrity sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw== + dependencies: + dunder-proto "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + set-value@^2.0.0, set-value@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" @@ -7184,6 +7743,35 @@ shiki@^0.14.7: vscode-oniguruma "^1.7.0" vscode-textmate "^8.0.0" +side-channel-list@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/side-channel-list/-/side-channel-list-1.0.0.tgz#10cb5984263115d3b7a0e336591e290a830af8ad" + integrity sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA== + dependencies: + es-errors "^1.3.0" + object-inspect "^1.13.3" + +side-channel-map@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/side-channel-map/-/side-channel-map-1.0.1.tgz#d6bb6b37902c6fef5174e5f533fab4c732a26f42" + integrity sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + get-intrinsic "^1.2.5" + object-inspect "^1.13.3" + +side-channel-weakmap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz#11dda19d5368e40ce9ec2bdc1fb0ecbc0790ecea" + integrity sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + get-intrinsic "^1.2.5" + object-inspect "^1.13.3" + side-channel-map "^1.0.1" + side-channel@^1.0.4, side-channel@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" @@ -7194,6 +7782,17 @@ side-channel@^1.0.4, side-channel@^1.0.6: get-intrinsic "^1.2.4" object-inspect "^1.13.1" +side-channel@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.1.0.tgz#c3fcff9c4da932784873335ec9765fa94ff66bc9" + integrity sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw== + dependencies: + es-errors "^1.3.0" + object-inspect "^1.13.3" + side-channel-list "^1.0.0" + side-channel-map "^1.0.1" + side-channel-weakmap "^1.0.2" + signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" @@ -7483,6 +8082,46 @@ string.prototype.includes@^2.0.1: define-properties "^1.2.1" es-abstract "^1.23.3" +string.prototype.matchall@^4.0.12: + version "4.0.12" + resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz#6c88740e49ad4956b1332a911e949583a275d4c0" + integrity sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + define-properties "^1.2.1" + es-abstract "^1.23.6" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + get-intrinsic "^1.2.6" + gopd "^1.2.0" + has-symbols "^1.1.0" + internal-slot "^1.1.0" + regexp.prototype.flags "^1.5.3" + set-function-name "^2.0.2" + side-channel "^1.1.0" + +string.prototype.repeat@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz#e90872ee0308b29435aa26275f6e1b762daee01a" + integrity sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + +string.prototype.trim@^1.2.10: + version "1.2.10" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz#40b2dd5ee94c959b4dcfb1d65ce72e90da480c81" + integrity sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.2" + define-data-property "^1.1.4" + define-properties "^1.2.1" + es-abstract "^1.23.5" + es-object-atoms "^1.0.0" + has-property-descriptors "^1.0.2" + string.prototype.trim@^1.2.9: version "1.2.9" resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz#b6fa326d72d2c78b6df02f7759c73f8f6274faa4" @@ -7502,6 +8141,16 @@ string.prototype.trimend@^1.0.8: define-properties "^1.2.1" es-object-atoms "^1.0.0" +string.prototype.trimend@^1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz#62e2731272cd285041b36596054e9f66569b6942" + integrity sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.2" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + string.prototype.trimstart@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz#7ee834dda8c7c17eff3118472bb35bfedaa34dde" @@ -7879,6 +8528,15 @@ typed-array-buffer@^1.0.2: es-errors "^1.3.0" is-typed-array "^1.1.13" +typed-array-buffer@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz#a72395450a4869ec033fd549371b47af3a2ee536" + integrity sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw== + dependencies: + call-bound "^1.0.3" + es-errors "^1.3.0" + is-typed-array "^1.1.14" + typed-array-byte-length@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz#d92972d3cff99a3fa2e765a28fcdc0f1d89dec67" @@ -7890,6 +8548,17 @@ typed-array-byte-length@^1.0.1: has-proto "^1.0.3" is-typed-array "^1.1.13" +typed-array-byte-length@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz#8407a04f7d78684f3d252aa1a143d2b77b4160ce" + integrity sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg== + dependencies: + call-bind "^1.0.8" + for-each "^0.3.3" + gopd "^1.2.0" + has-proto "^1.2.0" + is-typed-array "^1.1.14" + typed-array-byte-offset@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz#f9ec1acb9259f395093e4567eb3c28a580d02063" @@ -7902,6 +8571,19 @@ typed-array-byte-offset@^1.0.2: has-proto "^1.0.3" is-typed-array "^1.1.13" +typed-array-byte-offset@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz#ae3698b8ec91a8ab945016108aef00d5bff12355" + integrity sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.8" + for-each "^0.3.3" + gopd "^1.2.0" + has-proto "^1.2.0" + is-typed-array "^1.1.15" + reflect.getprototypeof "^1.0.9" + typed-array-length@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.6.tgz#57155207c76e64a3457482dfdc1c9d1d3c4c73a3" @@ -7914,6 +8596,18 @@ typed-array-length@^1.0.6: is-typed-array "^1.1.13" possible-typed-array-names "^1.0.0" +typed-array-length@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.7.tgz#ee4deff984b64be1e118b0de8c9c877d5ce73d3d" + integrity sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg== + dependencies: + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + is-typed-array "^1.1.13" + possible-typed-array-names "^1.0.0" + reflect.getprototypeof "^1.0.6" + typedarray-to-buffer@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" @@ -7965,6 +8659,16 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" +unbox-primitive@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.1.0.tgz#8d9d2c9edeea8460c7f35033a88867944934d1e2" + integrity sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw== + dependencies: + call-bound "^1.0.3" + has-bigints "^1.0.2" + has-symbols "^1.1.0" + which-boxed-primitive "^1.1.1" + undici-types@~6.19.2: version "6.19.8" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" @@ -8206,6 +8910,17 @@ which-boxed-primitive@^1.0.2: is-string "^1.0.5" is-symbol "^1.0.3" +which-boxed-primitive@^1.1.0, which-boxed-primitive@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz#d76ec27df7fa165f18d5808374a5fe23c29b176e" + integrity sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA== + dependencies: + is-bigint "^1.1.0" + is-boolean-object "^1.2.1" + is-number-object "^1.1.1" + is-string "^1.1.1" + is-symbol "^1.1.1" + which-builtin-type@^1.1.3: version "1.1.4" resolved "https://registry.yarnpkg.com/which-builtin-type/-/which-builtin-type-1.1.4.tgz#592796260602fc3514a1b5ee7fa29319b72380c3" @@ -8224,6 +8939,25 @@ which-builtin-type@^1.1.3: which-collection "^1.0.2" which-typed-array "^1.1.15" +which-builtin-type@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/which-builtin-type/-/which-builtin-type-1.2.1.tgz#89183da1b4907ab089a6b02029cc5d8d6574270e" + integrity sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q== + dependencies: + call-bound "^1.0.2" + function.prototype.name "^1.1.6" + has-tostringtag "^1.0.2" + is-async-function "^2.0.0" + is-date-object "^1.1.0" + is-finalizationregistry "^1.1.0" + is-generator-function "^1.0.10" + is-regex "^1.2.1" + is-weakref "^1.0.2" + isarray "^2.0.5" + which-boxed-primitive "^1.1.0" + which-collection "^1.0.2" + which-typed-array "^1.1.16" + which-collection@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.2.tgz#627ef76243920a107e7ce8e96191debe4b16c2a0" @@ -8245,6 +8979,18 @@ which-typed-array@^1.1.14, which-typed-array@^1.1.15: gopd "^1.0.1" has-tostringtag "^1.0.2" +which-typed-array@^1.1.16, which-typed-array@^1.1.18: + version "1.1.18" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.18.tgz#df2389ebf3fbb246a71390e90730a9edb6ce17ad" + integrity sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.8" + call-bound "^1.0.3" + for-each "^0.3.3" + gopd "^1.2.0" + has-tostringtag "^1.0.2" + which@^1.2.9: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" From 43ce719d365fee5ad01be189938355c0c9a82bb8 Mon Sep 17 00:00:00 2001 From: Richard Dominick <34370238+RichDom2185@users.noreply.github.com> Date: Wed, 26 Feb 2025 08:41:29 +0800 Subject: [PATCH 08/11] Add assert_not_equals --- src/bundles/testing/asserts.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/bundles/testing/asserts.ts b/src/bundles/testing/asserts.ts index 75c1531b1e..1d8a49753d 100644 --- a/src/bundles/testing/asserts.ts +++ b/src/bundles/testing/asserts.ts @@ -37,6 +37,18 @@ export function assert_equals(expected: any, received: any) { } } +/** + * Asserts that two parameters are not equal (!==). + * @param expected The expected value. + * @param received The given value. + * @returns + */ +export function assert_not_equals(expected: any, received: any) { + if (expected === received) { + throw new Error(`Expected \`${expected}\` to not equal \`${received}\`!`); + } +} + /** * Asserts that `xs` contains `toContain`. * @param xs The list to assert. From 1304ed849df59e474e93dba2c836cecc16ed1af4 Mon Sep 17 00:00:00 2001 From: Richard Dominick <34370238+RichDom2185@users.noreply.github.com> Date: Wed, 26 Feb 2025 08:41:46 +0800 Subject: [PATCH 09/11] Remove yet-to-be implemented exports --- src/bundles/testing/index.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/bundles/testing/index.ts b/src/bundles/testing/index.ts index 9caa27c148..83adf922c4 100644 --- a/src/bundles/testing/index.ts +++ b/src/bundles/testing/index.ts @@ -2,9 +2,6 @@ import { assert_equals, assert_not_equals, assert_contains, - assert_approx_equals, - assert_greater, - assert_greater_equals, assert_length, } from './asserts'; import { it, describe } from './functions'; @@ -33,9 +30,6 @@ export default () => ({ assert_equals, assert_not_equals, assert_contains, - assert_greater, - assert_greater_equals, - assert_approx_equals, assert_length, mock_fn, }); From ed1164621e2084a993d13159a8eaa14eebdaf654 Mon Sep 17 00:00:00 2001 From: Richard Dominick <34370238+RichDom2185@users.noreply.github.com> Date: Wed, 26 Feb 2025 08:43:36 +0800 Subject: [PATCH 10/11] Fix compile error post-merge --- src/bundles/testing/functions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bundles/testing/functions.ts b/src/bundles/testing/functions.ts index bb28f108f4..d844ef234f 100644 --- a/src/bundles/testing/functions.ts +++ b/src/bundles/testing/functions.ts @@ -1,4 +1,4 @@ -import { TestContext, TestSuite, Test } from './types'; +import type { TestContext, TestSuite, Test } from './types'; const handleErr = (err: any) => { if (err.error && err.error.message) { From 267a2d89546580c8711302378554d3599dfa3c90 Mon Sep 17 00:00:00 2001 From: Richard Dominick <34370238+RichDom2185@users.noreply.github.com> Date: Wed, 26 Feb 2025 08:45:14 +0800 Subject: [PATCH 11/11] Commit updated ESLint config --- eslint.config.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eslint.config.js b/eslint.config.js index bd65149527..775263e5f0 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -4,8 +4,10 @@ import js from '@eslint/js'; import stylePlugin from '@stylistic/eslint-plugin'; import * as importPlugin from 'eslint-plugin-import'; import jestPlugin from 'eslint-plugin-jest'; +import reactPlugin from 'eslint-plugin-react'; import reactHooksPlugin from 'eslint-plugin-react-hooks'; import globals from 'globals'; + import tseslint from 'typescript-eslint'; import typeImportsPlugin from './scripts/dist/typeimports.js'; @@ -96,7 +98,8 @@ export default tseslint.config( // global for TSX files files: ['**/*.tsx'], plugins: { - 'react-hooks': reactHooksPlugin + 'react-hooks': reactHooksPlugin, + 'react': reactPlugin }, rules: { 'react-hooks/rules-of-hooks': 'error',