diff --git a/package.json b/package.json index 9150370..fa184d5 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "private": false, "sideEffects": false, "type": "module", - "main": "./dist/index.cjs", + "main": "./dist/index.js", "module": "./dist/index.js", "types": "./dist/index.d.ts", "browser": {}, @@ -32,14 +32,12 @@ "import": { "types": "./dist/index.d.ts", "default": "./dist/dev.js" - }, - "require": "./dist/dev.cjs" + } }, "import": { "types": "./dist/index.d.ts", "default": "./dist/index.js" - }, - "require": "./dist/index.cjs" + } }, "typesVersions": {}, "scripts": { @@ -62,7 +60,7 @@ "@typescript-eslint/eslint-plugin": "^6.1.0", "@typescript-eslint/parser": "^6.1.0", "concurrently": "^8.2.0", - "esbuild": "^0.18.14", + "esbuild": "^0.18.15", "esbuild-plugin-solid": "^0.5.0", "eslint": "^8.45.0", "eslint-plugin-eslint-comments": "^3.2.0", @@ -71,9 +69,9 @@ "prettier": "3.0.0", "solid-js": "^1.7.8", "tsup": "^7.1.0", - "tsup-preset-solid": "^1.0.0", + "tsup-preset-solid": "^2.0.1", "typescript": "^5.1.6", - "vite": "^4.4.4", + "vite": "^4.4.6", "vite-plugin-solid": "^2.7.0", "vitest": "^0.33.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4df44fe..761975f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,11 +15,11 @@ devDependencies: specifier: ^8.2.0 version: 8.2.0 esbuild: - specifier: ^0.18.14 - version: 0.18.14 + specifier: ^0.18.15 + version: 0.18.15 esbuild-plugin-solid: specifier: ^0.5.0 - version: 0.5.0(esbuild@0.18.14)(solid-js@1.7.8) + version: 0.5.0(esbuild@0.18.15)(solid-js@1.7.8) eslint: specifier: ^8.45.0 version: 8.45.0 @@ -42,17 +42,17 @@ devDependencies: specifier: ^7.1.0 version: 7.1.0(typescript@5.1.6) tsup-preset-solid: - specifier: ^1.0.0 - version: 1.0.0(esbuild@0.18.14)(solid-js@1.7.8)(tsup@7.1.0) + specifier: ^2.0.1 + version: 2.0.1(esbuild@0.18.15)(solid-js@1.7.8)(tsup@7.1.0) typescript: specifier: ^5.1.6 version: 5.1.6 vite: - specifier: ^4.4.4 - version: 4.4.4(@types/node@20.4.2) + specifier: ^4.4.6 + version: 4.4.6(@types/node@20.4.2) vite-plugin-solid: specifier: ^2.7.0 - version: 2.7.0(solid-js@1.7.8)(vite@4.4.4) + version: 2.7.0(solid-js@1.7.8)(vite@4.4.6) vitest: specifier: ^0.33.0 version: 0.33.0(jsdom@22.1.0) @@ -401,8 +401,8 @@ packages: to-fast-properties: 2.0.0 dev: true - /@esbuild/android-arm64@0.18.14: - resolution: {integrity: sha512-rZ2v+Luba5/3D6l8kofWgTnqE+qsC/L5MleKIKFyllHTKHrNBMqeRCnZI1BtRx8B24xMYxeU32iIddRQqMsOsg==} + /@esbuild/android-arm64@0.18.15: + resolution: {integrity: sha512-NI/gnWcMl2kXt1HJKOn2H69SYn4YNheKo6NZt1hyfKWdMbaGadxjZIkcj4Gjk/WPxnbFXs9/3HjGHaknCqjrww==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -410,8 +410,8 @@ packages: dev: true optional: true - /@esbuild/android-arm@0.18.14: - resolution: {integrity: sha512-blODaaL+lngG5bdK/t4qZcQvq2BBqrABmYwqPPcS5VRxrCSGHb9R/rA3fqxh7R18I7WU4KKv+NYkt22FDfalcg==} + /@esbuild/android-arm@0.18.15: + resolution: {integrity: sha512-wlkQBWb79/jeEEoRmrxt/yhn5T1lU236OCNpnfRzaCJHZ/5gf82uYx1qmADTBWE0AR/v7FiozE1auk2riyQd3w==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -419,8 +419,8 @@ packages: dev: true optional: true - /@esbuild/android-x64@0.18.14: - resolution: {integrity: sha512-qSwh8y38QKl+1Iqg+YhvCVYlSk3dVLk9N88VO71U4FUjtiSFylMWK3Ugr8GC6eTkkP4Tc83dVppt2n8vIdlSGg==} + /@esbuild/android-x64@0.18.15: + resolution: {integrity: sha512-FM9NQamSaEm/IZIhegF76aiLnng1kEsZl2eve/emxDeReVfRuRNmvT28l6hoFD9TsCxpK+i4v8LPpEj74T7yjA==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -428,8 +428,8 @@ packages: dev: true optional: true - /@esbuild/darwin-arm64@0.18.14: - resolution: {integrity: sha512-9Hl2D2PBeDYZiNbnRKRWuxwHa9v5ssWBBjisXFkVcSP5cZqzZRFBUWEQuqBHO4+PKx4q4wgHoWtfQ1S7rUqJ2Q==} + /@esbuild/darwin-arm64@0.18.15: + resolution: {integrity: sha512-XmrFwEOYauKte9QjS6hz60FpOCnw4zaPAb7XV7O4lx1r39XjJhTN7ZpXqJh4sN6q60zbP6QwAVVA8N/wUyBH/w==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -437,8 +437,8 @@ packages: dev: true optional: true - /@esbuild/darwin-x64@0.18.14: - resolution: {integrity: sha512-ZnI3Dg4ElQ6tlv82qLc/UNHtFsgZSKZ7KjsUNAo1BF1SoYDjkGKHJyCrYyWjFecmXpvvG/KJ9A/oe0H12odPLQ==} + /@esbuild/darwin-x64@0.18.15: + resolution: {integrity: sha512-bMqBmpw1e//7Fh5GLetSZaeo9zSC4/CMtrVFdj+bqKPGJuKyfNJ5Nf2m3LknKZTS+Q4oyPiON+v3eaJ59sLB5A==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -446,8 +446,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-arm64@0.18.14: - resolution: {integrity: sha512-h3OqR80Da4oQCIa37zl8tU5MwHQ7qgPV0oVScPfKJK21fSRZEhLE4IIVpmcOxfAVmqjU6NDxcxhYaM8aDIGRLw==} + /@esbuild/freebsd-arm64@0.18.15: + resolution: {integrity: sha512-LoTK5N3bOmNI9zVLCeTgnk5Rk0WdUTrr9dyDAQGVMrNTh9EAPuNwSTCgaKOKiDpverOa0htPcO9NwslSE5xuLA==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -455,8 +455,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-x64@0.18.14: - resolution: {integrity: sha512-ha4BX+S6CZG4BoH9tOZTrFIYC1DH13UTCRHzFc3GWX74nz3h/N6MPF3tuR3XlsNjMFUazGgm35MPW5tHkn2lzQ==} + /@esbuild/freebsd-x64@0.18.15: + resolution: {integrity: sha512-62jX5n30VzgrjAjOk5orYeHFq6sqjvsIj1QesXvn5OZtdt5Gdj0vUNJy9NIpjfdNdqr76jjtzBJKf+h2uzYuTQ==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -464,8 +464,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm64@0.18.14: - resolution: {integrity: sha512-IXORRe22In7U65NZCzjwAUc03nn8SDIzWCnfzJ6t/8AvGx5zBkcLfknI+0P+hhuftufJBmIXxdSTbzWc8X/V4w==} + /@esbuild/linux-arm64@0.18.15: + resolution: {integrity: sha512-BWncQeuWDgYv0jTNzJjaNgleduV4tMbQjmk/zpPh/lUdMcNEAxy+jvneDJ6RJkrqloG7tB9S9rCrtfk/kuplsQ==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -473,8 +473,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm@0.18.14: - resolution: {integrity: sha512-5+7vehI1iqru5WRtJyU2XvTOvTGURw3OZxe3YTdE9muNNIdmKAVmSHpB3Vw2LazJk2ifEdIMt/wTWnVe5V98Kg==} + /@esbuild/linux-arm@0.18.15: + resolution: {integrity: sha512-dT4URUv6ir45ZkBqhwZwyFV6cH61k8MttIwhThp2BGiVtagYvCToF+Bggyx2VI57RG4Fbt21f9TmXaYx0DeUJg==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -482,8 +482,8 @@ packages: dev: true optional: true - /@esbuild/linux-ia32@0.18.14: - resolution: {integrity: sha512-BfHlMa0nibwpjG+VXbOoqJDmFde4UK2gnW351SQ2Zd4t1N3zNdmUEqRkw/srC1Sa1DRBE88Dbwg4JgWCbNz/FQ==} + /@esbuild/linux-ia32@0.18.15: + resolution: {integrity: sha512-JPXORvgHRHITqfms1dWT/GbEY89u848dC08o0yK3fNskhp0t2TuNUnsrrSgOdH28ceb1hJuwyr8R/1RnyPwocw==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -491,8 +491,8 @@ packages: dev: true optional: true - /@esbuild/linux-loong64@0.18.14: - resolution: {integrity: sha512-j2/Ex++DRUWIAaUDprXd3JevzGtZ4/d7VKz+AYDoHZ3HjJzCyYBub9CU1wwIXN+viOP0b4VR3RhGClsvyt/xSw==} + /@esbuild/linux-loong64@0.18.15: + resolution: {integrity: sha512-kArPI0DopjJCEplsVj/H+2Qgzz7vdFSacHNsgoAKpPS6W/Ndh8Oe24HRDQ5QCu4jHgN6XOtfFfLpRx3TXv/mEg==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -500,8 +500,8 @@ packages: dev: true optional: true - /@esbuild/linux-mips64el@0.18.14: - resolution: {integrity: sha512-qn2+nc+ZCrJmiicoAnJXJJkZWt8Nwswgu1crY7N+PBR8ChBHh89XRxj38UU6Dkthl2yCVO9jWuafZ24muzDC/A==} + /@esbuild/linux-mips64el@0.18.15: + resolution: {integrity: sha512-b/tmngUfO02E00c1XnNTw/0DmloKjb6XQeqxaYuzGwHe0fHVgx5/D6CWi+XH1DvkszjBUkK9BX7n1ARTOst59w==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -509,8 +509,8 @@ packages: dev: true optional: true - /@esbuild/linux-ppc64@0.18.14: - resolution: {integrity: sha512-aGzXzd+djqeEC5IRkDKt3kWzvXoXC6K6GyYKxd+wsFJ2VQYnOWE954qV2tvy5/aaNrmgPTb52cSCHFE+Z7Z0yg==} + /@esbuild/linux-ppc64@0.18.15: + resolution: {integrity: sha512-KXPY69MWw79QJkyvUYb2ex/OgnN/8N/Aw5UDPlgoRtoEfcBqfeLodPr42UojV3NdkoO4u10NXQdamWm1YEzSKw==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -518,8 +518,8 @@ packages: dev: true optional: true - /@esbuild/linux-riscv64@0.18.14: - resolution: {integrity: sha512-8C6vWbfr0ygbAiMFLS6OPz0BHvApkT2gCboOGV76YrYw+sD/MQJzyITNsjZWDXJwPu9tjrFQOVG7zijRzBCnLw==} + /@esbuild/linux-riscv64@0.18.15: + resolution: {integrity: sha512-komK3NEAeeGRnvFEjX1SfVg6EmkfIi5aKzevdvJqMydYr9N+pRQK0PGJXk+bhoPZwOUgLO4l99FZmLGk/L1jWg==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -527,8 +527,8 @@ packages: dev: true optional: true - /@esbuild/linux-s390x@0.18.14: - resolution: {integrity: sha512-G/Lf9iu8sRMM60OVGOh94ZW2nIStksEcITkXdkD09/T6QFD/o+g0+9WVyR/jajIb3A0LvBJ670tBnGe1GgXMgw==} + /@esbuild/linux-s390x@0.18.15: + resolution: {integrity: sha512-632T5Ts6gQ2WiMLWRRyeflPAm44u2E/s/TJvn+BP6M5mnHSk93cieaypj3VSMYO2ePTCRqAFXtuYi1yv8uZJNA==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -536,8 +536,8 @@ packages: dev: true optional: true - /@esbuild/linux-x64@0.18.14: - resolution: {integrity: sha512-TBgStYBQaa3EGhgqIDM+ECnkreb0wkcKqL7H6m+XPcGUoU4dO7dqewfbm0mWEQYH3kzFHrzjOFNpSAVzDZRSJw==} + /@esbuild/linux-x64@0.18.15: + resolution: {integrity: sha512-MsHtX0NgvRHsoOtYkuxyk4Vkmvk3PLRWfA4okK7c+6dT0Fu4SUqXAr9y4Q3d8vUf1VWWb6YutpL4XNe400iQ1g==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -545,8 +545,8 @@ packages: dev: true optional: true - /@esbuild/netbsd-x64@0.18.14: - resolution: {integrity: sha512-stvCcjyCQR2lMTroqNhAbvROqRjxPEq0oQ380YdXxA81TaRJEucH/PzJ/qsEtsHgXlWFW6Ryr/X15vxQiyRXVg==} + /@esbuild/netbsd-x64@0.18.15: + resolution: {integrity: sha512-djST6s+jQiwxMIVQ5rlt24JFIAr4uwUnzceuFL7BQT4CbrRtqBPueS4GjXSiIpmwVri1Icj/9pFRJ7/aScvT+A==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -554,8 +554,8 @@ packages: dev: true optional: true - /@esbuild/openbsd-x64@0.18.14: - resolution: {integrity: sha512-apAOJF14CIsN5ht1PA57PboEMsNV70j3FUdxLmA2liZ20gEQnfTG5QU0FhENo5nwbTqCB2O3WDsXAihfODjHYw==} + /@esbuild/openbsd-x64@0.18.15: + resolution: {integrity: sha512-naeRhUIvhsgeounjkF5mvrNAVMGAm6EJWiabskeE5yOeBbLp7T89tAEw0j5Jm/CZAwyLe3c67zyCWH6fsBLCpw==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -563,8 +563,8 @@ packages: dev: true optional: true - /@esbuild/sunos-x64@0.18.14: - resolution: {integrity: sha512-fYRaaS8mDgZcGybPn2MQbn1ZNZx+UXFSUoS5Hd2oEnlsyUcr/l3c6RnXf1bLDRKKdLRSabTmyCy7VLQ7VhGdOQ==} + /@esbuild/sunos-x64@0.18.15: + resolution: {integrity: sha512-qkT2+WxyKbNIKV1AEhI8QiSIgTHMcRctzSaa/I3kVgMS5dl3fOeoqkb7pW76KwxHoriImhx7Mg3TwN/auMDsyQ==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -572,8 +572,8 @@ packages: dev: true optional: true - /@esbuild/win32-arm64@0.18.14: - resolution: {integrity: sha512-1c44RcxKEJPrVj62XdmYhxXaU/V7auELCmnD+Ri+UCt+AGxTvzxl9uauQhrFso8gj6ZV1DaORV0sT9XSHOAk8Q==} + /@esbuild/win32-arm64@0.18.15: + resolution: {integrity: sha512-HC4/feP+pB2Vb+cMPUjAnFyERs+HJN7E6KaeBlFdBv799MhD+aPJlfi/yk36SED58J9TPwI8MAcVpJgej4ud0A==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -581,8 +581,8 @@ packages: dev: true optional: true - /@esbuild/win32-ia32@0.18.14: - resolution: {integrity: sha512-EXAFttrdAxZkFQmpvcAQ2bywlWUsONp/9c2lcfvPUhu8vXBBenCXpoq9YkUvVP639ld3YGiYx0YUQ6/VQz3Maw==} + /@esbuild/win32-ia32@0.18.15: + resolution: {integrity: sha512-ovjwoRXI+gf52EVF60u9sSDj7myPixPxqzD5CmkEUmvs+W9Xd0iqISVBQn8xcx4ciIaIVlWCuTbYDOXOnOL44Q==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -590,8 +590,8 @@ packages: dev: true optional: true - /@esbuild/win32-x64@0.18.14: - resolution: {integrity: sha512-K0QjGbcskx+gY+qp3v4/940qg8JitpXbdxFhRDA1aYoNaPff88+aEwoq45aqJ+ogpxQxmU0ZTjgnrQD/w8iiUg==} + /@esbuild/win32-x64@0.18.15: + resolution: {integrity: sha512-imUxH9a3WJARyAvrG7srLyiK73XdX83NXQkjKvQ+7vPh3ZxoLrzvPkQKKw2DwZ+RV2ZB6vBfNHP8XScAmQC3aA==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -1098,13 +1098,13 @@ packages: update-browserslist-db: 1.0.11(browserslist@4.21.9) dev: true - /bundle-require@4.0.1(esbuild@0.18.14): + /bundle-require@4.0.1(esbuild@0.18.15): resolution: {integrity: sha512-9NQkRHlNdNpDBGmLpngF3EFDcwodhMUuLz9PaWYciVcQF9SE4LFjM2DB/xV1Li5JiuDMv7ZUWuC3rGbqR0MAXQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} peerDependencies: esbuild: '>=0.17' dependencies: - esbuild: 0.18.14 + esbuild: 0.18.15 load-tsconfig: 0.2.5 dev: true @@ -1344,7 +1344,7 @@ packages: engines: {node: '>=0.12'} dev: true - /esbuild-plugin-solid@0.5.0(esbuild@0.18.14)(solid-js@1.7.8): + /esbuild-plugin-solid@0.5.0(esbuild@0.18.15)(solid-js@1.7.8): resolution: {integrity: sha512-ITK6n+0ayGFeDVUZWNMxX+vLsasEN1ILrg4pISsNOQ+mq4ljlJJiuXotInd+HE0MzwTcA9wExT1yzDE2hsqPsg==} peerDependencies: esbuild: '>=0.12' @@ -1353,40 +1353,40 @@ packages: '@babel/core': 7.22.9 '@babel/preset-typescript': 7.22.5(@babel/core@7.22.9) babel-preset-solid: 1.7.7(@babel/core@7.22.9) - esbuild: 0.18.14 + esbuild: 0.18.15 solid-js: 1.7.8 transitivePeerDependencies: - supports-color dev: true - /esbuild@0.18.14: - resolution: {integrity: sha512-uNPj5oHPYmj+ZhSQeYQVFZ+hAlJZbAGOmmILWIqrGvPVlNLbyOvU5Bu6Woi8G8nskcx0vwY0iFoMPrzT86Ko+w==} + /esbuild@0.18.15: + resolution: {integrity: sha512-3WOOLhrvuTGPRzQPU6waSDWrDTnQriia72McWcn6UCi43GhCHrXH4S59hKMeez+IITmdUuUyvbU9JIp+t3xlPQ==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/android-arm': 0.18.14 - '@esbuild/android-arm64': 0.18.14 - '@esbuild/android-x64': 0.18.14 - '@esbuild/darwin-arm64': 0.18.14 - '@esbuild/darwin-x64': 0.18.14 - '@esbuild/freebsd-arm64': 0.18.14 - '@esbuild/freebsd-x64': 0.18.14 - '@esbuild/linux-arm': 0.18.14 - '@esbuild/linux-arm64': 0.18.14 - '@esbuild/linux-ia32': 0.18.14 - '@esbuild/linux-loong64': 0.18.14 - '@esbuild/linux-mips64el': 0.18.14 - '@esbuild/linux-ppc64': 0.18.14 - '@esbuild/linux-riscv64': 0.18.14 - '@esbuild/linux-s390x': 0.18.14 - '@esbuild/linux-x64': 0.18.14 - '@esbuild/netbsd-x64': 0.18.14 - '@esbuild/openbsd-x64': 0.18.14 - '@esbuild/sunos-x64': 0.18.14 - '@esbuild/win32-arm64': 0.18.14 - '@esbuild/win32-ia32': 0.18.14 - '@esbuild/win32-x64': 0.18.14 + '@esbuild/android-arm': 0.18.15 + '@esbuild/android-arm64': 0.18.15 + '@esbuild/android-x64': 0.18.15 + '@esbuild/darwin-arm64': 0.18.15 + '@esbuild/darwin-x64': 0.18.15 + '@esbuild/freebsd-arm64': 0.18.15 + '@esbuild/freebsd-x64': 0.18.15 + '@esbuild/linux-arm': 0.18.15 + '@esbuild/linux-arm64': 0.18.15 + '@esbuild/linux-ia32': 0.18.15 + '@esbuild/linux-loong64': 0.18.15 + '@esbuild/linux-mips64el': 0.18.15 + '@esbuild/linux-ppc64': 0.18.15 + '@esbuild/linux-riscv64': 0.18.15 + '@esbuild/linux-s390x': 0.18.15 + '@esbuild/linux-x64': 0.18.15 + '@esbuild/netbsd-x64': 0.18.15 + '@esbuild/openbsd-x64': 0.18.15 + '@esbuild/sunos-x64': 0.18.15 + '@esbuild/win32-arm64': 0.18.15 + '@esbuild/win32-ia32': 0.18.15 + '@esbuild/win32-x64': 0.18.15 dev: true /escalade@3.1.1: @@ -2211,8 +2211,8 @@ packages: yaml: 2.3.1 dev: true - /postcss@8.4.26: - resolution: {integrity: sha512-jrXHFF8iTloAenySjM/ob3gSj7pCu0Ji49hnjqzsgSRa50hkWCKD0HQ+gMNJkW38jBI68MpAAg7ZWwHwX8NMMw==} + /postcss@8.4.27: + resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.6 @@ -2586,14 +2586,13 @@ packages: resolution: {integrity: sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==} dev: true - /tsup-preset-solid@1.0.0(esbuild@0.18.14)(solid-js@1.7.8)(tsup@7.1.0): - resolution: {integrity: sha512-2BqfcQPWXMWDm72QN762gJ2qGqWXArAsyimiJcEyIi5KqXURFiPWoNstS88+Ngjw6MLfKlCy6ahzBKjHCRvGMA==} + /tsup-preset-solid@2.0.1(esbuild@0.18.15)(solid-js@1.7.8)(tsup@7.1.0): + resolution: {integrity: sha512-gN0nD2h4909XvpMnSuqgeiKqv+Ao7Y0d1p4VuF0hnQvazBTXrFHX2ImULG4uCsvU73q2zzoDzk5Ei6iACQmk5w==} peerDependencies: tsup: ^7.0.0 dependencies: - esbuild-plugin-solid: 0.5.0(esbuild@0.18.14)(solid-js@1.7.8) + esbuild-plugin-solid: 0.5.0(esbuild@0.18.15)(solid-js@1.7.8) tsup: 7.1.0(typescript@5.1.6) - type-fest: 4.0.0 transitivePeerDependencies: - esbuild - solid-js @@ -2616,11 +2615,11 @@ packages: typescript: optional: true dependencies: - bundle-require: 4.0.1(esbuild@0.18.14) + bundle-require: 4.0.1(esbuild@0.18.15) cac: 6.7.14 chokidar: 3.5.3 debug: 4.3.4 - esbuild: 0.18.14 + esbuild: 0.18.15 execa: 5.1.1 globby: 11.1.0 joycon: 3.1.1 @@ -2653,11 +2652,6 @@ packages: engines: {node: '>=10'} dev: true - /type-fest@4.0.0: - resolution: {integrity: sha512-d/oYtUnPM9zar2fqqGLYPzgcY0qUlYK0evgNVti93xpzfjGkMgZHu9Lvgrkn0rqGXTgsFRxFamzjGoD9Uo+dgw==} - engines: {node: '>=16'} - dev: true - /typescript@5.1.6: resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} engines: {node: '>=14.17'} @@ -2711,7 +2705,7 @@ packages: mlly: 1.4.0 pathe: 1.1.1 picocolors: 1.0.0 - vite: 4.4.4(@types/node@20.4.2) + vite: 4.4.6(@types/node@20.4.2) transitivePeerDependencies: - '@types/node' - less @@ -2723,7 +2717,7 @@ packages: - terser dev: true - /vite-plugin-solid@2.7.0(solid-js@1.7.8)(vite@4.4.4): + /vite-plugin-solid@2.7.0(solid-js@1.7.8)(vite@4.4.6): resolution: {integrity: sha512-avp/Jl5zOp/Itfo67xtDB2O61U7idviaIp4mLsjhCa13PjKNasz+IID0jYTyqUp9SFx6/PmBr6v4KgDppqompg==} peerDependencies: solid-js: ^1.7.2 @@ -2736,14 +2730,14 @@ packages: merge-anything: 5.1.7 solid-js: 1.7.8 solid-refresh: 0.5.3(solid-js@1.7.8) - vite: 4.4.4(@types/node@20.4.2) - vitefu: 0.2.4(vite@4.4.4) + vite: 4.4.6(@types/node@20.4.2) + vitefu: 0.2.4(vite@4.4.6) transitivePeerDependencies: - supports-color dev: true - /vite@4.4.4(@types/node@20.4.2): - resolution: {integrity: sha512-4mvsTxjkveWrKDJI70QmelfVqTm+ihFAb6+xf4sjEU2TmUCTlVX87tmg/QooPEMQb/lM9qGHT99ebqPziEd3wg==} + /vite@4.4.6(@types/node@20.4.2): + resolution: {integrity: sha512-EY6Mm8vJ++S3D4tNAckaZfw3JwG3wa794Vt70M6cNJ6NxT87yhq7EC8Rcap3ahyHdo8AhCmV9PTk+vG1HiYn1A==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true peerDependencies: @@ -2771,14 +2765,14 @@ packages: optional: true dependencies: '@types/node': 20.4.2 - esbuild: 0.18.14 - postcss: 8.4.26 + esbuild: 0.18.15 + postcss: 8.4.27 rollup: 3.26.3 optionalDependencies: fsevents: 2.3.2 dev: true - /vitefu@0.2.4(vite@4.4.4): + /vitefu@0.2.4(vite@4.4.6): resolution: {integrity: sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==} peerDependencies: vite: ^3.0.0 || ^4.0.0 @@ -2786,7 +2780,7 @@ packages: vite: optional: true dependencies: - vite: 4.4.4(@types/node@20.4.2) + vite: 4.4.6(@types/node@20.4.2) dev: true /vitest@0.33.0(jsdom@22.1.0): @@ -2842,7 +2836,7 @@ packages: strip-literal: 1.0.1 tinybench: 2.5.0 tinypool: 0.6.0 - vite: 4.4.4(@types/node@20.4.2) + vite: 4.4.6(@types/node@20.4.2) vite-node: 0.33.0(@types/node@20.4.2) why-is-node-running: 2.2.2 transitivePeerDependencies: diff --git a/tsup.config.ts b/tsup.config.ts index 16ab5a0..efa23bc 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -1,14 +1,42 @@ -import { defineConfig } from 'tsup-preset-solid' - -export default defineConfig( - { - entry: 'src/index.tsx', - devEntry: true, - }, - { - // Enable this to write export conditions to package.json - // writePackageJson: true, - dropConsole: true, - cjs: true, - }, -) +import { defineConfig } from 'tsup' +import * as preset from 'tsup-preset-solid' + +const preset_options: preset.PresetOptions = { + // array or single object + entries: [ + // default entry (index) + { + // entries with '.tsx' extension will have `solid` export condition generated + entry: 'src/index.tsx', + // will generate a separate development entry + dev_entry: true, + }, + ], + // Set to `true` to remove all `console.*` calls and `debugger` statements in prod builds + drop_console: true, + // Set to `true` to generate a CommonJS build alongside ESM + // cjs: true, +} + +const CI = + process.env['CI'] === 'true' || + process.env['GITHUB_ACTIONS'] === 'true' || + process.env['CI'] === '"1"' || + process.env['GITHUB_ACTIONS'] === '"1"' + +export default defineConfig(config => { + const watching = !!config.watch + + const parsed_options = preset.parsePresetOptions(preset_options, watching) + + if (!watching && !CI) { + const package_fields = preset.generatePackageExports(parsed_options) + + console.log(`package.json: \n\n${JSON.stringify(package_fields, null, 2)}\n\n`) + + // will update ./package.json with the correct export fields + preset.writePackageJson(package_fields) + } + + return preset.generateTsupOptions(parsed_options) +})