From 712ec89077eaf2d55944438206dc2425e62df128 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: Mon, 27 Jan 2025 18:24:18 +0800 Subject: [PATCH 1/2] chore: bump father plugin --- .fatherrc.ts | 7 +------ package.json | 9 +++++---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.fatherrc.ts b/.fatherrc.ts index 7414da0..96268ae 100644 --- a/.fatherrc.ts +++ b/.fatherrc.ts @@ -1,10 +1,5 @@ import { defineConfig } from 'father'; export default defineConfig({ - platform: 'browser', - cjs: { output: 'lib' }, - esm: { - output: 'es', - alias: { 'rc-util/lib': 'rc-util/es' }, - }, + plugins: ['@rc-component/father-plugin'], }); diff --git a/package.json b/package.json index 70b1488..14cb494 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "rc-input", - "version": "1.7.2", + "name": "@rc-component/input", + "version": "1.0.0-0", "description": "React input component", "keywords": [ "react", @@ -44,11 +44,12 @@ "prepare": "husky install" }, "dependencies": { - "@babel/runtime": "^7.11.1", "classnames": "^2.2.1", - "rc-util": "^5.18.1" + "@rc-component/util": "^1.2.0" }, "devDependencies": { + "@rc-component/father-plugin": "^2.0.3", + "@rc-component/np": "^1.0.3", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.0.1", "@testing-library/user-event": "^14.0.0-beta", From e46102652077bea1a17eb02e159e1e37fde538ca 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: Mon, 27 Jan 2025 18:29:31 +0800 Subject: [PATCH 2/2] chore: base alias --- tests/focus.test.tsx | 2 +- tsconfig.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/focus.test.tsx b/tests/focus.test.tsx index 6e36452..44f6f53 100644 --- a/tests/focus.test.tsx +++ b/tests/focus.test.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { spyElementPrototypes } from 'rc-util/lib/test/domHook'; -import Input from 'rc-input'; +import Input from '../src'; import { fireEvent, render } from '@testing-library/react'; const getInputRef = () => { diff --git a/tsconfig.json b/tsconfig.json index 71f9c78..b8da981 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,7 +15,8 @@ "paths": { "@/*": ["src/*"], "@@/*": [".dumi/tmp/*"], - "rc-input": ["src/index.tsx"] + "rc-input": ["src/index.tsx"], + "@rc-component/input": ["src/index.tsx"] } }, "include": [".dumirc.ts", "**/*.ts", "**/*.tsx"]