Skip to content

Commit d5866f8

Browse files
authored
Avoid util deep imports (#706)
* chore: avoid util deep imports * chore: address review comments * fix: trim public exports
1 parent 799024c commit d5866f8

4 files changed

Lines changed: 16 additions & 6 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737
"test": "rc-test"
3838
},
3939
"dependencies": {
40-
"@rc-component/util": "^1.3.0",
40+
"@rc-component/util": "^1.11.1",
4141
"clsx": "^2.1.1"
4242
},
4343
"devDependencies": {
44-
"@rc-component/father-plugin": "^2.0.2",
44+
"@rc-component/father-plugin": "^2.2.0",
4545
"@rc-component/np": "^1.0.4",
4646
"@testing-library/jest-dom": "^6.1.5",
4747
"@testing-library/react": "^16.2.0",

src/AjaxUploader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint react/no-is-mounted:0,react/sort-comp:0,react/prop-types:0 */
2-
import pickAttrs from '@rc-component/util/lib/pickAttrs';
2+
import { pickAttrs } from '@rc-component/util';
33
import { clsx } from 'clsx';
44
import React, { Component } from 'react';
55
import attrAccept from './attr-accept';

src/index.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1-
import type { UploadProps } from './interface';
1+
import type {
2+
AcceptConfig,
3+
RcFile,
4+
UploadProps,
5+
UploadRequestOption,
6+
} from './interface';
27
import Upload from './Upload';
38

4-
export type { UploadProps };
9+
export type {
10+
AcceptConfig,
11+
RcFile,
12+
UploadProps,
13+
UploadRequestOption,
14+
};
515

616
export default Upload;

tests/uploader.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { resetWarned } from '@rc-component/util/lib/warning';
1+
import { resetWarned } from '@rc-component/util';
22
import { fireEvent, render } from '@testing-library/react';
33
import React from 'react';
44
import sinon from 'sinon';

0 commit comments

Comments
 (0)