From d27fafdc1909c27204cd1be0f586e2318df53ae5 Mon Sep 17 00:00:00 2001 From: zthxxx Date: Sat, 27 Apr 2024 13:53:00 +0800 Subject: [PATCH] release: update version to 2.1.0-beta.8 --- docs/.gitignore | 4 +- docs/CHANGELOG.v2.md | 8 +-- docs/next.config.mjs | 1 + docs/package.json | 2 +- packages/babel-plugin/package.json | 20 +++---- packages/inspector/package.json | 52 +++++++++---------- .../inspector/src/Inspector/Inspector.tsx | 4 +- packages/launch-editor-endpoint/package.json | 16 +++--- packages/middleware/package.json | 16 +++--- packages/umi3-plugin/package.json | 16 +++--- packages/umi4-plugin/package.json | 16 +++--- packages/vite-plugin/package.json | 16 +++--- packages/web-components/package.json | 13 ++--- 13 files changed, 94 insertions(+), 90 deletions(-) diff --git a/docs/.gitignore b/docs/.gitignore index b43a561a..49a7e55b 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,3 +1,3 @@ -.next +.next/ next-env.d.ts -/out +dist/ diff --git a/docs/CHANGELOG.v2.md b/docs/CHANGELOG.v2.md index a4e03f45..dc79f42b 100644 --- a/docs/CHANGELOG.v2.md +++ b/docs/CHANGELOG.v2.md @@ -1,15 +1,17 @@ # Changelog -## [2.1.0-beta.7](https://github.com/zthxxx/react-dev-inspector/compare/v2.0.1...v2.1.0-beta.7) +## [2.1.0-beta.8](https://github.com/zthxxx/react-dev-inspector/compare/v2.0.1...v2.1.0-beta.8) ### Features - integrate an `InspectContextPanel` trigger by right-click inspect -- add `@react-dev-inspector/components` package +- allow to setting some custom `InspectAgent`, to work with default `DOMInspectAgent` together +- add `@react-dev-inspector/web-components` package - export the `Overlay` (inspector indicating UI), support custom to get boxSizing and bounding - export the `InspectContextPanel` component, which is a context-menu as a draggable and resizable floating panel -- add export of some utils for access react fiber +- add export of some utils for access react fiber (`fiberUtils`) or help inspecting (`inspectUtils`), + use for custom InspectAgent ### Refactor diff --git a/docs/next.config.mjs b/docs/next.config.mjs index 5219983e..27a0ae19 100644 --- a/docs/next.config.mjs +++ b/docs/next.config.mjs @@ -18,6 +18,7 @@ export default withNextra({ ignoreDuringBuilds: true, }, output: 'export', + distDir: 'dist', images: { /** * Error: Image Optimization using Next.js' default loader is not compatible with `next export`. diff --git a/docs/package.json b/docs/package.json index 58861f9c..857ddc34 100644 --- a/docs/package.json +++ b/docs/package.json @@ -16,7 +16,7 @@ "scripts": { "clean": "rimraf .next dist", "dev": "npm run clean && node server.mjs", - "build": "npm run clean && next build && next export -o dist" + "build": "npm run clean && next build" }, "dependencies": { "clsx": "1.2.1", diff --git a/packages/babel-plugin/package.json b/packages/babel-plugin/package.json index 7d2d3ec8..724509dd 100644 --- a/packages/babel-plugin/package.json +++ b/packages/babel-plugin/package.json @@ -1,24 +1,17 @@ { "name": "@react-dev-inspector/babel-plugin", - "version": "2.1.0-beta.7", + "version": "2.1.0-beta.8", "sideEffects": false, "description": "babel plugin for react-dev-inspector to generate source code position info into jsx properties", "main": "dist/cjs", "module": "dist/esm", "types": "dist/esm", - "scripts": { - "test": "jest --passWithNoTests", - "gen:test-outputs": "tsx scripts/gen-test-outputs.ts", - "clean": "rimraf coverage dist es lib build", - "build:esm": "tsc -p tsconfig.esm.json", - "build:cjs": "tsc -p tsconfig.cjs.json", - "build": "npm-run-all clean --parallel build:esm build:cjs" - }, "repository": { "type": "git", "url": "https://github.com/zthxxx/react-dev-inspector.git", "directory": "packages/babel-plugin" }, + "homepage": "https://react-dev-inspector.zthxxx.me/docs/compiler-plugin#react-dev-inspectorbabel-plugin", "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org" @@ -28,12 +21,19 @@ "bugs": { "url": "https://github.com/zthxxx/react-dev-inspector/issues" }, - "homepage": "https://github.com/zthxxx/react-dev-inspector", "files": [ "README.md", "src", "dist" ], + "scripts": { + "test": "jest --passWithNoTests", + "gen:test-outputs": "tsx scripts/gen-test-outputs.ts", + "clean": "rimraf coverage dist es lib build", + "build:esm": "tsc -p tsconfig.esm.json", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build": "npm-run-all clean --parallel build:esm build:cjs" + }, "engines": { "node": ">=12.0.0" }, diff --git a/packages/inspector/package.json b/packages/inspector/package.json index cf3528b7..fa62e3e5 100644 --- a/packages/inspector/package.json +++ b/packages/inspector/package.json @@ -1,35 +1,11 @@ { "name": "react-dev-inspector", - "version": "2.1.0-beta.7", + "version": "2.1.0-beta.8", "sideEffects": false, "description": "dev-tool for inspect react components and jump to local IDE for component code.", "main": "dist/cjs", "module": "dist/esm", "types": "dist/esm", - "exports": { - ".": { - "import": "./dist/esm/index.js", - "require": "./dist/cjs/index.js" - }, - "./plugins/babel": "./dist/cjs/plugins/babel.js", - "./plugins/vite": "./dist/cjs/plugins/vite.js", - "./plugins/webpack": "./dist/cjs/plugins/webpack.js", - "./plugins/umi": "./dist/cjs/plugins/umi.js", - "./plugins/umi/react-inspector": "./dist/cjs/plugins/umi.js", - "./plugins/ice": "./dist/cjs/plugins/ice.js" - }, - "scripts": { - "test": "vitest run --passWithNoTests", - "test:watch": "vitest watch", - "clean": "rimraf coverage dist es lib build", - "dev": "storybook dev -p 59762", - "sync:readme": "cp -f ../../README.md README.md", - "build:storybook": "storybook build", - "build:esm": "tsc -p tsconfig.esm.json", - "build:cjs": "tsc -p tsconfig.cjs.json", - "build:test": "tsc -p tsconfig.test.json", - "build": "npm-run-all clean --parallel sync:readme build:esm build:cjs build:test" - }, "repository": { "type": "git", "url": "https://github.com/zthxxx/react-dev-inspector.git", @@ -49,12 +25,36 @@ "bugs": { "url": "https://github.com/zthxxx/react-dev-inspector/issues" }, - "homepage": "https://github.com/zthxxx/react-dev-inspector", + "homepage": "https://react-dev-inspector.zthxxx.me", "files": [ "README.md", "src", "dist" ], + "exports": { + ".": { + "import": "./dist/esm/index.js", + "require": "./dist/cjs/index.js" + }, + "./plugins/babel": "./dist/cjs/plugins/babel.js", + "./plugins/vite": "./dist/cjs/plugins/vite.js", + "./plugins/webpack": "./dist/cjs/plugins/webpack.js", + "./plugins/umi": "./dist/cjs/plugins/umi.js", + "./plugins/umi/react-inspector": "./dist/cjs/plugins/umi.js", + "./plugins/ice": "./dist/cjs/plugins/ice.js" + }, + "scripts": { + "test": "vitest run --passWithNoTests", + "test:watch": "vitest watch", + "clean": "rimraf coverage dist es lib build", + "dev": "storybook dev -p 59762", + "sync:readme": "cp -f ../../README.md README.md", + "build:storybook": "storybook build", + "build:esm": "tsc -p tsconfig.esm.json", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:test": "tsc -p tsconfig.test.json", + "build": "npm-run-all clean --parallel sync:readme build:esm build:cjs build:test" + }, "engines": { "node": ">=12.0.0" }, diff --git a/packages/inspector/src/Inspector/Inspector.tsx b/packages/inspector/src/Inspector/Inspector.tsx index aa2a3f0a..923c5a86 100644 --- a/packages/inspector/src/Inspector/Inspector.tsx +++ b/packages/inspector/src/Inspector/Inspector.tsx @@ -43,7 +43,7 @@ const defaultInspectAgents: InspectAgent[] = [ /** * the inspect meta info that is sent to the callback when an element is hovered over or clicked. */ -export interface InspectParams { +export interface InspectParams { /** hover / click event target dom element */ element: Element; /** nearest named react component fiber for dom element */ @@ -60,7 +60,7 @@ export interface InspectParams { editor?: TrustedEditor; } -export type OnInspectElementParams = +export type OnInspectElementParams = & Omit>, 'editor'> & Pick, 'editor'> diff --git a/packages/launch-editor-endpoint/package.json b/packages/launch-editor-endpoint/package.json index 5a3cfba1..5b37ae15 100644 --- a/packages/launch-editor-endpoint/package.json +++ b/packages/launch-editor-endpoint/package.json @@ -1,6 +1,6 @@ { "name": "@react-dev-inspector/launch-editor-endpoint", - "version": "2.1.0-beta.7", + "version": "2.1.0-beta.8", "sideEffects": false, "description": "middleware's endpoint and types for react-dev-inspector", "main": "dist/cjs", @@ -13,17 +13,12 @@ "require": "./dist/cjs/index.js" } }, - "scripts": { - "clean": "rimraf coverage dist es lib build", - "build:esm": "tsc -p tsconfig.esm.json", - "build:cjs": "tsc -p tsconfig.cjs.json", - "build": "npm-run-all clean --parallel build:esm build:cjs" - }, "repository": { "type": "git", "url": "https://github.com/zthxxx/react-dev-inspector.git", "directory": "packages/launch-editor-endpoint" }, + "homepage": "https://github.com/zthxxx/react-dev-inspector/tree/dev/packages/launch-editor-endpoint", "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org" @@ -33,12 +28,17 @@ "bugs": { "url": "https://github.com/zthxxx/react-dev-inspector/issues" }, - "homepage": "https://github.com/zthxxx/react-dev-inspector", "files": [ "README.md", "src", "dist" ], + "scripts": { + "clean": "rimraf coverage dist es lib build", + "build:esm": "tsc -p tsconfig.esm.json", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build": "npm-run-all clean --parallel build:esm build:cjs" + }, "devDependencies": { "@types/node": "20.12.10", "@zthxxx/tsconfig": "1.0.5", diff --git a/packages/middleware/package.json b/packages/middleware/package.json index 6cd713ea..4ee39ffb 100644 --- a/packages/middleware/package.json +++ b/packages/middleware/package.json @@ -1,22 +1,17 @@ { "name": "@react-dev-inspector/middleware", - "version": "2.1.0-beta.7", + "version": "2.1.0-beta.8", "sideEffects": false, "description": "express middleware for react-dev-inspector to launch local IDE", "main": "dist/cjs", "module": "dist/esm", "types": "dist/esm", - "scripts": { - "clean": "rimraf coverage dist es lib build", - "build:esm": "tsc -p tsconfig.esm.json", - "build:cjs": "tsc -p tsconfig.cjs.json", - "build": "npm-run-all clean --parallel build:esm build:cjs" - }, "repository": { "type": "git", "url": "https://github.com/zthxxx/react-dev-inspector.git", "directory": "packages/middleware" }, + "homepage": "https://react-dev-inspector.zthxxx.me/docs/integration#inspector-middleware", "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org" @@ -26,12 +21,17 @@ "bugs": { "url": "https://github.com/zthxxx/react-dev-inspector/issues" }, - "homepage": "https://github.com/zthxxx/react-dev-inspector", "files": [ "README.md", "src", "dist" ], + "scripts": { + "clean": "rimraf coverage dist es lib build", + "build:esm": "tsc -p tsconfig.esm.json", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build": "npm-run-all clean --parallel build:esm build:cjs" + }, "engines": { "node": ">=12.0.0" }, diff --git a/packages/umi3-plugin/package.json b/packages/umi3-plugin/package.json index 8fb09667..a56a3519 100644 --- a/packages/umi3-plugin/package.json +++ b/packages/umi3-plugin/package.json @@ -1,22 +1,17 @@ { "name": "@react-dev-inspector/umi3-plugin", - "version": "2.1.0-beta.7", + "version": "2.1.0-beta.8", "sideEffects": false, "description": "umi3 plugin for react-dev-inspector to add babel plugin and server middleware", "main": "dist/cjs", "module": "dist/esm", "types": "dist/esm", - "scripts": { - "clean": "rimraf coverage dist es lib build", - "build:esm": "tsc -p tsconfig.esm.json", - "build:cjs": "tsc -p tsconfig.cjs.json", - "build": "npm-run-all clean --parallel build:esm build:cjs" - }, "repository": { "type": "git", "url": "https://github.com/zthxxx/react-dev-inspector.git", "directory": "packages/umi3-plugin" }, + "homepage": "https://react-dev-inspector.zthxxx.me/docs/integration/umijs", "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org" @@ -26,12 +21,17 @@ "bugs": { "url": "https://github.com/zthxxx/react-dev-inspector/issues" }, - "homepage": "https://github.com/zthxxx/react-dev-inspector", "files": [ "README.md", "src", "dist" ], + "scripts": { + "clean": "rimraf coverage dist es lib build", + "build:esm": "tsc -p tsconfig.esm.json", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build": "npm-run-all clean --parallel build:esm build:cjs" + }, "engines": { "node": ">=12.0.0" }, diff --git a/packages/umi4-plugin/package.json b/packages/umi4-plugin/package.json index 842b4ba3..8fa06942 100644 --- a/packages/umi4-plugin/package.json +++ b/packages/umi4-plugin/package.json @@ -1,22 +1,17 @@ { "name": "@react-dev-inspector/umi4-plugin", - "version": "2.1.0-beta.7", + "version": "2.1.0-beta.8", "sideEffects": false, "description": "umi4 plugin for react-dev-inspector to add babel plugin and server middleware", "main": "dist/cjs", "module": "dist/esm", "types": "dist/esm", - "scripts": { - "clean": "rimraf coverage dist es lib build", - "build:esm": "tsc -p tsconfig.esm.json", - "build:cjs": "tsc -p tsconfig.cjs.json", - "build": "npm-run-all clean --parallel build:esm build:cjs" - }, "repository": { "type": "git", "url": "https://github.com/zthxxx/react-dev-inspector.git", "directory": "packages/umi4-plugin" }, + "homepage": "https://react-dev-inspector.zthxxx.me/docs/integration/umijs", "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org" @@ -26,12 +21,17 @@ "bugs": { "url": "https://github.com/zthxxx/react-dev-inspector/issues" }, - "homepage": "https://github.com/zthxxx/react-dev-inspector", "files": [ "README.md", "src", "dist" ], + "scripts": { + "clean": "rimraf coverage dist es lib build", + "build:esm": "tsc -p tsconfig.esm.json", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build": "npm-run-all clean --parallel build:esm build:cjs" + }, "engines": { "node": ">=12.0.0" }, diff --git a/packages/vite-plugin/package.json b/packages/vite-plugin/package.json index cbde8eb4..12fbcfa1 100644 --- a/packages/vite-plugin/package.json +++ b/packages/vite-plugin/package.json @@ -1,22 +1,17 @@ { "name": "@react-dev-inspector/vite-plugin", - "version": "2.1.0-beta.7", + "version": "2.1.0-beta.8", "sideEffects": false, "description": "vite plugin for react-dev-inspector to add server middleware. support vite2/vite3/vite4", "main": "dist/cjs", "module": "dist/esm", "types": "dist/esm", - "scripts": { - "clean": "rimraf coverage dist es lib build", - "build:esm": "tsc -p tsconfig.esm.json", - "build:cjs": "tsc -p tsconfig.cjs.json", - "build": "npm-run-all clean --parallel build:esm build:cjs" - }, "repository": { "type": "git", "url": "https://github.com/zthxxx/react-dev-inspector.git", "directory": "packages/vite-plugin" }, + "homepage": "https://react-dev-inspector.zthxxx.me/docs/integration/vite", "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org" @@ -26,7 +21,12 @@ "bugs": { "url": "https://github.com/zthxxx/react-dev-inspector/issues" }, - "homepage": "https://github.com/zthxxx/react-dev-inspector", + "scripts": { + "clean": "rimraf coverage dist es lib build", + "build:esm": "tsc -p tsconfig.esm.json", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build": "npm-run-all clean --parallel build:esm build:cjs" + }, "files": [ "README.md", "src", diff --git a/packages/web-components/package.json b/packages/web-components/package.json index 515581e3..3ca1a603 100644 --- a/packages/web-components/package.json +++ b/packages/web-components/package.json @@ -1,6 +1,6 @@ { "name": "@react-dev-inspector/web-components", - "version": "2.1.0-beta.7", + "version": "2.1.0-beta.8", "sideEffects": false, "description": "Web UI components for react-dev-inspector, build as Web Components via solid-js.", "repository": { @@ -8,6 +8,7 @@ "url": "https://github.com/zthxxx/react-dev-inspector.git", "directory": "packages/web-components" }, + "homepage": "https://github.com/zthxxx/react-dev-inspector/tree/dev/packages/web-components", "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org" @@ -22,10 +23,14 @@ "bugs": { "url": "https://github.com/zthxxx/react-dev-inspector/issues" }, - "homepage": "https://github.com/zthxxx/react-dev-inspector", "main": "dist/cjs", "module": "dist/esm", "types": "dist/types", + "files": [ + "README.md", + "src", + "dist" + ], "exports": { ".": { "import": "./dist/esm/index.js", @@ -39,10 +44,6 @@ "#floating": "./src/floating/index.ts", "#components": "./src/components/index.ts" }, - "files": [ - "README.md", - "dist" - ], "scripts": { "test": "vitest run", "test:watch": "vitest watch",