diff --git a/package-lock.json b/package-lock.json index c240885..dcc1bb9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@fortanix/baklava", - "version": "1.0.0-beta-20241114", + "version": "1.0.0-beta-20241115", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@fortanix/baklava", - "version": "1.0.0-beta-20241114", + "version": "1.0.0-beta-20241115", "license": "MPL-2.0", "dependencies": { "@effect/schema": "^0.74.1", @@ -17,8 +17,8 @@ "fast-check": "^3.13.2", "message-tag": "^0.10.0", "optics-ts": "^2.4.1", - "react": "^19.0.0-rc-0751fac7-20241002", - "react-dom": "^19.0.0-rc-0751fac7-20241002", + "react": "^19.0.0-rc.1", + "react-dom": "^19.0.0-rc.1", "react-error-boundary": "^4.0.13", "react-hook-form": "^7.53.0", "react-toastify": "^10.0.5" diff --git a/package.json b/package.json index 5688ad4..b51d423 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "//": "NOTE: This is a generated file. Do not edit this file directly, use package.json.js instead.", "name": "@fortanix/baklava", - "version": "1.0.0-beta-20241114", + "version": "1.0.0-beta-20241115", "license": "MPL-2.0", "author": "Fortanix", "description": "Fortanix Baklava design system", @@ -9,10 +9,6 @@ "type": "git", "url": "git+https://github.com/fortanix/baklava.git" }, - "sideEffects": [ - "*.css" - ], - "type": "module", "files": [ "src", "app", @@ -21,6 +17,16 @@ "CHANGELOG.md", "README.md" ], + "sideEffects": [ + "*.css" + ], + "type": "module", + "exports": { + ".": { + "types": "dist/baklava.d.ts", + "default": "dist/baklava.js" + } + }, "scripts": { "gen-package": "node package.json.js", "install-project": "npm run gen-package && npm install --force", @@ -84,8 +90,8 @@ "date-fns": "^4.1.0", "message-tag": "^0.10.0", "classnames": "^2.5.1", - "react": "^19.0.0-rc-0751fac7-20241002", - "react-dom": "^19.0.0-rc-0751fac7-20241002", + "react": "^19.0.0-rc.1", + "react-dom": "^19.0.0-rc.1", "react-error-boundary": "^4.0.13", "@floating-ui/react": "^0.26.24", "react-toastify": "^10.0.5", diff --git a/package.json.js b/package.json.js index 5db96b2..b83f465 100644 --- a/package.json.js +++ b/package.json.js @@ -8,15 +8,12 @@ import * as fs from 'node:fs'; const packageConfig = { name: '@fortanix/baklava', - version: '1.0.0-beta-20241114', + version: '1.0.0-beta-20241115', license: 'MPL-2.0', author: 'Fortanix', description: 'Fortanix Baklava design system', repository: { type: 'git', url: 'git+https://github.com/fortanix/baklava.git' }, - sideEffects: ['*.css'], - - type: 'module', files: [ 'src', 'app', @@ -25,6 +22,15 @@ const packageConfig = { 'CHANGELOG.md', 'README.md', ], + sideEffects: ['*.css'], + type: 'module', + exports: { + '.': { + 'types': 'dist/baklava.d.ts', + //'require': 'dist/baklava.cjs', + 'default': 'dist/baklava.js', + } + }, scripts: { // Utilities @@ -137,8 +143,8 @@ const packageConfig = { // React 'classnames': '^2.5.1', - 'react': '^19.0.0-rc-0751fac7-20241002', - 'react-dom': '^19.0.0-rc-0751fac7-20241002', + 'react': '^19.0.0-rc.1', + 'react-dom': '^19.0.0-rc.1', 'react-error-boundary': '^4.0.13', '@floating-ui/react': '^0.26.24', diff --git a/vite.config.ts b/vite.config.ts index 4aaf6a5..037ec8e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -37,7 +37,13 @@ export default defineConfig({ // Generate `.d.ts` files dts({ + // https://github.com/qmhc/vite-plugin-dts/issues/275#issuecomment-1963123685 + outDir: 'dist', // dts.root + 'dist' => where we need to rollup. + root: '../', //vite.root + ../ = ./ = (dts.root) + staticImport: true, + insertTypesEntry: true, rollupTypes: true, + //include: [path.resolve(__dirname, 'app')], tsconfigPath: path.resolve(__dirname, 'tsconfig.json'), }),