Skip to content

Commit

Permalink
chore: update deps (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ authored Jan 28, 2025
1 parent 41a3e6a commit 2dc39f1
Show file tree
Hide file tree
Showing 18 changed files with 38 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const name = 'mentions';
export default defineConfig({
favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'],
themeConfig: {
name: 'rc-mentions',
name: '@rc-component/mentions',
logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
},
outputPath: '.doc',
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
/**
* inline: true
*/
import Mentions from 'rc-mentions';
import Mentions from '@rc-component/mentions';
// Import the default styles
import './index.less';

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/allowClear.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Mentions from 'rc-mentions';
import Mentions from '@rc-component/mentions';
import React, { useState } from 'react';

export default function App() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import Mentions from 'rc-mentions';
import Mentions from '@rc-component/mentions';
import '../../assets/index.less';

const onSelect = (option, prefix) => {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/debug.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import Mentions from 'rc-mentions';
import Mentions from '@rc-component/mentions';
import '../../assets/index.less';

export default () => (
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/dynamic.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import Mentions from 'rc-mentions';
import Mentions from '@rc-component/mentions';
import '../../assets/index.less';
import './dynamic.less';

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/filter.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import Mentions from 'rc-mentions';
import Mentions from '@rc-component/mentions';
import '../../assets/index.less';

function filterOption(input, { key }) {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/multiple-prefix.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import Mentions from 'rc-mentions';
import Mentions from '@rc-component/mentions';
import '../../assets/index.less';

const OPTIONS = {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/onScroll.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import Mentions from 'rc-mentions';
import Mentions from '@rc-component/mentions';
import '../../assets/index.less';
import './onScroll.less';

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/split.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import Mentions from 'rc-mentions';
import Mentions from '@rc-component/mentions';
import '../../assets/index.less';

const { Option } = Mentions;
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/textarea.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import Mentions from 'rc-mentions';
import Mentions from '@rc-component/mentions';
import '../../assets/index.less';
import './textarea.less';

Expand Down
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
setupFiles: ['./tests/setup.ts'],
setupFilesAfterEnv: ['./tests/setupFilesAfterEnv.ts'],
collectCoverageFrom: ['./src/**/*.{ts,tsx}'],
};
17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rc-mentions",
"version": "2.19.1",
"name": "@rc-component/mentions",
"version": "1.0.0",
"description": "React Mentions",
"keywords": [
"react",
Expand Down Expand Up @@ -33,7 +33,7 @@
"gh-pages": "npm run docs:build && npm run docs:deploy",
"lint": "eslint src/ --ext .tsx,.ts",
"prepare": "husky install",
"prepublishOnly": "npm run compile && np --yolo --no-publish",
"prepublishOnly": "npm run compile && rc-np",
"postpublish": "npm run gh-pages",
"start": "dumi dev",
"test": "rc-test"
Expand All @@ -45,16 +45,16 @@
]
},
"dependencies": {
"@babel/runtime": "^7.22.5",
"@rc-component/trigger": "^2.0.0",
"classnames": "^2.2.6",
"rc-input": "~1.7.1",
"@rc-component/input": "~1.0.0",
"rc-menu": "~9.16.0",
"rc-textarea": "~1.9.0",
"rc-util": "^5.34.1"
"@rc-component/textarea": "~1.0.0",
"@rc-component/util": "^1.2.0"
},
"devDependencies": {
"@rc-component/father-plugin": "^1.0.0",
"@rc-component/father-plugin": "^2.0.2",
"@rc-component/np": "^1.0.3",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^16.0.0",
"@types/classnames": "^2.2.6",
Expand All @@ -68,7 +68,6 @@
"gh-pages": "^5.0.0",
"husky": "^9.1.6",
"lint-staged": "^15.2.7",
"np": "^10.0.0",
"prettier": "^3.3.2",
"rc-test": "^7.0.14",
"react": "^18.0.0",
Expand Down
18 changes: 9 additions & 9 deletions src/Mentions.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import classNames from 'classnames';
import { BaseInput } from 'rc-input';
import type { HolderRef } from 'rc-input/lib/BaseInput';
import type { CommonInputProps } from 'rc-input/lib/interface';
import type { TextAreaProps, TextAreaRef } from 'rc-textarea';
import TextArea from 'rc-textarea';
import toArray from 'rc-util/lib/Children/toArray';
import useMergedState from 'rc-util/lib/hooks/useMergedState';
import KeyCode from 'rc-util/lib/KeyCode';
import warning from 'rc-util/lib/warning';
import { BaseInput } from '@rc-component/input';
import type { HolderRef } from '@rc-component/input/lib/BaseInput';
import type { CommonInputProps } from '@rc-component/input/lib/interface';
import type { TextAreaProps, TextAreaRef } from '@rc-component/textarea';
import TextArea from '@rc-component/textarea';
import toArray from '@rc-component/util/lib/Children/toArray';
import useMergedState from '@rc-component/util/lib/hooks/useMergedState';
import KeyCode from '@rc-component/util/lib/KeyCode';
import warning from '@rc-component/util/lib/warning';
import React, {
forwardRef,
useEffect,
Expand Down
2 changes: 1 addition & 1 deletion tests/FullProcess.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { fireEvent, render } from '@testing-library/react';
import KeyCode from 'rc-util/lib/KeyCode';
import KeyCode from '@rc-component/util/lib/KeyCode';
import React from 'react';
import type { MentionsProps } from '../src';
import Mentions from '../src';
Expand Down
2 changes: 1 addition & 1 deletion tests/Mentions.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { fireEvent, render } from '@testing-library/react';
import KeyCode from 'rc-util/lib/KeyCode';
import KeyCode from '@rc-component/util/lib/KeyCode';
import React, { createRef } from 'react';
import { act } from 'react-dom/test-utils';
import type { MentionsProps } from '../src';
Expand Down
6 changes: 6 additions & 0 deletions tests/setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Mock empty ResizeObserver
global.ResizeObserver = class ResizeObserver {
observe() {}
unobserve() {}
disconnect() {}
};
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"paths": {
"@/*": ["src/*"],
"@@/*": [".dumi/tmp/*"],
"rc-mentions": ["src/index.ts"]
"@rc-component/mentions": ["src/index.ts"]
}
},
"include": [".dumirc.ts", "**/*.ts", "**/*.tsx"]
Expand Down

0 comments on commit 2dc39f1

Please sign in to comment.