Fix remaining imc-vibe references in README and bun.lock

This commit is contained in:
Christoph Haas 2026-03-24 23:44:56 +01:00
parent ff52be8adf
commit 061126c51e
41 changed files with 613 additions and 339 deletions

View file

@ -69,7 +69,7 @@ Open `http://your-server:8080` and login with the admin credentials.
### CLI Flags ### CLI Flags
```bash ```bash
./imc-vibe --help ./imc --help
``` ```
``` ```
@ -93,7 +93,7 @@ Existing ISPmail tables (`virtual_domains`, `virtual_users`, `virtual_aliases`)
## Systemd Service ## Systemd Service
Example service file at `/etc/systemd/system/imc-vibe.service`: Example service file at `/etc/systemd/system/imc.service`:
```ini ```ini
[Unit] [Unit]
@ -111,7 +111,7 @@ Environment=DB_NAME=mailserver
Environment=JWT_SECRET=your_secret Environment=JWT_SECRET=your_secret
Environment=BIND=0.0.0.0 Environment=BIND=0.0.0.0
Environment=PORT=8080 Environment=PORT=8080
ExecStart=/opt/imc-vibe/imc-vibe ExecStart=/opt/imc/imc
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View file

@ -3,7 +3,7 @@
"configVersion": 1, "configVersion": 1,
"workspaces": { "workspaces": {
"": { "": {
"name": "imc-vibe-frontend", "name": "imc-frontend",
"devDependencies": { "devDependencies": {
"@sveltejs/adapter-static": "^3.0.0", "@sveltejs/adapter-static": "^3.0.0",
"@sveltejs/kit": "^2.0.0", "@sveltejs/kit": "^2.0.0",
@ -79,55 +79,55 @@
"@polka/url": ["@polka/url@1.0.0-next.29", "", {}, "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww=="], "@polka/url": ["@polka/url@1.0.0-next.29", "", {}, "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww=="],
"@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.59.1", "", { "os": "android", "cpu": "arm" }, "sha512-xB0b51TB7IfDEzAojXahmr+gfA00uYVInJGgNNkeQG6RPnCPGr7udsylFLTubuIUSRE6FkcI1NElyRt83PP5oQ=="], "@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.60.0", "", { "os": "android", "cpu": "arm" }, "sha512-WOhNW9K8bR3kf4zLxbfg6Pxu2ybOUbB2AjMDHSQx86LIF4rH4Ft7vmMwNt0loO0eonglSNy4cpD3MKXXKQu0/A=="],
"@rollup/rollup-android-arm64": ["@rollup/rollup-android-arm64@4.59.1", "", { "os": "android", "cpu": "arm64" }, "sha512-XOjPId0qwSDKHaIsdzHJtKCxX0+nH8MhBwvrNsT7tVyKmdTx1jJ4XzN5RZXCdTzMpufLb+B8llTC0D8uCrLhcw=="], "@rollup/rollup-android-arm64": ["@rollup/rollup-android-arm64@4.60.0", "", { "os": "android", "cpu": "arm64" }, "sha512-u6JHLll5QKRvjciE78bQXDmqRqNs5M/3GVqZeMwvmjaNODJih/WIrJlFVEihvV0MiYFmd+ZyPr9wxOVbPAG2Iw=="],
"@rollup/rollup-darwin-arm64": ["@rollup/rollup-darwin-arm64@4.59.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-vQuRd28p0gQpPrS6kppd8IrWmFo42U8Pz1XLRjSZXq5zCqyMDYFABT7/sywL11mO1EL10Qhh7MVPEwkG8GiBeg=="], "@rollup/rollup-darwin-arm64": ["@rollup/rollup-darwin-arm64@4.60.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-qEF7CsKKzSRc20Ciu2Zw1wRrBz4g56F7r/vRwY430UPp/nt1x21Q/fpJ9N5l47WWvJlkNCPJz3QRVw008fi7yA=="],
"@rollup/rollup-darwin-x64": ["@rollup/rollup-darwin-x64@4.59.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-x6VG6U29+Ivlnajrg1IHdzXeAwSoEHBFVO+CtC9Brugx6de712CUJobRUxsIA0KYrQvCmzNrMPFTT1A4CCqNTg=="], "@rollup/rollup-darwin-x64": ["@rollup/rollup-darwin-x64@4.60.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-WADYozJ4QCnXCH4wPB+3FuGmDPoFseVCUrANmA5LWwGmC6FL14BWC7pcq+FstOZv3baGX65tZ378uT6WG8ynTw=="],
"@rollup/rollup-freebsd-arm64": ["@rollup/rollup-freebsd-arm64@4.59.1", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-Sgi0Uo6t1YCHJMNO3Y8+bm+SvOanUGkoZKn/VJPwYUe2kp31X5KnXmzKd/NjW8iA3gFcfNZ64zh14uOGrIllCQ=="], "@rollup/rollup-freebsd-arm64": ["@rollup/rollup-freebsd-arm64@4.60.0", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-6b8wGHJlDrGeSE3aH5mGNHBjA0TTkxdoNHik5EkvPHCt351XnigA4pS7Wsj/Eo9Y8RBU6f35cjN9SYmCFBtzxw=="],
"@rollup/rollup-freebsd-x64": ["@rollup/rollup-freebsd-x64@4.59.1", "", { "os": "freebsd", "cpu": "x64" }, "sha512-AM4xnwEZwukdhk7laMWfzWu9JGSVnJd+Fowt6Fd7QW1nrf3h0Hp7Qx5881M4aqrUlKBCybOxz0jofvIIfl7C5g=="], "@rollup/rollup-freebsd-x64": ["@rollup/rollup-freebsd-x64@4.60.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-h25Ga0t4jaylMB8M/JKAyrvvfxGRjnPQIR8lnCayyzEjEOx2EJIlIiMbhpWxDRKGKF8jbNH01NnN663dH638mA=="],
"@rollup/rollup-linux-arm-gnueabihf": ["@rollup/rollup-linux-arm-gnueabihf@4.59.1", "", { "os": "linux", "cpu": "arm" }, "sha512-KUizqxpwaR2AZdAUsMWfL/C94pUu7TKpoPd88c8yFVixJ+l9hejkrwoK5Zj3wiNh65UeyryKnJyxL1b7yNqFQA=="], "@rollup/rollup-linux-arm-gnueabihf": ["@rollup/rollup-linux-arm-gnueabihf@4.60.0", "", { "os": "linux", "cpu": "arm" }, "sha512-RzeBwv0B3qtVBWtcuABtSuCzToo2IEAIQrcyB/b2zMvBWVbjo8bZDjACUpnaafaxhTw2W+imQbP2BD1usasK4g=="],
"@rollup/rollup-linux-arm-musleabihf": ["@rollup/rollup-linux-arm-musleabihf@4.59.1", "", { "os": "linux", "cpu": "arm" }, "sha512-MZoQ/am77ckJtZGFAtPucgUuJWiop3m2R3lw7tC0QCcbfl4DRhQUBUkHWCkcrT3pqy5Mzv5QQgY6Dmlba6iTWg=="], "@rollup/rollup-linux-arm-musleabihf": ["@rollup/rollup-linux-arm-musleabihf@4.60.0", "", { "os": "linux", "cpu": "arm" }, "sha512-Sf7zusNI2CIU1HLzuu9Tc5YGAHEZs5Lu7N1ssJG4Tkw6e0MEsN7NdjUDDfGNHy2IU+ENyWT+L2obgWiguWibWQ=="],
"@rollup/rollup-linux-arm64-gnu": ["@rollup/rollup-linux-arm64-gnu@4.59.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-Sez95TP6xGjkWB1608EfhCX1gdGrO5wzyN99VqzRtC17x/1bhw5VU1V0GfKUwbW/Xr1J8mSasoFoJa6Y7aGGSA=="], "@rollup/rollup-linux-arm64-gnu": ["@rollup/rollup-linux-arm64-gnu@4.60.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-DX2x7CMcrJzsE91q7/O02IJQ5/aLkVtYFryqCjduJhUfGKG6yJV8hxaw8pZa93lLEpPTP/ohdN4wFz7yp/ry9A=="],
"@rollup/rollup-linux-arm64-musl": ["@rollup/rollup-linux-arm64-musl@4.59.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-9Cs2Seq98LWNOJzR89EGTZoiP8EkZ9UbQhBlDgfAkM6asVna1xJ04W2CLYWDN/RpUgOjtQvcv8wQVi1t5oQazA=="], "@rollup/rollup-linux-arm64-musl": ["@rollup/rollup-linux-arm64-musl@4.60.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-09EL+yFVbJZlhcQfShpswwRZ0Rg+z/CsSELFCnPt3iK+iqwGsI4zht3secj5vLEs957QvFFXnzAT0FFPIxSrkQ=="],
"@rollup/rollup-linux-loong64-gnu": ["@rollup/rollup-linux-loong64-gnu@4.59.1", "", { "os": "linux", "cpu": "none" }, "sha512-n9yqttftgFy7IrNEnHy1bOp6B4OSe8mJDiPkT7EqlM9FnKOwUMnCK62ixW0Kd9Clw0/wgvh8+SqaDXMFvw3KqQ=="], "@rollup/rollup-linux-loong64-gnu": ["@rollup/rollup-linux-loong64-gnu@4.60.0", "", { "os": "linux", "cpu": "none" }, "sha512-i9IcCMPr3EXm8EQg5jnja0Zyc1iFxJjZWlb4wr7U2Wx/GrddOuEafxRdMPRYVaXjgbhvqalp6np07hN1w9kAKw=="],
"@rollup/rollup-linux-loong64-musl": ["@rollup/rollup-linux-loong64-musl@4.59.1", "", { "os": "linux", "cpu": "none" }, "sha512-SfpNXDzVTqs/riak4xXcLpq5gIQWsqGWMhN1AGRQKB4qGSs4r0sEs3ervXPcE1O9RsQ5bm8Muz6zmQpQnPss1g=="], "@rollup/rollup-linux-loong64-musl": ["@rollup/rollup-linux-loong64-musl@4.60.0", "", { "os": "linux", "cpu": "none" }, "sha512-DGzdJK9kyJ+B78MCkWeGnpXJ91tK/iKA6HwHxF4TAlPIY7GXEvMe8hBFRgdrR9Ly4qebR/7gfUs9y2IoaVEyog=="],
"@rollup/rollup-linux-ppc64-gnu": ["@rollup/rollup-linux-ppc64-gnu@4.59.1", "", { "os": "linux", "cpu": "ppc64" }, "sha512-LjaChED0wQnjKZU+tsmGbN+9nN1XhaWUkAlSbTdhpEseCS4a15f/Q8xC2BN4GDKRzhhLZpYtJBZr2NZhR0jvNw=="], "@rollup/rollup-linux-ppc64-gnu": ["@rollup/rollup-linux-ppc64-gnu@4.60.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-RwpnLsqC8qbS8z1H1AxBA1H6qknR4YpPR9w2XX0vo2Sz10miu57PkNcnHVaZkbqyw/kUWfKMI73jhmfi9BRMUQ=="],
"@rollup/rollup-linux-ppc64-musl": ["@rollup/rollup-linux-ppc64-musl@4.59.1", "", { "os": "linux", "cpu": "ppc64" }, "sha512-ojW7iTJSIs4pwB2xV6QXGwNyDctvXOivYllttuPbXguuKDX5vwpqYJsHc6D2LZzjDGHML414Tuj3LvVPe1CT1A=="], "@rollup/rollup-linux-ppc64-musl": ["@rollup/rollup-linux-ppc64-musl@4.60.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-Z8pPf54Ly3aqtdWC3G4rFigZgNvd+qJlOE52fmko3KST9SoGfAdSRCwyoyG05q1HrrAblLbk1/PSIV+80/pxLg=="],
"@rollup/rollup-linux-riscv64-gnu": ["@rollup/rollup-linux-riscv64-gnu@4.59.1", "", { "os": "linux", "cpu": "none" }, "sha512-FP+Q6WTcxxvsr0wQczhSE+tOZvFPV8A/mUE6mhZYFW9/eea/y/XqAgRoLLMuE9Cz0hfX5bi7p116IWoB+P237A=="], "@rollup/rollup-linux-riscv64-gnu": ["@rollup/rollup-linux-riscv64-gnu@4.60.0", "", { "os": "linux", "cpu": "none" }, "sha512-3a3qQustp3COCGvnP4SvrMHnPQ9d1vzCakQVRTliaz8cIp/wULGjiGpbcqrkv0WrHTEp8bQD/B3HBjzujVWLOA=="],
"@rollup/rollup-linux-riscv64-musl": ["@rollup/rollup-linux-riscv64-musl@4.59.1", "", { "os": "linux", "cpu": "none" }, "sha512-L1uD9b/Ig8Z+rn1KttCJjwhN1FgjRMBKsPaBsDKkfUl7GfFq71pU4vWCnpOsGljycFEbkHWARZLf4lMYg3WOLw=="], "@rollup/rollup-linux-riscv64-musl": ["@rollup/rollup-linux-riscv64-musl@4.60.0", "", { "os": "linux", "cpu": "none" }, "sha512-pjZDsVH/1VsghMJ2/kAaxt6dL0psT6ZexQVrijczOf+PeP2BUqTHYejk3l6TlPRydggINOeNRhvpLa0AYpCWSQ=="],
"@rollup/rollup-linux-s390x-gnu": ["@rollup/rollup-linux-s390x-gnu@4.59.1", "", { "os": "linux", "cpu": "s390x" }, "sha512-EZc9NGTk/oSUzzOD4nYY4gIjteo2M3CiozX6t1IXGCOdgxJTlVu/7EdPeiqeHPSIrxkLhavqpBAUCfvC6vBOug=="], "@rollup/rollup-linux-s390x-gnu": ["@rollup/rollup-linux-s390x-gnu@4.60.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-3ObQs0BhvPgiUVZrN7gqCSvmFuMWvWvsjG5ayJ3Lraqv+2KhOsp+pUbigqbeWqueGIsnn+09HBw27rJ+gYK4VQ=="],
"@rollup/rollup-linux-x64-gnu": ["@rollup/rollup-linux-x64-gnu@4.59.1", "", { "os": "linux", "cpu": "x64" }, "sha512-NQ9KyU1Anuy59L8+HHOKM++CoUxrQWrZWXRik4BJFm+7i5NP6q/SW43xIBr80zzt+PDBJ7LeNmloQGfa0JGk0w=="], "@rollup/rollup-linux-x64-gnu": ["@rollup/rollup-linux-x64-gnu@4.60.0", "", { "os": "linux", "cpu": "x64" }, "sha512-EtylprDtQPdS5rXvAayrNDYoJhIz1/vzN2fEubo3yLE7tfAw+948dO0g4M0vkTVFhKojnF+n6C8bDNe+gDRdTg=="],
"@rollup/rollup-linux-x64-musl": ["@rollup/rollup-linux-x64-musl@4.59.1", "", { "os": "linux", "cpu": "x64" }, "sha512-GZkLk2t6naywsveSFBsEb0PLU+JC9ggVjbndsbG20VPhar6D1gkMfCx4NfP9owpovBXTN+eRdqGSkDGIxPHhmQ=="], "@rollup/rollup-linux-x64-musl": ["@rollup/rollup-linux-x64-musl@4.60.0", "", { "os": "linux", "cpu": "x64" }, "sha512-k09oiRCi/bHU9UVFqD17r3eJR9bn03TyKraCrlz5ULFJGdJGi7VOmm9jl44vOJvRJ6P7WuBi/s2A97LxxHGIdw=="],
"@rollup/rollup-openbsd-x64": ["@rollup/rollup-openbsd-x64@4.59.1", "", { "os": "openbsd", "cpu": "x64" }, "sha512-1hjG9Jpl2KDOetr64iQd8AZAEjkDUUK5RbDkYWsViYLC1op1oNzdjMJeFiofcGhqbNTaY2kfgqowE7DILifsrA=="], "@rollup/rollup-openbsd-x64": ["@rollup/rollup-openbsd-x64@4.60.0", "", { "os": "openbsd", "cpu": "x64" }, "sha512-1o/0/pIhozoSaDJoDcec+IVLbnRtQmHwPV730+AOD29lHEEo4F5BEUB24H0OBdhbBBDwIOSuf7vgg0Ywxdfiiw=="],
"@rollup/rollup-openharmony-arm64": ["@rollup/rollup-openharmony-arm64@4.59.1", "", { "os": "none", "cpu": "arm64" }, "sha512-ARoKfflk0SiiYm3r1fmF73K/yB+PThmOwfWCk1sr7x/k9dc3uGLWuEE9if+Pw21el8MSpp3TMnG5vLNsJ/MMGQ=="], "@rollup/rollup-openharmony-arm64": ["@rollup/rollup-openharmony-arm64@4.60.0", "", { "os": "none", "cpu": "arm64" }, "sha512-pESDkos/PDzYwtyzB5p/UoNU/8fJo68vcXM9ZW2V0kjYayj1KaaUfi1NmTUTUpMn4UhU4gTuK8gIaFO4UGuMbA=="],
"@rollup/rollup-win32-arm64-msvc": ["@rollup/rollup-win32-arm64-msvc@4.59.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-oOST61G6VM45Mz2vdzWMr1s2slI7y9LqxEV5fCoWi2MDONmMvgsJVHSXxce/I2xOSZPTZ47nDPOl1tkwKWSHcw=="], "@rollup/rollup-win32-arm64-msvc": ["@rollup/rollup-win32-arm64-msvc@4.60.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-hj1wFStD7B1YBeYmvY+lWXZ7ey73YGPcViMShYikqKT1GtstIKQAtfUI6yrzPjAy/O7pO0VLXGmUVWXQMaYgTQ=="],
"@rollup/rollup-win32-ia32-msvc": ["@rollup/rollup-win32-ia32-msvc@4.59.1", "", { "os": "win32", "cpu": "ia32" }, "sha512-x5WgLi5dWpRz7WclKBGEF15LcWTh0ewrHM6Cq4A+WUbkysUMZNeqt05bwPonOQ3ihPS/WMhAZV5zB1DfnI4Sxg=="], "@rollup/rollup-win32-ia32-msvc": ["@rollup/rollup-win32-ia32-msvc@4.60.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-SyaIPFoxmUPlNDq5EHkTbiKzmSEmq/gOYFI/3HHJ8iS/v1mbugVa7dXUzcJGQfoytp9DJFLhHH4U3/eTy2Bq4w=="],
"@rollup/rollup-win32-x64-gnu": ["@rollup/rollup-win32-x64-gnu@4.59.1", "", { "os": "win32", "cpu": "x64" }, "sha512-wS+zHAJRVP5zOL0e+a3V3E/NTEwM2HEvvNKoDy5Xcfs0o8lljxn+EAFPkUsxihBdmDq1JWzXmmB9cbssCPdxxw=="], "@rollup/rollup-win32-x64-gnu": ["@rollup/rollup-win32-x64-gnu@4.60.0", "", { "os": "win32", "cpu": "x64" }, "sha512-RdcryEfzZr+lAr5kRm2ucN9aVlCCa2QNq4hXelZxb8GG0NJSazq44Z3PCCc8wISRuCVnGs0lQJVX5Vp6fKA+IA=="],
"@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.59.1", "", { "os": "win32", "cpu": "x64" }, "sha512-rhHyrMeLpErT/C7BxcEsU4COHQUzHyrPYW5tOZUeUhziNtRuYxmDWvqQqzpuUt8xpOgmbKa1btGXfnA/ANVO+g=="], "@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.60.0", "", { "os": "win32", "cpu": "x64" }, "sha512-PrsWNQ8BuE00O3Xsx3ALh2Df8fAj9+cvvX9AIA6o4KpATR98c9mud4XtDWVvsEuyia5U4tVSTKygawyJkjm60w=="],
"@standard-schema/spec": ["@standard-schema/spec@1.1.0", "", {}, "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w=="], "@standard-schema/spec": ["@standard-schema/spec@1.1.0", "", {}, "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w=="],
@ -179,7 +179,7 @@
"@types/trusted-types": ["@types/trusted-types@2.0.7", "", {}, "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw=="], "@types/trusted-types": ["@types/trusted-types@2.0.7", "", {}, "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw=="],
"@typescript-eslint/types": ["@typescript-eslint/types@8.57.1", "", {}, "sha512-S29BOBPJSFUiblEl6RzPPjJt6w25A6XsBqRVDt53tA/tlL8q7ceQNZHTjPeONt/3S7KRI4quk+yP9jK2WjBiPQ=="], "@typescript-eslint/types": ["@typescript-eslint/types@8.57.2", "", {}, "sha512-/iZM6FnM4tnx9csuTxspMW4BOSegshwX5oBDznJ7S4WggL7Vczz5d2W11ecc4vRrQMQHXRSxzrCsyG5EsPPTbA=="],
"acorn": ["acorn@8.16.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw=="], "acorn": ["acorn@8.16.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw=="],
@ -211,7 +211,7 @@
"devalue": ["devalue@5.6.4", "", {}, "sha512-Gp6rDldRsFh/7XuouDbxMH3Mx8GMCcgzIb1pDTvNyn8pZGQ22u+Wa+lGV9dQCltFQ7uVw0MhRyb8XDskNFOReA=="], "devalue": ["devalue@5.6.4", "", {}, "sha512-Gp6rDldRsFh/7XuouDbxMH3Mx8GMCcgzIb1pDTvNyn8pZGQ22u+Wa+lGV9dQCltFQ7uVw0MhRyb8XDskNFOReA=="],
"electron-to-chromium": ["electron-to-chromium@1.5.321", "", {}, "sha512-L2C7Q279W2D/J4PLZLk7sebOILDSWos7bMsMNN06rK482umHUrh/3lM8G7IlHFOYip2oAg5nha1rCMxr/rs6ZQ=="], "electron-to-chromium": ["electron-to-chromium@1.5.322", "", {}, "sha512-vFU34OcrvMcH66T+dYC3G4nURmgfDVewMIu6Q2urXpumAPSMmzvcn04KVVV8Opikq8Vs5nUbO/8laNhNRqSzYw=="],
"enhanced-resolve": ["enhanced-resolve@5.20.1", "", { "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.3.0" } }, "sha512-Qohcme7V1inbAfvjItgw0EaxVX5q2rdVEZHRBrEQdRZTssLDGsL8Lwrznl8oQ/6kuTJONLaDcGjkNP247XEhcA=="], "enhanced-resolve": ["enhanced-resolve@5.20.1", "", { "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.3.0" } }, "sha512-Qohcme7V1inbAfvjItgw0EaxVX5q2rdVEZHRBrEQdRZTssLDGsL8Lwrznl8oQ/6kuTJONLaDcGjkNP247XEhcA=="],
@ -279,7 +279,7 @@
"postcss-value-parser": ["postcss-value-parser@4.2.0", "", {}, "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ=="], "postcss-value-parser": ["postcss-value-parser@4.2.0", "", {}, "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ=="],
"rollup": ["rollup@4.59.1", "", { "dependencies": { "@types/estree": "1.0.8" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.59.1", "@rollup/rollup-android-arm64": "4.59.1", "@rollup/rollup-darwin-arm64": "4.59.1", "@rollup/rollup-darwin-x64": "4.59.1", "@rollup/rollup-freebsd-arm64": "4.59.1", "@rollup/rollup-freebsd-x64": "4.59.1", "@rollup/rollup-linux-arm-gnueabihf": "4.59.1", "@rollup/rollup-linux-arm-musleabihf": "4.59.1", "@rollup/rollup-linux-arm64-gnu": "4.59.1", "@rollup/rollup-linux-arm64-musl": "4.59.1", "@rollup/rollup-linux-loong64-gnu": "4.59.1", "@rollup/rollup-linux-loong64-musl": "4.59.1", "@rollup/rollup-linux-ppc64-gnu": "4.59.1", "@rollup/rollup-linux-ppc64-musl": "4.59.1", "@rollup/rollup-linux-riscv64-gnu": "4.59.1", "@rollup/rollup-linux-riscv64-musl": "4.59.1", "@rollup/rollup-linux-s390x-gnu": "4.59.1", "@rollup/rollup-linux-x64-gnu": "4.59.1", "@rollup/rollup-linux-x64-musl": "4.59.1", "@rollup/rollup-openbsd-x64": "4.59.1", "@rollup/rollup-openharmony-arm64": "4.59.1", "@rollup/rollup-win32-arm64-msvc": "4.59.1", "@rollup/rollup-win32-ia32-msvc": "4.59.1", "@rollup/rollup-win32-x64-gnu": "4.59.1", "@rollup/rollup-win32-x64-msvc": "4.59.1", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-iZKH8BeoCwTCBTZBZWQQMreekd4mdomwdjIQ40GC1oZm6o+8PnNMIxFOiCsGMWeS8iDJ7KZcl7KwmKk/0HOQpA=="], "rollup": ["rollup@4.60.0", "", { "dependencies": { "@types/estree": "1.0.8" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.60.0", "@rollup/rollup-android-arm64": "4.60.0", "@rollup/rollup-darwin-arm64": "4.60.0", "@rollup/rollup-darwin-x64": "4.60.0", "@rollup/rollup-freebsd-arm64": "4.60.0", "@rollup/rollup-freebsd-x64": "4.60.0", "@rollup/rollup-linux-arm-gnueabihf": "4.60.0", "@rollup/rollup-linux-arm-musleabihf": "4.60.0", "@rollup/rollup-linux-arm64-gnu": "4.60.0", "@rollup/rollup-linux-arm64-musl": "4.60.0", "@rollup/rollup-linux-loong64-gnu": "4.60.0", "@rollup/rollup-linux-loong64-musl": "4.60.0", "@rollup/rollup-linux-ppc64-gnu": "4.60.0", "@rollup/rollup-linux-ppc64-musl": "4.60.0", "@rollup/rollup-linux-riscv64-gnu": "4.60.0", "@rollup/rollup-linux-riscv64-musl": "4.60.0", "@rollup/rollup-linux-s390x-gnu": "4.60.0", "@rollup/rollup-linux-x64-gnu": "4.60.0", "@rollup/rollup-linux-x64-musl": "4.60.0", "@rollup/rollup-openbsd-x64": "4.60.0", "@rollup/rollup-openharmony-arm64": "4.60.0", "@rollup/rollup-win32-arm64-msvc": "4.60.0", "@rollup/rollup-win32-ia32-msvc": "4.60.0", "@rollup/rollup-win32-x64-gnu": "4.60.0", "@rollup/rollup-win32-x64-msvc": "4.60.0", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-yqjxruMGBQJ2gG4HtjZtAfXArHomazDHoFwFFmZZl0r7Pdo7qCIXKqKHZc8yeoMgzJJ+pO6pEEHa+V7uzWlrAQ=="],
"set-cookie-parser": ["set-cookie-parser@3.1.0", "", {}, "sha512-kjnC1DXBHcxaOaOXBHBeRtltsDG2nUiUni+jP92M9gYdW12rsmx92UsfpH7o5tDRs7I1ZZPSQJQGv3UaRfCiuw=="], "set-cookie-parser": ["set-cookie-parser@3.1.0", "", {}, "sha512-kjnC1DXBHcxaOaOXBHBeRtltsDG2nUiUni+jP92M9gYdW12rsmx92UsfpH7o5tDRs7I1ZZPSQJQGv3UaRfCiuw=="],
@ -287,11 +287,11 @@
"source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="], "source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="],
"svelte": ["svelte@5.54.0", "", { "dependencies": { "@jridgewell/remapping": "^2.3.4", "@jridgewell/sourcemap-codec": "^1.5.0", "@sveltejs/acorn-typescript": "^1.0.5", "@types/estree": "^1.0.5", "@types/trusted-types": "^2.0.7", "acorn": "^8.12.1", "aria-query": "5.3.1", "axobject-query": "^4.1.0", "clsx": "^2.1.1", "devalue": "^5.6.4", "esm-env": "^1.2.1", "esrap": "^2.2.2", "is-reference": "^3.0.3", "locate-character": "^3.0.0", "magic-string": "^0.30.11", "zimmerframe": "^1.1.2" } }, "sha512-TTDxwYnHkova6Wsyj1PGt9TByuWqvMoeY1bQiuAf2DM/JeDSMw7FjRKzk8K/5mJ99vGOKhbCqTDpyAKwjp4igg=="], "svelte": ["svelte@5.55.0", "", { "dependencies": { "@jridgewell/remapping": "^2.3.4", "@jridgewell/sourcemap-codec": "^1.5.0", "@sveltejs/acorn-typescript": "^1.0.5", "@types/estree": "^1.0.5", "@types/trusted-types": "^2.0.7", "acorn": "^8.12.1", "aria-query": "5.3.1", "axobject-query": "^4.1.0", "clsx": "^2.1.1", "devalue": "^5.6.4", "esm-env": "^1.2.1", "esrap": "^2.2.2", "is-reference": "^3.0.3", "locate-character": "^3.0.0", "magic-string": "^0.30.11", "zimmerframe": "^1.1.2" } }, "sha512-SThllKq6TRMBwPtat7ASnm/9CDXnIhBR0NPGw0ujn2DVYx9rVwsPZxDaDQcYGdUz/3BYVsCzdq7pZarRQoGvtw=="],
"tailwindcss": ["tailwindcss@4.2.2", "", {}, "sha512-KWBIxs1Xb6NoLdMVqhbhgwZf2PGBpPEiwOqgI4pFIYbNTfBXiKYyWoTsXgBQ9WFg/OlhnvHaY+AEpW7wSmFo2Q=="], "tailwindcss": ["tailwindcss@4.2.2", "", {}, "sha512-KWBIxs1Xb6NoLdMVqhbhgwZf2PGBpPEiwOqgI4pFIYbNTfBXiKYyWoTsXgBQ9WFg/OlhnvHaY+AEpW7wSmFo2Q=="],
"tapable": ["tapable@2.3.1", "", {}, "sha512-b+u3CEM6FjDHru+nhUSjDofpWSBp2rINziJWgApm72wwGasQ/wKXftZe4tI2Y5HPv6OpzXSZHOFq87H4vfsgsw=="], "tapable": ["tapable@2.3.2", "", {}, "sha512-1MOpMXuhGzGL5TTCZFItxCc0AARf1EZFQkGqMm7ERKj8+Hgr5oLvJOVFcC+lRmR8hCe2S3jC4T5D7Vg/d7/fhA=="],
"totalist": ["totalist@3.0.1", "", {}, "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ=="], "totalist": ["totalist@3.0.1", "", {}, "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ=="],

View file

@ -1,6 +1,6 @@
{ {
"name": "@rollup/rollup-linux-x64-gnu", "name": "@rollup/rollup-linux-x64-gnu",
"version": "4.59.1", "version": "4.60.0",
"os": [ "os": [
"linux" "linux"
], ],

View file

@ -1,6 +1,6 @@
{ {
"name": "@rollup/rollup-linux-x64-musl", "name": "@rollup/rollup-linux-x64-musl",
"version": "4.59.1", "version": "4.60.0",
"os": [ "os": [
"linux" "linux"
], ],

View file

@ -1,6 +1,6 @@
{ {
"name": "@typescript-eslint/types", "name": "@typescript-eslint/types",
"version": "8.57.1", "version": "8.57.2",
"description": "Types for the TypeScript-ESTree AST spec", "description": "Types for the TypeScript-ESTree AST spec",
"files": [ "files": [
"dist", "dist",

File diff suppressed because one or more lines are too long

View file

@ -1,7 +1,7 @@
/* /*
@license @license
Rollup.js v4.59.1 Rollup.js v4.60.0
Sat, 21 Mar 2026 06:45:31 GMT - commit 0cba9e079e1d6e56882558827b37557f36c52966 Sun, 22 Mar 2026 06:57:22 GMT - commit 6ecd69fb2ce736c8aabb50829edd227d1792c957
https://github.com/rollup/rollup https://github.com/rollup/rollup

View file

@ -1,7 +1,7 @@
/* /*
@license @license
Rollup.js v4.59.1 Rollup.js v4.60.0
Sat, 21 Mar 2026 06:45:31 GMT - commit 0cba9e079e1d6e56882558827b37557f36c52966 Sun, 22 Mar 2026 06:57:22 GMT - commit 6ecd69fb2ce736c8aabb50829edd227d1792c957
https://github.com/rollup/rollup https://github.com/rollup/rollup

View file

@ -1,7 +1,7 @@
/* /*
@license @license
Rollup.js v4.59.1 Rollup.js v4.60.0
Sat, 21 Mar 2026 06:45:31 GMT - commit 0cba9e079e1d6e56882558827b37557f36c52966 Sun, 22 Mar 2026 06:57:22 GMT - commit 6ecd69fb2ce736c8aabb50829edd227d1792c957
https://github.com/rollup/rollup https://github.com/rollup/rollup

View file

@ -1,13 +1,13 @@
/* /*
@license @license
Rollup.js v4.59.1 Rollup.js v4.60.0
Sat, 21 Mar 2026 06:45:31 GMT - commit 0cba9e079e1d6e56882558827b37557f36c52966 Sun, 22 Mar 2026 06:57:22 GMT - commit 6ecd69fb2ce736c8aabb50829edd227d1792c957
https://github.com/rollup/rollup https://github.com/rollup/rollup
Released under the MIT License. Released under the MIT License.
*/ */
import { EMPTY_OBJECT, ExportDefaultDeclaration as ExportDefaultDeclaration$1, CallExpression as CallExpression$1, EMPTY_ARRAY, LOGLEVEL_WARN, logUnusedExternalImports, ANNOTATION_KEY, INVALID_ANNOTATION_KEY, ExpressionStatement as ExpressionStatement$1, AwaitExpression as AwaitExpression$1, MemberExpression as MemberExpression$1, Identifier as Identifier$1, FunctionExpression as FunctionExpression$1, ArrowFunctionExpression as ArrowFunctionExpression$1, ObjectExpression as ObjectExpression$1, Property as Property$1, Program as Program$1, logIllegalImportReassignment, BLANK, logRedeclarationError, StaticBlock as StaticBlock$1, CatchClause as CatchClause$1, logDuplicateArgumentNameError, logModuleLevelDirective, ReturnStatement as ReturnStatement$1, VariableDeclarator as VariableDeclarator$1, logMissingExport, normalize, getImportPath, logMissingNodeBuiltins, logReservedNamespace, error, logIllegalIdentifierAsName, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, RestElement as RestElement$1, logConstVariableReassignError, EMPTY_SET, logCannotCallNamespace, logEval, BlockStatement as BlockStatement$1, getRollupError, logModuleParseError, logParseError, LOGLEVEL_INFO, logFirstSideEffect, locate, logInvalidAnnotation, logThisIsUndefined, getAstBuffer, convertAnnotations, FIXED_STRINGS, convertNode as convertNode$1, logImportAttributeIsInvalid, logImportOptionsAreInvalid, logMissingEntryExport, logSyntheticNamedExportsNeedNamespaceExport, logDuplicateExportError, logInvalidSourcemapForError, augmentCodeLocation, logInconsistentImportAttributes, logMissingJsxExport, logNamespaceConflict, logAmbiguousExternalNamespaces, logShimmedExport, parseAst, TemplateLiteral as TemplateLiteral$1, Literal as Literal$1, logCircularReexport, logInvalidFormatForTopLevelAwait, logAddonNotGenerated, logIncompatibleExportOptionValue, logMixedExport, logFailedValidation, isPathFragment, logCyclicCrossChunkReexport, getAliasName, logUnexpectedNamedImport, isAbsolute as isAbsolute$1, relative as relative$1, logUnexpectedNamespaceReexport, logEmptyChunk, logMissingGlobalName, logOptimizeChunkStatus, logSourcemapBroken, logConflictingSourcemapSources, logChunkInvalid, logInvalidOption, URL_OUTPUT_FORMAT, URL_OUTPUT_DIR, URL_OUTPUT_SOURCEMAPFILE, URL_OUTPUT_AMD_ID, logFileNameOutsideOutputDirectory, logCannotAssignModuleToChunk, logCircularChunk, logUnknownOption, printQuotedStringList, LOGLEVEL_ERROR, logLevelPriority, LOGLEVEL_DEBUG, logAnonymousPluginCache, logDuplicatePluginName, logInvalidSetAssetSourceCall, logPluginError, logNoTransformMapOrAstWithoutCode, warnDeprecation, URL_TRANSFORM, relativeId, logBadLoader, logInternalIdCannotBeExternal, isRelative, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logExternalSyntheticExports, logUnresolvedEntry, logUnresolvedImplicitDependant, logExternalModulesCannotBeIncludedInManualChunks, logEntryCannotBeExternal, logImplicitDependantCannotBeExternal, logExternalModulesCannotBeTransformedToModules, URL_LOAD, logNoAssetSourceSet, logFileReferenceIdNotFoundForFilename, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logInvalidRollupPhaseForChunkEmission, logChunkNotGeneratedForFileName, logAssetNotFinalisedForFileName, logFileNameConflict, URL_GENERATEBUNDLE, logInvalidLogPosition, logInputHookInOutputPlugin, logInvalidAddonPluginHook, logInvalidFunctionPluginHook, logImplicitDependantIsNotIncluded, logCircularDependency, augmentLogMessage, URL_JSX, URL_TREESHAKE, URL_TREESHAKE_MODULESIDEEFFECTS, URL_OUTPUT_INLINEDYNAMICIMPORTS, URL_PRESERVEENTRYSIGNATURES, URL_OUTPUT_GENERATEDCODE, isValidUrl, addTrailingSlashIfMissed, URL_OUTPUT_SOURCEMAPBASEURL, URL_OUTPUT_MANUALCHUNKS, logInvalidExportOptionValue, URL_OUTPUT_AMD_BASEPATH, URL_OUTPUT_INTEROP, URL_OUTPUT_EXTERNALIMPORTATTRIBUTES, logAlreadyClosed, logMissingFileOrDirOption, logCannotEmitFromOptionsHook, URL_WATCH } from './parseAst.js'; import { EMPTY_OBJECT, ExportDefaultDeclaration as ExportDefaultDeclaration$1, CallExpression as CallExpression$1, EMPTY_ARRAY, LOGLEVEL_WARN, logUnusedExternalImports, ANNOTATION_KEY, INVALID_ANNOTATION_KEY, ExpressionStatement as ExpressionStatement$1, AwaitExpression as AwaitExpression$1, MemberExpression as MemberExpression$1, Identifier as Identifier$1, FunctionExpression as FunctionExpression$1, ArrowFunctionExpression as ArrowFunctionExpression$1, ObjectExpression as ObjectExpression$1, Property as Property$1, Program as Program$1, logIllegalImportReassignment, BLANK, logRedeclarationError, StaticBlock as StaticBlock$1, CatchClause as CatchClause$1, logDuplicateArgumentNameError, logModuleLevelDirective, ReturnStatement as ReturnStatement$1, VariableDeclarator as VariableDeclarator$1, logMissingExport, normalize, getImportPath, error, logSourcePhaseFormatUnsupported, logMissingNodeBuiltins, logReservedNamespace, logIllegalIdentifierAsName, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, RestElement as RestElement$1, logConstVariableReassignError, EMPTY_SET, logCannotCallNamespace, logEval, BlockStatement as BlockStatement$1, getRollupError, logModuleParseError, logParseError, LOGLEVEL_INFO, logFirstSideEffect, locate, logInvalidAnnotation, logThisIsUndefined, getAstBuffer, convertAnnotations, FIXED_STRINGS, convertNode as convertNode$1, logImportAttributeIsInvalid, logImportOptionsAreInvalid, logMissingEntryExport, logSyntheticNamedExportsNeedNamespaceExport, logDuplicateExportError, logInvalidSourcemapForError, augmentCodeLocation, logInconsistentImportAttributes, logMissingJsxExport, logNamespaceConflict, logAmbiguousExternalNamespaces, logShimmedExport, parseAst, TemplateLiteral as TemplateLiteral$1, Literal as Literal$1, logCircularReexport, logInvalidFormatForTopLevelAwait, logAddonNotGenerated, logIncompatibleExportOptionValue, logMixedExport, logFailedValidation, isPathFragment, logCyclicCrossChunkReexport, getAliasName, logUnexpectedNamedImport, isAbsolute as isAbsolute$1, relative as relative$1, logUnexpectedNamespaceReexport, logEmptyChunk, logMissingGlobalName, logOptimizeChunkStatus, logSourcemapBroken, logConflictingSourcemapSources, logChunkInvalid, logInvalidOption, URL_OUTPUT_FORMAT, URL_OUTPUT_DIR, URL_OUTPUT_SOURCEMAPFILE, URL_OUTPUT_AMD_ID, logFileNameOutsideOutputDirectory, logCannotAssignModuleToChunk, logCircularChunk, logUnknownOption, printQuotedStringList, LOGLEVEL_ERROR, logLevelPriority, LOGLEVEL_DEBUG, logAnonymousPluginCache, logDuplicatePluginName, logInvalidSetAssetSourceCall, logPluginError, logNoTransformMapOrAstWithoutCode, warnDeprecation, URL_TRANSFORM, relativeId, logBadLoader, logNonExternalSourcePhaseImport, logInternalIdCannotBeExternal, isRelative, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logExternalSyntheticExports, logUnresolvedEntry, logUnresolvedImplicitDependant, logExternalModulesCannotBeIncludedInManualChunks, logEntryCannotBeExternal, logImplicitDependantCannotBeExternal, logExternalModulesCannotBeTransformedToModules, URL_LOAD, logNoAssetSourceSet, logFileReferenceIdNotFoundForFilename, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logInvalidRollupPhaseForChunkEmission, logChunkNotGeneratedForFileName, logAssetNotFinalisedForFileName, logFileNameConflict, URL_GENERATEBUNDLE, logInvalidLogPosition, logInputHookInOutputPlugin, logInvalidAddonPluginHook, logInvalidFunctionPluginHook, logImplicitDependantIsNotIncluded, logCircularDependency, augmentLogMessage, URL_JSX, URL_TREESHAKE, URL_TREESHAKE_MODULESIDEEFFECTS, URL_OUTPUT_INLINEDYNAMICIMPORTS, URL_PRESERVEENTRYSIGNATURES, URL_OUTPUT_GENERATEDCODE, isValidUrl, addTrailingSlashIfMissed, URL_OUTPUT_SOURCEMAPBASEURL, URL_OUTPUT_MANUALCHUNKS, logInvalidExportOptionValue, URL_OUTPUT_AMD_BASEPATH, URL_OUTPUT_INTEROP, URL_OUTPUT_EXTERNALIMPORTATTRIBUTES, logAlreadyClosed, logMissingFileOrDirOption, logCannotEmitFromOptionsHook, URL_WATCH } from './parseAst.js';
import { relative, dirname, basename, extname, resolve as resolve$1, join } from 'node:path'; import { relative, dirname, basename, extname, resolve as resolve$1, join } from 'node:path';
import { posix, isAbsolute, resolve, win32 } from 'path'; import { posix, isAbsolute, resolve, win32 } from 'path';
import { parseAsync, xxhashBase16, xxhashBase64Url, xxhashBase36 } from '../../native.js'; import { parseAsync, xxhashBase16, xxhashBase64Url, xxhashBase36 } from '../../native.js';
@ -27,7 +27,7 @@ function _mergeNamespaces(n, m) {
return Object.defineProperty(n, Symbol.toStringTag, { value: 'Module' }); return Object.defineProperty(n, Symbol.toStringTag, { value: 'Module' });
} }
var version = "4.59.1"; var version = "4.60.0";
// src/vlq.ts // src/vlq.ts
var comma = ",".charCodeAt(0); var comma = ",".charCodeAt(0);
@ -2464,12 +2464,15 @@ class Variable extends ExpressionEntity {
} }
} }
/** Synthetic import name for source phase imports, similar to '*' for namespaces */
const SOURCE_PHASE_IMPORT = '*source';
class ExternalVariable extends Variable { class ExternalVariable extends Variable {
constructor(module, name) { constructor(module, name) {
super(name); super(name);
this.referenced = false; this.referenced = false;
this.module = module; this.module = module;
this.isNamespace = name === '*'; this.isNamespace = name === '*';
this.isSourcePhase = name === SOURCE_PHASE_IMPORT;
} }
addReference(identifier) { addReference(identifier) {
this.referenced = true; this.referenced = true;
@ -8432,6 +8435,13 @@ function getInteropBlock(dependencies, interop, externalLiveBindings, freeze, sy
return `${getHelpersBlock(neededInteropHelpers, accessedGlobals, indent, snippets, externalLiveBindings, freeze, symbols)}${interopStatements.length > 0 ? `${interopStatements.join(n)}${n}${n}` : ''}`; return `${getHelpersBlock(neededInteropHelpers, accessedGlobals, indent, snippets, externalLiveBindings, freeze, symbols)}${interopStatements.length > 0 ? `${interopStatements.join(n)}${n}${n}` : ''}`;
} }
function throwOnPhase(outputFormat, chunkId, dependencies) {
const sourcePhaseDependency = dependencies.find(dependency => dependency.sourcePhaseImport);
if (sourcePhaseDependency) {
error(logSourcePhaseFormatUnsupported(outputFormat, chunkId, sourcePhaseDependency.importPath));
}
}
function addJsExtension(name) { function addJsExtension(name) {
return name.endsWith('.js') ? name : name + '.js'; return name.endsWith('.js') ? name : name + '.js';
} }
@ -8570,6 +8580,7 @@ function warnOnBuiltins(log, dependencies) {
function amd(magicString, { accessedGlobals, dependencies, exports: exports$1, hasDefaultExport, hasExports, id, indent: t, intro, isEntryFacade, isModuleFacade, namedExportsMode, log, outro, snippets }, { amd, esModule, externalLiveBindings, freeze, generatedCode: { symbols }, interop, reexportProtoFromExternal, strict }) { function amd(magicString, { accessedGlobals, dependencies, exports: exports$1, hasDefaultExport, hasExports, id, indent: t, intro, isEntryFacade, isModuleFacade, namedExportsMode, log, outro, snippets }, { amd, esModule, externalLiveBindings, freeze, generatedCode: { symbols }, interop, reexportProtoFromExternal, strict }) {
warnOnBuiltins(log, dependencies); warnOnBuiltins(log, dependencies);
throwOnPhase('amd', id, dependencies);
const deps = dependencies.map(m => `'${updateExtensionForRelativeAmdId(m.importPath, amd.forceJsExtensionForImports)}'`); const deps = dependencies.map(m => `'${updateExtensionForRelativeAmdId(m.importPath, amd.forceJsExtensionForImports)}'`);
const parameters = dependencies.map(m => m.name); const parameters = dependencies.map(m => m.name);
const { n, getNonArrowFunctionIntro, _ } = snippets; const { n, getNonArrowFunctionIntro, _ } = snippets;
@ -8607,7 +8618,8 @@ function amd(magicString, { accessedGlobals, dependencies, exports: exports$1, h
.append(`${n}${n}}));`); .append(`${n}${n}}));`);
} }
function cjs(magicString, { accessedGlobals, dependencies, exports: exports$1, hasDefaultExport, hasExports, indent: t, intro, isEntryFacade, isModuleFacade, namedExportsMode, outro, snippets }, { compact, esModule, externalLiveBindings, freeze, interop, generatedCode: { symbols }, reexportProtoFromExternal, strict }) { function cjs(magicString, { accessedGlobals, dependencies, exports: exports$1, hasDefaultExport, hasExports, id, indent: t, intro, isEntryFacade, isModuleFacade, namedExportsMode, outro, snippets }, { compact, esModule, externalLiveBindings, freeze, interop, generatedCode: { symbols }, reexportProtoFromExternal, strict }) {
throwOnPhase('cjs', id, dependencies);
const { _, n } = snippets; const { _, n } = snippets;
const useStrict = strict ? `'use strict';${n}${n}` : ''; const useStrict = strict ? `'use strict';${n}${n}` : '';
let namespaceMarkers = getNamespaceMarkers(namedExportsMode && hasExports, isEntryFacade && (esModule === true || (esModule === 'if-default-prop' && hasDefaultExport)), isModuleFacade && symbols, snippets); let namespaceMarkers = getNamespaceMarkers(namedExportsMode && hasExports, isEntryFacade && (esModule === true || (esModule === 'if-default-prop' && hasDefaultExport)), isModuleFacade && symbols, snippets);
@ -8660,11 +8672,16 @@ function es(magicString, { accessedGlobals, indent: t, intro, outro, dependencie
} }
function getImportBlock(dependencies, importAttributesKey, { _ }) { function getImportBlock(dependencies, importAttributesKey, { _ }) {
const importBlock = []; const importBlock = [];
for (const { importPath, reexports, imports, name, attributes } of dependencies) { for (const { importPath, reexports, imports, name, attributes, sourcePhaseImport } of dependencies) {
const assertion = attributes ? `${_}${importAttributesKey}${_}${attributes}` : ''; const assertion = attributes ? `${_}${importAttributesKey}${_}${attributes}` : '';
const pathWithAssertion = `'${importPath}'${assertion};`; const pathWithAssertion = `'${importPath}'${assertion};`;
if (sourcePhaseImport) {
importBlock.push(`import source ${sourcePhaseImport} from${_}${pathWithAssertion}`);
}
if (!reexports && !imports) { if (!reexports && !imports) {
importBlock.push(`import${_}${pathWithAssertion}`); if (!sourcePhaseImport) {
importBlock.push(`import${_}${pathWithAssertion}`);
}
continue; continue;
} }
if (imports) { if (imports) {
@ -8818,7 +8835,8 @@ function trimEmptyImports(dependencies) {
return []; return [];
} }
function iife(magicString, { accessedGlobals, dependencies, exports: exports$1, hasDefaultExport, hasExports, indent: t, intro, namedExportsMode, log, outro, snippets }, { compact, esModule, extend, freeze, externalLiveBindings, reexportProtoFromExternal, globals, interop, name, generatedCode: { symbols }, strict }) { function iife(magicString, { accessedGlobals, dependencies, exports: exports$1, hasDefaultExport, hasExports, id, indent: t, intro, namedExportsMode, log, outro, snippets }, { compact, esModule, extend, freeze, externalLiveBindings, reexportProtoFromExternal, globals, interop, name, generatedCode: { symbols }, strict }) {
throwOnPhase('iife', id, dependencies);
const { _, getNonArrowFunctionIntro, getPropertyAccess, n } = snippets; const { _, getNonArrowFunctionIntro, getPropertyAccess, n } = snippets;
const isNamespaced = name && name.includes('.'); const isNamespaced = name && name.includes('.');
const useVariableAssignment = !extend && !isNamespaced; const useVariableAssignment = !extend && !isNamespaced;
@ -8877,7 +8895,8 @@ function iife(magicString, { accessedGlobals, dependencies, exports: exports$1,
const MISSING_EXPORT_SHIM_VARIABLE = '_missingExportShim'; const MISSING_EXPORT_SHIM_VARIABLE = '_missingExportShim';
function system(magicString, { accessedGlobals, dependencies, exports: exports$1, hasExports, indent: t, intro, snippets, outro, usesTopLevelAwait }, { externalLiveBindings, freeze, name, generatedCode: { symbols }, strict, systemNullSetters }) { function system(magicString, { accessedGlobals, dependencies, exports: exports$1, hasExports, id, indent: t, intro, snippets, outro, usesTopLevelAwait }, { externalLiveBindings, freeze, name, generatedCode: { symbols }, strict, systemNullSetters }) {
throwOnPhase('system', id, dependencies);
const { _, getFunctionIntro, getNonArrowFunctionIntro, n, s } = snippets; const { _, getFunctionIntro, getNonArrowFunctionIntro, n, s } = snippets;
const { importBindings, setters, starExcludes } = analyzeDependencies(dependencies, exports$1, t, snippets); const { importBindings, setters, starExcludes } = analyzeDependencies(dependencies, exports$1, t, snippets);
const registeredName = name ? `'${name}',${_}` : ''; const registeredName = name ? `'${name}',${_}` : '';
@ -9045,6 +9064,7 @@ function umd(magicString, { accessedGlobals, dependencies, exports: exports$1, h
if (hasExports && !name) { if (hasExports && !name) {
return error(logMissingNameOptionForUmdExport()); return error(logMissingNameOptionForUmdExport());
} }
throwOnPhase('umd', id, dependencies);
warnOnBuiltins(log, dependencies); warnOnBuiltins(log, dependencies);
const amdDeps = dependencies.map(m => `'${updateExtensionForRelativeAmdId(m.importPath, amd.forceJsExtensionForImports)}'`); const amdDeps = dependencies.map(m => `'${updateExtensionForRelativeAmdId(m.importPath, amd.forceJsExtensionForImports)}'`);
const cjsDeps = dependencies.map(m => `require('${m.importPath}')`); const cjsDeps = dependencies.map(m => `require('${m.importPath}')`);
@ -16120,6 +16140,8 @@ const bufferParsers = [
node.specifiers = convertNodeList(node, scope, buffer[position], buffer); node.specifiers = convertNodeList(node, scope, buffer[position], buffer);
node.source = convertNode(node, scope, buffer[position + 1], buffer); node.source = convertNode(node, scope, buffer[position + 1], buffer);
node.attributes = convertNodeList(node, scope, buffer[position + 2], buffer); node.attributes = convertNodeList(node, scope, buffer[position + 2], buffer);
const phaseIndex = buffer[position + 3];
node.phase = phaseIndex === 0 ? undefined : FIXED_STRINGS[phaseIndex];
}, },
function importDefaultSpecifier(node, position, buffer) { function importDefaultSpecifier(node, position, buffer) {
const { scope } = node; const { scope } = node;
@ -16131,6 +16153,8 @@ const bufferParsers = [
node.sourceAstNode = convertNode$1(buffer[position], buffer); node.sourceAstNode = convertNode$1(buffer[position], buffer);
const optionsPosition = buffer[position + 1]; const optionsPosition = buffer[position + 1];
node.options = optionsPosition === 0 ? null : convertNode(node, scope, optionsPosition, buffer); node.options = optionsPosition === 0 ? null : convertNode(node, scope, optionsPosition, buffer);
const phaseIndex = buffer[position + 2];
node.phase = phaseIndex === 0 ? undefined : FIXED_STRINGS[phaseIndex];
}, },
function importNamespaceSpecifier(node, position, buffer) { function importNamespaceSpecifier(node, position, buffer) {
const { scope } = node; const { scope } = node;
@ -16916,6 +16940,7 @@ class Module {
this.isUserDefinedEntryPoint = false; this.isUserDefinedEntryPoint = false;
this.needsExportShim = false; this.needsExportShim = false;
this.sideEffectDependenciesByVariable = new Map(); this.sideEffectDependenciesByVariable = new Map();
this.sourcePhaseSources = new Set();
this.sourcesWithAttributes = new Map(); this.sourcesWithAttributes = new Map();
this.allExportsIncluded = false; this.allExportsIncluded = false;
this.ast = null; this.ast = null;
@ -17566,16 +17591,19 @@ class Module {
if (this.scope.variables.has(localName) || this.importDescriptions.has(localName)) { if (this.scope.variables.has(localName) || this.importDescriptions.has(localName)) {
this.error(logRedeclarationError(localName), specifier.local.start); this.error(logRedeclarationError(localName), specifier.local.start);
} }
const name = specifier instanceof ImportDefaultSpecifier const name = node.phase === 'source'
? 'default' ? SOURCE_PHASE_IMPORT
: specifier instanceof ImportNamespaceSpecifier : specifier instanceof ImportDefaultSpecifier
? '*' ? 'default'
: specifier.imported instanceof Identifier : specifier instanceof ImportNamespaceSpecifier
? specifier.imported.name ? '*'
: specifier.imported.value; : specifier.imported instanceof Identifier
? specifier.imported.name
: specifier.imported.value;
this.importDescriptions.set(localName, { this.importDescriptions.set(localName, {
module: null, // filled in later module: null, // filled in later
name, name,
phase: node.phase === 'source' ? 'source' : 'instance',
source, source,
start: specifier.start start: specifier.start
}); });
@ -17648,6 +17676,9 @@ class Module {
else { else {
this.sourcesWithAttributes.set(source, parsedAttributes); this.sourcesWithAttributes.set(source, parsedAttributes);
} }
if (declaration.phase === 'source') {
this.sourcePhaseSources.add(source);
}
} }
getImportedJsxFactoryVariable(baseName, nodeStart, importSource) { getImportedJsxFactoryVariable(baseName, nodeStart, importSource) {
const { id } = this.resolvedIds[importSource]; const { id } = this.resolvedIds[importSource];
@ -17861,6 +17892,9 @@ function deconflictImportsEsmOrSystem(usedNames, imports, dependenciesToBeDeconf
? externalChunkByModule.get(module) ? externalChunkByModule.get(module)
: chunkByModule.get(module)).variableName); : chunkByModule.get(module)).variableName);
} }
else if (module instanceof ExternalModule && variable.isSourcePhase) {
variable.setRenderNames(null, getSafeName(module.suggestedVariableName + '__source', usedNames, variable.forbiddenNames));
}
else if (module instanceof ExternalModule && name === 'default') { else if (module instanceof ExternalModule && name === 'default') {
variable.setRenderNames(null, getSafeName([...module.exportedVariables].some(([exportedVariable, exportedName]) => exportedName === '*' && exportedVariable.included) variable.setRenderNames(null, getSafeName([...module.exportedVariables].some(([exportedVariable, exportedName]) => exportedName === '*' && exportedVariable.included)
? module.suggestedVariableName + '__default' ? module.suggestedVariableName + '__default'
@ -18907,10 +18941,14 @@ class Chunk {
const module = variable.module; const module = variable.module;
let dependency; let dependency;
let imported; let imported;
const isSourcePhase = module instanceof ExternalModule && variable.isSourcePhase;
if (module instanceof ExternalModule) { if (module instanceof ExternalModule) {
dependency = this.externalChunkByModule.get(module); dependency = this.externalChunkByModule.get(module);
imported = variable.name; imported = variable.name;
if (imported !== 'default' && imported !== '*' && interop(module.id) === 'defaultOnly') { if (!isSourcePhase &&
imported !== 'default' &&
imported !== '*' &&
interop(module.id) === 'defaultOnly') {
return error(logUnexpectedNamedImport(module.id, imported, false)); return error(logUnexpectedNamedImport(module.id, imported, false));
} }
} }
@ -18920,7 +18958,8 @@ class Chunk {
} }
getOrCreate(importsByDependency, dependency, getNewArray).push({ getOrCreate(importsByDependency, dependency, getNewArray).push({
imported, imported,
local: variable.getName(this.snippets.getPropertyAccess) local: variable.getName(this.snippets.getPropertyAccess),
phase: isSourcePhase ? 'source' : 'instance'
}); });
} }
return importsByDependency; return importsByDependency;
@ -19071,6 +19110,9 @@ class Chunk {
const reexports = reexportSpecifiers.get(dependency) || null; const reexports = reexportSpecifiers.get(dependency) || null;
const namedExportsMode = dependency instanceof ExternalChunk || dependency.exportMode !== 'default'; const namedExportsMode = dependency instanceof ExternalChunk || dependency.exportMode !== 'default';
const importPath = dependency.getImportPath(fileName); const importPath = dependency.getImportPath(fileName);
// Separate source-phase imports from regular imports
const sourcePhaseImport = imports?.find(index => index.phase === 'source');
const instanceImports = imports?.filter(index => index.phase !== 'source') ?? null;
renderedDependencies.set(dependency, { renderedDependencies.set(dependency, {
attributes: dependency instanceof ExternalChunk attributes: dependency instanceof ExternalChunk
? dependency.getImportAttributes(this.snippets) ? dependency.getImportAttributes(this.snippets)
@ -19080,12 +19122,13 @@ class Chunk {
(this.outputOptions.format === 'umd' || this.outputOptions.format === 'iife') && (this.outputOptions.format === 'umd' || this.outputOptions.format === 'iife') &&
getGlobalName(dependency, this.outputOptions.globals, (imports || reexports) !== null, this.inputOptions.onLog), getGlobalName(dependency, this.outputOptions.globals, (imports || reexports) !== null, this.inputOptions.onLog),
importPath, importPath,
imports, imports: instanceImports && instanceImports.length > 0 ? instanceImports : null,
isChunk: dependency instanceof Chunk, isChunk: dependency instanceof Chunk,
name: dependency.variableName, name: dependency.variableName,
namedExportsMode, namedExportsMode,
namespaceVariableName: dependency.namespaceVariableName, namespaceVariableName: dependency.namespaceVariableName,
reexports reexports,
sourcePhaseImport: sourcePhaseImport?.local
}); });
} }
return (this.renderedDependencies = renderedDependencies); return (this.renderedDependencies = renderedDependencies);
@ -21519,13 +21562,16 @@ class ModuleLoader {
return loadNewModulesPromise; return loadNewModulesPromise;
} }
async fetchDynamicDependencies(module, resolveDynamicImportPromises) { async fetchDynamicDependencies(module, resolveDynamicImportPromises) {
const dependencies = await Promise.all(resolveDynamicImportPromises.map(resolveDynamicImportPromise => resolveDynamicImportPromise.then(async ([{ node }, resolvedId]) => { const dependencies = await Promise.all(resolveDynamicImportPromises.map(resolveDynamicImportPromise => resolveDynamicImportPromise.then(async ([{ argument, node }, resolvedId]) => {
if (resolvedId === null) if (resolvedId === null)
return null; return null;
if (typeof resolvedId === 'string') { if (typeof resolvedId === 'string') {
node.resolution = resolvedId; node.resolution = resolvedId;
return null; return null;
} }
if (node.phase === 'source' && !resolvedId.external) {
return error(logNonExternalSourcePhaseImport(typeof argument === 'string' ? argument : relativeId(resolvedId.id), module.id));
}
return (node.resolution = await this.fetchResolvedDependency(relativeId(resolvedId.id), module.id, resolvedId)); return (node.resolution = await this.fetchResolvedDependency(relativeId(resolvedId.id), module.id, resolvedId));
}))); })));
for (const dependency of dependencies) { for (const dependency of dependencies) {
@ -21605,7 +21651,12 @@ class ModuleLoader {
return this.fetchModule(resolvedId, importer, false, false); return this.fetchModule(resolvedId, importer, false, false);
} }
async fetchStaticDependencies(module, resolveStaticDependencyPromises) { async fetchStaticDependencies(module, resolveStaticDependencyPromises) {
for (const dependency of await Promise.all(resolveStaticDependencyPromises.map(resolveStaticDependencyPromise => resolveStaticDependencyPromise.then(([source, resolvedId]) => this.fetchResolvedDependency(source, module.id, resolvedId))))) { for (const dependency of await Promise.all(resolveStaticDependencyPromises.map(resolveStaticDependencyPromise => resolveStaticDependencyPromise.then(([source, resolvedId]) => {
if (module.sourcePhaseSources.has(source) && !resolvedId.external) {
return error(logNonExternalSourcePhaseImport(source, module.id));
}
return this.fetchResolvedDependency(source, module.id, resolvedId);
})))) {
module.dependencies.add(dependency); module.dependencies.add(dependency);
dependency.importers.push(module.id); dependency.importers.push(module.id);
} }
@ -22874,7 +22925,7 @@ class Graph {
warnForMissingExports() { warnForMissingExports() {
for (const module of this.modules) { for (const module of this.modules) {
for (const importDescription of module.importDescriptions.values()) { for (const importDescription of module.importDescriptions.values()) {
if (importDescription.name !== '*') { if (importDescription.name !== '*' && importDescription.phase !== 'source') {
const [variable, options] = importDescription.module.getVariableForExportName(importDescription.name, { importChain: [module.id] }); const [variable, options] = importDescription.module.getVariableForExportName(importDescription.name, { importChain: [module.id] });
if (!variable) { if (!variable) {
module.log(LOGLEVEL_WARN, logMissingExport(importDescription.name, module.id, importDescription.module.id, !!options?.missingButExportExists), importDescription.start); module.log(LOGLEVEL_WARN, logMissingExport(importDescription.name, module.id, importDescription.module.id, !!options?.missingButExportExists), importDescription.start);

View file

@ -1,7 +1,7 @@
/* /*
@license @license
Rollup.js v4.59.1 Rollup.js v4.60.0
Sat, 21 Mar 2026 06:45:31 GMT - commit 0cba9e079e1d6e56882558827b37557f36c52966 Sun, 22 Mar 2026 06:57:22 GMT - commit 6ecd69fb2ce736c8aabb50829edd227d1792c957
https://github.com/rollup/rollup https://github.com/rollup/rollup
@ -108,7 +108,9 @@ const FIXED_STRINGS = [
'noSideEffects', 'noSideEffects',
'sourcemap', 'sourcemap',
'using', 'using',
'await using' 'await using',
'source',
'defer'
]; ];
const ANNOTATION_KEY = '_rollupAnnotations'; const ANNOTATION_KEY = '_rollupAnnotations';
@ -390,6 +392,8 @@ const URL_TREESHAKE_PURE = 'configuration-options/#pure';
const URL_TREESHAKE_NOSIDEEFFECTS = 'configuration-options/#no-side-effects'; const URL_TREESHAKE_NOSIDEEFFECTS = 'configuration-options/#no-side-effects';
const URL_TREESHAKE_MODULESIDEEFFECTS = 'configuration-options/#treeshake-modulesideeffects'; const URL_TREESHAKE_MODULESIDEEFFECTS = 'configuration-options/#treeshake-modulesideeffects';
const URL_WATCH = 'configuration-options/#watch'; const URL_WATCH = 'configuration-options/#watch';
// es-module-syntax
const URL_SOURCE_PHASE_IMPORTS = 'es-module-syntax/#source-phase-import';
const URL_GENERATEBUNDLE = 'plugin-development/#generatebundle'; const URL_GENERATEBUNDLE = 'plugin-development/#generatebundle';
const URL_LOAD = 'plugin-development/#load'; const URL_LOAD = 'plugin-development/#load';
const URL_TRANSFORM = 'plugin-development/#transform'; const URL_TRANSFORM = 'plugin-development/#transform';
@ -447,7 +451,7 @@ function augmentLogMessage(log) {
} }
// Error codes should be sorted alphabetically while errors should be sorted by // Error codes should be sorted alphabetically while errors should be sorted by
// error code below // error code below
const ADDON_ERROR = 'ADDON_ERROR', ALREADY_CLOSED = 'ALREADY_CLOSED', AMBIGUOUS_EXTERNAL_NAMESPACES = 'AMBIGUOUS_EXTERNAL_NAMESPACES', ANONYMOUS_PLUGIN_CACHE = 'ANONYMOUS_PLUGIN_CACHE', ASSET_NOT_FINALISED = 'ASSET_NOT_FINALISED', ASSET_NOT_FOUND = 'ASSET_NOT_FOUND', ASSET_SOURCE_ALREADY_SET = 'ASSET_SOURCE_ALREADY_SET', ASSET_SOURCE_MISSING = 'ASSET_SOURCE_MISSING', BAD_LOADER = 'BAD_LOADER', CANNOT_CALL_NAMESPACE = 'CANNOT_CALL_NAMESPACE', CANNOT_EMIT_FROM_OPTIONS_HOOK = 'CANNOT_EMIT_FROM_OPTIONS_HOOK', CHUNK_NOT_GENERATED = 'CHUNK_NOT_GENERATED', CHUNK_INVALID = 'CHUNK_INVALID', CIRCULAR_CHUNK = 'CIRCULAR_CHUNK', CIRCULAR_DEPENDENCY = 'CIRCULAR_DEPENDENCY', CIRCULAR_REEXPORT = 'CIRCULAR_REEXPORT', CONST_REASSIGN = 'CONST_REASSIGN', CYCLIC_CROSS_CHUNK_REEXPORT = 'CYCLIC_CROSS_CHUNK_REEXPORT', DEPRECATED_FEATURE = 'DEPRECATED_FEATURE', DUPLICATE_ARGUMENT_NAME = 'DUPLICATE_ARGUMENT_NAME', DUPLICATE_EXPORT = 'DUPLICATE_EXPORT', DUPLICATE_PLUGIN_NAME = 'DUPLICATE_PLUGIN_NAME', EMPTY_BUNDLE = 'EMPTY_BUNDLE', EVAL = 'EVAL', EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS = 'EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS', EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES = 'EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES', EXTERNAL_SYNTHETIC_EXPORTS = 'EXTERNAL_SYNTHETIC_EXPORTS', FILE_NAME_CONFLICT = 'FILE_NAME_CONFLICT', FILE_NAME_OUTSIDE_OUTPUT_DIRECTORY = 'FILE_NAME_OUTSIDE_OUTPUT_DIRECTORY', FILE_NOT_FOUND = 'FILE_NOT_FOUND', FIRST_SIDE_EFFECT = 'FIRST_SIDE_EFFECT', ILLEGAL_IDENTIFIER_AS_NAME = 'ILLEGAL_IDENTIFIER_AS_NAME', ILLEGAL_REASSIGNMENT = 'ILLEGAL_REASSIGNMENT', INCONSISTENT_IMPORT_ATTRIBUTES = 'INCONSISTENT_IMPORT_ATTRIBUTES', INVALID_ANNOTATION = 'INVALID_ANNOTATION', INPUT_HOOK_IN_OUTPUT_PLUGIN = 'INPUT_HOOK_IN_OUTPUT_PLUGIN', INVALID_CHUNK = 'INVALID_CHUNK', INVALID_EXPORT_OPTION = 'INVALID_EXPORT_OPTION', INVALID_EXTERNAL_ID = 'INVALID_EXTERNAL_ID', INVALID_IMPORT_ATTRIBUTE = 'INVALID_IMPORT_ATTRIBUTE', INVALID_LOG_POSITION = 'INVALID_LOG_POSITION', INVALID_OPTION = 'INVALID_OPTION', INVALID_PLUGIN_HOOK = 'INVALID_PLUGIN_HOOK', INVALID_ROLLUP_PHASE = 'INVALID_ROLLUP_PHASE', INVALID_SETASSETSOURCE = 'INVALID_SETASSETSOURCE', INVALID_TLA_FORMAT = 'INVALID_TLA_FORMAT', MISSING_EXPORT = 'MISSING_EXPORT', MISSING_GLOBAL_NAME = 'MISSING_GLOBAL_NAME', MISSING_IMPLICIT_DEPENDANT = 'MISSING_IMPLICIT_DEPENDANT', MISSING_JSX_EXPORT = 'MISSING_JSX_EXPORT', MISSING_NAME_OPTION_FOR_IIFE_EXPORT = 'MISSING_NAME_OPTION_FOR_IIFE_EXPORT', MISSING_NODE_BUILTINS = 'MISSING_NODE_BUILTINS', MISSING_OPTION = 'MISSING_OPTION', MIXED_EXPORTS = 'MIXED_EXPORTS', MODULE_LEVEL_DIRECTIVE = 'MODULE_LEVEL_DIRECTIVE', NAMESPACE_CONFLICT = 'NAMESPACE_CONFLICT', NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE = 'NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE', OPTIMIZE_CHUNK_STATUS = 'OPTIMIZE_CHUNK_STATUS', PARSE_ERROR = 'PARSE_ERROR', PLUGIN_ERROR = 'PLUGIN_ERROR', REDECLARATION_ERROR = 'REDECLARATION_ERROR', RESERVED_NAMESPACE = 'RESERVED_NAMESPACE', SHIMMED_EXPORT = 'SHIMMED_EXPORT', SOURCEMAP_BROKEN = 'SOURCEMAP_BROKEN', SOURCEMAP_ERROR = 'SOURCEMAP_ERROR', SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT = 'SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT', THIS_IS_UNDEFINED = 'THIS_IS_UNDEFINED', UNEXPECTED_NAMED_IMPORT = 'UNEXPECTED_NAMED_IMPORT', UNKNOWN_OPTION = 'UNKNOWN_OPTION', UNRESOLVED_ENTRY = 'UNRESOLVED_ENTRY', UNRESOLVED_IMPORT = 'UNRESOLVED_IMPORT', UNUSED_EXTERNAL_IMPORT = 'UNUSED_EXTERNAL_IMPORT', VALIDATION_ERROR = 'VALIDATION_ERROR'; const ADDON_ERROR = 'ADDON_ERROR', ALREADY_CLOSED = 'ALREADY_CLOSED', AMBIGUOUS_EXTERNAL_NAMESPACES = 'AMBIGUOUS_EXTERNAL_NAMESPACES', ANONYMOUS_PLUGIN_CACHE = 'ANONYMOUS_PLUGIN_CACHE', ASSET_NOT_FINALISED = 'ASSET_NOT_FINALISED', ASSET_NOT_FOUND = 'ASSET_NOT_FOUND', ASSET_SOURCE_ALREADY_SET = 'ASSET_SOURCE_ALREADY_SET', ASSET_SOURCE_MISSING = 'ASSET_SOURCE_MISSING', BAD_LOADER = 'BAD_LOADER', CANNOT_CALL_NAMESPACE = 'CANNOT_CALL_NAMESPACE', CANNOT_EMIT_FROM_OPTIONS_HOOK = 'CANNOT_EMIT_FROM_OPTIONS_HOOK', CHUNK_NOT_GENERATED = 'CHUNK_NOT_GENERATED', CHUNK_INVALID = 'CHUNK_INVALID', CIRCULAR_CHUNK = 'CIRCULAR_CHUNK', CIRCULAR_DEPENDENCY = 'CIRCULAR_DEPENDENCY', CIRCULAR_REEXPORT = 'CIRCULAR_REEXPORT', CONST_REASSIGN = 'CONST_REASSIGN', CYCLIC_CROSS_CHUNK_REEXPORT = 'CYCLIC_CROSS_CHUNK_REEXPORT', DEPRECATED_FEATURE = 'DEPRECATED_FEATURE', DUPLICATE_ARGUMENT_NAME = 'DUPLICATE_ARGUMENT_NAME', DUPLICATE_EXPORT = 'DUPLICATE_EXPORT', DUPLICATE_PLUGIN_NAME = 'DUPLICATE_PLUGIN_NAME', EMPTY_BUNDLE = 'EMPTY_BUNDLE', EVAL = 'EVAL', EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS = 'EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS', EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES = 'EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES', EXTERNAL_SYNTHETIC_EXPORTS = 'EXTERNAL_SYNTHETIC_EXPORTS', FILE_NAME_CONFLICT = 'FILE_NAME_CONFLICT', FILE_NAME_OUTSIDE_OUTPUT_DIRECTORY = 'FILE_NAME_OUTSIDE_OUTPUT_DIRECTORY', FILE_NOT_FOUND = 'FILE_NOT_FOUND', FIRST_SIDE_EFFECT = 'FIRST_SIDE_EFFECT', ILLEGAL_IDENTIFIER_AS_NAME = 'ILLEGAL_IDENTIFIER_AS_NAME', ILLEGAL_REASSIGNMENT = 'ILLEGAL_REASSIGNMENT', INCONSISTENT_IMPORT_ATTRIBUTES = 'INCONSISTENT_IMPORT_ATTRIBUTES', INVALID_ANNOTATION = 'INVALID_ANNOTATION', INPUT_HOOK_IN_OUTPUT_PLUGIN = 'INPUT_HOOK_IN_OUTPUT_PLUGIN', INVALID_CHUNK = 'INVALID_CHUNK', INVALID_EXPORT_OPTION = 'INVALID_EXPORT_OPTION', INVALID_EXTERNAL_ID = 'INVALID_EXTERNAL_ID', INVALID_IMPORT_ATTRIBUTE = 'INVALID_IMPORT_ATTRIBUTE', INVALID_LOG_POSITION = 'INVALID_LOG_POSITION', INVALID_OPTION = 'INVALID_OPTION', INVALID_PLUGIN_HOOK = 'INVALID_PLUGIN_HOOK', INVALID_ROLLUP_PHASE = 'INVALID_ROLLUP_PHASE', INVALID_SETASSETSOURCE = 'INVALID_SETASSETSOURCE', INVALID_TLA_FORMAT = 'INVALID_TLA_FORMAT', MISSING_EXPORT = 'MISSING_EXPORT', MISSING_GLOBAL_NAME = 'MISSING_GLOBAL_NAME', MISSING_IMPLICIT_DEPENDANT = 'MISSING_IMPLICIT_DEPENDANT', MISSING_JSX_EXPORT = 'MISSING_JSX_EXPORT', MISSING_NAME_OPTION_FOR_IIFE_EXPORT = 'MISSING_NAME_OPTION_FOR_IIFE_EXPORT', MISSING_NODE_BUILTINS = 'MISSING_NODE_BUILTINS', MISSING_OPTION = 'MISSING_OPTION', MIXED_EXPORTS = 'MIXED_EXPORTS', MODULE_LEVEL_DIRECTIVE = 'MODULE_LEVEL_DIRECTIVE', NAMESPACE_CONFLICT = 'NAMESPACE_CONFLICT', NON_EXTERNAL_SOURCE_PHASE_IMPORT = 'NON_EXTERNAL_SOURCE_PHASE_IMPORT', NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE = 'NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE', OPTIMIZE_CHUNK_STATUS = 'OPTIMIZE_CHUNK_STATUS', PARSE_ERROR = 'PARSE_ERROR', PLUGIN_ERROR = 'PLUGIN_ERROR', REDECLARATION_ERROR = 'REDECLARATION_ERROR', RESERVED_NAMESPACE = 'RESERVED_NAMESPACE', SHIMMED_EXPORT = 'SHIMMED_EXPORT', SOURCE_PHASE_FORMAT_UNSUPPORTED = 'SOURCE_PHASE_FORMAT_UNSUPPORTED', SOURCEMAP_BROKEN = 'SOURCEMAP_BROKEN', SOURCEMAP_ERROR = 'SOURCEMAP_ERROR', SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT = 'SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT', THIS_IS_UNDEFINED = 'THIS_IS_UNDEFINED', UNEXPECTED_NAMED_IMPORT = 'UNEXPECTED_NAMED_IMPORT', UNKNOWN_OPTION = 'UNKNOWN_OPTION', UNRESOLVED_ENTRY = 'UNRESOLVED_ENTRY', UNRESOLVED_IMPORT = 'UNRESOLVED_IMPORT', UNUSED_EXTERNAL_IMPORT = 'UNUSED_EXTERNAL_IMPORT', VALIDATION_ERROR = 'VALIDATION_ERROR';
function logAddonNotGenerated(message, hook, plugin) { function logAddonNotGenerated(message, hook, plugin) {
return { return {
code: ADDON_ERROR, code: ADDON_ERROR,
@ -892,6 +896,13 @@ function logNamespaceConflict(binding, reexportingModuleId, sources) {
reexporter: reexportingModuleId reexporter: reexportingModuleId
}; };
} }
function logNonExternalSourcePhaseImport(source, importer) {
return {
code: NON_EXTERNAL_SOURCE_PHASE_IMPORT,
message: `Source phase import "${source}" in "${relativeId(importer)}" must be external. Source phase imports are only supported for external modules. Use the "external" option to mark this module as external.`,
url: getRollupUrl(URL_SOURCE_PHASE_IMPORTS)
};
}
function logNoTransformMapOrAstWithoutCode(pluginName) { function logNoTransformMapOrAstWithoutCode(pluginName) {
return { return {
code: NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE, code: NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE,
@ -963,6 +974,13 @@ function logShimmedExport(id, binding) {
message: `Missing export "${binding}" has been shimmed in module "${relativeId(id)}".` message: `Missing export "${binding}" has been shimmed in module "${relativeId(id)}".`
}; };
} }
function logSourcePhaseFormatUnsupported(outputFormat, chunkId, dependencyId) {
return {
code: SOURCE_PHASE_FORMAT_UNSUPPORTED,
message: `Source phase imports are not supported for the "${outputFormat}" output format, importing "${dependencyId}" in "${chunkId}". Use the "es" output format to support source phase imports.`,
url: getRollupUrl(URL_SOURCE_PHASE_IMPORTS)
};
}
function logSourcemapBroken(plugin) { function logSourcemapBroken(plugin) {
return { return {
code: SOURCEMAP_BROKEN, code: SOURCEMAP_BROKEN,
@ -1496,13 +1514,15 @@ const nodeConverters = [
}; };
}, },
function importDeclaration(position, buffer) { function importDeclaration(position, buffer) {
const phaseIndex = buffer[position + 5];
return { return {
type: 'ImportDeclaration', type: 'ImportDeclaration',
start: buffer[position], start: buffer[position],
end: buffer[position + 1], end: buffer[position + 1],
specifiers: convertNodeList(buffer[position + 2], buffer), specifiers: convertNodeList(buffer[position + 2], buffer),
source: convertNode(buffer[position + 3], buffer), source: convertNode(buffer[position + 3], buffer),
attributes: convertNodeList(buffer[position + 4], buffer) attributes: convertNodeList(buffer[position + 4], buffer),
...(phaseIndex === 0 ? {} : { phase: FIXED_STRINGS[phaseIndex] })
}; };
}, },
function importDefaultSpecifier(position, buffer) { function importDefaultSpecifier(position, buffer) {
@ -1515,12 +1535,14 @@ const nodeConverters = [
}, },
function importExpression(position, buffer) { function importExpression(position, buffer) {
const optionsPosition = buffer[position + 3]; const optionsPosition = buffer[position + 3];
const phaseIndex = buffer[position + 4];
return { return {
type: 'ImportExpression', type: 'ImportExpression',
start: buffer[position], start: buffer[position],
end: buffer[position + 1], end: buffer[position + 1],
source: convertNode(buffer[position + 2], buffer), source: convertNode(buffer[position + 2], buffer),
options: optionsPosition === 0 ? null : convertNode(optionsPosition, buffer) options: optionsPosition === 0 ? null : convertNode(optionsPosition, buffer),
...(phaseIndex === 0 ? {} : { phase: FIXED_STRINGS[phaseIndex] })
}; };
}, },
function importNamespaceSpecifier(position, buffer) { function importNamespaceSpecifier(position, buffer) {
@ -2099,4 +2121,4 @@ function getAstBuffer(astBuffer) {
const parseAst = (input, { allowReturnOutsideFunction = false, jsx = false } = {}) => convertProgram(getAstBuffer(parse(input, allowReturnOutsideFunction, jsx))); const parseAst = (input, { allowReturnOutsideFunction = false, jsx = false } = {}) => convertProgram(getAstBuffer(parse(input, allowReturnOutsideFunction, jsx)));
const parseAstAsync = async (input, { allowReturnOutsideFunction = false, jsx = false, signal } = {}) => convertProgram(getAstBuffer(await parseAsync(input, allowReturnOutsideFunction, jsx, signal))); const parseAstAsync = async (input, { allowReturnOutsideFunction = false, jsx = false, signal } = {}) => convertProgram(getAstBuffer(await parseAsync(input, allowReturnOutsideFunction, jsx, signal)));
export { ANNOTATION_KEY, ArrowFunctionExpression, AwaitExpression, BLANK, BlockStatement, CallExpression, CatchClause, EMPTY_ARRAY, EMPTY_OBJECT, EMPTY_SET, ExportDefaultDeclaration, ExpressionStatement, FIXED_STRINGS, FunctionExpression, INVALID_ANNOTATION_KEY, Identifier, LOGLEVEL_DEBUG, LOGLEVEL_ERROR, LOGLEVEL_INFO, LOGLEVEL_WARN, Literal, MemberExpression, ObjectExpression, Program, Property, RestElement, ReturnStatement, StaticBlock, TemplateLiteral, URL_GENERATEBUNDLE, URL_JSX, URL_LOAD, URL_OUTPUT_AMD_BASEPATH, URL_OUTPUT_AMD_ID, URL_OUTPUT_DIR, URL_OUTPUT_EXTERNALIMPORTATTRIBUTES, URL_OUTPUT_FORMAT, URL_OUTPUT_GENERATEDCODE, URL_OUTPUT_INLINEDYNAMICIMPORTS, URL_OUTPUT_INTEROP, URL_OUTPUT_MANUALCHUNKS, URL_OUTPUT_SOURCEMAPBASEURL, URL_OUTPUT_SOURCEMAPFILE, URL_PRESERVEENTRYSIGNATURES, URL_TRANSFORM, URL_TREESHAKE, URL_TREESHAKE_MODULESIDEEFFECTS, URL_WATCH, VariableDeclarator, addTrailingSlashIfMissed, augmentCodeLocation, augmentLogMessage, convertAnnotations, convertNode, error, getAliasName, getAstBuffer, getImportPath, getRollupError, isAbsolute, isPathFragment, isRelative, isValidUrl, locate, logAddonNotGenerated, logAlreadyClosed, logAmbiguousExternalNamespaces, logAnonymousPluginCache, logAssetNotFinalisedForFileName, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logBadLoader, logCannotAssignModuleToChunk, logCannotCallNamespace, logCannotEmitFromOptionsHook, logChunkInvalid, logChunkNotGeneratedForFileName, logCircularChunk, logCircularDependency, logCircularReexport, logConflictingSourcemapSources, logConstVariableReassignError, logCyclicCrossChunkReexport, logDuplicateArgumentNameError, logDuplicateExportError, logDuplicatePluginName, logEmptyChunk, logEntryCannotBeExternal, logEval, logExternalModulesCannotBeIncludedInManualChunks, logExternalModulesCannotBeTransformedToModules, logExternalSyntheticExports, logFailedValidation, logFileNameConflict, logFileNameOutsideOutputDirectory, logFileReferenceIdNotFoundForFilename, logFirstSideEffect, logIllegalIdentifierAsName, logIllegalImportReassignment, logImplicitDependantCannotBeExternal, logImplicitDependantIsNotIncluded, logImportAttributeIsInvalid, logImportOptionsAreInvalid, logIncompatibleExportOptionValue, logInconsistentImportAttributes, logInputHookInOutputPlugin, logInternalIdCannotBeExternal, logInvalidAddonPluginHook, logInvalidAnnotation, logInvalidExportOptionValue, logInvalidFormatForTopLevelAwait, logInvalidFunctionPluginHook, logInvalidLogPosition, logInvalidOption, logInvalidRollupPhaseForChunkEmission, logInvalidSetAssetSourceCall, logInvalidSourcemapForError, logLevelPriority, logMissingEntryExport, logMissingExport, logMissingFileOrDirOption, logMissingGlobalName, logMissingJsxExport, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, logMissingNodeBuiltins, logMixedExport, logModuleLevelDirective, logModuleParseError, logNamespaceConflict, logNoAssetSourceSet, logNoTransformMapOrAstWithoutCode, logOptimizeChunkStatus, logParseError, logPluginError, logRedeclarationError, logReservedNamespace, logShimmedExport, logSourcemapBroken, logSyntheticNamedExportsNeedNamespaceExport, logThisIsUndefined, logUnexpectedNamedImport, logUnexpectedNamespaceReexport, logUnknownOption, logUnresolvedEntry, logUnresolvedImplicitDependant, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logUnusedExternalImports, normalize, parseAst, parseAstAsync, printQuotedStringList, relative, relativeId, warnDeprecation }; export { ANNOTATION_KEY, ArrowFunctionExpression, AwaitExpression, BLANK, BlockStatement, CallExpression, CatchClause, EMPTY_ARRAY, EMPTY_OBJECT, EMPTY_SET, ExportDefaultDeclaration, ExpressionStatement, FIXED_STRINGS, FunctionExpression, INVALID_ANNOTATION_KEY, Identifier, LOGLEVEL_DEBUG, LOGLEVEL_ERROR, LOGLEVEL_INFO, LOGLEVEL_WARN, Literal, MemberExpression, ObjectExpression, Program, Property, RestElement, ReturnStatement, StaticBlock, TemplateLiteral, URL_GENERATEBUNDLE, URL_JSX, URL_LOAD, URL_OUTPUT_AMD_BASEPATH, URL_OUTPUT_AMD_ID, URL_OUTPUT_DIR, URL_OUTPUT_EXTERNALIMPORTATTRIBUTES, URL_OUTPUT_FORMAT, URL_OUTPUT_GENERATEDCODE, URL_OUTPUT_INLINEDYNAMICIMPORTS, URL_OUTPUT_INTEROP, URL_OUTPUT_MANUALCHUNKS, URL_OUTPUT_SOURCEMAPBASEURL, URL_OUTPUT_SOURCEMAPFILE, URL_PRESERVEENTRYSIGNATURES, URL_TRANSFORM, URL_TREESHAKE, URL_TREESHAKE_MODULESIDEEFFECTS, URL_WATCH, VariableDeclarator, addTrailingSlashIfMissed, augmentCodeLocation, augmentLogMessage, convertAnnotations, convertNode, error, getAliasName, getAstBuffer, getImportPath, getRollupError, isAbsolute, isPathFragment, isRelative, isValidUrl, locate, logAddonNotGenerated, logAlreadyClosed, logAmbiguousExternalNamespaces, logAnonymousPluginCache, logAssetNotFinalisedForFileName, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logBadLoader, logCannotAssignModuleToChunk, logCannotCallNamespace, logCannotEmitFromOptionsHook, logChunkInvalid, logChunkNotGeneratedForFileName, logCircularChunk, logCircularDependency, logCircularReexport, logConflictingSourcemapSources, logConstVariableReassignError, logCyclicCrossChunkReexport, logDuplicateArgumentNameError, logDuplicateExportError, logDuplicatePluginName, logEmptyChunk, logEntryCannotBeExternal, logEval, logExternalModulesCannotBeIncludedInManualChunks, logExternalModulesCannotBeTransformedToModules, logExternalSyntheticExports, logFailedValidation, logFileNameConflict, logFileNameOutsideOutputDirectory, logFileReferenceIdNotFoundForFilename, logFirstSideEffect, logIllegalIdentifierAsName, logIllegalImportReassignment, logImplicitDependantCannotBeExternal, logImplicitDependantIsNotIncluded, logImportAttributeIsInvalid, logImportOptionsAreInvalid, logIncompatibleExportOptionValue, logInconsistentImportAttributes, logInputHookInOutputPlugin, logInternalIdCannotBeExternal, logInvalidAddonPluginHook, logInvalidAnnotation, logInvalidExportOptionValue, logInvalidFormatForTopLevelAwait, logInvalidFunctionPluginHook, logInvalidLogPosition, logInvalidOption, logInvalidRollupPhaseForChunkEmission, logInvalidSetAssetSourceCall, logInvalidSourcemapForError, logLevelPriority, logMissingEntryExport, logMissingExport, logMissingFileOrDirOption, logMissingGlobalName, logMissingJsxExport, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, logMissingNodeBuiltins, logMixedExport, logModuleLevelDirective, logModuleParseError, logNamespaceConflict, logNoAssetSourceSet, logNoTransformMapOrAstWithoutCode, logNonExternalSourcePhaseImport, logOptimizeChunkStatus, logParseError, logPluginError, logRedeclarationError, logReservedNamespace, logShimmedExport, logSourcePhaseFormatUnsupported, logSourcemapBroken, logSyntheticNamedExportsNeedNamespaceExport, logThisIsUndefined, logUnexpectedNamedImport, logUnexpectedNamespaceReexport, logUnknownOption, logUnresolvedEntry, logUnresolvedImplicitDependant, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logUnusedExternalImports, normalize, parseAst, parseAstAsync, printQuotedStringList, relative, relativeId, warnDeprecation };

View file

@ -1,7 +1,7 @@
/* /*
@license @license
Rollup.js v4.59.1 Rollup.js v4.60.0
Sat, 21 Mar 2026 06:45:31 GMT - commit 0cba9e079e1d6e56882558827b37557f36c52966 Sun, 22 Mar 2026 06:57:22 GMT - commit 6ecd69fb2ce736c8aabb50829edd227d1792c957
https://github.com/rollup/rollup https://github.com/rollup/rollup

View file

@ -1,7 +1,7 @@
/* /*
@license @license
Rollup.js v4.59.1 Rollup.js v4.60.0
Sat, 21 Mar 2026 06:45:31 GMT - commit 0cba9e079e1d6e56882558827b37557f36c52966 Sun, 22 Mar 2026 06:57:22 GMT - commit 6ecd69fb2ce736c8aabb50829edd227d1792c957
https://github.com/rollup/rollup https://github.com/rollup/rollup

View file

@ -1,7 +1,7 @@
/* /*
@license @license
Rollup.js v4.59.1 Rollup.js v4.60.0
Sat, 21 Mar 2026 06:45:31 GMT - commit 0cba9e079e1d6e56882558827b37557f36c52966 Sun, 22 Mar 2026 06:57:22 GMT - commit 6ecd69fb2ce736c8aabb50829edd227d1792c957
https://github.com/rollup/rollup https://github.com/rollup/rollup

View file

@ -1,7 +1,7 @@
/* /*
@license @license
Rollup.js v4.59.1 Rollup.js v4.60.0
Sat, 21 Mar 2026 06:45:31 GMT - commit 0cba9e079e1d6e56882558827b37557f36c52966 Sun, 22 Mar 2026 06:57:22 GMT - commit 6ecd69fb2ce736c8aabb50829edd227d1792c957
https://github.com/rollup/rollup https://github.com/rollup/rollup

View file

@ -1,7 +1,7 @@
/* /*
@license @license
Rollup.js v4.59.1 Rollup.js v4.60.0
Sat, 21 Mar 2026 06:45:31 GMT - commit 0cba9e079e1d6e56882558827b37557f36c52966 Sun, 22 Mar 2026 06:57:22 GMT - commit 6ecd69fb2ce736c8aabb50829edd227d1792c957
https://github.com/rollup/rollup https://github.com/rollup/rollup

View file

@ -1,7 +1,7 @@
/* /*
@license @license
Rollup.js v4.59.1 Rollup.js v4.60.0
Sat, 21 Mar 2026 06:45:31 GMT - commit 0cba9e079e1d6e56882558827b37557f36c52966 Sun, 22 Mar 2026 06:57:22 GMT - commit 6ecd69fb2ce736c8aabb50829edd227d1792c957
https://github.com/rollup/rollup https://github.com/rollup/rollup

View file

@ -1,7 +1,7 @@
/* /*
@license @license
Rollup.js v4.59.1 Rollup.js v4.60.0
Sat, 21 Mar 2026 06:45:31 GMT - commit 0cba9e079e1d6e56882558827b37557f36c52966 Sun, 22 Mar 2026 06:57:22 GMT - commit 6ecd69fb2ce736c8aabb50829edd227d1792c957
https://github.com/rollup/rollup https://github.com/rollup/rollup

View file

@ -1,7 +1,7 @@
/* /*
@license @license
Rollup.js v4.59.1 Rollup.js v4.60.0
Sat, 21 Mar 2026 06:45:31 GMT - commit 0cba9e079e1d6e56882558827b37557f36c52966 Sun, 22 Mar 2026 06:57:22 GMT - commit 6ecd69fb2ce736c8aabb50829edd227d1792c957
https://github.com/rollup/rollup https://github.com/rollup/rollup

View file

@ -1,7 +1,7 @@
/* /*
@license @license
Rollup.js v4.59.1 Rollup.js v4.60.0
Sat, 21 Mar 2026 06:45:31 GMT - commit 0cba9e079e1d6e56882558827b37557f36c52966 Sun, 22 Mar 2026 06:57:22 GMT - commit 6ecd69fb2ce736c8aabb50829edd227d1792c957
https://github.com/rollup/rollup https://github.com/rollup/rollup
@ -272,6 +272,8 @@ const URL_TREESHAKE_PURE = 'configuration-options/#pure';
const URL_TREESHAKE_NOSIDEEFFECTS = 'configuration-options/#no-side-effects'; const URL_TREESHAKE_NOSIDEEFFECTS = 'configuration-options/#no-side-effects';
const URL_TREESHAKE_MODULESIDEEFFECTS = 'configuration-options/#treeshake-modulesideeffects'; const URL_TREESHAKE_MODULESIDEEFFECTS = 'configuration-options/#treeshake-modulesideeffects';
const URL_WATCH = 'configuration-options/#watch'; const URL_WATCH = 'configuration-options/#watch';
// es-module-syntax
const URL_SOURCE_PHASE_IMPORTS = 'es-module-syntax/#source-phase-import';
// command-line-interface // command-line-interface
const URL_BUNDLE_CONFIG_AS_CJS = 'command-line-interface/#bundleconfigascjs'; const URL_BUNDLE_CONFIG_AS_CJS = 'command-line-interface/#bundleconfigascjs';
const URL_CONFIGURATION_FILES = 'command-line-interface/#configuration-files'; const URL_CONFIGURATION_FILES = 'command-line-interface/#configuration-files';
@ -332,7 +334,7 @@ function augmentLogMessage(log) {
} }
// Error codes should be sorted alphabetically while errors should be sorted by // Error codes should be sorted alphabetically while errors should be sorted by
// error code below // error code below
const ADDON_ERROR = 'ADDON_ERROR', ALREADY_CLOSED = 'ALREADY_CLOSED', AMBIGUOUS_EXTERNAL_NAMESPACES = 'AMBIGUOUS_EXTERNAL_NAMESPACES', ANONYMOUS_PLUGIN_CACHE = 'ANONYMOUS_PLUGIN_CACHE', ASSET_NOT_FINALISED = 'ASSET_NOT_FINALISED', ASSET_NOT_FOUND = 'ASSET_NOT_FOUND', ASSET_SOURCE_ALREADY_SET = 'ASSET_SOURCE_ALREADY_SET', ASSET_SOURCE_MISSING = 'ASSET_SOURCE_MISSING', BAD_LOADER = 'BAD_LOADER', CANNOT_CALL_NAMESPACE = 'CANNOT_CALL_NAMESPACE', CANNOT_EMIT_FROM_OPTIONS_HOOK = 'CANNOT_EMIT_FROM_OPTIONS_HOOK', CHUNK_NOT_GENERATED = 'CHUNK_NOT_GENERATED', CHUNK_INVALID = 'CHUNK_INVALID', CIRCULAR_CHUNK = 'CIRCULAR_CHUNK', CIRCULAR_DEPENDENCY = 'CIRCULAR_DEPENDENCY', CIRCULAR_REEXPORT = 'CIRCULAR_REEXPORT', CONST_REASSIGN = 'CONST_REASSIGN', CYCLIC_CROSS_CHUNK_REEXPORT = 'CYCLIC_CROSS_CHUNK_REEXPORT', DEPRECATED_FEATURE = 'DEPRECATED_FEATURE', DUPLICATE_ARGUMENT_NAME = 'DUPLICATE_ARGUMENT_NAME', DUPLICATE_EXPORT = 'DUPLICATE_EXPORT', DUPLICATE_IMPORT_OPTIONS = 'DUPLICATE_IMPORT_OPTIONS', DUPLICATE_PLUGIN_NAME = 'DUPLICATE_PLUGIN_NAME', EMPTY_BUNDLE = 'EMPTY_BUNDLE', EVAL = 'EVAL', EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS = 'EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS', EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES = 'EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES', EXTERNAL_SYNTHETIC_EXPORTS = 'EXTERNAL_SYNTHETIC_EXPORTS', FAIL_AFTER_WARNINGS = 'FAIL_AFTER_WARNINGS', FILE_NAME_CONFLICT = 'FILE_NAME_CONFLICT', FILE_NAME_OUTSIDE_OUTPUT_DIRECTORY = 'FILE_NAME_OUTSIDE_OUTPUT_DIRECTORY', FILE_NOT_FOUND = 'FILE_NOT_FOUND', FIRST_SIDE_EFFECT = 'FIRST_SIDE_EFFECT', ILLEGAL_IDENTIFIER_AS_NAME = 'ILLEGAL_IDENTIFIER_AS_NAME', ILLEGAL_REASSIGNMENT = 'ILLEGAL_REASSIGNMENT', INCONSISTENT_IMPORT_ATTRIBUTES = 'INCONSISTENT_IMPORT_ATTRIBUTES', INVALID_ANNOTATION = 'INVALID_ANNOTATION', INPUT_HOOK_IN_OUTPUT_PLUGIN = 'INPUT_HOOK_IN_OUTPUT_PLUGIN', INVALID_CHUNK = 'INVALID_CHUNK', INVALID_CONFIG_MODULE_FORMAT = 'INVALID_CONFIG_MODULE_FORMAT', INVALID_EXPORT_OPTION = 'INVALID_EXPORT_OPTION', INVALID_EXTERNAL_ID = 'INVALID_EXTERNAL_ID', INVALID_IMPORT_ATTRIBUTE = 'INVALID_IMPORT_ATTRIBUTE', INVALID_LOG_POSITION = 'INVALID_LOG_POSITION', INVALID_OPTION = 'INVALID_OPTION', INVALID_PLUGIN_HOOK = 'INVALID_PLUGIN_HOOK', INVALID_ROLLUP_PHASE = 'INVALID_ROLLUP_PHASE', INVALID_SETASSETSOURCE = 'INVALID_SETASSETSOURCE', INVALID_TLA_FORMAT = 'INVALID_TLA_FORMAT', MISSING_CONFIG = 'MISSING_CONFIG', MISSING_EXPORT = 'MISSING_EXPORT', MISSING_EXTERNAL_CONFIG = 'MISSING_EXTERNAL_CONFIG', MISSING_GLOBAL_NAME = 'MISSING_GLOBAL_NAME', MISSING_IMPLICIT_DEPENDANT = 'MISSING_IMPLICIT_DEPENDANT', MISSING_JSX_EXPORT = 'MISSING_JSX_EXPORT', MISSING_NAME_OPTION_FOR_IIFE_EXPORT = 'MISSING_NAME_OPTION_FOR_IIFE_EXPORT', MISSING_NODE_BUILTINS = 'MISSING_NODE_BUILTINS', MISSING_OPTION = 'MISSING_OPTION', MIXED_EXPORTS = 'MIXED_EXPORTS', MODULE_LEVEL_DIRECTIVE = 'MODULE_LEVEL_DIRECTIVE', NAMESPACE_CONFLICT = 'NAMESPACE_CONFLICT', NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE = 'NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE', ONLY_INLINE_SOURCEMAPS = 'ONLY_INLINE_SOURCEMAPS', OPTIMIZE_CHUNK_STATUS = 'OPTIMIZE_CHUNK_STATUS', PARSE_ERROR = 'PARSE_ERROR', PLUGIN_ERROR = 'PLUGIN_ERROR', REDECLARATION_ERROR = 'REDECLARATION_ERROR', RESERVED_NAMESPACE = 'RESERVED_NAMESPACE', SHIMMED_EXPORT = 'SHIMMED_EXPORT', SOURCEMAP_BROKEN = 'SOURCEMAP_BROKEN', SOURCEMAP_ERROR = 'SOURCEMAP_ERROR', SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT = 'SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT', THIS_IS_UNDEFINED = 'THIS_IS_UNDEFINED', UNEXPECTED_NAMED_IMPORT = 'UNEXPECTED_NAMED_IMPORT', UNKNOWN_OPTION = 'UNKNOWN_OPTION', UNRESOLVED_ENTRY = 'UNRESOLVED_ENTRY', UNRESOLVED_IMPORT = 'UNRESOLVED_IMPORT', UNUSED_EXTERNAL_IMPORT = 'UNUSED_EXTERNAL_IMPORT', VALIDATION_ERROR = 'VALIDATION_ERROR'; const ADDON_ERROR = 'ADDON_ERROR', ALREADY_CLOSED = 'ALREADY_CLOSED', AMBIGUOUS_EXTERNAL_NAMESPACES = 'AMBIGUOUS_EXTERNAL_NAMESPACES', ANONYMOUS_PLUGIN_CACHE = 'ANONYMOUS_PLUGIN_CACHE', ASSET_NOT_FINALISED = 'ASSET_NOT_FINALISED', ASSET_NOT_FOUND = 'ASSET_NOT_FOUND', ASSET_SOURCE_ALREADY_SET = 'ASSET_SOURCE_ALREADY_SET', ASSET_SOURCE_MISSING = 'ASSET_SOURCE_MISSING', BAD_LOADER = 'BAD_LOADER', CANNOT_CALL_NAMESPACE = 'CANNOT_CALL_NAMESPACE', CANNOT_EMIT_FROM_OPTIONS_HOOK = 'CANNOT_EMIT_FROM_OPTIONS_HOOK', CHUNK_NOT_GENERATED = 'CHUNK_NOT_GENERATED', CHUNK_INVALID = 'CHUNK_INVALID', CIRCULAR_CHUNK = 'CIRCULAR_CHUNK', CIRCULAR_DEPENDENCY = 'CIRCULAR_DEPENDENCY', CIRCULAR_REEXPORT = 'CIRCULAR_REEXPORT', CONST_REASSIGN = 'CONST_REASSIGN', CYCLIC_CROSS_CHUNK_REEXPORT = 'CYCLIC_CROSS_CHUNK_REEXPORT', DEPRECATED_FEATURE = 'DEPRECATED_FEATURE', DUPLICATE_ARGUMENT_NAME = 'DUPLICATE_ARGUMENT_NAME', DUPLICATE_EXPORT = 'DUPLICATE_EXPORT', DUPLICATE_IMPORT_OPTIONS = 'DUPLICATE_IMPORT_OPTIONS', DUPLICATE_PLUGIN_NAME = 'DUPLICATE_PLUGIN_NAME', EMPTY_BUNDLE = 'EMPTY_BUNDLE', EVAL = 'EVAL', EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS = 'EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS', EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES = 'EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES', EXTERNAL_SYNTHETIC_EXPORTS = 'EXTERNAL_SYNTHETIC_EXPORTS', FAIL_AFTER_WARNINGS = 'FAIL_AFTER_WARNINGS', FILE_NAME_CONFLICT = 'FILE_NAME_CONFLICT', FILE_NAME_OUTSIDE_OUTPUT_DIRECTORY = 'FILE_NAME_OUTSIDE_OUTPUT_DIRECTORY', FILE_NOT_FOUND = 'FILE_NOT_FOUND', FIRST_SIDE_EFFECT = 'FIRST_SIDE_EFFECT', ILLEGAL_IDENTIFIER_AS_NAME = 'ILLEGAL_IDENTIFIER_AS_NAME', ILLEGAL_REASSIGNMENT = 'ILLEGAL_REASSIGNMENT', INCONSISTENT_IMPORT_ATTRIBUTES = 'INCONSISTENT_IMPORT_ATTRIBUTES', INVALID_ANNOTATION = 'INVALID_ANNOTATION', INPUT_HOOK_IN_OUTPUT_PLUGIN = 'INPUT_HOOK_IN_OUTPUT_PLUGIN', INVALID_CHUNK = 'INVALID_CHUNK', INVALID_CONFIG_MODULE_FORMAT = 'INVALID_CONFIG_MODULE_FORMAT', INVALID_EXPORT_OPTION = 'INVALID_EXPORT_OPTION', INVALID_EXTERNAL_ID = 'INVALID_EXTERNAL_ID', INVALID_IMPORT_ATTRIBUTE = 'INVALID_IMPORT_ATTRIBUTE', INVALID_LOG_POSITION = 'INVALID_LOG_POSITION', INVALID_OPTION = 'INVALID_OPTION', INVALID_PLUGIN_HOOK = 'INVALID_PLUGIN_HOOK', INVALID_ROLLUP_PHASE = 'INVALID_ROLLUP_PHASE', INVALID_SETASSETSOURCE = 'INVALID_SETASSETSOURCE', INVALID_TLA_FORMAT = 'INVALID_TLA_FORMAT', MISSING_CONFIG = 'MISSING_CONFIG', MISSING_EXPORT = 'MISSING_EXPORT', MISSING_EXTERNAL_CONFIG = 'MISSING_EXTERNAL_CONFIG', MISSING_GLOBAL_NAME = 'MISSING_GLOBAL_NAME', MISSING_IMPLICIT_DEPENDANT = 'MISSING_IMPLICIT_DEPENDANT', MISSING_JSX_EXPORT = 'MISSING_JSX_EXPORT', MISSING_NAME_OPTION_FOR_IIFE_EXPORT = 'MISSING_NAME_OPTION_FOR_IIFE_EXPORT', MISSING_NODE_BUILTINS = 'MISSING_NODE_BUILTINS', MISSING_OPTION = 'MISSING_OPTION', MIXED_EXPORTS = 'MIXED_EXPORTS', MODULE_LEVEL_DIRECTIVE = 'MODULE_LEVEL_DIRECTIVE', NAMESPACE_CONFLICT = 'NAMESPACE_CONFLICT', NON_EXTERNAL_SOURCE_PHASE_IMPORT = 'NON_EXTERNAL_SOURCE_PHASE_IMPORT', NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE = 'NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE', ONLY_INLINE_SOURCEMAPS = 'ONLY_INLINE_SOURCEMAPS', OPTIMIZE_CHUNK_STATUS = 'OPTIMIZE_CHUNK_STATUS', PARSE_ERROR = 'PARSE_ERROR', PLUGIN_ERROR = 'PLUGIN_ERROR', REDECLARATION_ERROR = 'REDECLARATION_ERROR', RESERVED_NAMESPACE = 'RESERVED_NAMESPACE', SHIMMED_EXPORT = 'SHIMMED_EXPORT', SOURCE_PHASE_FORMAT_UNSUPPORTED = 'SOURCE_PHASE_FORMAT_UNSUPPORTED', SOURCEMAP_BROKEN = 'SOURCEMAP_BROKEN', SOURCEMAP_ERROR = 'SOURCEMAP_ERROR', SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT = 'SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT', THIS_IS_UNDEFINED = 'THIS_IS_UNDEFINED', UNEXPECTED_NAMED_IMPORT = 'UNEXPECTED_NAMED_IMPORT', UNKNOWN_OPTION = 'UNKNOWN_OPTION', UNRESOLVED_ENTRY = 'UNRESOLVED_ENTRY', UNRESOLVED_IMPORT = 'UNRESOLVED_IMPORT', UNUSED_EXTERNAL_IMPORT = 'UNUSED_EXTERNAL_IMPORT', VALIDATION_ERROR = 'VALIDATION_ERROR';
function logAddonNotGenerated(message, hook, plugin) { function logAddonNotGenerated(message, hook, plugin) {
return { return {
code: ADDON_ERROR, code: ADDON_ERROR,
@ -829,6 +831,13 @@ function logNamespaceConflict(binding, reexportingModuleId, sources) {
reexporter: reexportingModuleId reexporter: reexportingModuleId
}; };
} }
function logNonExternalSourcePhaseImport(source, importer) {
return {
code: NON_EXTERNAL_SOURCE_PHASE_IMPORT,
message: `Source phase import "${source}" in "${relativeId(importer)}" must be external. Source phase imports are only supported for external modules. Use the "external" option to mark this module as external.`,
url: getRollupUrl(URL_SOURCE_PHASE_IMPORTS)
};
}
function logNoTransformMapOrAstWithoutCode(pluginName) { function logNoTransformMapOrAstWithoutCode(pluginName) {
return { return {
code: NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE, code: NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE,
@ -906,6 +915,13 @@ function logShimmedExport(id, binding) {
message: `Missing export "${binding}" has been shimmed in module "${relativeId(id)}".` message: `Missing export "${binding}" has been shimmed in module "${relativeId(id)}".`
}; };
} }
function logSourcePhaseFormatUnsupported(outputFormat, chunkId, dependencyId) {
return {
code: SOURCE_PHASE_FORMAT_UNSUPPORTED,
message: `Source phase imports are not supported for the "${outputFormat}" output format, importing "${dependencyId}" in "${chunkId}". Use the "es" output format to support source phase imports.`,
url: getRollupUrl(URL_SOURCE_PHASE_IMPORTS)
};
}
function logSourcemapBroken(plugin) { function logSourcemapBroken(plugin) {
return { return {
code: SOURCEMAP_BROKEN, code: SOURCEMAP_BROKEN,
@ -1143,7 +1159,9 @@ const FIXED_STRINGS = [
'noSideEffects', 'noSideEffects',
'sourcemap', 'sourcemap',
'using', 'using',
'await using' 'await using',
'source',
'defer'
]; ];
const ANNOTATION_KEY = '_rollupAnnotations'; const ANNOTATION_KEY = '_rollupAnnotations';
@ -1559,13 +1577,15 @@ const nodeConverters = [
}; };
}, },
function importDeclaration(position, buffer) { function importDeclaration(position, buffer) {
const phaseIndex = buffer[position + 5];
return { return {
type: 'ImportDeclaration', type: 'ImportDeclaration',
start: buffer[position], start: buffer[position],
end: buffer[position + 1], end: buffer[position + 1],
specifiers: convertNodeList(buffer[position + 2], buffer), specifiers: convertNodeList(buffer[position + 2], buffer),
source: convertNode(buffer[position + 3], buffer), source: convertNode(buffer[position + 3], buffer),
attributes: convertNodeList(buffer[position + 4], buffer) attributes: convertNodeList(buffer[position + 4], buffer),
...(phaseIndex === 0 ? {} : { phase: FIXED_STRINGS[phaseIndex] })
}; };
}, },
function importDefaultSpecifier(position, buffer) { function importDefaultSpecifier(position, buffer) {
@ -1578,12 +1598,14 @@ const nodeConverters = [
}, },
function importExpression(position, buffer) { function importExpression(position, buffer) {
const optionsPosition = buffer[position + 3]; const optionsPosition = buffer[position + 3];
const phaseIndex = buffer[position + 4];
return { return {
type: 'ImportExpression', type: 'ImportExpression',
start: buffer[position], start: buffer[position],
end: buffer[position + 1], end: buffer[position + 1],
source: convertNode(buffer[position + 2], buffer), source: convertNode(buffer[position + 2], buffer),
options: optionsPosition === 0 ? null : convertNode(optionsPosition, buffer) options: optionsPosition === 0 ? null : convertNode(optionsPosition, buffer),
...(phaseIndex === 0 ? {} : { phase: FIXED_STRINGS[phaseIndex] })
}; };
}, },
function importNamespaceSpecifier(position, buffer) { function importNamespaceSpecifier(position, buffer) {
@ -2309,6 +2331,7 @@ exports.logModuleParseError = logModuleParseError;
exports.logNamespaceConflict = logNamespaceConflict; exports.logNamespaceConflict = logNamespaceConflict;
exports.logNoAssetSourceSet = logNoAssetSourceSet; exports.logNoAssetSourceSet = logNoAssetSourceSet;
exports.logNoTransformMapOrAstWithoutCode = logNoTransformMapOrAstWithoutCode; exports.logNoTransformMapOrAstWithoutCode = logNoTransformMapOrAstWithoutCode;
exports.logNonExternalSourcePhaseImport = logNonExternalSourcePhaseImport;
exports.logOnlyInlineSourcemapsForStdout = logOnlyInlineSourcemapsForStdout; exports.logOnlyInlineSourcemapsForStdout = logOnlyInlineSourcemapsForStdout;
exports.logOptimizeChunkStatus = logOptimizeChunkStatus; exports.logOptimizeChunkStatus = logOptimizeChunkStatus;
exports.logParseError = logParseError; exports.logParseError = logParseError;
@ -2316,6 +2339,7 @@ exports.logPluginError = logPluginError;
exports.logRedeclarationError = logRedeclarationError; exports.logRedeclarationError = logRedeclarationError;
exports.logReservedNamespace = logReservedNamespace; exports.logReservedNamespace = logReservedNamespace;
exports.logShimmedExport = logShimmedExport; exports.logShimmedExport = logShimmedExport;
exports.logSourcePhaseFormatUnsupported = logSourcePhaseFormatUnsupported;
exports.logSourcemapBroken = logSourcemapBroken; exports.logSourcemapBroken = logSourcemapBroken;
exports.logSyntheticNamedExportsNeedNamespaceExport = logSyntheticNamedExportsNeedNamespaceExport; exports.logSyntheticNamedExportsNeedNamespaceExport = logSyntheticNamedExportsNeedNamespaceExport;
exports.logThisIsUndefined = logThisIsUndefined; exports.logThisIsUndefined = logThisIsUndefined;

View file

@ -1,7 +1,7 @@
/* /*
@license @license
Rollup.js v4.59.1 Rollup.js v4.60.0
Sat, 21 Mar 2026 06:45:31 GMT - commit 0cba9e079e1d6e56882558827b37557f36c52966 Sun, 22 Mar 2026 06:57:22 GMT - commit 6ecd69fb2ce736c8aabb50829edd227d1792c957
https://github.com/rollup/rollup https://github.com/rollup/rollup
@ -42,7 +42,7 @@ function _mergeNamespaces(n, m) {
const promises__namespace = /*#__PURE__*/_interopNamespaceDefault(promises); const promises__namespace = /*#__PURE__*/_interopNamespaceDefault(promises);
var version = "4.59.1"; var version = "4.60.0";
function ensureArray$1(items) { function ensureArray$1(items) {
if (Array.isArray(items)) { if (Array.isArray(items)) {
@ -6255,12 +6255,15 @@ class Variable extends ExpressionEntity {
} }
} }
/** Synthetic import name for source phase imports, similar to '*' for namespaces */
const SOURCE_PHASE_IMPORT = '*source';
class ExternalVariable extends Variable { class ExternalVariable extends Variable {
constructor(module, name) { constructor(module, name) {
super(name); super(name);
this.referenced = false; this.referenced = false;
this.module = module; this.module = module;
this.isNamespace = name === '*'; this.isNamespace = name === '*';
this.isSourcePhase = name === SOURCE_PHASE_IMPORT;
} }
addReference(identifier) { addReference(identifier) {
this.referenced = true; this.referenced = true;
@ -12209,6 +12212,13 @@ function getInteropBlock(dependencies, interop, externalLiveBindings, freeze, sy
return `${getHelpersBlock(neededInteropHelpers, accessedGlobals, indent, snippets, externalLiveBindings, freeze, symbols)}${interopStatements.length > 0 ? `${interopStatements.join(n)}${n}${n}` : ''}`; return `${getHelpersBlock(neededInteropHelpers, accessedGlobals, indent, snippets, externalLiveBindings, freeze, symbols)}${interopStatements.length > 0 ? `${interopStatements.join(n)}${n}${n}` : ''}`;
} }
function throwOnPhase(outputFormat, chunkId, dependencies) {
const sourcePhaseDependency = dependencies.find(dependency => dependency.sourcePhaseImport);
if (sourcePhaseDependency) {
parseAst_js.error(parseAst_js.logSourcePhaseFormatUnsupported(outputFormat, chunkId, sourcePhaseDependency.importPath));
}
}
function addJsExtension(name) { function addJsExtension(name) {
return name.endsWith('.js') ? name : name + '.js'; return name.endsWith('.js') ? name : name + '.js';
} }
@ -12347,6 +12357,7 @@ function warnOnBuiltins(log, dependencies) {
function amd(magicString, { accessedGlobals, dependencies, exports: exports$1, hasDefaultExport, hasExports, id, indent: t, intro, isEntryFacade, isModuleFacade, namedExportsMode, log, outro, snippets }, { amd, esModule, externalLiveBindings, freeze, generatedCode: { symbols }, interop, reexportProtoFromExternal, strict }) { function amd(magicString, { accessedGlobals, dependencies, exports: exports$1, hasDefaultExport, hasExports, id, indent: t, intro, isEntryFacade, isModuleFacade, namedExportsMode, log, outro, snippets }, { amd, esModule, externalLiveBindings, freeze, generatedCode: { symbols }, interop, reexportProtoFromExternal, strict }) {
warnOnBuiltins(log, dependencies); warnOnBuiltins(log, dependencies);
throwOnPhase('amd', id, dependencies);
const deps = dependencies.map(m => `'${updateExtensionForRelativeAmdId(m.importPath, amd.forceJsExtensionForImports)}'`); const deps = dependencies.map(m => `'${updateExtensionForRelativeAmdId(m.importPath, amd.forceJsExtensionForImports)}'`);
const parameters = dependencies.map(m => m.name); const parameters = dependencies.map(m => m.name);
const { n, getNonArrowFunctionIntro, _ } = snippets; const { n, getNonArrowFunctionIntro, _ } = snippets;
@ -12384,7 +12395,8 @@ function amd(magicString, { accessedGlobals, dependencies, exports: exports$1, h
.append(`${n}${n}}));`); .append(`${n}${n}}));`);
} }
function cjs(magicString, { accessedGlobals, dependencies, exports: exports$1, hasDefaultExport, hasExports, indent: t, intro, isEntryFacade, isModuleFacade, namedExportsMode, outro, snippets }, { compact, esModule, externalLiveBindings, freeze, interop, generatedCode: { symbols }, reexportProtoFromExternal, strict }) { function cjs(magicString, { accessedGlobals, dependencies, exports: exports$1, hasDefaultExport, hasExports, id, indent: t, intro, isEntryFacade, isModuleFacade, namedExportsMode, outro, snippets }, { compact, esModule, externalLiveBindings, freeze, interop, generatedCode: { symbols }, reexportProtoFromExternal, strict }) {
throwOnPhase('cjs', id, dependencies);
const { _, n } = snippets; const { _, n } = snippets;
const useStrict = strict ? `'use strict';${n}${n}` : ''; const useStrict = strict ? `'use strict';${n}${n}` : '';
let namespaceMarkers = getNamespaceMarkers(namedExportsMode && hasExports, isEntryFacade && (esModule === true || (esModule === 'if-default-prop' && hasDefaultExport)), isModuleFacade && symbols, snippets); let namespaceMarkers = getNamespaceMarkers(namedExportsMode && hasExports, isEntryFacade && (esModule === true || (esModule === 'if-default-prop' && hasDefaultExport)), isModuleFacade && symbols, snippets);
@ -12437,11 +12449,16 @@ function es(magicString, { accessedGlobals, indent: t, intro, outro, dependencie
} }
function getImportBlock(dependencies, importAttributesKey, { _ }) { function getImportBlock(dependencies, importAttributesKey, { _ }) {
const importBlock = []; const importBlock = [];
for (const { importPath, reexports, imports, name, attributes } of dependencies) { for (const { importPath, reexports, imports, name, attributes, sourcePhaseImport } of dependencies) {
const assertion = attributes ? `${_}${importAttributesKey}${_}${attributes}` : ''; const assertion = attributes ? `${_}${importAttributesKey}${_}${attributes}` : '';
const pathWithAssertion = `'${importPath}'${assertion};`; const pathWithAssertion = `'${importPath}'${assertion};`;
if (sourcePhaseImport) {
importBlock.push(`import source ${sourcePhaseImport} from${_}${pathWithAssertion}`);
}
if (!reexports && !imports) { if (!reexports && !imports) {
importBlock.push(`import${_}${pathWithAssertion}`); if (!sourcePhaseImport) {
importBlock.push(`import${_}${pathWithAssertion}`);
}
continue; continue;
} }
if (imports) { if (imports) {
@ -12595,7 +12612,8 @@ function trimEmptyImports(dependencies) {
return []; return [];
} }
function iife(magicString, { accessedGlobals, dependencies, exports: exports$1, hasDefaultExport, hasExports, indent: t, intro, namedExportsMode, log, outro, snippets }, { compact, esModule, extend, freeze, externalLiveBindings, reexportProtoFromExternal, globals, interop, name, generatedCode: { symbols }, strict }) { function iife(magicString, { accessedGlobals, dependencies, exports: exports$1, hasDefaultExport, hasExports, id, indent: t, intro, namedExportsMode, log, outro, snippets }, { compact, esModule, extend, freeze, externalLiveBindings, reexportProtoFromExternal, globals, interop, name, generatedCode: { symbols }, strict }) {
throwOnPhase('iife', id, dependencies);
const { _, getNonArrowFunctionIntro, getPropertyAccess, n } = snippets; const { _, getNonArrowFunctionIntro, getPropertyAccess, n } = snippets;
const isNamespaced = name && name.includes('.'); const isNamespaced = name && name.includes('.');
const useVariableAssignment = !extend && !isNamespaced; const useVariableAssignment = !extend && !isNamespaced;
@ -12654,7 +12672,8 @@ function iife(magicString, { accessedGlobals, dependencies, exports: exports$1,
const MISSING_EXPORT_SHIM_VARIABLE = '_missingExportShim'; const MISSING_EXPORT_SHIM_VARIABLE = '_missingExportShim';
function system(magicString, { accessedGlobals, dependencies, exports: exports$1, hasExports, indent: t, intro, snippets, outro, usesTopLevelAwait }, { externalLiveBindings, freeze, name, generatedCode: { symbols }, strict, systemNullSetters }) { function system(magicString, { accessedGlobals, dependencies, exports: exports$1, hasExports, id, indent: t, intro, snippets, outro, usesTopLevelAwait }, { externalLiveBindings, freeze, name, generatedCode: { symbols }, strict, systemNullSetters }) {
throwOnPhase('system', id, dependencies);
const { _, getFunctionIntro, getNonArrowFunctionIntro, n, s } = snippets; const { _, getFunctionIntro, getNonArrowFunctionIntro, n, s } = snippets;
const { importBindings, setters, starExcludes } = analyzeDependencies(dependencies, exports$1, t, snippets); const { importBindings, setters, starExcludes } = analyzeDependencies(dependencies, exports$1, t, snippets);
const registeredName = name ? `'${name}',${_}` : ''; const registeredName = name ? `'${name}',${_}` : '';
@ -12822,6 +12841,7 @@ function umd(magicString, { accessedGlobals, dependencies, exports: exports$1, h
if (hasExports && !name) { if (hasExports && !name) {
return parseAst_js.error(parseAst_js.logMissingNameOptionForUmdExport()); return parseAst_js.error(parseAst_js.logMissingNameOptionForUmdExport());
} }
throwOnPhase('umd', id, dependencies);
warnOnBuiltins(log, dependencies); warnOnBuiltins(log, dependencies);
const amdDeps = dependencies.map(m => `'${updateExtensionForRelativeAmdId(m.importPath, amd.forceJsExtensionForImports)}'`); const amdDeps = dependencies.map(m => `'${updateExtensionForRelativeAmdId(m.importPath, amd.forceJsExtensionForImports)}'`);
const cjsDeps = dependencies.map(m => `require('${m.importPath}')`); const cjsDeps = dependencies.map(m => `require('${m.importPath}')`);
@ -17730,6 +17750,8 @@ const bufferParsers = [
node.specifiers = convertNodeList(node, scope, buffer[position], buffer); node.specifiers = convertNodeList(node, scope, buffer[position], buffer);
node.source = convertNode(node, scope, buffer[position + 1], buffer); node.source = convertNode(node, scope, buffer[position + 1], buffer);
node.attributes = convertNodeList(node, scope, buffer[position + 2], buffer); node.attributes = convertNodeList(node, scope, buffer[position + 2], buffer);
const phaseIndex = buffer[position + 3];
node.phase = phaseIndex === 0 ? undefined : parseAst_js.FIXED_STRINGS[phaseIndex];
}, },
function importDefaultSpecifier(node, position, buffer) { function importDefaultSpecifier(node, position, buffer) {
const { scope } = node; const { scope } = node;
@ -17741,6 +17763,8 @@ const bufferParsers = [
node.sourceAstNode = parseAst_js.convertNode(buffer[position], buffer); node.sourceAstNode = parseAst_js.convertNode(buffer[position], buffer);
const optionsPosition = buffer[position + 1]; const optionsPosition = buffer[position + 1];
node.options = optionsPosition === 0 ? null : convertNode(node, scope, optionsPosition, buffer); node.options = optionsPosition === 0 ? null : convertNode(node, scope, optionsPosition, buffer);
const phaseIndex = buffer[position + 2];
node.phase = phaseIndex === 0 ? undefined : parseAst_js.FIXED_STRINGS[phaseIndex];
}, },
function importNamespaceSpecifier(node, position, buffer) { function importNamespaceSpecifier(node, position, buffer) {
const { scope } = node; const { scope } = node;
@ -18519,6 +18543,7 @@ class Module {
this.isUserDefinedEntryPoint = false; this.isUserDefinedEntryPoint = false;
this.needsExportShim = false; this.needsExportShim = false;
this.sideEffectDependenciesByVariable = new Map(); this.sideEffectDependenciesByVariable = new Map();
this.sourcePhaseSources = new Set();
this.sourcesWithAttributes = new Map(); this.sourcesWithAttributes = new Map();
this.allExportsIncluded = false; this.allExportsIncluded = false;
this.ast = null; this.ast = null;
@ -19169,16 +19194,19 @@ class Module {
if (this.scope.variables.has(localName) || this.importDescriptions.has(localName)) { if (this.scope.variables.has(localName) || this.importDescriptions.has(localName)) {
this.error(parseAst_js.logRedeclarationError(localName), specifier.local.start); this.error(parseAst_js.logRedeclarationError(localName), specifier.local.start);
} }
const name = specifier instanceof ImportDefaultSpecifier const name = node.phase === 'source'
? 'default' ? SOURCE_PHASE_IMPORT
: specifier instanceof ImportNamespaceSpecifier : specifier instanceof ImportDefaultSpecifier
? '*' ? 'default'
: specifier.imported instanceof Identifier : specifier instanceof ImportNamespaceSpecifier
? specifier.imported.name ? '*'
: specifier.imported.value; : specifier.imported instanceof Identifier
? specifier.imported.name
: specifier.imported.value;
this.importDescriptions.set(localName, { this.importDescriptions.set(localName, {
module: null, // filled in later module: null, // filled in later
name, name,
phase: node.phase === 'source' ? 'source' : 'instance',
source, source,
start: specifier.start start: specifier.start
}); });
@ -19251,6 +19279,9 @@ class Module {
else { else {
this.sourcesWithAttributes.set(source, parsedAttributes); this.sourcesWithAttributes.set(source, parsedAttributes);
} }
if (declaration.phase === 'source') {
this.sourcePhaseSources.add(source);
}
} }
getImportedJsxFactoryVariable(baseName, nodeStart, importSource) { getImportedJsxFactoryVariable(baseName, nodeStart, importSource) {
const { id } = this.resolvedIds[importSource]; const { id } = this.resolvedIds[importSource];
@ -19464,6 +19495,9 @@ function deconflictImportsEsmOrSystem(usedNames, imports, dependenciesToBeDeconf
? externalChunkByModule.get(module) ? externalChunkByModule.get(module)
: chunkByModule.get(module)).variableName); : chunkByModule.get(module)).variableName);
} }
else if (module instanceof ExternalModule && variable.isSourcePhase) {
variable.setRenderNames(null, getSafeName(module.suggestedVariableName + '__source', usedNames, variable.forbiddenNames));
}
else if (module instanceof ExternalModule && name === 'default') { else if (module instanceof ExternalModule && name === 'default') {
variable.setRenderNames(null, getSafeName([...module.exportedVariables].some(([exportedVariable, exportedName]) => exportedName === '*' && exportedVariable.included) variable.setRenderNames(null, getSafeName([...module.exportedVariables].some(([exportedVariable, exportedName]) => exportedName === '*' && exportedVariable.included)
? module.suggestedVariableName + '__default' ? module.suggestedVariableName + '__default'
@ -20401,10 +20435,14 @@ class Chunk {
const module = variable.module; const module = variable.module;
let dependency; let dependency;
let imported; let imported;
const isSourcePhase = module instanceof ExternalModule && variable.isSourcePhase;
if (module instanceof ExternalModule) { if (module instanceof ExternalModule) {
dependency = this.externalChunkByModule.get(module); dependency = this.externalChunkByModule.get(module);
imported = variable.name; imported = variable.name;
if (imported !== 'default' && imported !== '*' && interop(module.id) === 'defaultOnly') { if (!isSourcePhase &&
imported !== 'default' &&
imported !== '*' &&
interop(module.id) === 'defaultOnly') {
return parseAst_js.error(parseAst_js.logUnexpectedNamedImport(module.id, imported, false)); return parseAst_js.error(parseAst_js.logUnexpectedNamedImport(module.id, imported, false));
} }
} }
@ -20414,7 +20452,8 @@ class Chunk {
} }
getOrCreate(importsByDependency, dependency, getNewArray).push({ getOrCreate(importsByDependency, dependency, getNewArray).push({
imported, imported,
local: variable.getName(this.snippets.getPropertyAccess) local: variable.getName(this.snippets.getPropertyAccess),
phase: isSourcePhase ? 'source' : 'instance'
}); });
} }
return importsByDependency; return importsByDependency;
@ -20565,6 +20604,9 @@ class Chunk {
const reexports = reexportSpecifiers.get(dependency) || null; const reexports = reexportSpecifiers.get(dependency) || null;
const namedExportsMode = dependency instanceof ExternalChunk || dependency.exportMode !== 'default'; const namedExportsMode = dependency instanceof ExternalChunk || dependency.exportMode !== 'default';
const importPath = dependency.getImportPath(fileName); const importPath = dependency.getImportPath(fileName);
// Separate source-phase imports from regular imports
const sourcePhaseImport = imports?.find(index => index.phase === 'source');
const instanceImports = imports?.filter(index => index.phase !== 'source') ?? null;
renderedDependencies.set(dependency, { renderedDependencies.set(dependency, {
attributes: dependency instanceof ExternalChunk attributes: dependency instanceof ExternalChunk
? dependency.getImportAttributes(this.snippets) ? dependency.getImportAttributes(this.snippets)
@ -20574,12 +20616,13 @@ class Chunk {
(this.outputOptions.format === 'umd' || this.outputOptions.format === 'iife') && (this.outputOptions.format === 'umd' || this.outputOptions.format === 'iife') &&
getGlobalName(dependency, this.outputOptions.globals, (imports || reexports) !== null, this.inputOptions.onLog), getGlobalName(dependency, this.outputOptions.globals, (imports || reexports) !== null, this.inputOptions.onLog),
importPath, importPath,
imports, imports: instanceImports && instanceImports.length > 0 ? instanceImports : null,
isChunk: dependency instanceof Chunk, isChunk: dependency instanceof Chunk,
name: dependency.variableName, name: dependency.variableName,
namedExportsMode, namedExportsMode,
namespaceVariableName: dependency.namespaceVariableName, namespaceVariableName: dependency.namespaceVariableName,
reexports reexports,
sourcePhaseImport: sourcePhaseImport?.local
}); });
} }
return (this.renderedDependencies = renderedDependencies); return (this.renderedDependencies = renderedDependencies);
@ -22748,13 +22791,16 @@ class ModuleLoader {
return loadNewModulesPromise; return loadNewModulesPromise;
} }
async fetchDynamicDependencies(module, resolveDynamicImportPromises) { async fetchDynamicDependencies(module, resolveDynamicImportPromises) {
const dependencies = await Promise.all(resolveDynamicImportPromises.map(resolveDynamicImportPromise => resolveDynamicImportPromise.then(async ([{ node }, resolvedId]) => { const dependencies = await Promise.all(resolveDynamicImportPromises.map(resolveDynamicImportPromise => resolveDynamicImportPromise.then(async ([{ argument, node }, resolvedId]) => {
if (resolvedId === null) if (resolvedId === null)
return null; return null;
if (typeof resolvedId === 'string') { if (typeof resolvedId === 'string') {
node.resolution = resolvedId; node.resolution = resolvedId;
return null; return null;
} }
if (node.phase === 'source' && !resolvedId.external) {
return parseAst_js.error(parseAst_js.logNonExternalSourcePhaseImport(typeof argument === 'string' ? argument : parseAst_js.relativeId(resolvedId.id), module.id));
}
return (node.resolution = await this.fetchResolvedDependency(parseAst_js.relativeId(resolvedId.id), module.id, resolvedId)); return (node.resolution = await this.fetchResolvedDependency(parseAst_js.relativeId(resolvedId.id), module.id, resolvedId));
}))); })));
for (const dependency of dependencies) { for (const dependency of dependencies) {
@ -22834,7 +22880,12 @@ class ModuleLoader {
return this.fetchModule(resolvedId, importer, false, false); return this.fetchModule(resolvedId, importer, false, false);
} }
async fetchStaticDependencies(module, resolveStaticDependencyPromises) { async fetchStaticDependencies(module, resolveStaticDependencyPromises) {
for (const dependency of await Promise.all(resolveStaticDependencyPromises.map(resolveStaticDependencyPromise => resolveStaticDependencyPromise.then(([source, resolvedId]) => this.fetchResolvedDependency(source, module.id, resolvedId))))) { for (const dependency of await Promise.all(resolveStaticDependencyPromises.map(resolveStaticDependencyPromise => resolveStaticDependencyPromise.then(([source, resolvedId]) => {
if (module.sourcePhaseSources.has(source) && !resolvedId.external) {
return parseAst_js.error(parseAst_js.logNonExternalSourcePhaseImport(source, module.id));
}
return this.fetchResolvedDependency(source, module.id, resolvedId);
})))) {
module.dependencies.add(dependency); module.dependencies.add(dependency);
dependency.importers.push(module.id); dependency.importers.push(module.id);
} }
@ -23246,7 +23297,7 @@ class Graph {
warnForMissingExports() { warnForMissingExports() {
for (const module of this.modules) { for (const module of this.modules) {
for (const importDescription of module.importDescriptions.values()) { for (const importDescription of module.importDescriptions.values()) {
if (importDescription.name !== '*') { if (importDescription.name !== '*' && importDescription.phase !== 'source') {
const [variable, options] = importDescription.module.getVariableForExportName(importDescription.name, { importChain: [module.id] }); const [variable, options] = importDescription.module.getVariableForExportName(importDescription.name, { importChain: [module.id] });
if (!variable) { if (!variable) {
module.log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logMissingExport(importDescription.name, module.id, importDescription.module.id, !!options?.missingButExportExists), importDescription.start); module.log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logMissingExport(importDescription.name, module.id, importDescription.module.id, !!options?.missingButExportExists), importDescription.start);

View file

@ -1,7 +1,7 @@
/* /*
@license @license
Rollup.js v4.59.1 Rollup.js v4.60.0
Sat, 21 Mar 2026 06:45:31 GMT - commit 0cba9e079e1d6e56882558827b37557f36c52966 Sun, 22 Mar 2026 06:57:22 GMT - commit 6ecd69fb2ce736c8aabb50829edd227d1792c957
https://github.com/rollup/rollup https://github.com/rollup/rollup

View file

@ -1,7 +1,7 @@
/* /*
@license @license
Rollup.js v4.59.1 Rollup.js v4.60.0
Sat, 21 Mar 2026 06:45:31 GMT - commit 0cba9e079e1d6e56882558827b37557f36c52966 Sun, 22 Mar 2026 06:57:22 GMT - commit 6ecd69fb2ce736c8aabb50829edd227d1792c957
https://github.com/rollup/rollup https://github.com/rollup/rollup

View file

@ -1,6 +1,6 @@
{ {
"name": "rollup", "name": "rollup",
"version": "4.59.1", "version": "4.60.0",
"description": "Next-generation ES module bundler", "description": "Next-generation ES module bundler",
"main": "dist/rollup.js", "main": "dist/rollup.js",
"module": "dist/es/rollup.js", "module": "dist/es/rollup.js",
@ -114,31 +114,31 @@
"homepage": "https://rollupjs.org/", "homepage": "https://rollupjs.org/",
"optionalDependencies": { "optionalDependencies": {
"fsevents": "~2.3.2", "fsevents": "~2.3.2",
"@rollup/rollup-darwin-arm64": "4.59.1", "@rollup/rollup-darwin-arm64": "4.60.0",
"@rollup/rollup-android-arm64": "4.59.1", "@rollup/rollup-android-arm64": "4.60.0",
"@rollup/rollup-win32-arm64-msvc": "4.59.1", "@rollup/rollup-win32-arm64-msvc": "4.60.0",
"@rollup/rollup-freebsd-arm64": "4.59.1", "@rollup/rollup-freebsd-arm64": "4.60.0",
"@rollup/rollup-linux-arm64-gnu": "4.59.1", "@rollup/rollup-linux-arm64-gnu": "4.60.0",
"@rollup/rollup-linux-arm64-musl": "4.59.1", "@rollup/rollup-linux-arm64-musl": "4.60.0",
"@rollup/rollup-android-arm-eabi": "4.59.1", "@rollup/rollup-android-arm-eabi": "4.60.0",
"@rollup/rollup-linux-arm-gnueabihf": "4.59.1", "@rollup/rollup-linux-arm-gnueabihf": "4.60.0",
"@rollup/rollup-linux-arm-musleabihf": "4.59.1", "@rollup/rollup-linux-arm-musleabihf": "4.60.0",
"@rollup/rollup-win32-ia32-msvc": "4.59.1", "@rollup/rollup-win32-ia32-msvc": "4.60.0",
"@rollup/rollup-linux-loong64-gnu": "4.59.1", "@rollup/rollup-linux-loong64-gnu": "4.60.0",
"@rollup/rollup-linux-loong64-musl": "4.59.1", "@rollup/rollup-linux-loong64-musl": "4.60.0",
"@rollup/rollup-linux-riscv64-gnu": "4.59.1", "@rollup/rollup-linux-riscv64-gnu": "4.60.0",
"@rollup/rollup-linux-riscv64-musl": "4.59.1", "@rollup/rollup-linux-riscv64-musl": "4.60.0",
"@rollup/rollup-linux-ppc64-gnu": "4.59.1", "@rollup/rollup-linux-ppc64-gnu": "4.60.0",
"@rollup/rollup-linux-ppc64-musl": "4.59.1", "@rollup/rollup-linux-ppc64-musl": "4.60.0",
"@rollup/rollup-linux-s390x-gnu": "4.59.1", "@rollup/rollup-linux-s390x-gnu": "4.60.0",
"@rollup/rollup-darwin-x64": "4.59.1", "@rollup/rollup-darwin-x64": "4.60.0",
"@rollup/rollup-win32-x64-gnu": "4.59.1", "@rollup/rollup-win32-x64-gnu": "4.60.0",
"@rollup/rollup-win32-x64-msvc": "4.59.1", "@rollup/rollup-win32-x64-msvc": "4.60.0",
"@rollup/rollup-freebsd-x64": "4.59.1", "@rollup/rollup-freebsd-x64": "4.60.0",
"@rollup/rollup-linux-x64-gnu": "4.59.1", "@rollup/rollup-linux-x64-gnu": "4.60.0",
"@rollup/rollup-linux-x64-musl": "4.59.1", "@rollup/rollup-linux-x64-musl": "4.60.0",
"@rollup/rollup-openbsd-x64": "4.59.1", "@rollup/rollup-openbsd-x64": "4.60.0",
"@rollup/rollup-openharmony-arm64": "4.59.1" "@rollup/rollup-openharmony-arm64": "4.60.0"
}, },
"dependencies": { "dependencies": {
"@types/estree": "1.0.8" "@types/estree": "1.0.8"
@ -176,6 +176,7 @@
"@vue/language-server": "^3.2.5", "@vue/language-server": "^3.2.5",
"acorn": "^8.16.0", "acorn": "^8.16.0",
"acorn-import-assertions": "^1.9.0", "acorn-import-assertions": "^1.9.0",
"acorn-import-phases": "^1.0.4",
"acorn-jsx": "^5.3.2", "acorn-jsx": "^5.3.2",
"buble": "^0.20.0", "buble": "^0.20.0",
"builtin-modules": "^5.0.0", "builtin-modules": "^5.0.0",
@ -186,7 +187,7 @@
"date-time": "^4.0.0", "date-time": "^4.0.0",
"es5-shim": "^4.6.7", "es5-shim": "^4.6.7",
"es6-shim": "^0.35.8", "es6-shim": "^0.35.8",
"eslint": "^10.0.3", "eslint": "^10.1.0",
"eslint-config-prettier": "^10.1.8", "eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.5", "eslint-plugin-prettier": "^5.5.5",
"eslint-plugin-unicorn": "^63.0.0", "eslint-plugin-unicorn": "^63.0.0",

File diff suppressed because one or more lines are too long

View file

@ -2,7 +2,7 @@
"name": "svelte", "name": "svelte",
"description": "Cybernetically enhanced web apps", "description": "Cybernetically enhanced web apps",
"license": "MIT", "license": "MIT",
"version": "5.54.0", "version": "5.55.0",
"type": "module", "type": "module",
"types": "./types/index.d.ts", "types": "./types/index.d.ts",
"engines": { "engines": {

View file

@ -1074,6 +1074,9 @@ function calculate_blockers(instance, analysis) {
let awaited = false; let awaited = false;
/** @type {Array<ESTree.Statement | ESTree.VariableDeclarator>} */
let sync_group = [];
// TODO this should probably be attached to the scope? // TODO this should probably be attached to the scope?
const promises = b.id('$$promises'); const promises = b.id('$$promises');
@ -1088,6 +1091,13 @@ function calculate_blockers(instance, analysis) {
binding.blocker = blocker; binding.blocker = blocker;
} }
function flush_sync_group() {
if (sync_group.length === 0) return;
analysis.instance_body.async.push({ nodes: sync_group, has_await: false });
sync_group = [];
}
/** /**
* Analysis of blockers for functions is deferred until we know which statements are async/blockers * Analysis of blockers for functions is deferred until we know which statements are async/blockers
* @type {Array<ESTree.FunctionDeclaration | ESTree.VariableDeclarator>} * @type {Array<ESTree.FunctionDeclaration | ESTree.VariableDeclarator>}
@ -1149,6 +1159,9 @@ function calculate_blockers(instance, analysis) {
trace_references(declarator, reads, writes, instance.scope); trace_references(declarator, reads, writes, instance.scope);
// Needs to happen before blocker computation
if (has_await) flush_sync_group();
const blocker = /** @type {NonNullable<Binding['blocker']>} */ ( const blocker = /** @type {NonNullable<Binding['blocker']>} */ (
b.member(promises, b.literal(analysis.instance_body.async.length), true) b.member(promises, b.literal(analysis.instance_body.async.length), true)
); );
@ -1161,11 +1174,12 @@ function calculate_blockers(instance, analysis) {
push_declaration(id, blocker); push_declaration(id, blocker);
} }
// one declarator per declaration, makes things simpler if (has_await) {
analysis.instance_body.async.push({ // one declarator per declaration, makes things simpler
node: declarator, analysis.instance_body.async.push({ nodes: [declarator], has_await: true });
has_await } else {
}); sync_group.push(declarator);
}
} }
} }
} else if (awaited) { } else if (awaited) {
@ -1177,6 +1191,9 @@ function calculate_blockers(instance, analysis) {
trace_references(node, reads, writes, instance.scope); trace_references(node, reads, writes, instance.scope);
// Needs to happen before blocker computation
if (has_await) flush_sync_group();
const blocker = /** @type {NonNullable<Binding['blocker']>} */ ( const blocker = /** @type {NonNullable<Binding['blocker']>} */ (
b.member(promises, b.literal(analysis.instance_body.async.length), true) b.member(promises, b.literal(analysis.instance_body.async.length), true)
); );
@ -1187,15 +1204,20 @@ function calculate_blockers(instance, analysis) {
if (node.type === 'ClassDeclaration') { if (node.type === 'ClassDeclaration') {
push_declaration(node.id, blocker); push_declaration(node.id, blocker);
analysis.instance_body.async.push({ node, has_await }); }
if (has_await) {
analysis.instance_body.async.push({ nodes: [node], has_await: true });
} else { } else {
analysis.instance_body.async.push({ node, has_await }); sync_group.push(node);
} }
} else { } else {
analysis.instance_body.sync.push(node); analysis.instance_body.sync.push(node);
} }
} }
flush_sync_group();
for (const fn of functions) { for (const fn of functions) {
/** @type {Set<Binding>} */ /** @type {Set<Binding>} */
const reads_writes = new Set(); const reads_writes = new Set();

View file

@ -47,64 +47,24 @@ export function transform_body(instance_body, runner, transform) {
// Thunks for the await expressions // Thunks for the await expressions
if (instance_body.async.length > 0) { if (instance_body.async.length > 0) {
const thunks = instance_body.async.map((s) => { const thunks = instance_body.async.map((entry) => {
if (s.node.type === 'VariableDeclarator') { /** @type {ESTree.Statement[]} */
const visited = /** @type {ESTree.VariableDeclaration | ESTree.EmptyStatement} */ ( const entry_statements = [];
transform(b.var(s.node.id, s.node.init))
);
const statements = for (const node of entry.nodes) {
visited.type === 'VariableDeclaration' entry_statements.push(...transform_async_node(node, transform));
? visited.declarations.map((node) => {
if (
node.id.type === 'Identifier' &&
(node.id.name.startsWith('$$d') || node.id.name.startsWith('$$array'))
) {
// this is an intermediate declaration created in VariableDeclaration.js;
// subsequent statements depend on it
return b.var(node.id, node.init);
}
return b.stmt(b.assignment('=', node.id, node.init ?? b.void0));
})
: [];
if (statements.length === 1) {
const statement = /** @type {ESTree.ExpressionStatement} */ (statements[0]);
return b.thunk(statement.expression, s.has_await);
}
return b.thunk(b.block(statements), s.has_await);
} }
if (s.node.type === 'ClassDeclaration') { if (entry_statements.length === 0) {
return b.thunk( // Keep indices stable for async sequencing while avoiding array holes in run([...]).
b.assignment( return b.thunk(b.void0, false);
'=',
s.node.id,
/** @type {ESTree.ClassExpression} */ ({ ...s.node, type: 'ClassExpression' })
),
s.has_await
);
} }
if (s.node.type === 'ExpressionStatement') { if (entry_statements.length === 1 && entry_statements[0].type === 'ExpressionStatement') {
// the expression may be a $inspect call, which will be transformed into an empty statement return b.thunk(entry_statements[0].expression, entry.has_await);
const expression = /** @type {ESTree.Expression | ESTree.EmptyStatement} */ (
transform(s.node.expression)
);
if (expression.type === 'EmptyStatement') {
// Keep indices stable for async sequencing while avoiding array holes in run([...]).
return b.thunk(b.void0, false);
}
return expression.type === 'AwaitExpression'
? b.thunk(expression, true)
: b.thunk(b.unary('void', expression), s.has_await);
} }
return b.thunk(b.block([/** @type {ESTree.Statement} */ (transform(s.node))]), s.has_await); return b.thunk(b.block(entry_statements), entry.has_await);
}); });
// TODO get the `$$promises` ID from scope // TODO get the `$$promises` ID from scope
@ -113,3 +73,63 @@ export function transform_body(instance_body, runner, transform) {
return statements; return statements;
} }
/**
* @param {ESTree.Statement | ESTree.VariableDeclarator} node
* @param {(node: ESTree.Node) => ESTree.Node} transform
* @returns {ESTree.Statement[]}
*/
function transform_async_node(node, transform) {
if (node.type === 'VariableDeclarator') {
const visited = /** @type {ESTree.VariableDeclaration | ESTree.EmptyStatement} */ (
transform(b.var(node.id, node.init))
);
return visited.type === 'VariableDeclaration'
? visited.declarations.map((node) => {
if (
node.id.type === 'Identifier' &&
(node.id.name.startsWith('$$d') || node.id.name.startsWith('$$array'))
) {
// This intermediate declaration is created in VariableDeclaration.js;
// subsequent statements may depend on it.
return b.var(node.id, node.init);
}
return b.stmt(b.assignment('=', node.id, node.init ?? b.void0));
})
: [];
}
if (node.type === 'ClassDeclaration') {
return [
b.stmt(
b.assignment(
'=',
node.id,
/** @type {ESTree.ClassExpression} */ ({ ...node, type: 'ClassExpression' })
)
)
];
}
if (node.type === 'ExpressionStatement') {
// The expression may be a $inspect call, which will be transformed into an empty statement.
const expression = /** @type {ESTree.Expression | ESTree.EmptyStatement} */ (
transform(node.expression)
);
if (expression.type === 'EmptyStatement') {
return [];
}
if (expression.type === 'AwaitExpression') {
return [b.stmt(expression)];
}
return [b.stmt(b.unary('void', expression))];
}
const statement = /** @type {ESTree.Statement | ESTree.EmptyStatement} */ (transform(node));
return statement.type === 'EmptyStatement' ? [] : [statement];
}

View file

@ -592,8 +592,13 @@ const svelte_visitors = (comments) => ({
}, },
ConstTag(node, context) { ConstTag(node, context) {
context.write('{@'); context.write('{@const ');
context.visit(node.declaration); const declarators = node.declaration.declarations;
for (let i = 0; i < declarators.length; i++) {
if (i > 0) context.write(', ');
context.visit(declarators[i]);
}
context.write('}'); context.write('}');
}, },

View file

@ -5,9 +5,7 @@ import { hydrate_node, hydrating } from '../dom/hydration.js';
import { block, branch, destroy_effect } from '../reactivity/effects.js'; import { block, branch, destroy_effect } from '../reactivity/effects.js';
import { set, source } from '../reactivity/sources.js'; import { set, source } from '../reactivity/sources.js';
import { set_should_intro } from '../render.js'; import { set_should_intro } from '../render.js';
import { get } from '../runtime.js'; import { active_effect, get } from '../runtime.js';
import { assign_nodes } from '../dom/template.js';
import { create_comment } from '../dom/operations.js';
/** /**
* @template {(anchor: Comment, props: any) => any} Component * @template {(anchor: Comment, props: any) => any} Component
@ -29,13 +27,6 @@ export function hmr(fn) {
let ran = false; let ran = false;
// Surround the wrapped effects with comments and assign the nodes
// on the wrapping effects so the parent can properly do DOM operations.
let start = create_comment();
let end = create_comment();
anchor.before(start);
block(() => { block(() => {
if (component === (component = get(current))) { if (component === (component = get(current))) {
return; return;
@ -52,16 +43,21 @@ export function hmr(fn) {
if (ran) set_should_intro(false); if (ran) set_should_intro(false);
// preserve getters/setters // preserve getters/setters
Object.defineProperties( var result =
instance, // @ts-expect-error
Object.getOwnPropertyDescriptors( new.target ? new component(anchor, props) : component(anchor, props);
// @ts-expect-error // a component is not guaranteed to return something and we can't invoke getOwnPropertyDescriptors on undefined
new.target ? new component(anchor, props) : component(anchor, props) if (result) {
) Object.defineProperties(instance, Object.getOwnPropertyDescriptors(result));
); }
if (ran) set_should_intro(true); if (ran) set_should_intro(true);
}); });
// Forward the nodes from the inner effect to the outer active effect which would
// get them if the HMR wrapper wasn't there. Do this inside the block not outside
// so that HMR updates to the component will also update the nodes on the active effect.
/** @type {Effect} */ (active_effect).nodes = effect.nodes;
}, EFFECT_TRANSPARENT); }, EFFECT_TRANSPARENT);
ran = true; ran = true;
@ -70,10 +66,6 @@ export function hmr(fn) {
anchor = hydrate_node; anchor = hydrate_node;
} }
anchor.before(end);
assign_nodes(start, end);
return instance; return instance;
} }

View file

@ -209,8 +209,8 @@ export async function* for_await_track_reactivity_loss(iterable) {
yield value; yield value;
} }
} finally { } finally {
// If the iterator had a normal completion and `return` is defined on the iterator, call it and return the value // If the iterator had an abrupt completion and `return` is defined on the iterator, call it and return the value
if (normal_completion && iterator.return !== undefined) { if (!normal_completion && iterator.return !== undefined) {
// eslint-disable-next-line no-unsafe-finally // eslint-disable-next-line no-unsafe-finally
return /** @type {TReturn} */ ((await track_reactivity_loss(iterator.return()))().value); return /** @type {TReturn} */ ((await track_reactivity_loss(iterator.return()))().value);
} }
@ -307,15 +307,16 @@ export function wait(blockers) {
* @returns {(skip?: boolean) => void} * @returns {(skip?: boolean) => void}
*/ */
export function increment_pending() { export function increment_pending() {
var boundary = /** @type {Boundary} */ (/** @type {Effect} */ (active_effect).b); var effect = /** @type {Effect} */ (active_effect);
var boundary = /** @type {Boundary} */ (effect.b);
var batch = /** @type {Batch} */ (current_batch); var batch = /** @type {Batch} */ (current_batch);
var blocking = boundary.is_rendered(); var blocking = boundary.is_rendered();
boundary.update_pending_count(1, batch); boundary.update_pending_count(1, batch);
batch.increment(blocking); batch.increment(blocking, effect);
return (skip = false) => { return (skip = false) => {
boundary.update_pending_count(-1, batch); boundary.update_pending_count(-1, batch);
batch.decrement(blocking, skip); batch.decrement(blocking, effect, skip);
}; };
} }

View file

@ -90,20 +90,20 @@ var source_stacks = DEV ? new Set() : null;
let uid = 1; let uid = 1;
export class Batch { export class Batch {
// for debugging. TODO remove once async is stable
id = uid++; id = uid++;
/** /**
* The current values of any sources that are updated in this batch * The current values of any signals that are updated in this batch.
* Tuple format: [value, is_derived] (note: is_derived is false for deriveds, too, if they were overridden via assignment)
* They keys of this map are identical to `this.#previous` * They keys of this map are identical to `this.#previous`
* @type {Map<Source, any>} * @type {Map<Value, [any, boolean]>}
*/ */
current = new Map(); current = new Map();
/** /**
* The values of any sources that are updated in this batch _before_ those updates took place. * The values of any signals (sources and deriveds) that are updated in this batch _before_ those updates took place.
* They keys of this map are identical to `this.#current` * They keys of this map are identical to `this.#current`
* @type {Map<Source, any>} * @type {Map<Value, any>}
*/ */
previous = new Map(); previous = new Map();
@ -121,14 +121,16 @@ export class Batch {
#discard_callbacks = new Set(); #discard_callbacks = new Set();
/** /**
* The number of async effects that are currently in flight * Async effects that are currently in flight
* @type {Map<Effect, number>}
*/ */
#pending = 0; #pending = new Map();
/** /**
* The number of async effects that are currently in flight, _not_ inside a pending boundary * Async effects that are currently in flight, _not_ inside a pending boundary
* @type {Map<Effect, number>}
*/ */
#blocking_pending = 0; #blocking_pending = new Map();
/** /**
* A deferred that resolves when the batch is committed, used with `settled()` * A deferred that resolves when the batch is committed, used with `settled()`
@ -168,8 +170,35 @@ export class Batch {
#decrement_queued = false; #decrement_queued = false;
/** @type {Set<Batch>} */
#blockers = new Set();
#is_deferred() { #is_deferred() {
return this.is_fork || this.#blocking_pending > 0; return this.is_fork || this.#blocking_pending.size > 0;
}
#is_blocked() {
for (const batch of this.#blockers) {
for (const effect of batch.#blocking_pending.keys()) {
var skipped = false;
var e = effect;
while (e.parent !== null) {
if (this.#skipped_branches.has(e)) {
skipped = true;
break;
}
e = e.parent;
}
if (!skipped) {
return true;
}
}
}
return false;
} }
/** /**
@ -264,7 +293,7 @@ export class Batch {
collected_effects = null; collected_effects = null;
legacy_updates = null; legacy_updates = null;
if (this.#is_deferred()) { if (this.#is_deferred() || this.#is_blocked()) {
this.#defer_effects(render_effects); this.#defer_effects(render_effects);
this.#defer_effects(effects); this.#defer_effects(effects);
@ -272,7 +301,7 @@ export class Batch {
reset_branch(e, t); reset_branch(e, t);
} }
} else { } else {
if (this.#pending === 0) { if (this.#pending.size === 0) {
batches.delete(this); batches.delete(this);
} }
@ -383,17 +412,18 @@ export class Batch {
/** /**
* Associate a change to a given source with the current * Associate a change to a given source with the current
* batch, noting its previous and current values * batch, noting its previous and current values
* @param {Source} source * @param {Value} source
* @param {any} old_value * @param {any} old_value
* @param {boolean} [is_derived]
*/ */
capture(source, old_value) { capture(source, old_value, is_derived = false) {
if (old_value !== UNINITIALIZED && !this.previous.has(source)) { if (old_value !== UNINITIALIZED && !this.previous.has(source)) {
this.previous.set(source, old_value); this.previous.set(source, old_value);
} }
// Don't save errors in `batch_values`, or they won't be thrown in `runtime.js#get` // Don't save errors in `batch_values`, or they won't be thrown in `runtime.js#get`
if ((source.f & ERROR_VALUE) === 0) { if ((source.f & ERROR_VALUE) === 0) {
this.current.set(source, source.v); this.current.set(source, [source.v, is_derived]);
batch_values?.set(source, source.v); batch_values?.set(source, source.v);
} }
} }
@ -453,11 +483,13 @@ export class Batch {
/** @type {Source[]} */ /** @type {Source[]} */
var sources = []; var sources = [];
for (const [source, value] of this.current) { for (const [source, [value, is_derived]] of this.current) {
if (batch.current.has(source)) { if (batch.current.has(source)) {
if (is_earlier && value !== batch.current.get(source)) { var batch_value = /** @type {[any, boolean]} */ (batch.current.get(source))[0]; // faster than destructuring
if (is_earlier && value !== batch_value) {
// bring the value up to date // bring the value up to date
batch.current.set(source, value); batch.current.set(source, [value, is_derived]);
} else { } else {
// same value or later batch has more recent value, // same value or later batch has more recent value,
// no need to re-run these effects // no need to re-run these effects
@ -507,24 +539,56 @@ export class Batch {
batch.deactivate(); batch.deactivate();
} }
} }
for (const batch of batches) {
if (batch.#blockers.has(this)) {
batch.#blockers.delete(this);
if (batch.#blockers.size === 0 && !batch.#is_deferred()) {
batch.activate();
batch.#process();
}
}
}
} }
/** /**
*
* @param {boolean} blocking * @param {boolean} blocking
* @param {Effect} effect
*/ */
increment(blocking) { increment(blocking, effect) {
this.#pending += 1; let pending_count = this.#pending.get(effect) ?? 0;
if (blocking) this.#blocking_pending += 1; this.#pending.set(effect, pending_count + 1);
if (blocking) {
let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;
this.#blocking_pending.set(effect, blocking_pending_count + 1);
}
} }
/** /**
* @param {boolean} blocking * @param {boolean} blocking
* @param {Effect} effect
* @param {boolean} skip - whether to skip updates (because this is triggered by a stale reaction) * @param {boolean} skip - whether to skip updates (because this is triggered by a stale reaction)
*/ */
decrement(blocking, skip) { decrement(blocking, effect, skip) {
this.#pending -= 1; let pending_count = this.#pending.get(effect) ?? 0;
if (blocking) this.#blocking_pending -= 1;
if (pending_count === 1) {
this.#pending.delete(effect);
} else {
this.#pending.set(effect, pending_count - 1);
}
if (blocking) {
let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;
if (blocking_pending_count === 1) {
this.#blocking_pending.delete(effect);
} else {
this.#blocking_pending.set(effect, blocking_pending_count - 1);
}
}
if (this.#decrement_queued || skip) return; if (this.#decrement_queued || skip) return;
this.#decrement_queued = true; this.#decrement_queued = true;
@ -597,15 +661,37 @@ export class Batch {
// if there are multiple batches, we are 'time travelling' — // if there are multiple batches, we are 'time travelling' —
// we need to override values with the ones in this batch... // we need to override values with the ones in this batch...
batch_values = new Map(this.current); batch_values = new Map();
for (const [source, [value]] of this.current) {
batch_values.set(source, value);
}
// ...and undo changes belonging to other batches // ...and undo changes belonging to other batches unless they block this one
for (const batch of batches) { for (const batch of batches) {
if (batch === this || batch.is_fork) continue; if (batch === this || batch.is_fork) continue;
for (const [source, previous] of batch.previous) { // A batch is blocked on an earlier batch if it overlaps with the earlier batch's changes but is not a superset
if (!batch_values.has(source)) { var intersects = false;
batch_values.set(source, previous); var differs = false;
if (batch.id < this.id) {
for (const [source, [, is_derived]] of batch.current) {
// Derived values don't partake in the blocking mechanism, because a derived could
// be triggered in one batch already but not the other one yet, causing a false-positive
if (is_derived) continue;
intersects ||= this.current.has(source);
differs ||= !this.current.has(source);
}
}
if (intersects && differs) {
this.#blockers.add(batch);
} else {
for (const [source, previous] of batch.previous) {
if (!batch_values.has(source)) {
batch_values.set(source, previous);
}
} }
} }
} }
@ -1065,7 +1151,7 @@ export function fork(fn) {
batch.is_fork = false; batch.is_fork = false;
// apply changes and update write versions so deriveds see the change // apply changes and update write versions so deriveds see the change
for (var [source, value] of batch.current) { for (var [source, [value]] of batch.current) {
source.v = value; source.v = value;
source.wv = increment_write_version(); source.wv = increment_write_version();
} }

View file

@ -396,7 +396,7 @@ export function update_derived(derived) {
// change, `derived.equals` may incorrectly return `true` // change, `derived.equals` may incorrectly return `true`
if (!current_batch?.is_fork || derived.deps === null) { if (!current_batch?.is_fork || derived.deps === null) {
derived.v = value; derived.v = value;
current_batch?.capture(derived, old_value); current_batch?.capture(derived, old_value, true);
// deriveds without dependencies should never be recomputed // deriveds without dependencies should never be recomputed
if (derived.deps === null) { if (derived.deps === null) {

View file

@ -559,6 +559,7 @@ export function destroy_effect(effect, remove_dom = true) {
effect.fn = effect.fn =
effect.nodes = effect.nodes =
effect.ac = effect.ac =
effect.b =
null; null;
} }

View file

@ -1,6 +1,6 @@
/** @import { Task } from '#client' */ /** @import { Task } from '#client' */
/** @import { SpringOpts, SpringUpdateOpts, TickContext } from './private.js' */ /** @import { TickContext } from './private.js' */
/** @import { Spring as SpringStore } from './public.js' */ /** @import { Spring as SpringStore, SpringOptions, SpringUpdateOptions } from './public.js' */
import { writable } from '../store/shared/index.js'; import { writable } from '../store/shared/index.js';
import { loop } from '../internal/client/loop.js'; import { loop } from '../internal/client/loop.js';
import { raf } from '../internal/client/timing.js'; import { raf } from '../internal/client/timing.js';
@ -62,7 +62,7 @@ function tick_spring(ctx, last_value, current_value, target_value) {
* @deprecated Use [`Spring`](https://svelte.dev/docs/svelte/svelte-motion#Spring) instead * @deprecated Use [`Spring`](https://svelte.dev/docs/svelte/svelte-motion#Spring) instead
* @template [T=any] * @template [T=any]
* @param {T} [value] * @param {T} [value]
* @param {SpringOpts} [opts] * @param {SpringOptions} [opts]
* @returns {SpringStore<T>} * @returns {SpringStore<T>}
*/ */
export function spring(value, opts = {}) { export function spring(value, opts = {}) {
@ -83,7 +83,7 @@ export function spring(value, opts = {}) {
let cancel_task = false; let cancel_task = false;
/** /**
* @param {T} new_value * @param {T} new_value
* @param {SpringUpdateOpts} opts * @param {SpringUpdateOptions} opts
* @returns {Promise<void>} * @returns {Promise<void>}
*/ */
function set(new_value, opts = {}) { function set(new_value, opts = {}) {
@ -191,7 +191,7 @@ export class Spring {
/** /**
* @param {T} value * @param {T} value
* @param {SpringOpts} [options] * @param {SpringOptions} [options]
*/ */
constructor(value, options = {}) { constructor(value, options = {}) {
this.#current = DEV ? tag(state(value), 'Spring.current') : state(value); this.#current = DEV ? tag(state(value), 'Spring.current') : state(value);
@ -225,7 +225,7 @@ export class Spring {
* ``` * ```
* @template U * @template U
* @param {() => U} fn * @param {() => U} fn
* @param {SpringOpts} [options] * @param {SpringOptions} [options]
*/ */
static of(fn, options) { static of(fn, options) {
const spring = new Spring(fn(), options); const spring = new Spring(fn(), options);
@ -293,7 +293,7 @@ export class Spring {
* the specified number of milliseconds. This is useful for things like 'fling' gestures. * the specified number of milliseconds. This is useful for things like 'fling' gestures.
* *
* @param {T} value * @param {T} value
* @param {SpringUpdateOpts} [options] * @param {SpringUpdateOptions} [options]
*/ */
set(value, options) { set(value, options) {
this.#deferred?.reject(new Error('Aborted')); this.#deferred?.reject(new Error('Aborted'));

View file

@ -1,6 +1,5 @@
/** @import { Task } from '../internal/client/types' */ /** @import { Task } from '../internal/client/types' */
/** @import { Tweened } from './public' */ /** @import { Tweened, TweenOptions } from './public' */
/** @import { TweenedOptions } from './private' */
import { writable } from '../store/shared/index.js'; import { writable } from '../store/shared/index.js';
import { raf } from '../internal/client/timing.js'; import { raf } from '../internal/client/timing.js';
import { loop } from '../internal/client/loop.js'; import { loop } from '../internal/client/loop.js';
@ -84,7 +83,7 @@ function get_interpolator(a, b) {
* @deprecated Use [`Tween`](https://svelte.dev/docs/svelte/svelte-motion#Tween) instead * @deprecated Use [`Tween`](https://svelte.dev/docs/svelte/svelte-motion#Tween) instead
* @template T * @template T
* @param {T} [value] * @param {T} [value]
* @param {TweenedOptions<T>} [defaults] * @param {TweenOptions<T>} [defaults]
* @returns {Tweened<T>} * @returns {Tweened<T>}
*/ */
export function tweened(value, defaults = {}) { export function tweened(value, defaults = {}) {
@ -94,7 +93,7 @@ export function tweened(value, defaults = {}) {
let target_value = value; let target_value = value;
/** /**
* @param {T} new_value * @param {T} new_value
* @param {TweenedOptions<T>} [opts] * @param {TweenOptions<T>} [opts]
*/ */
function set(new_value, opts) { function set(new_value, opts) {
target_value = new_value; target_value = new_value;
@ -180,7 +179,7 @@ export class Tween {
#current; #current;
#target; #target;
/** @type {TweenedOptions<T>} */ /** @type {TweenOptions<T>} */
#defaults; #defaults;
/** @type {import('../internal/client/types').Task | null} */ /** @type {import('../internal/client/types').Task | null} */
@ -188,7 +187,7 @@ export class Tween {
/** /**
* @param {T} value * @param {T} value
* @param {TweenedOptions<T>} options * @param {TweenOptions<T>} options
*/ */
constructor(value, options = {}) { constructor(value, options = {}) {
this.#current = state(value); this.#current = state(value);
@ -216,7 +215,7 @@ export class Tween {
* ``` * ```
* @template U * @template U
* @param {() => U} fn * @param {() => U} fn
* @param {TweenedOptions<U>} [options] * @param {TweenOptions<U>} [options]
*/ */
static of(fn, options) { static of(fn, options) {
const tween = new Tween(fn(), options); const tween = new Tween(fn(), options);
@ -233,7 +232,7 @@ export class Tween {
* *
* If `options` are provided, they will override the tween's defaults. * If `options` are provided, they will override the tween's defaults.
* @param {T} value * @param {T} value
* @param {TweenedOptions<T>} [options] * @param {TweenOptions<T>} [options]
* @returns * @returns
*/ */
set(value, options) { set(value, options) {

View file

@ -4,5 +4,5 @@
* The current version, as set in package.json. * The current version, as set in package.json.
* @type {string} * @type {string}
*/ */
export const VERSION = '5.54.0'; export const VERSION = '5.55.0';
export const PUBLIC_VERSION = '5'; export const PUBLIC_VERSION = '5';

View file

@ -2005,16 +2005,50 @@ declare module 'svelte/legacy' {
declare module 'svelte/motion' { declare module 'svelte/motion' {
import type { MediaQuery } from 'svelte/reactivity'; import type { MediaQuery } from 'svelte/reactivity';
export interface SpringOptions {
stiffness?: number;
damping?: number;
precision?: number;
}
export interface SpringUpdateOptions {
/**
* @deprecated Only use this for the spring store; does nothing when set on the Spring class
*/
hard?: any;
/**
* @deprecated Only use this for the spring store; does nothing when set on the Spring class
*/
soft?: string | number | boolean;
/**
* Only use this for the Spring class; does nothing when set on the spring store
*/
instant?: boolean;
/**
* Only use this for the Spring class; does nothing when set on the spring store
*/
preserveMomentum?: number;
}
export type Updater<T> = (target_value: T, value: T) => T;
export interface TweenOptions<T> {
delay?: number;
duration?: number | ((from: T, to: T) => number);
easing?: (t: number) => number;
interpolate?: (a: T, b: T) => (t: number) => T;
}
// TODO we do declaration merging here in order to not have a breaking change (renaming the Spring interface) // TODO we do declaration merging here in order to not have a breaking change (renaming the Spring interface)
// this means both the Spring class and the Spring interface are merged into one with some things only // this means both the Spring class and the Spring interface are merged into one with some things only
// existing on one side. In Svelte 6, remove the type definition and move the jsdoc onto the class in spring.js // existing on one side. In Svelte 6, remove the type definition and move the jsdoc onto the class in spring.js
export interface Spring<T> extends Readable<T> { export interface Spring<T> extends Readable<T> {
set(new_value: T, opts?: SpringUpdateOpts): Promise<void>; set(new_value: T, opts?: SpringUpdateOptions): Promise<void>;
/** /**
* @deprecated Only exists on the legacy `spring` store, not the `Spring` class * @deprecated Only exists on the legacy `spring` store, not the `Spring` class
*/ */
update: (fn: Updater<T>, opts?: SpringUpdateOpts) => Promise<void>; update: (fn: Updater<T>, opts?: SpringUpdateOptions) => Promise<void>;
/** /**
* @deprecated Only exists on the legacy `spring` store, not the `Spring` class * @deprecated Only exists on the legacy `spring` store, not the `Spring` class
*/ */
@ -2041,7 +2075,7 @@ declare module 'svelte/motion' {
* @since 5.8.0 * @since 5.8.0
*/ */
export class Spring<T> { export class Spring<T> {
constructor(value: T, options?: SpringOpts); constructor(value: T, options?: SpringOptions);
/** /**
* Create a spring whose value is bound to the return value of `fn`. This must be called * Create a spring whose value is bound to the return value of `fn`. This must be called
@ -2057,7 +2091,7 @@ declare module 'svelte/motion' {
* </script> * </script>
* ``` * ```
*/ */
static of<U>(fn: () => U, options?: SpringOpts): Spring<U>; static of<U>(fn: () => U, options?: SpringOptions): Spring<U>;
/** /**
* Sets `spring.target` to `value` and returns a `Promise` that resolves if and when `spring.current` catches up to it. * Sets `spring.target` to `value` and returns a `Promise` that resolves if and when `spring.current` catches up to it.
@ -2067,7 +2101,7 @@ declare module 'svelte/motion' {
* If `options.preserveMomentum` is provided, the spring will continue on its current trajectory for * If `options.preserveMomentum` is provided, the spring will continue on its current trajectory for
* the specified number of milliseconds. This is useful for things like 'fling' gestures. * the specified number of milliseconds. This is useful for things like 'fling' gestures.
*/ */
set(value: T, options?: SpringUpdateOpts): Promise<void>; set(value: T, options?: SpringUpdateOptions): Promise<void>;
damping: number; damping: number;
precision: number; precision: number;
@ -2085,8 +2119,8 @@ declare module 'svelte/motion' {
} }
export interface Tweened<T> extends Readable<T> { export interface Tweened<T> extends Readable<T> {
set(value: T, opts?: TweenedOptions<T>): Promise<void>; set(value: T, opts?: TweenOptions<T>): Promise<void>;
update(updater: Updater<T>, opts?: TweenedOptions<T>): Promise<void>; update(updater: Updater<T>, opts?: TweenOptions<T>): Promise<void>;
} }
/** Callback to inform of a value updates. */ /** Callback to inform of a value updates. */
type Subscriber<T> = (value: T) => void; type Subscriber<T> = (value: T) => void;
@ -2103,39 +2137,6 @@ declare module 'svelte/motion' {
*/ */
subscribe(this: void, run: Subscriber<T>, invalidate?: () => void): Unsubscriber; subscribe(this: void, run: Subscriber<T>, invalidate?: () => void): Unsubscriber;
} }
interface SpringOpts {
stiffness?: number;
damping?: number;
precision?: number;
}
interface SpringUpdateOpts {
/**
* @deprecated Only use this for the spring store; does nothing when set on the Spring class
*/
hard?: any;
/**
* @deprecated Only use this for the spring store; does nothing when set on the Spring class
*/
soft?: string | number | boolean;
/**
* Only use this for the Spring class; does nothing when set on the spring store
*/
instant?: boolean;
/**
* Only use this for the Spring class; does nothing when set on the spring store
*/
preserveMomentum?: number;
}
type Updater<T> = (target_value: T, value: T) => T;
interface TweenedOptions<T> {
delay?: number;
duration?: number | ((from: T, to: T) => number);
easing?: (t: number) => number;
interpolate?: (a: T, b: T) => (t: number) => T;
}
/** /**
* A [media query](https://svelte.dev/docs/svelte/svelte-reactivity#MediaQuery) that matches if the user [prefers reduced motion](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion). * A [media query](https://svelte.dev/docs/svelte/svelte-reactivity#MediaQuery) that matches if the user [prefers reduced motion](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion).
* *
@ -2165,13 +2166,13 @@ declare module 'svelte/motion' {
* *
* @deprecated Use [`Spring`](https://svelte.dev/docs/svelte/svelte-motion#Spring) instead * @deprecated Use [`Spring`](https://svelte.dev/docs/svelte/svelte-motion#Spring) instead
* */ * */
export function spring<T = any>(value?: T | undefined, opts?: SpringOpts | undefined): Spring<T>; export function spring<T = any>(value?: T | undefined, opts?: SpringOptions | undefined): Spring<T>;
/** /**
* A tweened store in Svelte is a special type of store that provides smooth transitions between state values over time. * A tweened store in Svelte is a special type of store that provides smooth transitions between state values over time.
* *
* @deprecated Use [`Tween`](https://svelte.dev/docs/svelte/svelte-motion#Tween) instead * @deprecated Use [`Tween`](https://svelte.dev/docs/svelte/svelte-motion#Tween) instead
* */ * */
export function tweened<T>(value?: T | undefined, defaults?: TweenedOptions<T> | undefined): Tweened<T>; export function tweened<T>(value?: T | undefined, defaults?: TweenOptions<T> | undefined): Tweened<T>;
/** /**
* A wrapper for a value that tweens smoothly to its target value. Changes to `tween.target` will cause `tween.current` to * A wrapper for a value that tweens smoothly to its target value. Changes to `tween.target` will cause `tween.current` to
* move towards it over time, taking account of the `delay`, `duration` and `easing` options. * move towards it over time, taking account of the `delay`, `duration` and `easing` options.
@ -2204,15 +2205,15 @@ declare module 'svelte/motion' {
* ``` * ```
* *
*/ */
static of<U>(fn: () => U, options?: TweenedOptions<U> | undefined): Tween<U>; static of<U>(fn: () => U, options?: TweenOptions<U> | undefined): Tween<U>;
constructor(value: T, options?: TweenedOptions<T>); constructor(value: T, options?: TweenOptions<T>);
/** /**
* Sets `tween.target` to `value` and returns a `Promise` that resolves if and when `tween.current` catches up to it. * Sets `tween.target` to `value` and returns a `Promise` that resolves if and when `tween.current` catches up to it.
* *
* If `options` are provided, they will override the tween's defaults. * If `options` are provided, they will override the tween's defaults.
* */ * */
set(value: T, options?: TweenedOptions<T> | undefined): Promise<void>; set(value: T, options?: TweenOptions<T> | undefined): Promise<void>;
get current(): T; get current(): T;
set target(v: T); set target(v: T);
get target(): T; get target(): T;

File diff suppressed because one or more lines are too long