diff --git a/.vscode/settings.json b/.vscode/settings.json index fbfaad4..6313e93 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,9 +1,19 @@ { "editor.defaultFormatter": "biomejs.biome", - "[markdown]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[html]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - } + "editor.formatOnSave": true, + "[typescript]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[javascript]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[markdown]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[html]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "editor.insertSpaces": false, + "editor.detectIndentation": false, + "editor.tabSize": 2 } diff --git a/biome.json b/biome.json index 6c75f8a..5c85471 100644 --- a/biome.json +++ b/biome.json @@ -47,7 +47,7 @@ "javascript": { "formatter": { "quoteStyle": "single", - "indentStyle": "space", + "indentStyle": "tab", "indentWidth": 2, "lineWidth": 80, "lineEnding": "lf" diff --git a/kitchen-sink/src/index.jsx b/kitchen-sink/src/index.jsx index 0d6212e..51eaf07 100644 --- a/kitchen-sink/src/index.jsx +++ b/kitchen-sink/src/index.jsx @@ -6,11 +6,12 @@ const PROJECT = "mini-react-scan"; export const root = ReactDOM.createRoot(document.getElementById("root")); const render = async () => { - const Component = ( - await import( - process.env.NODE_ENV !== "production" ? `./${PROJECT}.jsx` : "./main.jsx" - ) - ).default; + let Component; + if (process.env.NODE_ENV === "production") { + Component = (await import(/* @vite-ignore */ `./main.jsx`)).default; + } else { + Component = (await import(/* @vite-ignore */ `./${PROJECT}.jsx`)).default; + } root.render(); }; diff --git a/kitchen-sink/src/mini-react-scan.jsx b/kitchen-sink/src/mini-react-scan.jsx index b7c7ff3..cd9f36d 100644 --- a/kitchen-sink/src/mini-react-scan.jsx +++ b/kitchen-sink/src/mini-react-scan.jsx @@ -1,5 +1,5 @@ import React, { useState, createContext } from "react"; -import * as BippyScan from "bippy/dist/scan/index"; +import * as BippyScan from "bippy/scan"; // const visit = createFiberVisitor({ // onRender(fiber) { diff --git a/kitchen-sink/vite.config.mjs b/kitchen-sink/vite.config.mjs index bf6f2d5..2b11193 100644 --- a/kitchen-sink/vite.config.mjs +++ b/kitchen-sink/vite.config.mjs @@ -17,14 +17,14 @@ export default defineConfig({ tailwindcss(), ], define: { - __VERSION__: `"v${JSON.parse(fs.readFileSync("../package.json", "utf8")).version}"`, + __VERSION__: `"v${JSON.parse(fs.readFileSync('../package.json', 'utf8')).version}"`, }, resolve: - process.env.NODE_ENV === "production" + process.env.NODE_ENV === 'production' ? {} : { alias: { - bippy: path.resolve(__dirname, ".."), + bippy: path.resolve(__dirname, '../packages/bippy/dist'), }, }, }); diff --git a/package.json b/package.json index e0e672b..5f886e5 100644 --- a/package.json +++ b/package.json @@ -1,91 +1,17 @@ { - "name": "bippy", - "version": "0.1.1", - "description": "hack into react internals", - "keywords": [ - "react", - "react-instrumentation", - "react instrumentation", - "fiber", - "internals" - ], - "homepage": "https://github.com/aidenybai/bippy#readme", - "bugs": { - "url": "https://github.com/aidenybai/bippy/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/aidenybai/bippy.git" - }, - "license": "MIT", - "author": { - "name": "Aiden Bai", - "email": "aiden@million.dev" - }, - "sideEffects": false, + "name": "root", "type": "module", - "exports": { - "./package.json": "./package.json", - ".": { - "import": { - "types": "./dist/index.d.ts", - "default": "./dist/index.js" - }, - "require": { - "types": "./dist/index.d.cts", - "default": "./dist/index.cjs" - } - }, - "./core": { - "import": { - "types": "./dist/core.d.ts", - "default": "./dist/core.js" - }, - "require": { - "types": "./dist/core.d.cts", - "default": "./dist/core.cjs" - } - }, - "./dist/*": "./dist/*.js", - "./dist/*.js": "./dist/*.js", - "./dist/*.cjs": "./dist/*.cjs", - "./dist/*.mjs": "./dist/*.mjs" - }, - "main": "dist/index.js", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "files": ["dist", "bin", "package.json", "README.md", "LICENSE"], "scripts": { - "build": "NODE_ENV=production tsup", - "dev": "NODE_ENV=development tsup --watch", - "lint": "pnpm biome lint --write src/*.ts", - "format": "pnpm biome format --write src/*.ts", - "check": "pnpm biome check --write src/*.ts", - "publint": "publint", - "test": "vitest --dom", - "coverage": "vitest run --coverage --dom" + "clean": "rm -rf dist", + "build": "pnpm clean && pnpm -r build", + "dev": "pnpm clean && pnpm -r dev", + "lint": "pnpm biome lint --write packages/*/src/**/*.ts", + "format": "pnpm biome format --write packages/*/src/**/*.ts", + "check": "pnpm biome check --write packages/*/src/**/*.ts" }, "devDependencies": { - "@biomejs/biome": "1.9.4", - "@testing-library/dom": "^10.4.0", - "@testing-library/react": "^16.1.0", - "@types/react": "^18.3.12", - "@types/react-dom": "^19.0.2", - "@types/react-reconciler": "^0.28.9", - "@vitest/coverage-istanbul": "2.1.8", - "@vitest/ui": "^2.1.8", - "esbuild": "^0.24.2", - "esbuild-plugin-inline-worker": "^0.1.1", - "happy-dom": "^15.11.7", - "prettier": "^3.3.3", - "publint": "^0.2.12", - "react": "19.0.0", - "react-dom": "19.0.0", - "react-reconciler": "^0.31.0", - "semver": "^7.6.3", - "terser": "^5.36.0", - "tsup": "^8.2.4", - "vitest": "^2.1.8" + "@types/node": "^22.10.5", + "prettier": "^3.3.3" }, "publishConfig": { "access": "public" diff --git a/packages/bippy/package.json b/packages/bippy/package.json new file mode 100644 index 0000000..617c3d1 --- /dev/null +++ b/packages/bippy/package.json @@ -0,0 +1,97 @@ +{ + "name": "bippy", + "version": "0.1.1", + "description": "hack into react internals", + "keywords": [ + "react", + "react-instrumentation", + "react instrumentation", + "fiber", + "internals" + ], + "homepage": "https://github.com/aidenybai/bippy#readme", + "bugs": { + "url": "https://github.com/aidenybai/bippy/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/aidenybai/bippy.git" + }, + "license": "MIT", + "author": { + "name": "Aiden Bai", + "email": "aiden@million.dev" + }, + "sideEffects": false, + "type": "module", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } + }, + "./core": { + "import": { + "types": "./dist/core.d.ts", + "default": "./dist/core.js" + }, + "require": { + "types": "./dist/core.d.cts", + "default": "./dist/core.cjs" + } + }, + "./dist/*": "./dist/*.js", + "./dist/*.js": "./dist/*.js", + "./dist/*.cjs": "./dist/*.cjs", + "./dist/*.mjs": "./dist/*.mjs" + }, + "main": "dist/index.js", + "module": "dist/index.js", + "types": "dist/index.d.ts", + "files": [ + "dist", + "bin", + "package.json", + "README.md", + "LICENSE" + ], + "scripts": { + "build": "tsup", + "dev": "tsup --watch", + "publint": "publint", + "test": "vitest --dom", + "coverage": "vitest run --coverage --dom" + }, + "devDependencies": { + "@biomejs/biome": "1.9.4", + "@testing-library/dom": "^10.4.0", + "@testing-library/react": "^16.1.0", + "@types/node": "^22.10.5", + "@types/react": "^18.3.12", + "@types/react-dom": "^19.0.2", + "@types/react-reconciler": "^0.28.9", + "@vitest/coverage-istanbul": "2.1.8", + "@vitest/ui": "^2.1.8", + "esbuild": "^0.24.2", + "esbuild-plugin-inline-worker": "^0.1.1", + "happy-dom": "^15.11.7", + "prettier": "^3.3.3", + "publint": "^0.2.12", + "react": "19.0.0", + "react-dom": "19.0.0", + "react-reconciler": "^0.31.0", + "semver": "^7.6.3", + "terser": "^5.36.0", + "tsup": "^8.2.4", + "vitest": "^2.1.8" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/src/core.ts b/packages/bippy/src/core.ts similarity index 99% rename from src/core.ts rename to packages/bippy/src/core.ts index 9d3b62e..5c30dd2 100644 --- a/src/core.ts +++ b/packages/bippy/src/core.ts @@ -6,7 +6,7 @@ import { BIPPY_INSTRUMENTATION_STRING, getRDTHook, hasRDTHook, -} from "./rdt-hook.js"; +} from "./rdt-hook"; import type { ContextDependency, Effect, @@ -14,7 +14,7 @@ import type { FiberRoot, MemoizedState, ReactRenderer, -} from "./types.js"; +} from "./types"; // https://github.com/facebook/react/blob/main/packages/react-reconciler/src/ReactWorkTags.js export const FunctionComponentTag = 0; diff --git a/src/index-dom.test.tsx b/packages/bippy/src/index-dom.test.tsx similarity index 99% rename from src/index-dom.test.tsx rename to packages/bippy/src/index-dom.test.tsx index 973433e..d5a7d60 100644 --- a/src/index-dom.test.tsx +++ b/packages/bippy/src/index-dom.test.tsx @@ -27,7 +27,7 @@ import { traverseFiber, traverseProps, traverseState, -} from "./index.js"; +} from "./index"; import React, { isValidElement } from "react"; import { render, screen } from "@testing-library/react"; diff --git a/packages/bippy/src/index.ts b/packages/bippy/src/index.ts new file mode 100644 index 0000000..7cbd74e --- /dev/null +++ b/packages/bippy/src/index.ts @@ -0,0 +1,3 @@ +export * from "./rdt-hook"; +export * from "./core"; +export type * from "./types"; diff --git a/src/rdt-hook.ts b/packages/bippy/src/rdt-hook.ts similarity index 99% rename from src/rdt-hook.ts rename to packages/bippy/src/rdt-hook.ts index 035b8e0..f015d69 100644 --- a/src/rdt-hook.ts +++ b/packages/bippy/src/rdt-hook.ts @@ -1,4 +1,4 @@ -import type { ReactDevToolsGlobalHook, ReactRenderer } from "./types.js"; +import type { ReactDevToolsGlobalHook, ReactRenderer } from "./types"; export const version = process.env.VERSION; export const BIPPY_INSTRUMENTATION_STRING = `bippy-${version}`; diff --git a/src/scan/README.md b/packages/bippy/src/scan/README.md similarity index 100% rename from src/scan/README.md rename to packages/bippy/src/scan/README.md diff --git a/src/scan/canvas.ts b/packages/bippy/src/scan/canvas.ts similarity index 100% rename from src/scan/canvas.ts rename to packages/bippy/src/scan/canvas.ts diff --git a/src/scan/index.ts b/packages/bippy/src/scan/index.ts similarity index 100% rename from src/scan/index.ts rename to packages/bippy/src/scan/index.ts diff --git a/src/scan/offscreen-canvas.worker.ts b/packages/bippy/src/scan/offscreen-canvas.worker.ts similarity index 100% rename from src/scan/offscreen-canvas.worker.ts rename to packages/bippy/src/scan/offscreen-canvas.worker.ts diff --git a/src/scan/types.ts b/packages/bippy/src/scan/types.ts similarity index 100% rename from src/scan/types.ts rename to packages/bippy/src/scan/types.ts diff --git a/src/types.ts b/packages/bippy/src/types.ts similarity index 100% rename from src/types.ts rename to packages/bippy/src/types.ts diff --git a/packages/bippy/tsconfig.json b/packages/bippy/tsconfig.json new file mode 100644 index 0000000..f2281f5 --- /dev/null +++ b/packages/bippy/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "include": [ + "src", + "vitest.config.ts", + "tsup.config.ts" + ] +} diff --git a/tsup.config.ts b/packages/bippy/tsup.config.ts similarity index 100% rename from tsup.config.ts rename to packages/bippy/tsup.config.ts diff --git a/vitest.config.ts b/packages/bippy/vitest.config.ts similarity index 100% rename from vitest.config.ts rename to packages/bippy/vitest.config.ts diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f975a92..ca05209 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,58 @@ settings: importers: .: + devDependencies: + '@types/node': + specifier: ^22.10.5 + version: 22.10.5 + prettier: + specifier: ^3.3.3 + version: 3.4.1 + + kitchen-sink: + dependencies: + '@codesandbox/sandpack-react': + specifier: ^2.19.10 + version: 2.19.10(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@codesandbox/sandpack-themes': + specifier: ^2.0.21 + version: 2.0.21 + bippy: + specifier: ^0.1.1 + version: 0.1.1 + clsx: + specifier: ^2.1.1 + version: 2.1.1 + react: + specifier: ^19.0.0 + version: 19.0.0 + react-dom: + specifier: ^19.0.0 + version: 19.0.0(react@19.0.0) + react-inspector: + specifier: ^6.0.2 + version: 6.0.2(react@19.0.0) + sugar-high: + specifier: ^0.7.5 + version: 0.7.5 + tailwind-merge: + specifier: ^2.6.0 + version: 2.6.0 + devDependencies: + '@tailwindcss/vite': + specifier: 4.0.0-beta.8 + version: 4.0.0-beta.8(vite@6.0.2(@types/node@22.10.5)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.36.0)(yaml@2.7.0)) + '@vitejs/plugin-react': + specifier: ^4.3.4 + version: 4.3.4(vite@6.0.2(@types/node@22.10.5)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.36.0)(yaml@2.7.0)) + tailwindcss: + specifier: 4.0.0-beta.8 + version: 4.0.0-beta.8 + vite: + specifier: ^6.0.2 + version: 6.0.2(@types/node@22.10.5)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.36.0)(yaml@2.7.0) + + packages/bippy: devDependencies: '@biomejs/biome': specifier: 1.9.4 @@ -17,6 +69,9 @@ importers: '@testing-library/react': specifier: ^16.1.0 version: 16.1.0(@testing-library/dom@10.4.0)(@types/react-dom@19.0.2(@types/react@18.3.12))(@types/react@18.3.12)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@types/node': + specifier: ^22.10.5 + version: 22.10.5 '@types/react': specifier: ^18.3.12 version: 18.3.12 @@ -67,50 +122,7 @@ importers: version: 8.3.5(jiti@2.4.2)(postcss@8.4.49)(typescript@5.7.2)(yaml@2.7.0) vitest: specifier: ^2.1.8 - version: 2.1.8(@vitest/ui@2.1.8)(happy-dom@15.11.7)(lightningcss@1.28.2)(terser@5.36.0) - - kitchen-sink: - dependencies: - '@codesandbox/sandpack-react': - specifier: ^2.19.10 - version: 2.19.10(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - '@codesandbox/sandpack-themes': - specifier: ^2.0.21 - version: 2.0.21 - bippy: - specifier: ^0.1.1 - version: 0.1.1 - clsx: - specifier: ^2.1.1 - version: 2.1.1 - react: - specifier: ^19.0.0 - version: 19.0.0 - react-dom: - specifier: ^19.0.0 - version: 19.0.0(react@19.0.0) - react-inspector: - specifier: ^6.0.2 - version: 6.0.2(react@19.0.0) - sugar-high: - specifier: ^0.7.5 - version: 0.7.5 - tailwind-merge: - specifier: ^2.6.0 - version: 2.6.0 - devDependencies: - '@tailwindcss/vite': - specifier: 4.0.0-beta.8 - version: 4.0.0-beta.8(vite@6.0.2(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.36.0)(yaml@2.7.0)) - '@vitejs/plugin-react': - specifier: ^4.3.4 - version: 4.3.4(vite@6.0.2(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.36.0)(yaml@2.7.0)) - tailwindcss: - specifier: 4.0.0-beta.8 - version: 4.0.0-beta.8 - vite: - specifier: ^6.0.2 - version: 6.0.2(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.36.0)(yaml@2.7.0) + version: 2.1.8(@types/node@22.10.5)(@vitest/ui@2.1.8)(happy-dom@15.11.7)(lightningcss@1.28.2)(terser@5.36.0) packages: @@ -1006,6 +1018,9 @@ packages: '@types/estree@1.0.6': resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + '@types/node@22.10.5': + resolution: {integrity: sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==} + '@types/prop-types@15.7.13': resolution: {integrity: sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==} @@ -1930,6 +1945,9 @@ packages: engines: {node: '>=14.17'} hasBin: true + undici-types@6.20.0: + resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + update-browserslist-db@1.1.1: resolution: {integrity: sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==} hasBin: true @@ -2753,13 +2771,13 @@ snapshots: '@tailwindcss/oxide-win32-arm64-msvc': 4.0.0-beta.8 '@tailwindcss/oxide-win32-x64-msvc': 4.0.0-beta.8 - '@tailwindcss/vite@4.0.0-beta.8(vite@6.0.2(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.36.0)(yaml@2.7.0))': + '@tailwindcss/vite@4.0.0-beta.8(vite@6.0.2(@types/node@22.10.5)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.36.0)(yaml@2.7.0))': dependencies: '@tailwindcss/node': 4.0.0-beta.8 '@tailwindcss/oxide': 4.0.0-beta.8 lightningcss: 1.28.2 tailwindcss: 4.0.0-beta.8 - vite: 6.0.2(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.36.0)(yaml@2.7.0) + vite: 6.0.2(@types/node@22.10.5)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.36.0)(yaml@2.7.0) '@testing-library/dom@10.4.0': dependencies: @@ -2807,6 +2825,10 @@ snapshots: '@types/estree@1.0.6': {} + '@types/node@22.10.5': + dependencies: + undici-types: 6.20.0 + '@types/prop-types@15.7.13': {} '@types/react-dom@19.0.2(@types/react@18.3.12)': @@ -2822,14 +2844,14 @@ snapshots: '@types/prop-types': 15.7.13 csstype: 3.1.3 - '@vitejs/plugin-react@4.3.4(vite@6.0.2(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.36.0)(yaml@2.7.0))': + '@vitejs/plugin-react@4.3.4(vite@6.0.2(@types/node@22.10.5)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.36.0)(yaml@2.7.0))': dependencies: '@babel/core': 7.26.0 '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.0) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 6.0.2(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.36.0)(yaml@2.7.0) + vite: 6.0.2(@types/node@22.10.5)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.36.0)(yaml@2.7.0) transitivePeerDependencies: - supports-color @@ -2845,7 +2867,7 @@ snapshots: magicast: 0.3.5 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.1.8(@vitest/ui@2.1.8)(happy-dom@15.11.7)(lightningcss@1.28.2)(terser@5.36.0) + vitest: 2.1.8(@types/node@22.10.5)(@vitest/ui@2.1.8)(happy-dom@15.11.7)(lightningcss@1.28.2)(terser@5.36.0) transitivePeerDependencies: - supports-color @@ -2856,13 +2878,13 @@ snapshots: chai: 5.1.2 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.8(vite@5.4.11(lightningcss@1.28.2)(terser@5.36.0))': + '@vitest/mocker@2.1.8(vite@5.4.11(@types/node@22.10.5)(lightningcss@1.28.2)(terser@5.36.0))': dependencies: '@vitest/spy': 2.1.8 estree-walker: 3.0.3 magic-string: 0.30.15 optionalDependencies: - vite: 5.4.11(lightningcss@1.28.2)(terser@5.36.0) + vite: 5.4.11(@types/node@22.10.5)(lightningcss@1.28.2)(terser@5.36.0) '@vitest/pretty-format@2.1.8': dependencies: @@ -2892,7 +2914,7 @@ snapshots: sirv: 3.0.0 tinyglobby: 0.2.10 tinyrainbow: 1.2.0 - vitest: 2.1.8(@vitest/ui@2.1.8)(happy-dom@15.11.7)(lightningcss@1.28.2)(terser@5.36.0) + vitest: 2.1.8(@types/node@22.10.5)(@vitest/ui@2.1.8)(happy-dom@15.11.7)(lightningcss@1.28.2)(terser@5.36.0) '@vitest/utils@2.1.8': dependencies: @@ -3729,19 +3751,21 @@ snapshots: typescript@5.7.2: optional: true + undici-types@6.20.0: {} + update-browserslist-db@1.1.1(browserslist@4.24.2): dependencies: browserslist: 4.24.2 escalade: 3.2.0 picocolors: 1.1.1 - vite-node@2.1.8(lightningcss@1.28.2)(terser@5.36.0): + vite-node@2.1.8(@types/node@22.10.5)(lightningcss@1.28.2)(terser@5.36.0): dependencies: cac: 6.7.14 debug: 4.3.7 es-module-lexer: 1.5.4 pathe: 1.1.2 - vite: 5.4.11(lightningcss@1.28.2)(terser@5.36.0) + vite: 5.4.11(@types/node@22.10.5)(lightningcss@1.28.2)(terser@5.36.0) transitivePeerDependencies: - '@types/node' - less @@ -3753,32 +3777,34 @@ snapshots: - supports-color - terser - vite@5.4.11(lightningcss@1.28.2)(terser@5.36.0): + vite@5.4.11(@types/node@22.10.5)(lightningcss@1.28.2)(terser@5.36.0): dependencies: esbuild: 0.21.5 postcss: 8.4.49 rollup: 4.28.0 optionalDependencies: + '@types/node': 22.10.5 fsevents: 2.3.3 lightningcss: 1.28.2 terser: 5.36.0 - vite@6.0.2(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.36.0)(yaml@2.7.0): + vite@6.0.2(@types/node@22.10.5)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.36.0)(yaml@2.7.0): dependencies: esbuild: 0.24.0 postcss: 8.4.49 rollup: 4.28.0 optionalDependencies: + '@types/node': 22.10.5 fsevents: 2.3.3 jiti: 2.4.2 lightningcss: 1.28.2 terser: 5.36.0 yaml: 2.7.0 - vitest@2.1.8(@vitest/ui@2.1.8)(happy-dom@15.11.7)(lightningcss@1.28.2)(terser@5.36.0): + vitest@2.1.8(@types/node@22.10.5)(@vitest/ui@2.1.8)(happy-dom@15.11.7)(lightningcss@1.28.2)(terser@5.36.0): dependencies: '@vitest/expect': 2.1.8 - '@vitest/mocker': 2.1.8(vite@5.4.11(lightningcss@1.28.2)(terser@5.36.0)) + '@vitest/mocker': 2.1.8(vite@5.4.11(@types/node@22.10.5)(lightningcss@1.28.2)(terser@5.36.0)) '@vitest/pretty-format': 2.1.8 '@vitest/runner': 2.1.8 '@vitest/snapshot': 2.1.8 @@ -3794,10 +3820,11 @@ snapshots: tinyexec: 0.3.1 tinypool: 1.0.2 tinyrainbow: 1.2.0 - vite: 5.4.11(lightningcss@1.28.2)(terser@5.36.0) - vite-node: 2.1.8(lightningcss@1.28.2)(terser@5.36.0) + vite: 5.4.11(@types/node@22.10.5)(lightningcss@1.28.2)(terser@5.36.0) + vite-node: 2.1.8(@types/node@22.10.5)(lightningcss@1.28.2)(terser@5.36.0) why-is-node-running: 2.3.0 optionalDependencies: + '@types/node': 22.10.5 '@vitest/ui': 2.1.8(vitest@2.1.8) happy-dom: 15.11.7 transitivePeerDependencies: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index ce0db90..fd6e2a3 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,2 +1,3 @@ packages: + - 'packages/*' - 'kitchen-sink' diff --git a/src/index.ts b/src/index.ts deleted file mode 100644 index 1bfb3d5..0000000 --- a/src/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./rdt-hook.js"; -export * from "./core.js"; -export type * from "./types.js"; diff --git a/tsconfig.json b/tsconfig.json index 6f1ee44..d8d5b28 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,13 +1,17 @@ { "compilerOptions": { "jsx": "react", - "module": "NodeNext", + "module": "ESNext", + "target": "ESNext", "esModuleInterop": true, "strictNullChecks": true, "allowSyntheticDefaultImports": true, "strict": true, - "lib": ["esnext", "dom"] + "lib": [ + "esnext", + "dom" + ], + "moduleResolution": "bundler" }, - "include": ["src", "vitest.config.ts", "tsup.config.ts"], "exclude": ["**/node_modules/**", "dist"] }