fix tests

This commit is contained in:
Rene
2022-06-10 11:52:45 +02:00
parent 35868511ff
commit a40a8802ec
6 changed files with 541 additions and 228 deletions
+2 -1
View File
@@ -8,7 +8,7 @@
"@babel/plugin-transform-runtime": "^7.18.2",
"@babel/preset-env": "^7.18.2",
"@babel/preset-typescript": "^7.17.12",
"@babel/runtime": "^7.18.2",
"@babel/runtime": "^7.18.2",
"@playwright/test": "^1.22.2",
"@rollup/plugin-alias": "^3.1.9",
"@rollup/plugin-babel": "^5.3.1",
@@ -38,6 +38,7 @@
"eslint-plugin-react-hooks": "^4.0.8",
"glob": "^7.1.6",
"jest": "^28.1.1",
"jest-environment-jsdom": "^28.1.1",
"node-sass": "^7.0.1",
"playwright": "^1.22.2",
"playwright-chromium": "^1.22.2",
@@ -192,8 +192,8 @@ export const createOverflowLifecycle = (lifecycleHub: LifecycleHub): Lifecycle =
? style(_viewport, ['overflowX', 'overflowY'])
: viewportStyleObj;
const scroll = {
x: styleObj!.overflowX === 'scroll',
y: styleObj!.overflowY === 'scroll',
x: styleObj.overflowX === 'scroll',
y: styleObj.overflowY === 'scroll',
};
const scrollbarsHideOffset = {
x:
@@ -236,13 +236,13 @@ export const createOverflowLifecycle = (lifecycleHub: LifecycleHub): Lifecycle =
): ViewportOverflowState => {
const { _visible: xVisible, _behavior: xVisibleBehavior } = setAxisOverflowStyle(
true,
overflowAmount!.w,
overflowAmount.w,
overflow.x,
viewportStyleObj
);
const { _visible: yVisible, _behavior: yVisibleBehavior } = setAxisOverflowStyle(
false,
overflowAmount!.h,
overflowAmount.h,
overflow.y,
viewportStyleObj
);
@@ -524,12 +524,12 @@ export const createOverflowLifecycle = (lifecycleHub: LifecycleHub): Lifecycle =
overflowAmuntCache = updateOverflowAmountCache(force, {
_viewportSizeFraction: viewportSizeFraction!,
_viewportScrollSize: {
w: max(viewportScrollSize!.w, arrangedViewportScrollSize.w),
h: max(viewportScrollSize!.h, arrangedViewportScrollSize.h),
w: max(viewportScrollSize.w, arrangedViewportScrollSize.w),
h: max(viewportScrollSize.h, arrangedViewportScrollSize.h),
},
_viewportClientSize: {
w: arrangedViewportClientSize.w + max(0, viewportContentSize.w - viewportScrollSize!.w),
h: arrangedViewportClientSize.h + max(0, viewportContentSize.h - viewportScrollSize!.h),
w: arrangedViewportClientSize.w + max(0, viewportContentSize.w - viewportScrollSize.w),
h: arrangedViewportClientSize.h + max(0, viewportContentSize.h - viewportScrollSize.h),
},
});
}
@@ -36,23 +36,23 @@ export const createPaddingLifecycle = (lifecycleHub: LifecycleHub): Lifecycle =>
if (paddingStyleChanged) {
// if there is no padding element and no scrollbar styling, paddingAbsolute isn't supported
const paddingRelative = !paddingAbsolute || (!_padding && !_nativeScrollbarStyling);
const paddingHorizontal = padding!.r + padding!.l;
const paddingVertical = padding!.t + padding!.b;
const paddingHorizontal = padding.r + padding.l;
const paddingVertical = padding.t + padding.b;
const paddingStyle: StyleObject = {
marginRight: paddingRelative && !directionIsRTL ? -paddingHorizontal : 0,
marginBottom: paddingRelative ? -paddingVertical : 0,
marginLeft: paddingRelative && directionIsRTL ? -paddingHorizontal : 0,
top: paddingRelative ? -padding!.t : 0,
right: paddingRelative ? (directionIsRTL ? -padding!.r : 'auto') : 0,
left: paddingRelative ? (directionIsRTL ? 'auto' : -padding!.l) : 0,
top: paddingRelative ? -padding.t : 0,
right: paddingRelative ? (directionIsRTL ? -padding.r : 'auto') : 0,
left: paddingRelative ? (directionIsRTL ? 'auto' : -padding.l) : 0,
width: paddingRelative ? `calc(100% + ${paddingHorizontal}px)` : '',
};
const viewportStyle: StyleObject = {
paddingTop: paddingRelative ? padding!.t : 0,
paddingRight: paddingRelative ? padding!.r : 0,
paddingBottom: paddingRelative ? padding!.b : 0,
paddingLeft: paddingRelative ? padding!.l : 0,
paddingTop: paddingRelative ? padding.t : 0,
paddingRight: paddingRelative ? padding.r : 0,
paddingBottom: paddingRelative ? padding.b : 0,
paddingLeft: paddingRelative ? padding.l : 0,
};
// if there is no padding element apply the style to the viewport element instead
@@ -15,21 +15,24 @@ const createUpdater = <T, C = unknown>(updaterReturn: (i: number) => T) => {
describe('cache', () => {
test('creates and updates cache', () => {
const [fn, updater] = createUpdater((i) => `${i}`);
const { _update, _current } = createCache<string>(updater);
const _initialValue = '';
const [updateCache, getCurrentCache] = createCache<string>(updater, {
_initialValue,
});
let { _value, _previous, _changed } = _update();
expect({ _value, _previous, _changed: false }).toEqual(_current());
expect(fn).toHaveBeenLastCalledWith(undefined, undefined, undefined);
expect(_value).toBe('1');
expect(_previous).toBe(undefined);
expect(_changed).toBe(true);
let [value, changed, previous] = updateCache();
expect([value, false, previous]).toEqual(getCurrentCache());
expect(fn).toHaveBeenLastCalledWith(undefined, _initialValue, undefined);
expect(value).toBe('1');
expect(previous).toBe(_initialValue);
expect(changed).toBe(true);
({ _value, _previous, _changed } = _update());
expect({ _value, _previous, _changed: false }).toEqual(_current());
expect(fn).toHaveBeenLastCalledWith(undefined, '1', undefined);
expect(_value).toBe('2');
expect(_previous).toBe('1');
expect(_changed).toBe(true);
[value, changed, previous] = updateCache();
expect([value, false, previous]).toEqual(getCurrentCache());
expect(fn).toHaveBeenLastCalledWith(undefined, '1', _initialValue);
expect(value).toBe('2');
expect(previous).toBe('1');
expect(changed).toBe(true);
});
describe('context', () => {
@@ -38,51 +41,52 @@ describe('cache', () => {
test: string;
even: number;
}
const _initialValue = false;
const updateFn = jest.fn();
const updater = (context?: ContextObj, current?: boolean, previous?: boolean) => {
updateFn(context, current, previous);
return context!.test === 'test' || context!.even % 2 === 0;
};
const { _update, _current } = createCache(updater);
const [updateCache, getCurrentCache] = createCache(updater, { _initialValue });
const firstCtx = { test: 'test', even: 2 };
let { _value, _previous, _changed } = _update(0, firstCtx);
expect({ _value, _previous, _changed: false }).toEqual(_current());
expect(updateFn).toHaveBeenLastCalledWith(firstCtx, undefined, undefined);
expect(_value).toBe(true);
expect(_previous).toBe(undefined);
expect(_changed).toBe(true);
expect({ _value, _previous, _changed: false }).toEqual(_current());
let [value, changed, previous] = updateCache(0, firstCtx);
expect([value, false, previous]).toEqual(getCurrentCache());
expect(updateFn).toHaveBeenLastCalledWith(firstCtx, _initialValue, undefined);
expect(value).toBe(true);
expect(previous).toBe(_initialValue);
expect(changed).toBe(true);
expect([value, false, previous]).toEqual(getCurrentCache());
({ _value, _previous, _changed } = _update(0, firstCtx));
expect({ _value, _previous, _changed: false }).toEqual(_current());
expect(updateFn).toHaveBeenLastCalledWith(firstCtx, true, undefined);
expect(_value).toBe(true);
expect(_previous).toBe(undefined);
expect(_changed).toBe(false);
[value, changed, previous] = updateCache(0, firstCtx);
expect([value, false, previous]).toEqual(getCurrentCache());
expect(updateFn).toHaveBeenLastCalledWith(firstCtx, true, _initialValue);
expect(value).toBe(true);
expect(previous).toBe(_initialValue);
expect(changed).toBe(false);
const scndCtx = { test: 'nah', even: 1 };
({ _value, _previous, _changed } = _update(0, scndCtx));
expect({ _value, _previous, _changed: false }).toEqual(_current());
expect(updateFn).toHaveBeenLastCalledWith(scndCtx, true, undefined);
expect(_value).toBe(false);
expect(_previous).toBe(true);
expect(_changed).toBe(true);
[value, changed, previous] = updateCache(0, scndCtx);
expect([value, false, previous]).toEqual(getCurrentCache());
expect(updateFn).toHaveBeenLastCalledWith(scndCtx, true, _initialValue);
expect(value).toBe(false);
expect(previous).toBe(true);
expect(changed).toBe(true);
({ _value, _previous, _changed } = _update(0, scndCtx));
expect({ _value, _previous, _changed: false }).toEqual(_current());
[value, changed, previous] = updateCache(0, scndCtx);
expect([value, false, previous]).toEqual(getCurrentCache());
expect(updateFn).toHaveBeenLastCalledWith(scndCtx, false, true);
expect(_value).toBe(false);
expect(_previous).toBe(true);
expect(_changed).toBe(false);
expect(value).toBe(false);
expect(previous).toBe(true);
expect(changed).toBe(false);
({ _value, _previous, _changed } = _update(true, scndCtx));
expect({ _value, _previous, _changed: false }).toEqual(_current());
[value, changed, previous] = updateCache(true, scndCtx);
expect([value, false, previous]).toEqual(getCurrentCache());
expect(updateFn).toHaveBeenLastCalledWith(scndCtx, false, true);
expect(_value).toBe(false);
expect(_previous).toBe(false);
expect(_changed).toBe(true);
expect(value).toBe(false);
expect(previous).toBe(false);
expect(changed).toBe(true);
});
test('creates and updates cache with context shorthand', () => {
@@ -90,151 +94,170 @@ describe('cache', () => {
test: string;
even: number;
}
const { _update } = createCache<ContextObj, ContextObj>(0);
const _initialValue = undefined;
const firstCtx = { test: 'test', even: 2 };
const [_update] = createCache<ContextObj | undefined, ContextObj>(0, {
_initialValue,
});
let { _value, _previous, _changed } = _update(0, firstCtx);
expect(_value).toBe(firstCtx);
expect(_previous).toBe(undefined);
expect(_changed).toBe(true);
let [value, changed, previous] = _update(0, firstCtx);
expect(value).toBe(firstCtx);
expect(previous).toBe(undefined);
expect(changed).toBe(true);
({ _value, _previous, _changed } = _update(0, firstCtx));
expect(_value).toBe(firstCtx);
expect(_previous).toBe(undefined);
expect(_changed).toBe(false);
[value, changed, previous] = _update(0, firstCtx);
expect(value).toBe(firstCtx);
expect(previous).toBe(undefined);
expect(changed).toBe(false);
const scndCtx = { test: 'nah', even: 1 };
({ _value, _previous, _changed } = _update(0, scndCtx));
expect(_value).toBe(scndCtx);
expect(_previous).toBe(firstCtx);
expect(_changed).toBe(true);
[value, changed, previous] = _update(0, scndCtx);
expect(value).toBe(scndCtx);
expect(previous).toBe(firstCtx);
expect(changed).toBe(true);
({ _value, _previous, _changed } = _update(0, scndCtx));
expect(_value).toBe(scndCtx);
expect(_previous).toBe(firstCtx);
expect(_changed).toBe(false);
[value, changed, previous] = _update(0, scndCtx);
expect(value).toBe(scndCtx);
expect(previous).toBe(firstCtx);
expect(changed).toBe(false);
({ _value, _previous, _changed } = _update(true, scndCtx));
expect(_value).toBe(scndCtx);
expect(_previous).toBe(scndCtx);
expect(_changed).toBe(true);
[value, changed, previous] = _update(true, scndCtx);
expect(value).toBe(scndCtx);
expect(previous).toBe(scndCtx);
expect(changed).toBe(true);
});
});
describe('equal', () => {
test('with equal always true', () => {
const [fn, updater] = createUpdater((i) => i);
const { _update, _current } = createCache<number>(updater, { _equal: () => true });
const [updateCache, getCurrentCache] = createCache<number | undefined>(updater, {
_initialValue: undefined,
_equal: () => true,
});
let { _value, _previous, _changed } = _update();
expect({ _value, _previous, _changed: false }).toEqual(_current());
let [value, changed, previous] = updateCache();
expect([value, false, previous]).toEqual(getCurrentCache());
expect(fn).toHaveBeenLastCalledWith(undefined, undefined, undefined);
expect(_value).toBe(undefined);
expect(_previous).toBe(undefined);
expect(_changed).toBe(false);
expect(value).toBe(undefined);
expect(previous).toBe(undefined);
expect(changed).toBe(false);
({ _value, _previous, _changed } = _update());
expect({ _value, _previous, _changed: false }).toEqual(_current());
[value, changed, previous] = updateCache();
expect([value, false, previous]).toEqual(getCurrentCache());
expect(fn).toHaveBeenLastCalledWith(undefined, undefined, undefined);
expect(_value).toBe(undefined);
expect(_previous).toBe(undefined);
expect(_changed).toBe(false);
expect(value).toBe(undefined);
expect(previous).toBe(undefined);
expect(changed).toBe(false);
});
test('with equal always false', () => {
const [fn, updater] = createUpdater(() => 1);
const { _update, _current } = createCache<number>(updater, { _equal: () => false });
const [updateCache, getCurrentCache] = createCache<number | undefined>(updater, {
_initialValue: undefined,
_equal: () => false,
});
let { _value, _previous, _changed } = _update();
expect({ _value, _previous, _changed: false }).toEqual(_current());
let [value, changed, previous] = updateCache();
expect([value, false, previous]).toEqual(getCurrentCache());
expect(fn).toHaveBeenLastCalledWith(undefined, undefined, undefined);
expect(_value).toBe(1);
expect(_previous).toBe(undefined);
expect(_changed).toBe(true);
expect(value).toBe(1);
expect(previous).toBe(undefined);
expect(changed).toBe(true);
({ _value, _previous, _changed } = _update());
expect({ _value, _previous, _changed: false }).toEqual(_current());
[value, changed, previous] = updateCache();
expect([value, false, previous]).toEqual(getCurrentCache());
expect(fn).toHaveBeenLastCalledWith(undefined, 1, undefined);
expect(_value).toBe(1);
expect(_previous).toBe(1);
expect(_changed).toBe(true);
expect(value).toBe(1);
expect(previous).toBe(1);
expect(changed).toBe(true);
});
test('with object equal', () => {
const obj = { a: -1, b: -1 };
const [fn, updater] = createUpdater((i) => ({ a: i, b: i + 1 }));
const { _update } = createCache<typeof obj>(updater, { _equal: (a, b) => a?.a === b?.a && a?.b === b?.b });
const [updateCache] = createCache<typeof obj | undefined>(updater, {
_initialValue: undefined,
_equal: (a, b) => a?.a === b?.a && a?.b === b?.b,
});
let { _value, _previous, _changed } = _update();
let [value, changed, previous] = updateCache();
expect(fn).toHaveBeenLastCalledWith(undefined, undefined, undefined);
expect(_value).toEqual({ a: 1, b: 2 });
expect(_previous).toBe(undefined);
expect(_changed).toBe(true);
expect(value).toEqual({ a: 1, b: 2 });
expect(previous).toBe(undefined);
expect(changed).toBe(true);
({ _value, _previous, _changed } = _update());
[value, changed, previous] = updateCache();
expect(fn).toHaveBeenLastCalledWith(undefined, { a: 1, b: 2 }, undefined);
expect(_value).toEqual({ a: 2, b: 3 });
expect(_previous).toEqual({ a: 1, b: 2 });
expect(_changed).toBe(true);
expect(value).toEqual({ a: 2, b: 3 });
expect(previous).toEqual({ a: 1, b: 2 });
expect(changed).toBe(true);
});
});
describe('inital value', () => {
test('creates and updates cache with initialValue', () => {
const [fn, updater] = createUpdater((i) => i);
const { _update, _current } = createCache<number>(updater, { _initialValue: 0 });
const [updateCache, getCurrentCache] = createCache<number>(updater, { _initialValue: 0 });
let { _value, _previous, _changed } = _update();
expect({ _value, _previous, _changed: false }).toEqual(_current());
let [value, changed, previous] = updateCache();
expect([value, false, previous]).toEqual(getCurrentCache());
expect(fn).toHaveBeenLastCalledWith(undefined, 0, undefined);
expect(_value).toBe(1);
expect(_previous).toBe(0);
expect(_changed).toBe(true);
expect(value).toBe(1);
expect(previous).toBe(0);
expect(changed).toBe(true);
({ _value, _previous, _changed } = _update());
expect({ _value, _previous, _changed: false }).toEqual(_current());
[value, changed, previous] = updateCache();
expect([value, false, previous]).toEqual(getCurrentCache());
expect(fn).toHaveBeenLastCalledWith(undefined, 1, 0);
expect(_value).toBe(2);
expect(_previous).toBe(1);
expect(_changed).toBe(true);
expect(value).toBe(2);
expect(previous).toBe(1);
expect(changed).toBe(true);
});
test('creates and updates cache with initialValue and equal', () => {
const obj = { a: -1, b: -1 };
const [fn, updater] = createUpdater((i) => ({ a: i, b: i + 1 }));
const { _update } = createCache<typeof obj>(updater, { _initialValue: obj, _equal: (a, b) => a?.a === b?.a && a?.b === b?.b });
const [updateCache] = createCache<typeof obj>(updater, {
_initialValue: obj,
_equal: (a, b) => a?.a === b?.a && a?.b === b?.b,
});
let { _value, _previous, _changed } = _update();
let [value, changed, previous] = updateCache();
expect(fn).toHaveBeenLastCalledWith(undefined, obj, undefined);
expect(_value).toEqual({ a: 1, b: 2 });
expect(_previous).toBe(obj);
expect(_changed).toBe(true);
expect(value).toEqual({ a: 1, b: 2 });
expect(previous).toBe(obj);
expect(changed).toBe(true);
({ _value, _previous, _changed } = _update());
[value, changed, previous] = updateCache();
expect(fn).toHaveBeenLastCalledWith(undefined, { a: 1, b: 2 }, obj);
expect(_value).toEqual({ a: 2, b: 3 });
expect(_previous).toEqual({ a: 1, b: 2 });
expect(_changed).toBe(true);
expect(value).toEqual({ a: 2, b: 3 });
expect(previous).toEqual({ a: 1, b: 2 });
expect(changed).toBe(true);
});
});
describe('always update values', () => {
test('creates and updates cache with alwaysUpdateValues and equal always true', () => {
const [fn, updater] = createUpdater((i) => i);
const { _update } = createCache<number>(updater, { _alwaysUpdateValues: true, _equal: () => true });
const [updateCache] = createCache<number | undefined>(updater, {
_initialValue: undefined,
_alwaysUpdateValues: true,
_equal: () => true,
});
let { _value, _previous, _changed } = _update();
let [value, changed, previous] = updateCache();
expect(fn).toHaveBeenLastCalledWith(undefined, undefined, undefined);
expect(_value).toBe(1);
expect(_previous).toBe(undefined);
expect(_changed).toBe(false);
expect(value).toBe(1);
expect(previous).toBe(undefined);
expect(changed).toBe(false);
({ _value, _previous, _changed } = _update());
[value, changed, previous] = updateCache();
expect(fn).toHaveBeenLastCalledWith(undefined, 1, undefined);
expect(_value).toBe(2);
expect(_previous).toBe(1);
expect(_changed).toBe(false);
expect(value).toBe(2);
expect(previous).toBe(1);
expect(changed).toBe(false);
});
test('creates and updates cache with context shorthand and alwaysUpdateValues', () => {
@@ -242,112 +265,119 @@ describe('cache', () => {
test: string;
even: number;
}
const { _update, _current } = createCache<ContextObj, ContextObj>(0, { _alwaysUpdateValues: true });
const [updateCache, getCurrentCache] = createCache<ContextObj | undefined, ContextObj>(0, {
_initialValue: undefined,
_alwaysUpdateValues: true,
});
const firstCtx = { test: 'test', even: 2 };
let { _value, _previous, _changed } = _update(0, firstCtx);
expect({ _value, _previous, _changed: false }).toEqual(_current());
expect(_value).toBe(firstCtx);
expect(_previous).toBe(undefined);
expect(_changed).toBe(true);
let [value, changed, previous] = updateCache(0, firstCtx);
expect([value, false, previous]).toEqual(getCurrentCache());
expect(value).toBe(firstCtx);
expect(previous).toBe(undefined);
expect(changed).toBe(true);
({ _value, _previous, _changed } = _update(0, firstCtx));
expect({ _value, _previous, _changed: false }).toEqual(_current());
expect(_value).toBe(firstCtx);
expect(_previous).toBe(firstCtx);
expect(_changed).toBe(false);
[value, changed, previous] = updateCache(0, firstCtx);
expect([value, false, previous]).toEqual(getCurrentCache());
expect(value).toBe(firstCtx);
expect(previous).toBe(firstCtx);
expect(changed).toBe(false);
const scndCtx = { test: 'nah', even: 1 };
({ _value, _previous, _changed } = _update(0, scndCtx));
expect({ _value, _previous, _changed: false }).toEqual(_current());
expect(_value).toBe(scndCtx);
expect(_previous).toBe(firstCtx);
expect(_changed).toBe(true);
[value, changed, previous] = updateCache(0, scndCtx);
expect([value, false, previous]).toEqual(getCurrentCache());
expect(value).toBe(scndCtx);
expect(previous).toBe(firstCtx);
expect(changed).toBe(true);
({ _value, _previous, _changed } = _update(0, scndCtx));
expect({ _value, _previous, _changed: false }).toEqual(_current());
expect(_value).toBe(scndCtx);
expect(_previous).toBe(scndCtx);
expect(_changed).toBe(false);
[value, changed, previous] = updateCache(0, scndCtx);
expect([value, false, previous]).toEqual(getCurrentCache());
expect(value).toBe(scndCtx);
expect(previous).toBe(scndCtx);
expect(changed).toBe(false);
({ _value, _previous, _changed } = _update(true, scndCtx));
expect({ _value, _previous, _changed: false }).toEqual(_current());
expect(_value).toBe(scndCtx);
expect(_previous).toBe(scndCtx);
expect(_changed).toBe(true);
[value, changed, previous] = updateCache(true, scndCtx);
expect([value, false, previous]).toEqual(getCurrentCache());
expect(value).toBe(scndCtx);
expect(previous).toBe(scndCtx);
expect(changed).toBe(true);
});
});
describe('constant', () => {
test('updates constant initially without intial value', () => {
const [fn, updater] = createUpdater(() => true);
const { _update, _current } = createCache<boolean>(updater);
const [updateCache, getCurrentCache] = createCache<boolean | undefined>(updater, {
_initialValue: undefined,
});
let { _value, _previous, _changed } = _update();
expect({ _value, _previous, _changed: false }).toEqual(_current());
let [value, changed, previous] = updateCache();
expect([value, false, previous]).toEqual(getCurrentCache());
expect(fn).toHaveBeenLastCalledWith(undefined, undefined, undefined);
expect(_value).toBe(true);
expect(_previous).toBe(undefined);
expect(_changed).toBe(true);
expect(value).toBe(true);
expect(previous).toBe(undefined);
expect(changed).toBe(true);
({ _value, _previous, _changed } = _update());
expect({ _value, _previous, _changed: false }).toEqual(_current());
[value, changed, previous] = updateCache();
expect([value, false, previous]).toEqual(getCurrentCache());
expect(fn).toHaveBeenLastCalledWith(undefined, true, undefined);
expect(_value).toBe(true);
expect(_previous).toBe(undefined);
expect(_changed).toBe(false);
expect(value).toBe(true);
expect(previous).toBe(undefined);
expect(changed).toBe(false);
});
test('doesnt update constant with initial value', () => {
const obj = { constant: true };
const [fn, updater] = createUpdater(() => obj);
const { _update } = createCache<typeof obj>(updater, { _initialValue: obj });
const [updateCache] = createCache<typeof obj>(updater, { _initialValue: obj });
let { _value, _previous, _changed } = _update();
let [value, changed, previous] = updateCache();
expect(fn).toHaveBeenLastCalledWith(undefined, obj, undefined);
expect(_value).toBe(obj);
expect(_previous).toBe(undefined);
expect(_changed).toBe(false);
expect(value).toBe(obj);
expect(previous).toBe(undefined);
expect(changed).toBe(false);
({ _value, _previous, _changed } = _update());
[value, changed, previous] = updateCache();
expect(fn).toHaveBeenLastCalledWith(undefined, obj, undefined);
expect(_value).toBe(obj);
expect(_previous).toBe(undefined);
expect(_changed).toBe(false);
expect(value).toBe(obj);
expect(previous).toBe(undefined);
expect(changed).toBe(false);
});
test('updates constant with force', () => {
const [fn, updater] = createUpdater(() => 'constant');
const { _update, _current } = createCache<string>(updater);
const [updateCache, getCurrentCache] = createCache<string | undefined>(updater, {
_initialValue: undefined,
});
let { _value, _previous, _changed } = _update();
expect({ _value, _previous, _changed: false }).toEqual(_current());
let [value, changed, previous] = updateCache();
expect([value, false, previous]).toEqual(getCurrentCache());
expect(fn).toHaveBeenLastCalledWith(undefined, undefined, undefined);
expect(_value).toBe('constant');
expect(_previous).toBe(undefined);
expect(_changed).toBe(true);
expect(value).toBe('constant');
expect(previous).toBe(undefined);
expect(changed).toBe(true);
({ _value, _previous, _changed } = _update(true));
expect({ _value, _previous, _changed: false }).toEqual(_current());
[value, changed, previous] = updateCache(true);
expect([value, false, previous]).toEqual(getCurrentCache());
expect(fn).toHaveBeenLastCalledWith(undefined, 'constant', undefined);
expect(_value).toBe('constant');
expect(_previous).toBe('constant');
expect(_changed).toBe(true);
expect(value).toBe('constant');
expect(previous).toBe('constant');
expect(changed).toBe(true);
({ _value, _previous, _changed } = _update(false));
expect({ _value, _previous, _changed: false }).toEqual(_current());
[value, changed, previous] = updateCache(false);
expect([value, false, previous]).toEqual(getCurrentCache());
expect(fn).toHaveBeenLastCalledWith(undefined, 'constant', 'constant');
expect(_value).toBe('constant');
expect(_previous).toBe('constant');
expect(_changed).toBe(false);
expect(value).toBe('constant');
expect(previous).toBe('constant');
expect(changed).toBe(false);
({ _value, _previous, _changed } = _update());
expect({ _value, _previous, _changed: false }).toEqual(_current());
[value, changed, previous] = updateCache();
expect([value, false, previous]).toEqual(getCurrentCache());
expect(fn).toHaveBeenLastCalledWith(undefined, 'constant', 'constant');
expect(_value).toBe('constant');
expect(_previous).toBe('constant');
expect(_changed).toBe(false);
expect(value).toBe('constant');
expect(previous).toBe('constant');
expect(changed).toBe(false);
});
});
});
@@ -1,14 +1,12 @@
import 'jest-playwright-preset';
import 'expect-playwright';
// @ts-ignore
import { playwrightRollup } from '@/playwright/rollup';
import { test } from '@playwright/test';
import { Environment } from 'environment';
import url from './.build/build.html';
describe('Environment', () => {
beforeAll(async () => {
await page.goto(url);
});
playwrightRollup();
test('page should be titled "Environment"', async () => {
test.describe('Environment', () => {
test('page should be titled "Environment"', async ({ page }) => {
// @ts-ignore
const a: Environment = await page.evaluate(() => window.environment.envInstance);
console.log(a);
+295 -11
View File
@@ -1676,6 +1676,11 @@
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82"
integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==
"@tootallnate/once@2":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf"
integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==
"@types/aria-query@^4.2.0":
version "4.2.0"
resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-4.2.0.tgz#14264692a9d6e2fa4db3df5e56e94b5e25647ac0"
@@ -1783,6 +1788,15 @@
jest-diff "^26.0.0"
pretty-format "^26.0.0"
"@types/jsdom@^16.2.4":
version "16.2.14"
resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-16.2.14.tgz#26fe9da6a8870715b154bb84cd3b2e53433d8720"
integrity sha512-6BAy1xXEmMuHeAJ4Fv4yXKwBDTGTOseExKE3OaHiNycdHdZw59KfYzrt0DkDluvwmik1HRt6QS7bImxUmpSy+w==
dependencies:
"@types/node" "*"
"@types/parse5" "*"
"@types/tough-cookie" "*"
"@types/json-schema@^7.0.3":
version "7.0.6"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0"
@@ -1833,6 +1847,11 @@
resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0"
integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==
"@types/parse5@*":
version "6.0.3"
resolved "https://registry.yarnpkg.com/@types/parse5/-/parse5-6.0.3.tgz#705bb349e789efa06f43f128cef51240753424cb"
integrity sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==
"@types/prettier@^2.1.5":
version "2.3.2"
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.3.2.tgz#fc8c2825e4ed2142473b4a81064e6e081463d1b3"
@@ -1860,6 +1879,11 @@
resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.0.tgz#7036640b4e21cc2f259ae826ce843d277dad8cff"
integrity sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw==
"@types/tough-cookie@*":
version "4.0.2"
resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.2.tgz#6286b4c7228d58ab7866d19716f3696e03a09397"
integrity sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==
"@types/ua-parser-js@^0.7.36":
version "0.7.36"
resolved "https://registry.yarnpkg.com/@types/ua-parser-js/-/ua-parser-js-0.7.36.tgz#9bd0b47f26b5a3151be21ba4ce9f5fa457c5f190"
@@ -1995,21 +2019,44 @@
resolved "https://registry.yarnpkg.com/@wessberg/stringutil/-/stringutil-1.0.19.tgz#baadcb6f4471fe2d46462a7d7a8294e4b45b29ad"
integrity sha512-9AZHVXWlpN8Cn9k5BC/O0Dzb9E9xfEMXzYrNunwvkUTvuK7xgQPVRZpLo+jWCOZ5r8oBa8NIrHuPEu1hzbb6bg==
abab@^2.0.5, abab@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291"
integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==
abbrev@1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
acorn-globals@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45"
integrity sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==
dependencies:
acorn "^7.1.1"
acorn-walk "^7.1.1"
acorn-jsx@^5.2.0:
version "5.3.1"
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b"
integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==
acorn-walk@^7.1.1:
version "7.2.0"
resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc"
integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==
acorn@^7.1.1, acorn@^7.4.0:
version "7.4.0"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.0.tgz#e1ad486e6c54501634c6c397c5c121daa383607c"
integrity sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w==
acorn@^8.5.0:
version "8.7.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30"
integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==
agent-base@6, agent-base@^6.0.2:
version "6.0.2"
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77"
@@ -2399,6 +2446,11 @@ braces@^3.0.1, braces@~3.0.2:
dependencies:
fill-range "^7.0.1"
browser-process-hrtime@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626"
integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==
browserslist-generator@^1.0.66:
version "1.0.66"
resolved "https://registry.yarnpkg.com/browserslist-generator/-/browserslist-generator-1.0.66.tgz#14f3f2cbf09e9a82e7c53a62f8cc18ce6c35eca3"
@@ -2780,7 +2832,7 @@ colorette@^1.2.2:
resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94"
integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==
combined-stream@^1.0.6, combined-stream@~1.0.6:
combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6:
version "1.0.8"
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
@@ -3036,6 +3088,23 @@ csso@^4.0.2:
dependencies:
css-tree "1.0.0-alpha.39"
cssom@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.5.0.tgz#d254fa92cd8b6fbd83811b9fbaed34663cc17c36"
integrity sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==
cssom@~0.3.6:
version "0.3.8"
resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a"
integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==
cssstyle@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852"
integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==
dependencies:
cssom "~0.3.6"
damerau-levenshtein@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.6.tgz#143c1641cb3d85c60c32329e26899adea8701791"
@@ -3048,6 +3117,15 @@ dashdash@^1.12.0:
dependencies:
assert-plus "^1.0.0"
data-urls@^3.0.1:
version "3.0.2"
resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-3.0.2.tgz#9cf24a477ae22bcef5cd5f6f0bfbc1d2d3be9143"
integrity sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==
dependencies:
abab "^2.0.6"
whatwg-mimetype "^3.0.0"
whatwg-url "^11.0.0"
debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
@@ -3089,6 +3167,11 @@ decamelize@^1.1.0, decamelize@^1.2.0:
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=
decimal.js@^10.3.1:
version "10.3.1"
resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.3.1.tgz#d8c3a444a9c6774ba60ca6ad7261c3a94fd5e783"
integrity sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==
decompress-response@^4.2.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-4.2.1.tgz#414023cc7a302da25ce2ec82d0d5238ccafd8986"
@@ -3224,6 +3307,13 @@ domelementtype@^2.0.1:
resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.0.1.tgz#1f8bdfe91f5a78063274e803b4bdcedf6e94f94d"
integrity sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==
domexception@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/domexception/-/domexception-4.0.0.tgz#4ad1be56ccadc86fc76d033353999a8037d03673"
integrity sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==
dependencies:
webidl-conversions "^7.0.0"
domutils@^1.7.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a"
@@ -3518,6 +3608,18 @@ escape-string-regexp@^2.0.0:
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344"
integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==
escodegen@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd"
integrity sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==
dependencies:
esprima "^4.0.1"
estraverse "^5.2.0"
esutils "^2.0.2"
optionator "^0.8.1"
optionalDependencies:
source-map "~0.6.1"
eslint-config-airbnb-base@^14.2.0:
version "14.2.0"
resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.0.tgz#fe89c24b3f9dc8008c9c0d0d88c28f95ed65e9c4"
@@ -3790,7 +3892,7 @@ espree@^7.3.0:
acorn-jsx "^5.2.0"
eslint-visitor-keys "^1.3.0"
esprima@^4.0.0:
esprima@^4.0.0, esprima@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
@@ -4006,6 +4108,15 @@ forever-agent@~0.6.1:
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
form-data@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452"
integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.8"
mime-types "^2.1.12"
form-data@~2.3.2:
version "2.3.3"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
@@ -4328,6 +4439,13 @@ html-comment-regex@^1.1.0:
resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.2.tgz#97d4688aeb5c81886a364faa0cad1dda14d433a7"
integrity sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==
html-encoding-sniffer@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz#2cb1a8cf0db52414776e5b2a7a04d5dd98158de9"
integrity sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==
dependencies:
whatwg-encoding "^2.0.0"
html-escaper@^2.0.0:
version "2.0.2"
resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453"
@@ -4347,6 +4465,15 @@ http-proxy-agent@^4.0.1:
agent-base "6"
debug "4"
http-proxy-agent@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43"
integrity sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==
dependencies:
"@tootallnate/once" "2"
agent-base "6"
debug "4"
http-signature@~1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
@@ -4376,6 +4503,13 @@ humanize-ms@^1.2.1:
dependencies:
ms "^2.0.0"
iconv-lite@0.6.3, iconv-lite@^0.6.2:
version "0.6.3"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501"
integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==
dependencies:
safer-buffer ">= 2.1.2 < 3.0.0"
iconv-lite@^0.4.24:
version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
@@ -4383,13 +4517,6 @@ iconv-lite@^0.4.24:
dependencies:
safer-buffer ">= 2.1.2 < 3"
iconv-lite@^0.6.2:
version "0.6.3"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501"
integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==
dependencies:
safer-buffer ">= 2.1.2 < 3.0.0"
icss-utils@^4.0.0, icss-utils@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-4.1.1.tgz#21170b53789ee27447c2f47dd683081403f9a467"
@@ -4648,6 +4775,11 @@ is-plain-obj@^1.1.0:
resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"
integrity sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==
is-potential-custom-element-name@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5"
integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==
is-reference@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7"
@@ -4880,6 +5012,20 @@ jest-each@^28.1.1:
jest-util "^28.1.1"
pretty-format "^28.1.1"
jest-environment-jsdom@^28.1.1:
version "28.1.1"
resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-28.1.1.tgz#8bd721915b32f9b196723292c4461a0ad548b55b"
integrity sha512-41ZvgSoPNcKG5q3LuuOcAczdBxRq9DbZkPe24okN6ZCmiZdAfFtPg3z+lOtsT1fM6OAERApKT+3m0MRDQH2zIA==
dependencies:
"@jest/environment" "^28.1.1"
"@jest/fake-timers" "^28.1.1"
"@jest/types" "^28.1.1"
"@types/jsdom" "^16.2.4"
"@types/node" "*"
jest-mock "^28.1.1"
jest-util "^28.1.1"
jsdom "^19.0.0"
jest-environment-node@^28.1.1:
version "28.1.1"
resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-28.1.1.tgz#1c86c59003a7d319fa06ea3b1bbda6c193715c67"
@@ -5173,6 +5319,39 @@ jsbn@~0.1.0:
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM=
jsdom@^19.0.0:
version "19.0.0"
resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-19.0.0.tgz#93e67c149fe26816d38a849ea30ac93677e16b6a"
integrity sha512-RYAyjCbxy/vri/CfnjUWJQQtZ3LKlLnDqj+9XLNnJPgEGeirZs3hllKR20re8LUZ6o1b1X4Jat+Qd26zmP41+A==
dependencies:
abab "^2.0.5"
acorn "^8.5.0"
acorn-globals "^6.0.0"
cssom "^0.5.0"
cssstyle "^2.3.0"
data-urls "^3.0.1"
decimal.js "^10.3.1"
domexception "^4.0.0"
escodegen "^2.0.0"
form-data "^4.0.0"
html-encoding-sniffer "^3.0.0"
http-proxy-agent "^5.0.0"
https-proxy-agent "^5.0.0"
is-potential-custom-element-name "^1.0.1"
nwsapi "^2.2.0"
parse5 "6.0.1"
saxes "^5.0.1"
symbol-tree "^3.2.4"
tough-cookie "^4.0.0"
w3c-hr-time "^1.0.2"
w3c-xmlserializer "^3.0.0"
webidl-conversions "^7.0.0"
whatwg-encoding "^2.0.0"
whatwg-mimetype "^3.0.0"
whatwg-url "^10.0.0"
ws "^8.2.3"
xml-name-validator "^4.0.0"
jsesc@^2.5.1:
version "2.5.2"
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4"
@@ -5855,6 +6034,11 @@ number-is-nan@^1.0.0:
resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=
nwsapi@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7"
integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==
oauth-sign@~0.9.0:
version "0.9.0"
resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455"
@@ -5946,7 +6130,7 @@ opener@1:
resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598"
integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==
optionator@^0.8.3:
optionator@^0.8.1, optionator@^0.8.3:
version "0.8.3"
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495"
integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==
@@ -6097,6 +6281,11 @@ parse-json@^5.2.0:
json-parse-even-better-errors "^2.3.0"
lines-and-columns "^1.1.6"
parse5@6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b"
integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==
path-exists@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515"
@@ -6665,7 +6854,7 @@ prop-types@^15.7.2:
object-assign "^4.1.1"
react-is "^16.8.1"
psl@^1.1.28:
psl@^1.1.28, psl@^1.1.33:
version "1.8.0"
resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24"
integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==
@@ -7153,6 +7342,13 @@ sax@~1.2.4:
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
saxes@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d"
integrity sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==
dependencies:
xmlchars "^2.2.0"
scss-tokenizer@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.3.0.tgz#ef7edc3bc438b25cd6ffacf1aa5b9ad5813bf260"
@@ -7698,6 +7894,11 @@ svgo@^1.0.0:
unquote "~1.1.1"
util.promisify "~1.0.0"
symbol-tree@^3.2.4:
version "3.2.4"
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2"
integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==
table@^5.2.3:
version "5.4.6"
resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e"
@@ -7802,6 +8003,15 @@ to-regex-range@^5.0.1:
dependencies:
is-number "^7.0.0"
tough-cookie@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.0.0.tgz#d822234eeca882f991f0f908824ad2622ddbece4"
integrity sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==
dependencies:
psl "^1.1.33"
punycode "^2.1.1"
universalify "^0.1.2"
tough-cookie@~2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2"
@@ -7810,6 +8020,13 @@ tough-cookie@~2.5.0:
psl "^1.1.28"
punycode "^2.1.1"
tr46@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/tr46/-/tr46-3.0.0.tgz#555c4e297a950617e8eeddef633c87d4d9d6cbf9"
integrity sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==
dependencies:
punycode "^2.1.1"
trim-newlines@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144"
@@ -8009,6 +8226,11 @@ unique-slug@^2.0.0:
dependencies:
imurmurhash "^0.1.4"
universalify@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==
universalify@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d"
@@ -8144,6 +8366,20 @@ vue-eslint-parser@~7.1.0:
esquery "^1.0.1"
lodash "^4.17.15"
w3c-hr-time@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd"
integrity sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==
dependencies:
browser-process-hrtime "^1.0.0"
w3c-xmlserializer@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-3.0.0.tgz#06cdc3eefb7e4d0b20a560a5a3aeb0d2d9a65923"
integrity sha512-3WFqGEgSXIyGhOmAFtlicJNMjEps8b1MG31NCA0/vOF9+nKMUW1ckhi9cnNHmf88Rzw5V+dwIwsm2C7X8k9aQg==
dependencies:
xml-name-validator "^4.0.0"
walker@^1.0.8:
version "1.0.8"
resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f"
@@ -8151,6 +8387,39 @@ walker@^1.0.8:
dependencies:
makeerror "1.0.12"
webidl-conversions@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a"
integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==
whatwg-encoding@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz#e7635f597fd87020858626805a2729fa7698ac53"
integrity sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==
dependencies:
iconv-lite "0.6.3"
whatwg-mimetype@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz#5fa1a7623867ff1af6ca3dc72ad6b8a4208beba7"
integrity sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==
whatwg-url@^10.0.0:
version "10.0.0"
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-10.0.0.tgz#37264f720b575b4a311bd4094ed8c760caaa05da"
integrity sha512-CLxxCmdUby142H5FZzn4D8ikO1cmypvXVQktsgosNy4a4BHrDHeciBBGZhb0bNoR5/MltoCatso+vFjjGx8t0w==
dependencies:
tr46 "^3.0.0"
webidl-conversions "^7.0.0"
whatwg-url@^11.0.0:
version "11.0.0"
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-11.0.0.tgz#0a849eebb5faf2119b901bb76fd795c2848d4018"
integrity sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==
dependencies:
tr46 "^3.0.0"
webidl-conversions "^7.0.0"
which@^1.2.9:
version "1.3.1"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
@@ -8220,6 +8489,21 @@ ws@^6.2.1:
dependencies:
async-limiter "~1.0.0"
ws@^8.2.3:
version "8.8.0"
resolved "https://registry.yarnpkg.com/ws/-/ws-8.8.0.tgz#8e71c75e2f6348dbf8d78005107297056cb77769"
integrity sha512-JDAgSYQ1ksuwqfChJusw1LSJ8BizJ2e/vVu5Lxjq3YvNJNlROv1ui4i+c/kUUrPheBvQl4c5UbERhTwKa6QBJQ==
xml-name-validator@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz#79a006e2e63149a8600f15430f0a4725d1524835"
integrity sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==
xmlchars@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb"
integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==
y18n@^5.0.5:
version "5.0.8"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"