@jetbrains/ring-ui 7.0.95 → 7.0.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/auth/auth-core.d.ts +13 -1
- package/components/auth/auth-core.js +73 -42
- package/components/avatar/avatar.js +1 -1
- package/components/list/list-item.js +1 -1
- package/components/list/list.d.ts +1 -2
- package/components/list/list.js +16 -14
- package/components/tabs/collapsible-tabs.js +1 -3
- package/package.json +32 -25
|
@@ -8,6 +8,7 @@ import TokenValidator, { type TokenValidationError, type TokenValidatorConfig }
|
|
|
8
8
|
import type AuthDialogService from '../auth-dialog-service/auth-dialog-service';
|
|
9
9
|
export declare const DEFAULT_EXPIRES_TIMEOUT: number;
|
|
10
10
|
export declare const DEFAULT_BACKGROUND_TIMEOUT: number;
|
|
11
|
+
export declare const TOKEN_REFRESH_RETRY_DELAYS: number[];
|
|
11
12
|
export declare const USER_CHANGED_EVENT = "userChange";
|
|
12
13
|
export declare const DOMAIN_USER_CHANGED_EVENT = "domainUser";
|
|
13
14
|
export declare const LOGOUT_EVENT = "logout";
|
|
@@ -80,6 +81,7 @@ export interface AuthConfig extends TokenValidatorConfig {
|
|
|
80
81
|
translations?: AuthTranslations | null | undefined;
|
|
81
82
|
userParams?: RequestParams | undefined;
|
|
82
83
|
waitForRedirectTimeout: number;
|
|
84
|
+
tokenRefreshRetryDelays: readonly number[];
|
|
83
85
|
rpInitiatedLogout: boolean;
|
|
84
86
|
}
|
|
85
87
|
type AuthPayloadMap = {
|
|
@@ -139,6 +141,7 @@ declare class Auth implements HTTPAuth {
|
|
|
139
141
|
_tokenValidator: TokenValidator | null;
|
|
140
142
|
private _postponed;
|
|
141
143
|
private _backendCheckPromise;
|
|
144
|
+
private _forceTokenUpdatePromise;
|
|
142
145
|
private _authDialogService;
|
|
143
146
|
_domainStorage: AuthStorage<UserChange>;
|
|
144
147
|
user: AuthUser | null;
|
|
@@ -168,9 +171,18 @@ declare class Auth implements HTTPAuth {
|
|
|
168
171
|
requestToken(): Promise<string | null>;
|
|
169
172
|
/**
|
|
170
173
|
* Get new token in the background or redirect to the login page.
|
|
171
|
-
*
|
|
174
|
+
*
|
|
175
|
+
* Retries background token refresh with delays from {@link AuthConfig.tokenRefreshRetryDelays}
|
|
176
|
+
* with increasing delays before showing the auth dialog.
|
|
177
|
+
* This handles transient failures that commonly occur after network
|
|
178
|
+
* recovery (e.g. waking from sleep, switching networks) where the first
|
|
179
|
+
* iframe-based auth attempt fails but a subsequent one succeeds once
|
|
180
|
+
* the Hub session is re-established.
|
|
181
|
+
*
|
|
182
|
+
* @return {Promise.<string | null>}
|
|
172
183
|
*/
|
|
173
184
|
forceTokenUpdate(): Promise<string | null>;
|
|
185
|
+
private _doForceTokenUpdate;
|
|
174
186
|
loadCurrentService(): Promise<void>;
|
|
175
187
|
getAPIPath(): string;
|
|
176
188
|
/**
|
|
@@ -15,6 +15,7 @@ export const DEFAULT_BACKGROUND_TIMEOUT = 10 * 1000;
|
|
|
15
15
|
const DEFAULT_BACKEND_CHECK_TIMEOUT = 10 * 1000;
|
|
16
16
|
const BACKGROUND_REDIRECT_TIMEOUT = 20 * 1000;
|
|
17
17
|
const DEFAULT_WAIT_FOR_REDIRECT_TIMEOUT = 5 * 1000;
|
|
18
|
+
export const TOKEN_REFRESH_RETRY_DELAYS = [0, 2000, 5000];
|
|
18
19
|
export const USER_CHANGED_EVENT = 'userChange';
|
|
19
20
|
export const DOMAIN_USER_CHANGED_EVENT = 'domainUser';
|
|
20
21
|
export const LOGOUT_EVENT = 'logout';
|
|
@@ -43,6 +44,7 @@ const DEFAULT_CONFIG = {
|
|
|
43
44
|
onBackendDown: () => () => { },
|
|
44
45
|
defaultExpiresIn: DEFAULT_EXPIRES_TIMEOUT,
|
|
45
46
|
waitForRedirectTimeout: DEFAULT_WAIT_FOR_REDIRECT_TIMEOUT,
|
|
47
|
+
tokenRefreshRetryDelays: TOKEN_REFRESH_RETRY_DELAYS,
|
|
46
48
|
rpInitiatedLogout: true,
|
|
47
49
|
translations: null,
|
|
48
50
|
};
|
|
@@ -68,6 +70,7 @@ class Auth {
|
|
|
68
70
|
_tokenValidator = null;
|
|
69
71
|
_postponed = false;
|
|
70
72
|
_backendCheckPromise = null;
|
|
73
|
+
_forceTokenUpdatePromise = null;
|
|
71
74
|
_authDialogService = undefined;
|
|
72
75
|
_domainStorage;
|
|
73
76
|
user = null;
|
|
@@ -208,6 +211,8 @@ class Auth {
|
|
|
208
211
|
throw error;
|
|
209
212
|
}
|
|
210
213
|
if (this._canShowDialogs()) {
|
|
214
|
+
// eslint-disable-next-line no-console
|
|
215
|
+
console.error('RingUI Auth: Init failure', error);
|
|
211
216
|
this._showAuthDialog({ nonInteractive: true, error });
|
|
212
217
|
}
|
|
213
218
|
}
|
|
@@ -221,7 +226,7 @@ class Auth {
|
|
|
221
226
|
if (this.user && userID === this.user.id) {
|
|
222
227
|
return;
|
|
223
228
|
}
|
|
224
|
-
this.forceTokenUpdate();
|
|
229
|
+
this.forceTokenUpdate().catch(noop);
|
|
225
230
|
});
|
|
226
231
|
let state;
|
|
227
232
|
try {
|
|
@@ -243,7 +248,7 @@ class Auth {
|
|
|
243
248
|
if (message) {
|
|
244
249
|
const { userID, serviceID } = message;
|
|
245
250
|
if (serviceID !== this.config.clientId && (!userID || this.user?.id !== userID)) {
|
|
246
|
-
this.forceTokenUpdate();
|
|
251
|
+
this.forceTokenUpdate().catch(noop);
|
|
247
252
|
}
|
|
248
253
|
}
|
|
249
254
|
// Access token appears to be valid.
|
|
@@ -341,9 +346,26 @@ class Auth {
|
|
|
341
346
|
}
|
|
342
347
|
/**
|
|
343
348
|
* Get new token in the background or redirect to the login page.
|
|
344
|
-
*
|
|
349
|
+
*
|
|
350
|
+
* Retries background token refresh with delays from {@link AuthConfig.tokenRefreshRetryDelays}
|
|
351
|
+
* with increasing delays before showing the auth dialog.
|
|
352
|
+
* This handles transient failures that commonly occur after network
|
|
353
|
+
* recovery (e.g. waking from sleep, switching networks) where the first
|
|
354
|
+
* iframe-based auth attempt fails but a subsequent one succeeds once
|
|
355
|
+
* the Hub session is re-established.
|
|
356
|
+
*
|
|
357
|
+
* @return {Promise.<string | null>}
|
|
345
358
|
*/
|
|
346
|
-
|
|
359
|
+
forceTokenUpdate() {
|
|
360
|
+
if (this._forceTokenUpdatePromise) {
|
|
361
|
+
return this._forceTokenUpdatePromise;
|
|
362
|
+
}
|
|
363
|
+
this._forceTokenUpdatePromise = this._doForceTokenUpdate().finally(() => {
|
|
364
|
+
this._forceTokenUpdatePromise = null;
|
|
365
|
+
});
|
|
366
|
+
return this._forceTokenUpdatePromise;
|
|
367
|
+
}
|
|
368
|
+
async _doForceTokenUpdate() {
|
|
347
369
|
try {
|
|
348
370
|
if (!this._backendCheckPromise) {
|
|
349
371
|
this._backendCheckPromise = this._checkBackendsStatusesIfEnabled();
|
|
@@ -351,49 +373,53 @@ class Auth {
|
|
|
351
373
|
await this._backendCheckPromise;
|
|
352
374
|
}
|
|
353
375
|
catch (e) {
|
|
354
|
-
throw new Error('Cannot refresh token: backend is not available. Postponed by user.');
|
|
376
|
+
throw new Error('Cannot refresh token: backend is not available. Postponed by user.', { cause: e });
|
|
355
377
|
}
|
|
356
378
|
finally {
|
|
357
379
|
this._backendCheckPromise = null;
|
|
358
380
|
}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
if (!(error instanceof Error)) {
|
|
364
|
-
return null;
|
|
381
|
+
let lastError = null;
|
|
382
|
+
for (const delay of this.config.tokenRefreshRetryDelays) {
|
|
383
|
+
if (delay > 0) {
|
|
384
|
+
await new Promise(resolve => setTimeout(resolve, delay));
|
|
365
385
|
}
|
|
366
|
-
|
|
367
|
-
return
|
|
368
|
-
const onTryAgain = async () => {
|
|
369
|
-
try {
|
|
370
|
-
const result = await this._backgroundFlow?.authorize();
|
|
371
|
-
resolve(result ?? null);
|
|
372
|
-
}
|
|
373
|
-
catch (retryError) {
|
|
374
|
-
if (retryError instanceof Error) {
|
|
375
|
-
this._showAuthDialog({
|
|
376
|
-
nonInteractive: true,
|
|
377
|
-
error: retryError,
|
|
378
|
-
onTryAgain,
|
|
379
|
-
});
|
|
380
|
-
}
|
|
381
|
-
throw retryError;
|
|
382
|
-
}
|
|
383
|
-
};
|
|
384
|
-
this._showAuthDialog({
|
|
385
|
-
nonInteractive: true,
|
|
386
|
-
error: error,
|
|
387
|
-
onTryAgain,
|
|
388
|
-
});
|
|
389
|
-
});
|
|
386
|
+
try {
|
|
387
|
+
return (await this._backgroundFlow?.authorize()) ?? null;
|
|
390
388
|
}
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
this._redirectCurrentPage(authRequest.url);
|
|
389
|
+
catch (error) {
|
|
390
|
+
lastError = error instanceof Error ? error : new Error(String(error));
|
|
394
391
|
}
|
|
395
|
-
throw new TokenValidator.TokenValidationError(error.message);
|
|
396
392
|
}
|
|
393
|
+
if (this._canShowDialogs()) {
|
|
394
|
+
return new Promise(resolve => {
|
|
395
|
+
const onTryAgain = async () => {
|
|
396
|
+
try {
|
|
397
|
+
const result = await this._backgroundFlow?.authorize();
|
|
398
|
+
resolve(result ?? null);
|
|
399
|
+
}
|
|
400
|
+
catch (retryError) {
|
|
401
|
+
if (retryError instanceof Error) {
|
|
402
|
+
this._showAuthDialog({
|
|
403
|
+
nonInteractive: true,
|
|
404
|
+
error: retryError,
|
|
405
|
+
onTryAgain,
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
throw retryError;
|
|
409
|
+
}
|
|
410
|
+
};
|
|
411
|
+
this._showAuthDialog({
|
|
412
|
+
nonInteractive: true,
|
|
413
|
+
error: lastError,
|
|
414
|
+
onTryAgain,
|
|
415
|
+
});
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
const authRequest = await this._requestBuilder?.prepareAuthRequest();
|
|
419
|
+
if (authRequest) {
|
|
420
|
+
this._redirectCurrentPage(authRequest.url);
|
|
421
|
+
}
|
|
422
|
+
throw new TokenValidator.TokenValidationError(lastError?.message ?? 'Failed to refresh token');
|
|
397
423
|
}
|
|
398
424
|
async loadCurrentService() {
|
|
399
425
|
if (this._service.serviceName) {
|
|
@@ -471,7 +497,10 @@ class Auth {
|
|
|
471
497
|
}
|
|
472
498
|
_beforeLogout(params) {
|
|
473
499
|
if (this._canShowDialogs()) {
|
|
474
|
-
|
|
500
|
+
const onTryAgain = async () => {
|
|
501
|
+
await this.forceTokenUpdate();
|
|
502
|
+
};
|
|
503
|
+
this._showAuthDialog({ onTryAgain, ...params });
|
|
475
504
|
return;
|
|
476
505
|
}
|
|
477
506
|
this.logout();
|
|
@@ -507,7 +536,7 @@ class Auth {
|
|
|
507
536
|
return;
|
|
508
537
|
}
|
|
509
538
|
if (this.user?.guest && nonInteractive) {
|
|
510
|
-
this.forceTokenUpdate();
|
|
539
|
+
this.forceTokenUpdate().catch(noop);
|
|
511
540
|
}
|
|
512
541
|
else {
|
|
513
542
|
this._initDeferred?.resolve?.();
|
|
@@ -688,6 +717,8 @@ class Auth {
|
|
|
688
717
|
}
|
|
689
718
|
}
|
|
690
719
|
catch (e) {
|
|
720
|
+
// eslint-disable-next-line no-console
|
|
721
|
+
console.error('RingUI Auth: login failure', e);
|
|
691
722
|
this._beforeLogout();
|
|
692
723
|
}
|
|
693
724
|
}
|
|
@@ -703,7 +734,7 @@ class Auth {
|
|
|
703
734
|
throw new Error('No state in AuthResponse');
|
|
704
735
|
}
|
|
705
736
|
const { scope: defaultScope } = this.config;
|
|
706
|
-
let urlFromState
|
|
737
|
+
let urlFromState;
|
|
707
738
|
try {
|
|
708
739
|
urlFromState = new URL(state); // checking if state contains valid URL on same origin, see HUB-11514
|
|
709
740
|
}
|
|
@@ -65,7 +65,7 @@ export default class Avatar extends PureComponent {
|
|
|
65
65
|
};
|
|
66
66
|
src = encodeURL(urlStart, queryParams);
|
|
67
67
|
}
|
|
68
|
-
let subavatarSrc
|
|
68
|
+
let subavatarSrc;
|
|
69
69
|
if (subavatar && !isDataURI(subavatar)) {
|
|
70
70
|
const [urlStart, query] = subavatar.split('?');
|
|
71
71
|
const queryParams = {
|
|
@@ -36,7 +36,7 @@ export default class ListItem extends PureComponent {
|
|
|
36
36
|
const style = {
|
|
37
37
|
paddingLeft: `${(Number(level) || 0) * RING_UNIT + DEFAULT_PADDING + (showCheckbox ? CHECKBOX_WIDTH : 0)}px`,
|
|
38
38
|
};
|
|
39
|
-
let computedTitle
|
|
39
|
+
let computedTitle;
|
|
40
40
|
if (this._isString(title)) {
|
|
41
41
|
// if title is specified and is a string then use it
|
|
42
42
|
computedTitle = title;
|
|
@@ -68,7 +68,6 @@ export interface ListState<T = unknown> {
|
|
|
68
68
|
prevActiveIndex: number | null;
|
|
69
69
|
prevData: ListDataItem<T>[];
|
|
70
70
|
activeItem: ListDataItem<T> | null;
|
|
71
|
-
needScrollToActive: boolean;
|
|
72
71
|
scrolling: boolean;
|
|
73
72
|
hasOverflow: boolean;
|
|
74
73
|
scrolledToBottom: boolean;
|
|
@@ -109,7 +108,7 @@ export default class List<T = unknown> extends Component<ListProps<T>, ListState
|
|
|
109
108
|
};
|
|
110
109
|
componentDidMount(): void;
|
|
111
110
|
shouldComponentUpdate(nextProps: ListProps<T>, nextState: ListState<T>): boolean;
|
|
112
|
-
componentDidUpdate(prevProps: ListProps<T>): void;
|
|
111
|
+
componentDidUpdate(prevProps: ListProps<T>, prevState: ListState<T>): void;
|
|
113
112
|
componentWillUnmount(): void;
|
|
114
113
|
scheduleScrollListener: (cb: () => void) => void;
|
|
115
114
|
static isItemType: typeof isItemType;
|
package/components/list/list.js
CHANGED
|
@@ -74,7 +74,6 @@ export default class List extends Component {
|
|
|
74
74
|
prevActiveIndex: null,
|
|
75
75
|
prevData: [],
|
|
76
76
|
activeItem: null,
|
|
77
|
-
needScrollToActive: false,
|
|
78
77
|
scrolling: false,
|
|
79
78
|
hasOverflow: false,
|
|
80
79
|
scrolledToBottom: false,
|
|
@@ -101,7 +100,6 @@ export default class List extends Component {
|
|
|
101
100
|
Object.assign(nextState, {
|
|
102
101
|
activeIndex,
|
|
103
102
|
activeItem: data[activeIndex],
|
|
104
|
-
needScrollToActive: true,
|
|
105
103
|
});
|
|
106
104
|
}
|
|
107
105
|
else if (data !== prevData && restoreActiveIndex && activeItem && activeItem.key) {
|
|
@@ -126,14 +124,25 @@ export default class List extends Component {
|
|
|
126
124
|
return (Object.keys(nextProps).some(key => !Object.is(nextProps[key], this.props[key])) ||
|
|
127
125
|
Object.keys(nextState).some(key => nextState[key] !== this.state[key]));
|
|
128
126
|
}
|
|
129
|
-
componentDidUpdate(prevProps) {
|
|
127
|
+
componentDidUpdate(prevProps, prevState) {
|
|
130
128
|
if (this.virtualizedList && prevProps.data !== this.props.data) {
|
|
131
129
|
this.virtualizedList.recomputeRowHeights();
|
|
132
130
|
}
|
|
133
131
|
const { activeIndex } = this.state;
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
132
|
+
if (!this.props.disableScrollToActive && activeIndex != null && activeIndex !== prevState.activeIndex) {
|
|
133
|
+
if (this.virtualizedList) {
|
|
134
|
+
this.virtualizedList.scrollToRow(activeIndex + 1);
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
const itemId = this.getId(this.props.data[activeIndex]);
|
|
138
|
+
if (itemId) {
|
|
139
|
+
document.getElementById(itemId)?.scrollIntoView?.({
|
|
140
|
+
block: 'center',
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
const isActiveItemRetainedPosition = activeIndex != null ? prevProps.data[activeIndex]?.key === this.props.data[activeIndex]?.key : false;
|
|
137
146
|
if ((this.props.activeIndex === null || this.props.activeIndex === undefined) &&
|
|
138
147
|
getDataHash(this.props.data) !== getDataHash(prevProps.data) &&
|
|
139
148
|
shouldActivateFirstItem(this.props) &&
|
|
@@ -196,7 +205,6 @@ export default class List extends Component {
|
|
|
196
205
|
this.setState({
|
|
197
206
|
activeIndex: firstActivatableIndex,
|
|
198
207
|
activeItem: this.props.data[firstActivatableIndex],
|
|
199
|
-
needScrollToActive: true,
|
|
200
208
|
});
|
|
201
209
|
}
|
|
202
210
|
};
|
|
@@ -271,7 +279,6 @@ export default class List extends Component {
|
|
|
271
279
|
this.setState({
|
|
272
280
|
activeIndex: correctedIndex,
|
|
273
281
|
activeItem: item,
|
|
274
|
-
needScrollToActive: true,
|
|
275
282
|
}, function onSet() {
|
|
276
283
|
if (!isActivatable(item)) {
|
|
277
284
|
retryCallback(e);
|
|
@@ -463,12 +470,7 @@ export default class List extends Component {
|
|
|
463
470
|
this.scrollEndHandler();
|
|
464
471
|
}} scrollTop={scrollTop} rowCount={rowCount} estimatedRowSize={this.defaultItemHeight()} rowHeight={this._cache.rowHeight} rowRenderer={this.renderItem} overscanRowCount={this._bufferSize}
|
|
465
472
|
// ensure rerendering
|
|
466
|
-
noop={() => { }}
|
|
467
|
-
this.state.needScrollToActive &&
|
|
468
|
-
this.state.activeIndex !== null &&
|
|
469
|
-
this.state.activeIndex !== undefined
|
|
470
|
-
? this.state.activeIndex + 1
|
|
471
|
-
: undefined} scrollToAlignment='center' deferredMeasurementCache={this._cache} onRowsRendered={this.checkOverflow} containerRole='none' // row role is set by rowRenderer
|
|
473
|
+
noop={() => { }} scrollToAlignment='center' deferredMeasurementCache={this._cache} onRowsRendered={this.checkOverflow} containerRole='none' // row role is set by rowRenderer
|
|
472
474
|
/>
|
|
473
475
|
</div>)}
|
|
474
476
|
</AutoSizer>);
|
|
@@ -42,7 +42,7 @@ export const CollapsibleTabs = ({ children, selected, onSelect, onLastVisibleInd
|
|
|
42
42
|
const adjustTabs = useCallback((entry) => {
|
|
43
43
|
const containerWidth = entry.contentRect.width;
|
|
44
44
|
const { tabs: tabsSizes, more = 0 } = elements.sizes;
|
|
45
|
-
|
|
45
|
+
const renderMore = children.some(tab => tab.props.alwaysHidden);
|
|
46
46
|
const tabsToRender = [];
|
|
47
47
|
let filledWidth = renderMore ? (more ?? 0) : 0;
|
|
48
48
|
for (let i = 0; i < tabsSizes.length; i++) {
|
|
@@ -58,7 +58,6 @@ export const CollapsibleTabs = ({ children, selected, onSelect, onLastVisibleInd
|
|
|
58
58
|
for (let i = tabsToRender.length - 1; i >= 0; i--) {
|
|
59
59
|
if (filledWidth + more < containerWidth + MEASURE_TOLERANCE) {
|
|
60
60
|
filledWidth += more;
|
|
61
|
-
renderMore = true;
|
|
62
61
|
break;
|
|
63
62
|
}
|
|
64
63
|
else {
|
|
@@ -71,7 +70,6 @@ export const CollapsibleTabs = ({ children, selected, onSelect, onLastVisibleInd
|
|
|
71
70
|
const selectedWidth = tabsSizes[selectedIndex];
|
|
72
71
|
for (let i = tabsToRender.length - 1; i >= 0; i--) {
|
|
73
72
|
if (filledWidth + selectedWidth < containerWidth + MEASURE_TOLERANCE) {
|
|
74
|
-
filledWidth += selectedWidth;
|
|
75
73
|
break;
|
|
76
74
|
}
|
|
77
75
|
else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.97",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "JetBrains"
|
|
@@ -56,6 +56,8 @@
|
|
|
56
56
|
"figma-connect-unpublish": "npx figma connect unpublish --token=$FIGMA_CODE_CONNECT_TOKEN",
|
|
57
57
|
"figma-connect-unpublish-local": "dotenv -- npm run figma-connect-unpublish",
|
|
58
58
|
"lint": "npm run lint:js && npm run stylelint",
|
|
59
|
+
"prelint-ci": "echo \"##teamcity[importData type='jslint' path='eslint-report.xml']\"",
|
|
60
|
+
"lint-ci": "eslint --format jslint-xml . > eslint-report.xml && npm run stylelint-ci",
|
|
59
61
|
"lint:js": "eslint",
|
|
60
62
|
"postbuild": "cpy './**/*.d.ts' ../dist --parents --cwd=components/",
|
|
61
63
|
"_postinstall": "husky && npm run postinstall:gitconfig",
|
|
@@ -79,12 +81,15 @@
|
|
|
79
81
|
"start": "storybook dev -p 9999",
|
|
80
82
|
"storybook-debug": "node --inspect-brk node_modules/@storybook/react/bin -p 9999",
|
|
81
83
|
"stylelint": "stylelint --ignore-path .stylelintignore '**/*.css'",
|
|
84
|
+
"stylelint-ci": "stylelint --ignore-path .stylelintignore --custom-formatter 'scripts/jslint-xml.js' '**/*.css' | xmlappend eslint-report.xml",
|
|
82
85
|
"test": "vitest src",
|
|
83
86
|
"type-check": "(npm run type-check:create-d-ts && npm run type-check:main && npm run type-check:build) ; npm run type-check:cleanup-d-ts",
|
|
84
87
|
"type-check:create-d-ts": "npx tcm src && npx tcm .storybook",
|
|
85
88
|
"type-check:main": "tsc --noEmit -p tsconfig.json",
|
|
86
89
|
"type-check:build": "tsc --noEmit -p tsconfig-build.json",
|
|
87
90
|
"type-check:cleanup-d-ts": "rimraf src/**/*.css.d.ts .storybook/*.css.d.ts .storybook/**/*.css.d.ts",
|
|
91
|
+
"pretype-check-ci": "npm run type-check:create-d-ts",
|
|
92
|
+
"type-check-ci": "node scripts/tsc-teamcity",
|
|
88
93
|
"update-styles": "node scripts/update-styles.mjs",
|
|
89
94
|
"validate-tc-config": "mvn --file .teamcity/pom.xml org.jetbrains.teamcity:teamcity-configs-maven-plugin:generate -e"
|
|
90
95
|
},
|
|
@@ -99,9 +104,9 @@
|
|
|
99
104
|
"@csstools/css-parser-algorithms": "^4.0.0",
|
|
100
105
|
"@csstools/stylelint-no-at-nest-rule": "^5.0.0",
|
|
101
106
|
"@eslint/compat": "^2.0.2",
|
|
102
|
-
"@eslint/eslintrc": "^3.3.
|
|
103
|
-
"@eslint/js": "^
|
|
104
|
-
"@figma/code-connect": "^1.
|
|
107
|
+
"@eslint/eslintrc": "^3.3.4",
|
|
108
|
+
"@eslint/js": "^10.0.1",
|
|
109
|
+
"@figma/code-connect": "^1.4.1",
|
|
105
110
|
"@jetbrains/eslint-config": "^6.0.5",
|
|
106
111
|
"@jetbrains/logos": "3.0.0-canary.734b213.0",
|
|
107
112
|
"@jetbrains/rollup-css-plugin": "./packages/rollup-css-plugin",
|
|
@@ -112,11 +117,11 @@
|
|
|
112
117
|
"@rollup/plugin-json": "^6.1.0",
|
|
113
118
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
114
119
|
"@rollup/plugin-replace": "^6.0.3",
|
|
115
|
-
"@storybook/addon-a11y": "10.2.
|
|
116
|
-
"@storybook/addon-docs": "^10.2.
|
|
117
|
-
"@storybook/addon-themes": "^10.2.
|
|
120
|
+
"@storybook/addon-a11y": "10.2.13",
|
|
121
|
+
"@storybook/addon-docs": "^10.2.13",
|
|
122
|
+
"@storybook/addon-themes": "^10.2.13",
|
|
118
123
|
"@storybook/csf": "^0.1.13",
|
|
119
|
-
"@storybook/react-webpack5": "10.2.
|
|
124
|
+
"@storybook/react-webpack5": "10.2.13",
|
|
120
125
|
"@storybook/test-runner": "^0.24.2",
|
|
121
126
|
"@testing-library/dom": "^10.4.1",
|
|
122
127
|
"@testing-library/react": "^16.3.2",
|
|
@@ -128,10 +133,10 @@
|
|
|
128
133
|
"@types/react-dom": "^19.2.3",
|
|
129
134
|
"@types/webpack-env": "^1.18.8",
|
|
130
135
|
"@vitejs/plugin-react": "^5.1.4",
|
|
131
|
-
"@vitest/eslint-plugin": "^1.6.
|
|
132
|
-
"acorn": "^8.
|
|
136
|
+
"@vitest/eslint-plugin": "^1.6.9",
|
|
137
|
+
"acorn": "^8.16.0",
|
|
133
138
|
"babel-plugin-require-context-hook": "^1.0.0",
|
|
134
|
-
"caniuse-lite": "^1.0.
|
|
139
|
+
"caniuse-lite": "^1.0.30001770",
|
|
135
140
|
"chai-as-promised": "^8.0.2",
|
|
136
141
|
"chai-dom": "^1.12.1",
|
|
137
142
|
"cheerio": "^1.2.0",
|
|
@@ -140,6 +145,7 @@
|
|
|
140
145
|
"dotenv-cli": "^11.0.0",
|
|
141
146
|
"eslint": "^9.39.2",
|
|
142
147
|
"eslint-config-prettier": "^10.1.8",
|
|
148
|
+
"eslint-formatter-jslint-xml": "^8.40.0",
|
|
143
149
|
"eslint-import-resolver-exports": "^1.0.0-beta.5",
|
|
144
150
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
145
151
|
"eslint-import-resolver-webpack": "^0.13.10",
|
|
@@ -148,10 +154,10 @@
|
|
|
148
154
|
"eslint-plugin-prettier": "^5.5.5",
|
|
149
155
|
"eslint-plugin-react": "^7.37.5",
|
|
150
156
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
151
|
-
"eslint-plugin-storybook": "^10.2.
|
|
152
|
-
"eslint-plugin-unicorn": "^
|
|
157
|
+
"eslint-plugin-storybook": "^10.2.13",
|
|
158
|
+
"eslint-plugin-unicorn": "^63.0.0",
|
|
153
159
|
"events": "^3.3.0",
|
|
154
|
-
"glob": "^13.0.
|
|
160
|
+
"glob": "^13.0.6",
|
|
155
161
|
"globals": "^17.3.0",
|
|
156
162
|
"html-webpack-plugin": "^5.6.6",
|
|
157
163
|
"http-server": "^14.1.1",
|
|
@@ -169,23 +175,24 @@
|
|
|
169
175
|
"react": "^19.2.4",
|
|
170
176
|
"react-dom": "^19.2.4",
|
|
171
177
|
"regenerator-runtime": "^0.14.1",
|
|
172
|
-
"rimraf": "^6.1.
|
|
173
|
-
"rollup": "^4.
|
|
178
|
+
"rimraf": "^6.1.3",
|
|
179
|
+
"rollup": "^4.59.0",
|
|
174
180
|
"rollup-plugin-clear": "^2.0.7",
|
|
175
181
|
"storage-mock": "^2.1.0",
|
|
176
|
-
"storybook": "10.2.
|
|
177
|
-
"stylelint": "^17.
|
|
178
|
-
"stylelint-config-sass-guidelines": "^
|
|
182
|
+
"storybook": "10.2.13",
|
|
183
|
+
"stylelint": "^17.4.0",
|
|
184
|
+
"stylelint-config-sass-guidelines": "^13.0.0",
|
|
179
185
|
"svg-inline-loader": "^0.8.2",
|
|
180
186
|
"teamcity-service-messages": "^0.1.14",
|
|
181
187
|
"terser-webpack-plugin": "^5.3.16",
|
|
182
188
|
"typed-css-modules": "^0.9.1",
|
|
183
189
|
"typescript": "~5.9.3",
|
|
184
|
-
"typescript-eslint": "^8.
|
|
190
|
+
"typescript-eslint": "^8.56.1",
|
|
185
191
|
"vitest": "^4.0.18",
|
|
186
192
|
"vitest-teamcity-reporter": "^0.4.1",
|
|
187
|
-
"webpack": "^5.105.
|
|
188
|
-
"webpack-cli": "^6.0.1"
|
|
193
|
+
"webpack": "^5.105.3",
|
|
194
|
+
"webpack-cli": "^6.0.1",
|
|
195
|
+
"xmlappend": "^1.0.4"
|
|
189
196
|
},
|
|
190
197
|
"peerDependencies": {
|
|
191
198
|
"@types/react": ">=18.0.0",
|
|
@@ -223,7 +230,7 @@
|
|
|
223
230
|
"change-case": "^4.1.1",
|
|
224
231
|
"classnames": "^2.5.1",
|
|
225
232
|
"combokeys": "^3.0.1",
|
|
226
|
-
"css-loader": "^7.1.
|
|
233
|
+
"css-loader": "^7.1.4",
|
|
227
234
|
"csstype": "^3.2.1",
|
|
228
235
|
"date-fns": "^4.1.0",
|
|
229
236
|
"dequal": "^2.0.3",
|
|
@@ -238,9 +245,9 @@
|
|
|
238
245
|
"postcss-calc": "^10.1.1",
|
|
239
246
|
"postcss-flexbugs-fixes": "^5.0.2",
|
|
240
247
|
"postcss-font-family-system-ui": "^5.0.0",
|
|
241
|
-
"postcss-loader": "^8.2.
|
|
248
|
+
"postcss-loader": "^8.2.1",
|
|
242
249
|
"postcss-modules-values-replace": "^4.2.2",
|
|
243
|
-
"postcss-preset-env": "^11.
|
|
250
|
+
"postcss-preset-env": "^11.2.0",
|
|
244
251
|
"react-compiler-runtime": "^1.0.0",
|
|
245
252
|
"react-movable": "^3.4.1",
|
|
246
253
|
"react-virtualized": "^9.22.6",
|