From d9791b84c46b2432333044fc48171e0e6cba9e13 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sun, 9 Feb 2025 18:24:27 +0000 Subject: [PATCH] updated rollup --- package-lock.json | 333 ++++++++++++++++++++++++++++++++++++++-------- package.json | 3 +- rollup.config.js | 106 ++++++++------- 3 files changed, 337 insertions(+), 105 deletions(-) diff --git a/package-lock.json b/package-lock.json index f2f3f0c3..815718dd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "utopia-ui", - "version": "3.0.40", + "version": "3.0.51", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "utopia-ui", - "version": "3.0.40", + "version": "3.0.51", "license": "GPL-3.0-only", "dependencies": { "@heroicons/react": "^2.0.17", @@ -27,6 +27,7 @@ "react-string-replace": "^1.1.1", "react-toastify": "^9.1.3", "remark-breaks": "^4.0.0", + "rollup-plugin-dts": "^6.1.1", "tw-elements": "^1.0.0", "yet-another-react-lightbox": "^3.21.7" }, @@ -64,7 +65,7 @@ "prettier": "^3.3.3", "react": "^18.3.1", "react-dom": "^18.3.1", - "rollup": "^2.75.7", + "rollup": "^4.34.6", "rollup-plugin-postcss": "^4.0.2", "rollup-plugin-typescript2": "^0.32.1", "tailwindcss": "^3.3.1", @@ -98,7 +99,7 @@ }, "node_modules/@babel/code-frame": { "version": "7.26.2", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.25.9", @@ -246,7 +247,7 @@ }, "node_modules/@babel/helper-validator-identifier": { "version": "7.25.9", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -714,30 +715,234 @@ "node": ">=14.0.0" } }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.34.1", + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.34.6.tgz", + "integrity": "sha512-+GcCXtOQoWuC7hhX1P00LqjjIiS/iOouHXhMdiDSnq/1DGTox4SpUvO52Xm+div6+106r+TcvOeo/cxvyEyTgg==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.34.6.tgz", + "integrity": "sha512-E8+2qCIjciYUnCa1AiVF1BkRgqIGW9KzJeesQqVfyRITGQN+dFuoivO0hnro1DjT74wXLRZ7QF8MIbz+luGaJA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.34.6.tgz", + "integrity": "sha512-z9Ib+OzqN3DZEjX7PDQMHEhtF+t6Mi2z/ueChQPLS/qUMKY7Ybn5A2ggFoKRNRh1q1T03YTQfBTQCJZiepESAg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.34.6.tgz", + "integrity": "sha512-PShKVY4u0FDAR7jskyFIYVyHEPCPnIQY8s5OcXkdU8mz3Y7eXDJPdyM/ZWjkYdR2m0izD9HHWA8sGcXn+Qrsyg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.34.6.tgz", + "integrity": "sha512-YSwyOqlDAdKqs0iKuqvRHLN4SrD2TiswfoLfvYXseKbL47ht1grQpq46MSiQAx6rQEN8o8URtpXARCpqabqxGQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.34.6.tgz", + "integrity": "sha512-HEP4CgPAY1RxXwwL5sPFv6BBM3tVeLnshF03HMhJYCNc6kvSqBgTMmsEjb72RkZBAWIqiPUyF1JpEBv5XT9wKQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.34.6.tgz", + "integrity": "sha512-88fSzjC5xeH9S2Vg3rPgXJULkHcLYMkh8faix8DX4h4TIAL65ekwuQMA/g2CXq8W+NJC43V6fUpYZNjaX3+IIg==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.34.6.tgz", + "integrity": "sha512-wM4ztnutBqYFyvNeR7Av+reWI/enK9tDOTKNF+6Kk2Q96k9bwhDDOlnCUNRPvromlVXo04riSliMBs/Z7RteEg==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.34.6.tgz", + "integrity": "sha512-9RyprECbRa9zEjXLtvvshhw4CMrRa3K+0wcp3KME0zmBe1ILmvcVHnypZ/aIDXpRyfhSYSuN4EPdCCj5Du8FIA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.34.6.tgz", + "integrity": "sha512-qTmklhCTyaJSB05S+iSovfo++EwnIEZxHkzv5dep4qoszUMX5Ca4WM4zAVUMbfdviLgCSQOu5oU8YoGk1s6M9Q==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.34.6.tgz", + "integrity": "sha512-4Qmkaps9yqmpjY5pvpkfOerYgKNUGzQpFxV6rnS7c/JfYbDSU0y6WpbbredB5cCpLFGJEqYX40WUmxMkwhWCjw==", + "cpu": [ + "loong64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.34.6.tgz", + "integrity": "sha512-Zsrtux3PuaxuBTX/zHdLaFmcofWGzaWW1scwLU3ZbW/X+hSsFbz9wDIp6XvnT7pzYRl9MezWqEqKy7ssmDEnuQ==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.34.6.tgz", + "integrity": "sha512-aK+Zp+CRM55iPrlyKiU3/zyhgzWBxLVrw2mwiQSYJRobCURb781+XstzvA8Gkjg/hbdQFuDw44aUOxVQFycrAg==", + "cpu": [ + "riscv64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.34.6.tgz", + "integrity": "sha512-WoKLVrY9ogmaYPXwTH326+ErlCIgMmsoRSx6bO+l68YgJnlOXhygDYSZe/qbUJCSiCiZAQ+tKm88NcWuUXqOzw==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.34.6.tgz", + "integrity": "sha512-Sht4aFvmA4ToHd2vFzwMFaQCiYm2lDFho5rPcvPBT5pCdC+GwHG6CMch4GQfmWTQ1SwRKS0dhDYb54khSrjDWw==", "cpu": [ "x64" ], - "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.34.1", + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.34.6.tgz", + "integrity": "sha512-zmmpOQh8vXc2QITsnCiODCDGXFC8LMi64+/oPpPx5qz3pqv0s6x46ps4xoycfUiVZps5PFn1gksZzo4RGTKT+A==", "cpu": [ "x64" ], - "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ] }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.34.6.tgz", + "integrity": "sha512-3/q1qUsO/tLqGBaD4uXsB6coVGB3usxw3qyeVb59aArCgedSF66MPdgRStUd7vbZOsko/CgVaY5fo2vkvPLWiA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.34.6.tgz", + "integrity": "sha512-oLHxuyywc6efdKVTxvc0135zPrRdtYVjtVD5GUm55I3ODxhU/PwkQFD97z16Xzxa1Fz0AEe4W/2hzRtd+IfpOA==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.34.6.tgz", + "integrity": "sha512-0PVwmgzZ8+TZ9oGBmdZoQVXflbvuwzN/HRclujpl4N/q3i+y0lqLw8n1bXA8ru3sApDjlmONaNAuYr38y1Kr9w==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@rtsao/scc": { "version": "1.1.0", "dev": true, @@ -3634,6 +3839,19 @@ "version": "1.0.0", "license": "ISC" }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "license": "MIT", @@ -4726,7 +4944,6 @@ }, "node_modules/magic-string": { "version": "0.30.17", - "dev": true, "license": "MIT", "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" @@ -6930,19 +7147,63 @@ } }, "node_modules/rollup": { - "version": "2.79.2", - "dev": true, - "license": "MIT", + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.34.6.tgz", + "integrity": "sha512-wc2cBWqJgkU3Iz5oztRkQbfVkbxoz5EhnCGOrnJvnLnQ7O0WhQUYyv18qQI79O8L7DdHrrlJNeCHd4VGpnaXKQ==", + "dependencies": { + "@types/estree": "1.0.6" + }, "bin": { "rollup": "dist/bin/rollup" }, "engines": { - "node": ">=10.0.0" + "node": ">=18.0.0", + "npm": ">=8.0.0" }, "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.34.6", + "@rollup/rollup-android-arm64": "4.34.6", + "@rollup/rollup-darwin-arm64": "4.34.6", + "@rollup/rollup-darwin-x64": "4.34.6", + "@rollup/rollup-freebsd-arm64": "4.34.6", + "@rollup/rollup-freebsd-x64": "4.34.6", + "@rollup/rollup-linux-arm-gnueabihf": "4.34.6", + "@rollup/rollup-linux-arm-musleabihf": "4.34.6", + "@rollup/rollup-linux-arm64-gnu": "4.34.6", + "@rollup/rollup-linux-arm64-musl": "4.34.6", + "@rollup/rollup-linux-loongarch64-gnu": "4.34.6", + "@rollup/rollup-linux-powerpc64le-gnu": "4.34.6", + "@rollup/rollup-linux-riscv64-gnu": "4.34.6", + "@rollup/rollup-linux-s390x-gnu": "4.34.6", + "@rollup/rollup-linux-x64-gnu": "4.34.6", + "@rollup/rollup-linux-x64-musl": "4.34.6", + "@rollup/rollup-win32-arm64-msvc": "4.34.6", + "@rollup/rollup-win32-ia32-msvc": "4.34.6", + "@rollup/rollup-win32-x64-msvc": "4.34.6", "fsevents": "~2.3.2" } }, + "node_modules/rollup-plugin-dts": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-dts/-/rollup-plugin-dts-6.1.1.tgz", + "integrity": "sha512-aSHRcJ6KG2IHIioYlvAOcEq6U99sVtqDDKVhnwt70rW6tsz3tv5OSjEiWcgzfsHdLyGXZ/3b/7b/+Za3Y6r1XA==", + "dependencies": { + "magic-string": "^0.30.10" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/Swatinem" + }, + "optionalDependencies": { + "@babel/code-frame": "^7.24.2" + }, + "peerDependencies": { + "rollup": "^3.29.4 || ^4", + "typescript": "^4.5 || ^5.0" + } + }, "node_modules/rollup-plugin-postcss": { "version": "4.0.2", "dev": true, @@ -8008,7 +8269,6 @@ }, "node_modules/typescript": { "version": "5.7.3", - "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -8300,43 +8560,6 @@ "url": "https://opencollective.com/vitest" } }, - "node_modules/vite/node_modules/rollup": { - "version": "4.34.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "1.0.6" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.34.1", - "@rollup/rollup-android-arm64": "4.34.1", - "@rollup/rollup-darwin-arm64": "4.34.1", - "@rollup/rollup-darwin-x64": "4.34.1", - "@rollup/rollup-freebsd-arm64": "4.34.1", - "@rollup/rollup-freebsd-x64": "4.34.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.34.1", - "@rollup/rollup-linux-arm-musleabihf": "4.34.1", - "@rollup/rollup-linux-arm64-gnu": "4.34.1", - "@rollup/rollup-linux-arm64-musl": "4.34.1", - "@rollup/rollup-linux-loongarch64-gnu": "4.34.1", - "@rollup/rollup-linux-powerpc64le-gnu": "4.34.1", - "@rollup/rollup-linux-riscv64-gnu": "4.34.1", - "@rollup/rollup-linux-s390x-gnu": "4.34.1", - "@rollup/rollup-linux-x64-gnu": "4.34.1", - "@rollup/rollup-linux-x64-musl": "4.34.1", - "@rollup/rollup-win32-arm64-msvc": "4.34.1", - "@rollup/rollup-win32-ia32-msvc": "4.34.1", - "@rollup/rollup-win32-x64-msvc": "4.34.1", - "fsevents": "~2.3.2" - } - }, "node_modules/vitest": { "version": "3.0.5", "dev": true, diff --git a/package.json b/package.json index ffa63e47..12423ece 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "prettier": "^3.3.3", "react": "^18.3.1", "react-dom": "^18.3.1", - "rollup": "^2.75.7", + "rollup": "^4.34.6", "rollup-plugin-postcss": "^4.0.2", "rollup-plugin-typescript2": "^0.32.1", "tailwindcss": "^3.3.1", @@ -89,6 +89,7 @@ "react-string-replace": "^1.1.1", "react-toastify": "^9.1.3", "remark-breaks": "^4.0.0", + "rollup-plugin-dts": "^6.1.1", "tw-elements": "^1.0.0", "yet-another-react-lightbox": "^3.21.7" }, diff --git a/rollup.config.js b/rollup.config.js index d3dd649f..af4b5b3f 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,52 +1,60 @@ +import { dts } from 'rollup-plugin-dts' import postcss from 'rollup-plugin-postcss' import typescript from 'rollup-plugin-typescript2' -export default { - input: 'src/index.tsx', - output: [ - { - dir: 'dist/', - format: 'esm', - exports: 'named', - sourcemap: true, - strict: false, - }, - ], - plugins: [ - postcss({ - plugins: [], - }), - typescript(), - ], - external: [ - 'react', - 'react-dom', - 'react-markdown', - 'react/jsx-runtime', - 'remark-breaks', - 'leaflet', - 'react-leaflet', - 'react-toastify', - 'react-string-replace', - 'react-toastify/dist/ReactToastify.css', - 'tw-elements', - 'react-router-dom', - 'react-leaflet-cluster', - '@tanstack/react-query', - 'tributejs', - 'prop-types', - 'leaflet/dist/leaflet.css', - '@heroicons/react/20/solid', - '@heroicons/react/24/outline/ChevronRightIcon', - '@heroicons/react/24/outline', - 'date-fns', - '@heroicons/react/24/outline/InformationCircleIcon', - '@heroicons/react/24/outline/QuestionMarkCircleIcon', - '@heroicons/react/24/outline/ChevronDownIcon', - 'axios', - 'react-image-crop', - 'react-image-crop/dist/ReactCrop.css', - 'react-colorful', - 'leaflet.locatecontrol/dist/L.Control.Locate.css', - ], -} +export default [ + { + input: 'src/index.tsx', + output: [ + { + dir: 'dist/', + format: 'esm', + exports: 'named', + sourcemap: true, + strict: false, + }, + ], + plugins: [ + postcss({ + plugins: [], + }), + typescript(), + ], + external: [ + 'react', + 'react-dom', + 'react-markdown', + 'react/jsx-runtime', + 'remark-breaks', + 'leaflet', + 'react-leaflet', + 'react-toastify', + 'react-string-replace', + 'react-toastify/dist/ReactToastify.css', + 'tw-elements', + 'react-router-dom', + 'react-leaflet-cluster', + '@tanstack/react-query', + 'tributejs', + 'prop-types', + 'leaflet/dist/leaflet.css', + '@heroicons/react/20/solid', + '@heroicons/react/24/outline/ChevronRightIcon', + '@heroicons/react/24/outline', + 'date-fns', + '@heroicons/react/24/outline/InformationCircleIcon', + '@heroicons/react/24/outline/QuestionMarkCircleIcon', + '@heroicons/react/24/outline/ChevronDownIcon', + 'axios', + 'react-image-crop', + 'react-image-crop/dist/ReactCrop.css', + 'react-colorful', + 'leaflet.locatecontrol/dist/L.Control.Locate.css', + ], + }, + { + input: 'types/index.d.ts', + output: [{ file: 'dist/index.d.ts', format: 'es' }], + plugins: [dts()], + }, +]