From bb208c1a8ecc6371f57630574b32e4dd27570428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E6=9C=BA=E5=99=A8=E4=BA=BA?= Date: Tue, 25 Feb 2025 15:47:49 +0800 Subject: [PATCH] chore: bump deps --- assets/select.less | 2 +- examples/form.tsx | 4 ++-- package.json | 17 ++++++++--------- src/OptionList.tsx | 10 +++++----- src/TreeSelect.tsx | 10 +++++----- src/hooks/useDataEntities.ts | 2 +- src/utils/legacyUtil.tsx | 4 ++-- src/utils/warningPropsUtil.ts | 2 +- tests/Select.SearchInput.spec.js | 2 +- tests/Select.maxCount.spec.tsx | 2 +- tests/Select.multiple.spec.js | 2 +- tests/Select.spec.tsx | 4 ++-- tests/Select.tree.spec.js | 2 +- tests/Select.warning.spec.js | 2 +- 14 files changed, 32 insertions(+), 33 deletions(-) diff --git a/assets/select.less b/assets/select.less index 2e473db4..a71d5489 100644 --- a/assets/select.less +++ b/assets/select.less @@ -1,3 +1,3 @@ -@import '~rc-select/assets/index'; +@import '~@rc-component/select/assets/index'; @select-prefix: ~'rc-tree-select'; \ No newline at end of file diff --git a/examples/form.tsx b/examples/form.tsx index 17464cd5..7a391f9b 100644 --- a/examples/form.tsx +++ b/examples/form.tsx @@ -1,8 +1,8 @@ import React, { Component } from 'react'; -import Select from 'rc-select'; +import Select from '@rc-component/select'; import Form, { useForm, Field } from 'rc-field-form'; import TreeSelect from '../src'; -import 'rc-select/assets/index.less'; +import '@rc-component/select/assets/index.less'; import '../assets/index.less'; import { gData } from './utils/dataUtil'; diff --git a/package.json b/package.json index 3f06ab14..7cdc4e5d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "rc-tree-select", - "version": "5.27.0", + "name": "@rc-component/tree-select", + "version": "1.0.0", "description": "tree-select ui component for react", "keywords": [ "react", @@ -35,7 +35,7 @@ "lint": "eslint src/ examples/ --ext .tsx,.ts,.jsx,.js", "now-build": "npm run build", "prepare": "husky && dumi setup", - "prepublishOnly": "npm run compile && np --yolo --no-publish --any-branch", + "prepublishOnly": "npm run compile && rc-np", "prettier": "prettier '{src,tests}/**/*.{ts,tsx}' 'tests/**/*.js' --write", "start": "dumi dev", "test": "rc-test" @@ -44,15 +44,15 @@ "*": "prettier --write --ignore-unknown" }, "dependencies": { - "@babel/runtime": "^7.25.7", "classnames": "2.x", - "rc-select": "~14.16.2", + "@rc-component/select": "~1.0.0", "rc-tree": "~5.13.0", - "rc-util": "^5.43.0" + "@rc-component/util": "^1.2.1" }, "devDependencies": { - "@rc-component/father-plugin": "^1.1.0", - "@rc-component/trigger": "^1.18.3", + "@rc-component/father-plugin": "^2.0.2", + "@rc-component/np": "^1.0.3", + "@rc-component/trigger": "^3.0.0", "@testing-library/react": "^12.1.5", "@types/jest": "^29.5.13", "@types/node": "^22.7.5", @@ -73,7 +73,6 @@ "glob": "^11.0.0", "husky": "^9.1.6", "lint-staged": "^15.2.10", - "np": "^10.0.7", "prettier": "^3.3.3", "rc-dialog": "^9.6.0", "rc-field-form": "^2.4.0", diff --git a/src/OptionList.tsx b/src/OptionList.tsx index 5b53047e..a96a256b 100644 --- a/src/OptionList.tsx +++ b/src/OptionList.tsx @@ -1,17 +1,17 @@ -import { useBaseProps } from 'rc-select'; -import type { RefOptionListProps } from 'rc-select/lib/OptionList'; +import { useBaseProps } from '@rc-component/select'; +import type { RefOptionListProps } from '@rc-component/select/lib/OptionList'; import type { TreeProps } from 'rc-tree'; import Tree from 'rc-tree'; import { UnstableContext } from 'rc-tree'; import type { EventDataNode, ScrollTo } from 'rc-tree/lib/interface'; -import KeyCode from 'rc-util/lib/KeyCode'; -import useMemo from 'rc-util/lib/hooks/useMemo'; +import KeyCode from '@rc-component/util/lib/KeyCode'; +import useMemo from '@rc-component/util/lib/hooks/useMemo'; import * as React from 'react'; import LegacyContext from './LegacyContext'; import TreeSelectContext from './TreeSelectContext'; import type { DataNode, Key, SafeKey } from './interface'; import { getAllKeys, isCheckDisabled } from './utils/valueUtil'; -import { useEvent } from 'rc-util'; +import { useEvent } from '@rc-component/util'; const HIDDEN_STYLE = { width: 0, diff --git a/src/TreeSelect.tsx b/src/TreeSelect.tsx index 1a8a938d..10c3418e 100644 --- a/src/TreeSelect.tsx +++ b/src/TreeSelect.tsx @@ -1,11 +1,11 @@ -import type { BaseSelectPropsWithoutPrivate, BaseSelectRef } from 'rc-select'; -import { BaseSelect } from 'rc-select'; -import useId from 'rc-select/lib/hooks/useId'; +import type { BaseSelectPropsWithoutPrivate, BaseSelectRef } from '@rc-component/select'; +import { BaseSelect } from '@rc-component/select'; +import useId from '@rc-component/select/lib/hooks/useId'; import type { IconType } from 'rc-tree/lib/interface'; import type { ExpandAction } from 'rc-tree/lib/Tree'; import { conductCheck } from 'rc-tree/lib/utils/conductUtil'; -import useMergedState from 'rc-util/lib/hooks/useMergedState'; -import warning from 'rc-util/lib/warning'; +import useMergedState from '@rc-component/util/lib/hooks/useMergedState'; +import warning from '@rc-component/util/lib/warning'; import * as React from 'react'; import useCache from './hooks/useCache'; import useCheckedKeys from './hooks/useCheckedKeys'; diff --git a/src/hooks/useDataEntities.ts b/src/hooks/useDataEntities.ts index 95e082d0..709b4321 100644 --- a/src/hooks/useDataEntities.ts +++ b/src/hooks/useDataEntities.ts @@ -2,7 +2,7 @@ import * as React from 'react'; import { convertDataToEntities } from 'rc-tree/lib/utils/treeUtil'; import type { DataEntity } from 'rc-tree/lib/interface'; import type { SafeKey, FieldNames } from '../interface'; -import warning from 'rc-util/lib/warning'; +import warning from '@rc-component/util/lib/warning'; import { isNil } from '../utils/valueUtil'; export default (treeData: any, fieldNames: FieldNames) => diff --git a/src/utils/legacyUtil.tsx b/src/utils/legacyUtil.tsx index b670f9a6..d7deef09 100644 --- a/src/utils/legacyUtil.tsx +++ b/src/utils/legacyUtil.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import toArray from 'rc-util/lib/Children/toArray'; -import warning from 'rc-util/lib/warning'; +import toArray from '@rc-component/util/lib/Children/toArray'; +import warning from '@rc-component/util/lib/warning'; import type { DataNode, ChangeEventExtra, diff --git a/src/utils/warningPropsUtil.ts b/src/utils/warningPropsUtil.ts index 11c07d64..7ca3050d 100644 --- a/src/utils/warningPropsUtil.ts +++ b/src/utils/warningPropsUtil.ts @@ -1,4 +1,4 @@ -import warning from 'rc-util/lib/warning'; +import warning from '@rc-component/util/lib/warning'; import type { TreeSelectProps } from '../TreeSelect'; import { toArray } from './valueUtil'; diff --git a/tests/Select.SearchInput.spec.js b/tests/Select.SearchInput.spec.js index cd2d15c3..c2c1cc42 100644 --- a/tests/Select.SearchInput.spec.js +++ b/tests/Select.SearchInput.spec.js @@ -3,7 +3,7 @@ import React, { useState } from 'react'; import { mount } from 'enzyme'; import { render, fireEvent } from '@testing-library/react'; import TreeSelect, { TreeNode } from '../src'; -import KeyCode from 'rc-util/lib/KeyCode'; +import KeyCode from '@rc-component/util/lib/KeyCode'; describe('TreeSelect.SearchInput', () => { it('select item will clean searchInput', () => { diff --git a/tests/Select.maxCount.spec.tsx b/tests/Select.maxCount.spec.tsx index 1f9c74e9..8bb137a7 100644 --- a/tests/Select.maxCount.spec.tsx +++ b/tests/Select.maxCount.spec.tsx @@ -1,5 +1,5 @@ import { render, fireEvent, within } from '@testing-library/react'; -import KeyCode from 'rc-util/lib/KeyCode'; +import KeyCode from '@rc-component/util/lib/KeyCode'; import { keyDown, keyUp } from './util'; import React from 'react'; import TreeSelect from '../src'; diff --git a/tests/Select.multiple.spec.js b/tests/Select.multiple.spec.js index 5f2cebca..81a70898 100644 --- a/tests/Select.multiple.spec.js +++ b/tests/Select.multiple.spec.js @@ -1,7 +1,7 @@ /* eslint-disable no-undef */ import { render, fireEvent, within } from '@testing-library/react'; import { mount } from 'enzyme'; -import KeyCode from 'rc-util/lib/KeyCode'; +import KeyCode from '@rc-component/util/lib/KeyCode'; import React from 'react'; import TreeSelect, { TreeNode } from '../src'; import focusTest from './shared/focusTest'; diff --git a/tests/Select.spec.tsx b/tests/Select.spec.tsx index d7f52497..19235f78 100644 --- a/tests/Select.spec.tsx +++ b/tests/Select.spec.tsx @@ -1,11 +1,11 @@ import { render } from '@testing-library/react'; import { mount } from 'enzyme'; -import KeyCode from 'rc-util/lib/KeyCode'; +import KeyCode from '@rc-component/util/lib/KeyCode'; import React from 'react'; import TreeSelect, { TreeNode } from '../src'; import focusTest from './shared/focusTest'; import { selectNode } from './util'; -import type { BaseSelectRef } from 'rc-select'; +import type { BaseSelectRef } from '@rc-component/select'; const mockScrollTo = jest.fn(); diff --git a/tests/Select.tree.spec.js b/tests/Select.tree.spec.js index 914df004..71dbae7a 100644 --- a/tests/Select.tree.spec.js +++ b/tests/Select.tree.spec.js @@ -1,7 +1,7 @@ /* eslint-disable no-undef, react/no-multi-comp, no-console */ import React from 'react'; import { mount } from 'enzyme'; -import { resetWarned } from 'rc-util/lib/warning'; +import { resetWarned } from '@rc-component/util/lib/warning'; import TreeSelect, { TreeNode as SelectNode } from '../src'; describe('TreeSelect.tree', () => { diff --git a/tests/Select.warning.spec.js b/tests/Select.warning.spec.js index 780c1ec0..2b8f8ff7 100644 --- a/tests/Select.warning.spec.js +++ b/tests/Select.warning.spec.js @@ -1,6 +1,6 @@ import React from 'react'; import { mount } from 'enzyme'; -import { resetWarned } from 'rc-util/lib/warning'; +import { resetWarned } from '@rc-component/util/lib/warning'; import TreeSelect from '../src'; describe('TreeSelect.warning', () => {