diff --git a/.changeset/spotty-roses-nail.md b/.changeset/spotty-roses-nail.md new file mode 100644 index 00000000..13391838 --- /dev/null +++ b/.changeset/spotty-roses-nail.md @@ -0,0 +1,5 @@ +--- +"next-yak": patch +--- + +Fixed types in bun workspaces diff --git a/packages/next-yak/package.json b/packages/next-yak/package.json index a2c5b8f0..5f1fa139 100644 --- a/packages/next-yak/package.json +++ b/packages/next-yak/package.json @@ -1,36 +1,54 @@ { "name": "next-yak", "version": "9.4.1", - "type": "module", - "types": "./dist/", - "sideEffects": false, - "license": "MIT", "description": "next-yak is a CSS-in-JS solution tailored for Next.js that seamlessly combines the expressive power of styled-components syntax with efficient build-time extraction of CSS using Next.js's built-in CSS configuration", + "keywords": [ + "css-in-js", + "next.js", + "react", + "styled-components", + "typescript" + ], "homepage": "https://yak.js.org/", + "bugs": { + "url": "https://github.com/DigitecGalaxus/next-yak/issues" + }, + "license": "MIT", + "author": { + "name": "Jan Nicklas" + }, + "maintainers": [ + { + "name": "Luca Schneider" + } + ], "repository": { "type": "git", "url": "https://github.com/DigitecGalaxus/next-yak.git" }, - "bugs": { - "url": "https://github.com/DigitecGalaxus/next-yak/issues" - }, - "keywords": [ - "next.js", - "css-in-js", - "styled-components", - "react", - "typescript" + "files": [ + "dist", + "loaders", + "runtime", + "withYak", + "LICENSE" ], + "type": "module", + "sideEffects": false, + "types": "./dist/", "exports": { ".": { + "types": "./dist/index.d.ts", "import": "./dist/index.js", "require": "./dist/index.cjs" }, "./static": { + "types": "./dist/static/index.d.ts", "import": "./dist/static/index.js", "require": "./dist/static/index.cjs" }, "./internal": { + "types": "./dist/internal.d.ts", "import": "./dist/internal.js", "require": "./dist/internal.cjs" }, @@ -40,24 +58,29 @@ "require": "./dist/withYak/index.cjs" }, "./context/baseContext": { + "types": "./dist/context/baseContext.d.ts", "import": "./dist/context/baseContext.js", "require": "./dist/context/baseContext.cjs" }, "./context": { "react-server": { + "types": "./dist/context/index.server.d.ts", "import": "./dist/context/index.server.js", "require": "./dist/context/index.server.cjs" }, "default": { + "types": "./dist/context/index.d.ts", "import": "./dist/context/index.js", "require": "./dist/context/index.cjs" } }, "./jsx-runtime": { + "types": "./dist/jsx-runtime.d.ts", "require": "./dist/jsx-runtime.cjs", "import": "./dist/jsx-runtime.js" }, "./jsx-dev-runtime": { + "types": "./dist/jsx-dev-runtime.d.ts", "require": "./dist/jsx-dev-runtime.cjs", "import": "./dist/jsx-dev-runtime.js" }, @@ -68,6 +91,9 @@ "import": "./dist/loaders/vite-plugin.js" } }, + "publishConfig": { + "access": "public" + }, "scripts": { "prepublishOnly": "node ../../scripts/check-pnpm.js && npm run build && npm run test && npm run test:types:code && npm run test:types:test", "build": "tsup", @@ -103,33 +129,23 @@ "vitest": "catalog:dev" }, "peerDependencies": { + "@types/react": ">=18", "next": ">=16.1.0", + "react": ">=18.0.0", "vite": ">=7.0.0" }, "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, "next": { "optional": true }, "vite": { "optional": true + }, + "react": { + "optional": true } - }, - "files": [ - "dist", - "loaders", - "runtime", - "withYak", - "LICENSE" - ], - "publishConfig": { - "access": "public" - }, - "maintainers": [ - { - "name": "Luca Schneider" - } - ], - "author": { - "name": "Jan Nicklas" } } diff --git a/packages/next-yak/tsup.config.ts b/packages/next-yak/tsup.config.ts index 992f82e1..f3ffcba1 100644 --- a/packages/next-yak/tsup.config.ts +++ b/packages/next-yak/tsup.config.ts @@ -29,7 +29,7 @@ export default defineConfig([ format: ["cjs", "esm"], minify: false, sourcemap: true, - dts: false, + dts: true, external: ["react", "next-yak/context"], target: "es2022", outDir: "dist", @@ -77,6 +77,7 @@ export default defineConfig([ minify: false, sourcemap: true, clean: false, + dts: true, external: ["react", "next-yak/context/baseContext", "./index.js"], target: "es2022", outDir: "dist/context", @@ -173,6 +174,7 @@ export default defineConfig([ minify: true, sourcemap: true, clean: true, + dts: true, external: ["react"], target: "es2022", outDir: "dist",