Initial React project

This commit is contained in:
Johan
2026-03-17 00:42:10 +01:00
parent c9031f2275
commit 8bca9680e4
1317 changed files with 48700 additions and 23334 deletions

View File

@@ -4,8 +4,8 @@ This template provides a minimal setup to get React working in Vite with HMR and
Currently, two official plugins are available: Currently, two official plugins are available:
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)
## React Compiler ## React Compiler

BIN
dist/appicon.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 662 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 662 KiB

11
dist/assets/index-0Jq0j0el.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
dist/assets/index-Bu03706B.css vendored Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 KiB

1
dist/favicon.svg vendored Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.3 KiB

178
dist/homepage.html vendored
View File

@@ -1,178 +0,0 @@
<!DOCTYPE html>
<html lang="da" class="scroll-smooth"><head>
<meta charset="UTF-8">
<link rel="icon" type="image/png" sizes="32x32" href="/appicon.png?v=5">
<link rel="icon" type="image/png" sizes="192x192" href="/appicon.png?v=5">
<link rel="shortcut icon" type="image/png" href="/appicon.png?v=5">
<link rel="apple-touch-icon" href="/apple-touch-icon.png?v=5">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Arbejd.com | Din hurtigste vej til dit næste job</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://code.iconify.design/iconify-icon/1.0.7/iconify-icon.min.js"></script>
<style>
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; }
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background-color: rgba(20, 184, 166, 0.2); border-radius: 20px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background-color: rgba(20, 184, 166, 0.4); }
@keyframes float-slow {
0%, 100% { transform: translateY(0) scale(1); }
50% { transform: translateY(-15px) scale(1.02); }
}
@keyframes float-medium {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-10px); }
}
@keyframes float-fast {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-5px); }
}
.animate-float-slow { animation: float-slow 8s ease-in-out infinite; }
.animate-float-medium { animation: float-medium 6s ease-in-out infinite; }
.animate-float-fast { animation: float-fast 4s ease-in-out infinite; }
.text-gradient {
background: linear-gradient(135deg, #0f172a 0%, #0d9488 50%, #4338ca 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.text-gradient-subtle {
background: linear-gradient(135deg, #1f2937 0%, #4b5563 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
</style>
</head>
<body class="bg-[#f8fafc] relative min-h-screen text-gray-600 selection:bg-teal-100 selection:text-teal-900 overflow-x-hidden flex flex-col font-normal custom-scrollbar">
<div class="fixed top-[-15%] left-[-10%] w-[60vw] h-[60vw] rounded-full bg-gradient-to-br from-teal-400/30 to-emerald-300/10 blur-[140px] pointer-events-none z-0"></div>
<div class="fixed bottom-[-15%] right-[-10%] w-[70vw] h-[70vw] rounded-full bg-gradient-to-tl from-indigo-500/20 to-purple-400/10 blur-[160px] pointer-events-none z-0"></div>
<div class="fixed top-[20%] right-[15%] w-[40vw] h-[40vw] rounded-full bg-gradient-to-tr from-cyan-400/20 to-blue-300/10 blur-[130px] pointer-events-none z-0"></div>
<nav class="fixed top-0 inset-x-0 z-50 h-16 bg-white/20 backdrop-blur-2xl border-b border-white/50 shadow-[0_4px_30px_rgba(0,0,0,0.03)] flex items-center justify-between px-6 lg:px-12 transition-all">
<a href="#" class="flex items-center gap-2 group outline-none">
<svg viewBox="0 0 100 100" class="w-8 h-8 rounded-lg shadow-[0_4px_15px_rgba(49,103,201,0.2)] group-hover:shadow-[0_6px_20px_rgba(49,103,201,0.3)] transition-all group-hover:scale-105">
<defs>
<linearGradient id="navLogoBg" x1="0%" y1="100%" x2="100%" y2="0%">
<stop offset="0%" stop-color="#1A9A75"></stop>
<stop offset="100%" stop-color="#3167C9"></stop>
</linearGradient>
<linearGradient id="navLogoFg" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#6ACEEB"></stop>
<stop offset="100%" stop-color="#46D3B6"></stop>
</linearGradient>
</defs>
<rect width="100" height="100" fill="url(#navLogoBg)"></rect>
<path fill-rule="evenodd" clip-rule="evenodd" d="M 60 15 L 72 15 L 72 85 L 60 85 L 60 72.98 A 28 28 0 1 1 60 27.02 Z M 44 34 A 16 16 0 1 0 44 66 A 16 16 0 1 0 44 34 Z" fill="url(#navLogoFg)"></path>
</svg>
<span class="text-xl font-normal tracking-tight text-gray-900 uppercase">ARBEJD</span>
</a>
<div class="hidden md:flex items-center gap-8">
<a href="#" class="text-base font-normal text-gray-600 hover:text-gray-900 transition-colors outline-none drop-shadow-sm">Sådan virker det</a>
<a href="#" class="text-base font-normal text-gray-600 hover:text-gray-900 transition-colors outline-none drop-shadow-sm">Gratis hjælp</a>
<a href="#" class="text-base font-normal text-gray-600 hover:text-gray-900 transition-colors outline-none drop-shadow-sm">Priser</a>
</div>
<div class="flex items-center gap-4">
<a href="#" class="hidden sm:block text-base font-normal text-gray-700 hover:text-gray-900 transition-colors outline-none drop-shadow-sm">Log ind</a>
<a href="#" class="text-base font-normal text-white bg-gradient-to-r from-gray-900 to-gray-800 hover:from-gray-800 hover:to-gray-700 px-5 py-2.5 rounded-full transition-all shadow-[0_4px_15px_rgba(0,0,0,0.1)] outline-none border border-gray-700">Opret dig</a>
</div>
</nav>
<main class="flex-1 relative z-10 pt-16">
<section class="relative pt-24 pb-32 px-6 lg:px-12 max-w-7xl mx-auto flex flex-col items-center text-center">
<div class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-full max-w-4xl aspect-[2/1] bg-gradient-to-tr from-white/40 via-white/10 to-teal-50/30 backdrop-blur-3xl border border-white/60 rounded-[3rem] shadow-[0_8px_40px_rgba(0,0,0,0.06)] -z-10 animate-float-slow"></div>
<div class="inline-flex items-center gap-2 px-4 py-2 rounded-full bg-gradient-to-r from-white/60 to-white/30 backdrop-blur-xl border border-white/80 text-teal-800 text-sm font-medium uppercase tracking-wider mb-8 shadow-[0_4px_20px_rgba(20,184,166,0.1)]">
<iconify-icon icon="solar:magic-stick-3-linear" class="text-base" style="stroke-width: 1.5;"></iconify-icon>
Fremtidens rekruttering
</div>
<h1 class="text-5xl md:text-6xl lg:text-7xl font-medium tracking-tight text-gradient mb-8 leading-tight max-w-4xl drop-shadow-sm">
Arbejd, Danmarks Nye Jobportal
</h1>
<p class="text-xl md:text-2xl text-gray-600 mb-10 max-w-2xl font-normal leading-relaxed drop-shadow-sm">
Opdag drømmejobbet med kraften fra AI. Vi matcher dine færdigheder med de perfekte muligheder og hjælper dig hele vejen til samtalen.
</p>
<button class="group relative inline-flex items-center gap-3 px-8 py-4 bg-gradient-to-r from-gray-900 via-gray-800 to-gray-900 text-white rounded-full font-normal text-lg overflow-hidden shadow-[0_8px_25px_rgba(17,24,39,0.25)] hover:shadow-[0_12px_35px_rgba(17,24,39,0.35)] transition-all outline-none border border-gray-700 hover:-translate-y-0.5">
<span class="relative z-10">Udforsk Arbejd.com</span>
<iconify-icon icon="solar:arrow-right-linear" class="text-xl group-hover:translate-x-1 transition-transform relative z-10" style="stroke-width: 1.5;"></iconify-icon>
</button>
</section>
<section class="py-12 border-y border-white/40 bg-gradient-to-r from-white/10 via-white/30 to-white/10 backdrop-blur-xl shadow-[0_4px_30px_rgba(0,0,0,0.02)]">
<div class="max-w-7xl mx-auto px-6 lg:px-12">
<p class="text-center text-sm font-medium text-gray-500 uppercase tracking-widest mb-8 drop-shadow-sm">Stoles på af innovative virksomheder</p>
<div class="flex flex-wrap justify-center items-center gap-8 md:gap-16 opacity-60 grayscale hover:grayscale-0 transition-all duration-500">
<iconify-icon icon="solar:box-linear" class="text-3xl text-gray-800" style="stroke-width: 1.5;"></iconify-icon>
<iconify-icon icon="solar:medal-ribbon-linear" class="text-3xl text-gray-800" style="stroke-width: 1.5;"></iconify-icon>
<iconify-icon icon="solar:global-linear" class="text-3xl text-gray-800" style="stroke-width: 1.5;"></iconify-icon>
<iconify-icon icon="solar:buildings-2-linear" class="text-3xl text-gray-800" style="stroke-width: 1.5;"></iconify-icon>
<iconify-icon icon="solar:laptop-linear" class="text-3xl text-gray-800" style="stroke-width: 1.5;"></iconify-icon>
<iconify-icon icon="solar:database-linear" class="text-3xl text-gray-800" style="stroke-width: 1.5;"></iconify-icon>
</div>
</div>
</section>
<section class="py-24 px-6 lg:px-12 max-w-7xl mx-auto border-t border-white/40 relative">
<div class="text-center mb-16 relative z-10">
<h2 class="text-3xl md:text-4xl font-medium tracking-tight text-gradient-subtle mb-4">Succeshistorier</h2>
<p class="text-lg text-gray-600 max-w-2xl mx-auto font-normal drop-shadow-sm">Se hvordan andre har brugt Arbejd til at lande drømmejobbet.</p>
</div>
</section>
<section class="py-24 px-6 lg:px-12 max-w-7xl mx-auto border-t border-white/40 relative">
<div class="text-center mb-16 relative z-10">
<h2 class="text-3xl md:text-4xl font-medium tracking-tight text-gradient-subtle mb-4">Mød holdet bag</h2>
<p class="text-lg text-gray-600 max-w-2xl mx-auto font-normal drop-shadow-sm">Passionerede mennesker der brænder for at revolutionere måden, vi finder arbejde på.</p>
</div>
</section>
<section class="py-24 px-6 lg:px-12 max-w-7xl mx-auto border-t border-white/40 relative">
<div class="text-center mb-16 relative z-10">
<h2 class="text-3xl md:text-4xl font-medium tracking-tight text-gradient-subtle mb-4">Gennemsigtige priser</h2>
<p class="text-lg text-gray-600 max-w-2xl mx-auto font-normal drop-shadow-sm">Vælg den plan, der passer bedst til din karriererejse.</p>
</div>
</section>
<section class="py-24 px-6 lg:px-12 max-w-7xl mx-auto relative z-10">
<div class="bg-gradient-to-br from-teal-400/20 via-indigo-400/10 to-purple-400/20 backdrop-blur-3xl border border-white/60 rounded-[3rem] p-10 md:p-16 text-center shadow-[0_20px_60px_rgba(0,0,0,0.05)] relative overflow-hidden group">
<div class="absolute inset-0 bg-gradient-to-t from-white/60 to-white/20 z-0"></div>
<div class="relative z-10 max-w-3xl mx-auto flex flex-col items-center">
<iconify-icon icon="solar:rocket-linear" class="text-5xl text-teal-600 mb-6 drop-shadow-sm" style="stroke-width: 1.5;"></iconify-icon>
<h2 class="text-3xl md:text-5xl font-medium tracking-tight text-gradient-subtle mb-6 leading-tight drop-shadow-sm">
Klar til at tage styringen over din karriere?
</h2>
<p class="text-xl text-gray-700 mb-10 font-normal leading-relaxed drop-shadow-sm">
Din næste store chance venter.
</p>
<button class="inline-flex items-center gap-2 px-8 py-4 bg-gradient-to-r from-gray-900 via-gray-800 to-gray-900 border border-gray-700 hover:border-gray-600 text-white rounded-full font-normal text-lg transition-all shadow-[0_8px_25px_rgba(17,24,39,0.2)] outline-none hover:-translate-y-0.5">
Tilmeld dig Arbejd.com i dag
<iconify-icon icon="solar:arrow-right-linear" class="text-xl" style="stroke-width: 1.5;"></iconify-icon>
</button>
</div>
</div>
</section>
</main>
<footer class="bg-white/60 backdrop-blur-xl border-t border-white/80 mt-10 pt-16 pb-12 relative z-10 shadow-[0_-10px_40px_rgba(0,0,0,0.02)]">
<div class="max-w-7xl mx-auto px-6 lg:px-12">
<div class="pt-8 border-t border-gray-200/60 flex flex-col md:flex-row justify-between items-center gap-4">
<p class="text-sm text-gray-400 font-normal">© 2026 Arbejd.com. Alle rettigheder forbeholdes.</p>
<div class="flex items-center gap-4">
<a href="#" class="text-sm text-gray-400 hover:text-gray-900 transition-colors font-normal">Privatlivspolitik</a>
<a href="#" class="text-sm text-gray-400 hover:text-gray-900 transition-colors font-normal">Handelsbetingelser</a>
<a href="#" class="text-sm text-gray-400 hover:text-gray-900 transition-colors font-normal">Cookies</a>
</div>
</div>
</div>
</footer>
</body></html>

24
dist/icons.svg vendored Normal file
View File

@@ -0,0 +1,24 @@
<svg xmlns="http://www.w3.org/2000/svg">
<symbol id="bluesky-icon" viewBox="0 0 16 17">
<g clip-path="url(#bluesky-clip)"><path fill="#08060d" d="M7.75 7.735c-.693-1.348-2.58-3.86-4.334-5.097-1.68-1.187-2.32-.981-2.74-.79C.188 2.065.1 2.812.1 3.251s.241 3.602.398 4.13c.52 1.744 2.367 2.333 4.07 2.145-2.495.37-4.71 1.278-1.805 4.512 3.196 3.309 4.38-.71 4.987-2.746.608 2.036 1.307 5.91 4.93 2.746 2.72-2.746.747-4.143-1.747-4.512 1.702.189 3.55-.4 4.07-2.145.156-.528.397-3.691.397-4.13s-.088-1.186-.575-1.406c-.42-.19-1.06-.395-2.741.79-1.755 1.24-3.64 3.752-4.334 5.099"/></g>
<defs><clipPath id="bluesky-clip"><path fill="#fff" d="M.1.85h15.3v15.3H.1z"/></clipPath></defs>
</symbol>
<symbol id="discord-icon" viewBox="0 0 20 19">
<path fill="#08060d" d="M16.224 3.768a14.5 14.5 0 0 0-3.67-1.153c-.158.286-.343.67-.47.976a13.5 13.5 0 0 0-4.067 0c-.128-.306-.317-.69-.476-.976A14.4 14.4 0 0 0 3.868 3.77C1.546 7.28.916 10.703 1.231 14.077a14.7 14.7 0 0 0 4.5 2.306q.545-.748.965-1.587a9.5 9.5 0 0 1-1.518-.74q.191-.14.372-.293c2.927 1.369 6.107 1.369 8.999 0q.183.152.372.294-.723.437-1.52.74.418.838.963 1.588a14.6 14.6 0 0 0 4.504-2.308c.37-3.911-.63-7.302-2.644-10.309m-9.13 8.234c-.878 0-1.599-.82-1.599-1.82 0-.998.705-1.82 1.6-1.82.894 0 1.614.82 1.599 1.82.001 1-.705 1.82-1.6 1.82m5.91 0c-.878 0-1.599-.82-1.599-1.82 0-.998.705-1.82 1.6-1.82.893 0 1.614.82 1.599 1.82 0 1-.706 1.82-1.6 1.82"/>
</symbol>
<symbol id="documentation-icon" viewBox="0 0 21 20">
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="m15.5 13.333 1.533 1.322c.645.555.967.833.967 1.178s-.322.623-.967 1.179L15.5 18.333m-3.333-5-1.534 1.322c-.644.555-.966.833-.966 1.178s.322.623.966 1.179l1.534 1.321"/>
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M17.167 10.836v-4.32c0-1.41 0-2.117-.224-2.68-.359-.906-1.118-1.621-2.08-1.96-.599-.21-1.349-.21-2.848-.21-2.623 0-3.935 0-4.983.369-1.684.591-3.013 1.842-3.641 3.428C3 6.449 3 7.684 3 10.154v2.122c0 2.558 0 3.838.706 4.726q.306.383.713.671c.76.536 1.79.64 3.581.66"/>
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M3 10a2.78 2.78 0 0 1 2.778-2.778c.555 0 1.209.097 1.748-.047.48-.129.854-.503.982-.982.145-.54.048-1.194.048-1.749a2.78 2.78 0 0 1 2.777-2.777"/>
</symbol>
<symbol id="github-icon" viewBox="0 0 19 19">
<path fill="#08060d" fill-rule="evenodd" d="M9.356 1.85C5.05 1.85 1.57 5.356 1.57 9.694a7.84 7.84 0 0 0 5.324 7.44c.387.079.528-.168.528-.376 0-.182-.013-.805-.013-1.454-2.165.467-2.616-.935-2.616-.935-.349-.91-.864-1.143-.864-1.143-.71-.48.051-.48.051-.48.787.051 1.2.805 1.2.805.695 1.194 1.817.857 2.268.649.064-.507.27-.857.49-1.052-1.728-.182-3.545-.857-3.545-3.87 0-.857.31-1.558.8-2.104-.078-.195-.349-1 .077-2.078 0 0 .657-.208 2.14.805a7.5 7.5 0 0 1 1.946-.26c.657 0 1.328.092 1.946.26 1.483-1.013 2.14-.805 2.14-.805.426 1.078.155 1.883.078 2.078.502.546.799 1.247.799 2.104 0 3.013-1.818 3.675-3.558 3.87.284.247.528.714.528 1.454 0 1.052-.012 1.896-.012 2.156 0 .208.142.455.528.377a7.84 7.84 0 0 0 5.324-7.441c.013-4.338-3.48-7.844-7.773-7.844" clip-rule="evenodd"/>
</symbol>
<symbol id="social-icon" viewBox="0 0 20 20">
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M12.5 6.667a4.167 4.167 0 1 0-8.334 0 4.167 4.167 0 0 0 8.334 0"/>
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M2.5 16.667a5.833 5.833 0 0 1 8.75-5.053m3.837.474.513 1.035c.07.144.257.282.414.309l.93.155c.596.1.736.536.307.965l-.723.73a.64.64 0 0 0-.152.531l.207.903c.164.715-.213.991-.84.618l-.872-.52a.63.63 0 0 0-.577 0l-.872.52c-.624.373-1.003.094-.84-.618l.207-.903a.64.64 0 0 0-.152-.532l-.723-.729c-.426-.43-.289-.864.306-.964l.93-.156a.64.64 0 0 0 .412-.31l.513-1.034c.28-.562.735-.562 1.012 0"/>
</symbol>
<symbol id="x-icon" viewBox="0 0 19 19">
<path fill="#08060d" fill-rule="evenodd" d="M1.893 1.98c.052.072 1.245 1.769 2.653 3.77l2.892 4.114c.183.261.333.48.333.486s-.068.089-.152.183l-.522.593-.765.867-3.597 4.087c-.375.426-.734.834-.798.905a1 1 0 0 0-.118.148c0 .01.236.017.664.017h.663l.729-.83c.4-.457.796-.906.879-.999a692 692 0 0 0 1.794-2.038c.034-.037.301-.34.594-.675l.551-.624.345-.392a7 7 0 0 1 .34-.374c.006 0 .93 1.306 2.052 2.903l2.084 2.965.045.063h2.275c1.87 0 2.273-.003 2.266-.021-.008-.02-1.098-1.572-3.894-5.547-2.013-2.862-2.28-3.246-2.273-3.266.008-.019.282-.332 2.085-2.38l2-2.274 1.567-1.782c.022-.028-.016-.03-.65-.03h-.674l-.3.342a871 871 0 0 1-1.782 2.025c-.067.075-.405.458-.75.852a100 100 0 0 1-.803.91c-.148.172-.299.344-.99 1.127-.304.343-.32.358-.345.327-.015-.019-.904-1.282-1.976-2.808L6.365 1.85H1.8zm1.782.91 8.078 11.294c.772 1.08 1.413 1.973 1.425 1.984.016.017.241.02 1.05.017l1.03-.004-2.694-3.766L7.796 5.75 5.722 2.852l-1.039-.004-1.039-.004z" clip-rule="evenodd"/>
</symbol>
</svg>

After

Width:  |  Height:  |  Size: 4.9 KiB

33
dist/index.html vendored
View File

@@ -1,17 +1,44 @@
<!doctype html> <!doctype html>
<html lang="en"> <html lang="da">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" type="image/png" sizes="32x32" href="/appicon.png?v=5" /> <link rel="icon" type="image/png" sizes="32x32" href="/appicon.png?v=5" />
<link rel="icon" type="image/png" sizes="192x192" href="/appicon.png?v=5" /> <link rel="icon" type="image/png" sizes="192x192" href="/appicon.png?v=5" />
<link rel="shortcut icon" type="image/png" href="/appicon.png?v=5" /> <link rel="shortcut icon" type="image/png" href="/appicon.png?v=5" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png?v=5" /> <link rel="apple-touch-icon" href="/apple-touch-icon.png?v=5" />
<meta name="theme-color" content="#f8fafc" />
<meta name="author" content="Arbejd.com" />
<meta name="application-name" content="Arbejd.com" />
<meta name="description" content="Organiser hele din jobsøgning med din personlige AI-assistent. CV, ansøgninger, jobmatch og interviewtræning samlet ét sted." />
<meta name="keywords" content="arbejd.com, jobsøgning, job, cv, ansøgning, interviewtræning, karriere, rekruttering" />
<meta name="robots" content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1" />
<meta name="googlebot" content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1" />
<meta name="referrer" content="strict-origin-when-cross-origin" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="da_DK" />
<meta property="og:site_name" content="Arbejd.com" />
<meta property="og:title" content="Arbejd.com | Din hurtigste vej til dit næste job" />
<meta property="og:description" content="Organiser hele din jobsøgning med din personlige AI-assistent. CV, ansøgninger, jobmatch og interviewtræning samlet ét sted." />
<meta property="og:url" content="https://www.arbejd.com/" />
<meta property="og:image" content="https://www.arbejd.com/appicon.png" />
<meta property="og:image:alt" content="Arbejd.com logo" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Arbejd.com | Din hurtigste vej til dit næste job" />
<meta name="twitter:description" content="Organiser hele din jobsøgning med din personlige AI-assistent. CV, ansøgninger, jobmatch og interviewtræning samlet ét sted." />
<meta name="twitter:image" content="https://www.arbejd.com/appicon.png" />
<meta name="twitter:image:alt" content="Arbejd.com logo" />
<meta name="twitter:site" content="@arbejdcom" />
<meta name="twitter:creator" content="@arbejdcom" />
<link rel="canonical" href="https://www.arbejd.com/" />
<link rel="alternate" hreflang="da-DK" href="https://www.arbejd.com/" />
<link rel="alternate" hreflang="x-default" href="https://www.arbejd.com/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Arbejd.com | Din hurtigste vej til dit næste job</title> <title>Arbejd.com | Din hurtigste vej til dit næste job</title>
<script src="https://cdn.tailwindcss.com"></script> <script src="https://cdn.tailwindcss.com"></script>
<script src="https://code.iconify.design/iconify-icon/1.0.7/iconify-icon.min.js"></script> <script src="https://code.iconify.design/iconify-icon/1.0.7/iconify-icon.min.js"></script>
<script type="module" crossorigin src="/assets/index-B8uZZaoK.js"></script> <script type="module" crossorigin src="/assets/index-0Jq0j0el.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-BYNOGfOg.css"> <link rel="stylesheet" crossorigin href="/assets/index-Bu03706B.css">
<link rel="sitemap" type="application/xml" title="Sitemap" href="/sitemap.xml">
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>

4
dist/robots.txt vendored Normal file
View File

@@ -0,0 +1,4 @@
User-agent: *
Allow: /
Sitemap: https://www.arbejd.com/sitemap.xml

157
dist/sitemap.xml vendored Normal file
View File

@@ -0,0 +1,157 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url>
<loc>
https://www.arbejd.com/
</loc>
<lastmod>
2026-03-16T23:21:40.893Z
</lastmod>
<changefreq>
weekly
</changefreq>
<priority>
1.0
</priority>
</url>
<url>
<loc>
https://www.arbejd.com/home
</loc>
<lastmod>
2026-03-16T23:21:40.893Z
</lastmod>
<changefreq>
weekly
</changefreq>
<priority>
0.9
</priority>
</url>
<url>
<loc>
https://www.arbejd.com/for-jobsogere
</loc>
<lastmod>
2026-03-16T23:21:40.893Z
</lastmod>
<changefreq>
weekly
</changefreq>
<priority>
0.9
</priority>
</url>
<url>
<loc>
https://www.arbejd.com/for-virksomheder
</loc>
<lastmod>
2026-03-16T23:21:40.893Z
</lastmod>
<changefreq>
weekly
</changefreq>
<priority>
0.7
</priority>
</url>
<url>
<loc>
https://www.arbejd.com/pricing
</loc>
<lastmod>
2026-03-16T23:21:40.893Z
</lastmod>
<changefreq>
weekly
</changefreq>
<priority>
0.8
</priority>
</url>
<url>
<loc>
https://www.arbejd.com/kontakt
</loc>
<lastmod>
2026-03-16T23:21:40.893Z
</lastmod>
<changefreq>
weekly
</changefreq>
<priority>
0.7
</priority>
</url>
<url>
<loc>
https://www.arbejd.com/faq
</loc>
<lastmod>
2026-03-16T23:21:40.893Z
</lastmod>
<changefreq>
weekly
</changefreq>
<priority>
0.7
</priority>
</url>
<url>
<loc>
https://www.arbejd.com/privatlivspolitik
</loc>
<lastmod>
2026-03-16T23:21:40.893Z
</lastmod>
<changefreq>
yearly
</changefreq>
<priority>
0.7
</priority>
</url>
<url>
<loc>
https://www.arbejd.com/jobordbogen
</loc>
<lastmod>
2026-03-16T23:21:40.893Z
</lastmod>
<changefreq>
weekly
</changefreq>
<priority>
0.7
</priority>
</url>
<url>
<loc>
https://www.arbejd.com/stories
</loc>
<lastmod>
2026-03-16T23:21:40.893Z
</lastmod>
<changefreq>
weekly
</changefreq>
<priority>
0.7
</priority>
</url>
<url>
<loc>
https://www.arbejd.com/newsletter
</loc>
<lastmod>
2026-03-16T23:21:40.893Z
</lastmod>
<changefreq>
weekly
</changefreq>
<priority>
0.7
</priority>
</url>
</urlset>

View File

@@ -1,11 +1,37 @@
<!doctype html> <!doctype html>
<html lang="en"> <html lang="da">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" type="image/png" sizes="32x32" href="/appicon.png?v=5" /> <link rel="icon" type="image/png" sizes="32x32" href="/appicon.png?v=5" />
<link rel="icon" type="image/png" sizes="192x192" href="/appicon.png?v=5" /> <link rel="icon" type="image/png" sizes="192x192" href="/appicon.png?v=5" />
<link rel="shortcut icon" type="image/png" href="/appicon.png?v=5" /> <link rel="shortcut icon" type="image/png" href="/appicon.png?v=5" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png?v=5" /> <link rel="apple-touch-icon" href="/apple-touch-icon.png?v=5" />
<meta name="theme-color" content="#f8fafc" />
<meta name="author" content="Arbejd.com" />
<meta name="application-name" content="Arbejd.com" />
<meta name="description" content="Organiser hele din jobsøgning med din personlige AI-assistent. CV, ansøgninger, jobmatch og interviewtræning samlet ét sted." />
<meta name="keywords" content="arbejd.com, jobsøgning, job, cv, ansøgning, interviewtræning, karriere, rekruttering" />
<meta name="robots" content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1" />
<meta name="googlebot" content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1" />
<meta name="referrer" content="strict-origin-when-cross-origin" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="da_DK" />
<meta property="og:site_name" content="Arbejd.com" />
<meta property="og:title" content="Arbejd.com | Din hurtigste vej til dit næste job" />
<meta property="og:description" content="Organiser hele din jobsøgning med din personlige AI-assistent. CV, ansøgninger, jobmatch og interviewtræning samlet ét sted." />
<meta property="og:url" content="https://www.arbejd.com/" />
<meta property="og:image" content="https://www.arbejd.com/appicon.png" />
<meta property="og:image:alt" content="Arbejd.com logo" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Arbejd.com | Din hurtigste vej til dit næste job" />
<meta name="twitter:description" content="Organiser hele din jobsøgning med din personlige AI-assistent. CV, ansøgninger, jobmatch og interviewtræning samlet ét sted." />
<meta name="twitter:image" content="https://www.arbejd.com/appicon.png" />
<meta name="twitter:image:alt" content="Arbejd.com logo" />
<meta name="twitter:site" content="@arbejdcom" />
<meta name="twitter:creator" content="@arbejdcom" />
<link rel="canonical" href="https://www.arbejd.com/" />
<link rel="alternate" hreflang="da-DK" href="https://www.arbejd.com/" />
<link rel="alternate" hreflang="x-default" href="https://www.arbejd.com/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Arbejd.com | Din hurtigste vej til dit næste job</title> <title>Arbejd.com | Din hurtigste vej til dit næste job</title>
<script src="https://cdn.tailwindcss.com"></script> <script src="https://cdn.tailwindcss.com"></script>

View File

@@ -1,28 +0,0 @@
server {
listen 8080;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Never cache HTML entrypoint so new deploys are picked up immediately
location = /index.html {
try_files $uri =404;
add_header Cache-Control "no-store, no-cache, must-revalidate, max-age=0";
add_header Pragma "no-cache";
add_header Expires "0";
}
# Static assets
location /assets/ {
try_files $uri =404;
access_log off;
expires 30d;
add_header Cache-Control "public, max-age=2592000, immutable";
}
# Single-page app fallback
location / {
try_files $uri $uri/ /index.html;
}
}

View File

@@ -1 +1 @@
../baseline-browser-mapping/dist/cli.js ../baseline-browser-mapping/dist/cli.cjs

1
node_modules/.bin/loose-envify generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../loose-envify/cli.js

780
node_modules/.package-lock.json generated vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -1,43 +1,49 @@
{ {
"hash": "9f828600", "hash": "d64679c8",
"configHash": "e8c17b8b", "configHash": "8173562f",
"lockfileHash": "1dd2cb93", "lockfileHash": "b475d2d6",
"browserHash": "2551e78b", "browserHash": "41ef5122",
"optimized": { "optimized": {
"react": { "react": {
"src": "../../react/index.js", "src": "../../react/index.js",
"file": "react.js", "file": "react.js",
"fileHash": "32ad5d7a", "fileHash": "9cfcf420",
"needsInterop": true "needsInterop": true
}, },
"react-dom": { "react-dom": {
"src": "../../react-dom/index.js", "src": "../../react-dom/index.js",
"file": "react-dom.js", "file": "react-dom.js",
"fileHash": "529a1881", "fileHash": "b004db3a",
"needsInterop": true "needsInterop": true
}, },
"react/jsx-dev-runtime": { "react/jsx-dev-runtime": {
"src": "../../react/jsx-dev-runtime.js", "src": "../../react/jsx-dev-runtime.js",
"file": "react_jsx-dev-runtime.js", "file": "react_jsx-dev-runtime.js",
"fileHash": "602e9bcd", "fileHash": "d912a8ac",
"needsInterop": true "needsInterop": true
}, },
"react/jsx-runtime": { "react/jsx-runtime": {
"src": "../../react/jsx-runtime.js", "src": "../../react/jsx-runtime.js",
"file": "react_jsx-runtime.js", "file": "react_jsx-runtime.js",
"fileHash": "6e5c0fbb", "fileHash": "10b29ac6",
"needsInterop": true
},
"react-dom/client": {
"src": "../../react-dom/client.js",
"file": "react-dom_client.js",
"fileHash": "056eddc3",
"needsInterop": true "needsInterop": true
}, },
"lucide-react": { "lucide-react": {
"src": "../../lucide-react/dist/esm/lucide-react.js", "src": "../../lucide-react/dist/esm/lucide-react.js",
"file": "lucide-react.js", "file": "lucide-react.js",
"fileHash": "12698df0", "fileHash": "a6f95ae6",
"needsInterop": false
},
"react-dom/client": {
"src": "../../react-dom/client.js",
"file": "react-dom_client.js",
"fileHash": "d6b66b84",
"needsInterop": true
},
"react-helmet-async": {
"src": "../../react-helmet-async/lib/index.esm.js",
"file": "react-helmet-async.js",
"fileHash": "a1e28d83",
"needsInterop": false "needsInterop": false
} }
}, },

1148
node_modules/.vite/deps/react-helmet-async.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

7
node_modules/.vite/deps/react-helmet-async.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@@ -1,6 +1,6 @@
{ {
"name": "@esbuild/darwin-arm64", "name": "@esbuild/darwin-arm64",
"version": "0.27.3", "version": "0.27.4",
"description": "The macOS ARM 64-bit binary for esbuild, a JavaScript bundler.", "description": "The macOS ARM 64-bit binary for esbuild, a JavaScript bundler.",
"repository": { "repository": {
"type": "git", "type": "git",

View File

@@ -951,7 +951,7 @@ caseInsensitive = false } = {}) {
let endsWithSep = false; let endsWithSep = false;
let i = j; let i = j;
// Terminates with `i` at the non-inclusive end of the current segment. // Terminates with `i` at the non-inclusive end of the current segment.
for(; i < glob.length && !c.seps.includes(glob[i]); i++){ for(; i < glob.length && !(c.seps.includes(glob[i]) && groupStack.length === 0); i++){
if (inEscape) { if (inEscape) {
inEscape = false; inEscape = false;
const escapeChars = inRange ? RANGE_ESCAPE_CHARS : REG_EXP_ESCAPE_CHARS; const escapeChars = inRange ? RANGE_ESCAPE_CHARS : REG_EXP_ESCAPE_CHARS;
@@ -1224,7 +1224,7 @@ const constants = {
"(": ")", "(": ")",
"[": "]" "[": "]"
}; };
const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^[\\\]]+\]|\{[^{\\}]+\}|\(\?[:!=][^\\)]+\)|\([^(|]+\|[^\\)]+\))/; const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^[\\\]]+\]|\{[^{\\}]+\}|\(\?[:!=][^\\)]+\)|\([^(|]+\|[^\\)]+\)|@\([^)]+\))/;
if (str === "") { if (str === "") {
return false; return false;
} }

View File

@@ -1001,7 +1001,7 @@ function assertArgs(from, to) {
/** /**
* Return the relative path from `from` to `to` based on current working directory. * Return the relative path from `from` to `to` based on current working directory.
* *
* An example in windws, for instance: * An example in windows, for instance:
* from = 'C:\\orandea\\test\\aaa' * from = 'C:\\orandea\\test\\aaa'
* to = 'C:\\orandea\\impl\\bbb' * to = 'C:\\orandea\\impl\\bbb'
* The output of the function should be: '..\\..\\impl\\bbb' * The output of the function should be: '..\\..\\impl\\bbb'
@@ -1291,7 +1291,7 @@ caseInsensitive = false } = {}) {
let endsWithSep = false; let endsWithSep = false;
let i = j; let i = j;
// Terminates with `i` at the non-inclusive end of the current segment. // Terminates with `i` at the non-inclusive end of the current segment.
for(; i < glob.length && !c.seps.includes(glob[i]); i++){ for(; i < glob.length && !(c.seps.includes(glob[i]) && groupStack.length === 0); i++){
if (inEscape) { if (inEscape) {
inEscape = false; inEscape = false;
const escapeChars = inRange ? RANGE_ESCAPE_CHARS : REG_EXP_ESCAPE_CHARS; const escapeChars = inRange ? RANGE_ESCAPE_CHARS : REG_EXP_ESCAPE_CHARS;
@@ -1565,7 +1565,7 @@ const constants = {
"(": ")", "(": ")",
"[": "]" "[": "]"
}; };
const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^[\\\]]+\]|\{[^{\\}]+\}|\(\?[:!=][^\\)]+\)|\([^(|]+\|[^\\)]+\))/; const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^[\\\]]+\]|\{[^{\\}]+\}|\(\?[:!=][^\\)]+\)|\([^(|]+\|[^\\)]+\)|@\([^)]+\))/;
if (str === "") { if (str === "") {
return false; return false;
} }

View File

@@ -949,7 +949,7 @@ caseInsensitive = false } = {}) {
let endsWithSep = false; let endsWithSep = false;
let i = j; let i = j;
// Terminates with `i` at the non-inclusive end of the current segment. // Terminates with `i` at the non-inclusive end of the current segment.
for(; i < glob.length && !c.seps.includes(glob[i]); i++){ for(; i < glob.length && !(c.seps.includes(glob[i]) && groupStack.length === 0); i++){
if (inEscape) { if (inEscape) {
inEscape = false; inEscape = false;
const escapeChars = inRange ? RANGE_ESCAPE_CHARS : REG_EXP_ESCAPE_CHARS; const escapeChars = inRange ? RANGE_ESCAPE_CHARS : REG_EXP_ESCAPE_CHARS;
@@ -1222,7 +1222,7 @@ const constants = {
"(": ")", "(": ")",
"[": "]" "[": "]"
}; };
const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^[\\\]]+\]|\{[^{\\}]+\}|\(\?[:!=][^\\)]+\)|\([^(|]+\|[^\\)]+\))/; const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^[\\\]]+\]|\{[^{\\}]+\}|\(\?[:!=][^\\)]+\)|\([^(|]+\|[^\\)]+\)|@\([^)]+\))/;
if (str === "") { if (str === "") {
return false; return false;
} }

View File

@@ -999,7 +999,7 @@ function assertArgs(from, to) {
/** /**
* Return the relative path from `from` to `to` based on current working directory. * Return the relative path from `from` to `to` based on current working directory.
* *
* An example in windws, for instance: * An example in windows, for instance:
* from = 'C:\\orandea\\test\\aaa' * from = 'C:\\orandea\\test\\aaa'
* to = 'C:\\orandea\\impl\\bbb' * to = 'C:\\orandea\\impl\\bbb'
* The output of the function should be: '..\\..\\impl\\bbb' * The output of the function should be: '..\\..\\impl\\bbb'
@@ -1289,7 +1289,7 @@ caseInsensitive = false } = {}) {
let endsWithSep = false; let endsWithSep = false;
let i = j; let i = j;
// Terminates with `i` at the non-inclusive end of the current segment. // Terminates with `i` at the non-inclusive end of the current segment.
for(; i < glob.length && !c.seps.includes(glob[i]); i++){ for(; i < glob.length && !(c.seps.includes(glob[i]) && groupStack.length === 0); i++){
if (inEscape) { if (inEscape) {
inEscape = false; inEscape = false;
const escapeChars = inRange ? RANGE_ESCAPE_CHARS : REG_EXP_ESCAPE_CHARS; const escapeChars = inRange ? RANGE_ESCAPE_CHARS : REG_EXP_ESCAPE_CHARS;
@@ -1563,7 +1563,7 @@ const constants = {
"(": ")", "(": ")",
"[": "]" "[": "]"
}; };
const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^[\\\]]+\]|\{[^{\\}]+\}|\(\?[:!=][^\\)]+\)|\([^(|]+\|[^\\)]+\))/; const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^[\\\]]+\]|\{[^{\\}]+\}|\(\?[:!=][^\\)]+\)|\([^(|]+\|[^\\)]+\)|@\([^)]+\))/;
if (str === "") { if (str === "") {
return false; return false;
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@eslint/config-array", "name": "@eslint/config-array",
"version": "0.21.1", "version": "0.21.2",
"description": "General purpose glob-based configuration matching.", "description": "General purpose glob-based configuration matching.",
"author": "Nicholas C. Zakas", "author": "Nicholas C. Zakas",
"type": "module", "type": "module",
@@ -51,7 +51,7 @@
"dependencies": { "dependencies": {
"@eslint/object-schema": "^2.1.7", "@eslint/object-schema": "^2.1.7",
"debug": "^4.3.1", "debug": "^4.3.1",
"minimatch": "^3.1.2" "minimatch": "^3.1.5"
}, },
"devDependencies": { "devDependencies": {
"@jsr/std__path": "^1.0.4", "@jsr/std__path": "^1.0.4",

View File

@@ -135,10 +135,10 @@ The following companies, organizations, and individuals support ESLint's ongoing
to get your logo on our READMEs and [website](https://eslint.org/sponsors). to get your logo on our READMEs and [website](https://eslint.org/sponsors).
<h3>Platinum Sponsors</h3> <h3>Platinum Sponsors</h3>
<p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="128"></a></p><h3>Gold Sponsors</h3> <p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a></p><h3>Gold Sponsors</h3>
<p><a href="https://qlty.sh/"><img src="https://images.opencollective.com/qltysh/33d157d/logo.png" alt="Qlty Software" height="96"></a> <a href="https://shopify.engineering/"><img src="https://avatars.githubusercontent.com/u/8085" alt="Shopify" height="96"></a></p><h3>Silver Sponsors</h3> <p><a href="https://qlty.sh/"><img src="https://images.opencollective.com/qltysh/33d157d/logo.png" alt="Qlty Software" height="96"></a></p><h3>Silver Sponsors</h3>
<p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/e6d15e1/logo.png" alt="Vite" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/2d6c3b6/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301" alt="American Express" height="64"></a> <a href="https://stackblitz.com"><img src="https://avatars.githubusercontent.com/u/28635252" alt="StackBlitz" height="64"></a></p><h3>Bronze Sponsors</h3> <p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/d472863/logo.png" alt="Vite" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/2d6c3b6/logo.png" alt="Liftoff" height="64"></a> <a href="https://stackblitz.com"><img src="https://avatars.githubusercontent.com/u/28635252" alt="StackBlitz" height="64"></a></p><h3>Bronze Sponsors</h3>
<p><a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://syntax.fm"><img src="https://github.com/syntaxfm.png" alt="Syntax" height="32"></a> <a href="https://www.n-ix.com/"><img src="https://images.opencollective.com/n-ix-ltd/575a7a5/logo.png" alt="N-iX Ltd" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104" alt="Nx" height="32"></a> <a href="https://opensource.mercedes-benz.com/"><img src="https://avatars.githubusercontent.com/u/34240465" alt="Mercedes-Benz Group" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://www.lambdatest.com"><img src="https://avatars.githubusercontent.com/u/171592363" alt="LambdaTest" height="32"></a></p> <p><a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://opensource.sap.com"><img src="https://avatars.githubusercontent.com/u/2531208" alt="SAP" height="32"></a> <a href="https://www.crawljobs.com/"><img src="https://images.opencollective.com/crawljobs-poland/fa43a17/logo.png" alt="CrawlJobs" height="32"></a> <a href="https://depot.dev"><img src="https://images.opencollective.com/depot/39125a1/logo.png" alt="Depot" height="32"></a> <a href="https://www.n-ix.com/"><img src="https://images.opencollective.com/n-ix-ltd/575a7a5/logo.png" alt="N-iX Ltd" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://www.lambdatest.com"><img src="https://avatars.githubusercontent.com/u/171592363" alt="TestMu AI Open Source Office (Formerly LambdaTest)" height="32"></a></p>
<h3>Technology Sponsors</h3> <h3>Technology Sponsors</h3>
Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work. Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.
<p><a href="https://netlify.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/netlify-icon.svg" alt="Netlify" height="32"></a> <a href="https://algolia.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/algolia-icon.svg" alt="Algolia" height="32"></a> <a href="https://1password.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/1password-icon.svg" alt="1Password" height="32"></a></p> <p><a href="https://netlify.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/netlify-icon.svg" alt="Netlify" height="32"></a> <a href="https://algolia.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/algolia-icon.svg" alt="Algolia" height="32"></a> <a href="https://1password.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/1password-icon.svg" alt="1Password" height="32"></a></p>

View File

@@ -1,6 +1,6 @@
{ {
"name": "@eslint/eslintrc", "name": "@eslint/eslintrc",
"version": "3.3.3", "version": "3.3.5",
"description": "The legacy ESLintRC config file format for ESLint", "description": "The legacy ESLintRC config file format for ESLint",
"type": "module", "type": "module",
"main": "./dist/eslintrc.cjs", "main": "./dist/eslintrc.cjs",
@@ -62,14 +62,14 @@
"typescript": "^5.7.3" "typescript": "^5.7.3"
}, },
"dependencies": { "dependencies": {
"ajv": "^6.12.4", "ajv": "^6.14.0",
"debug": "^4.3.2", "debug": "^4.3.2",
"espree": "^10.0.1", "espree": "^10.0.1",
"globals": "^14.0.0", "globals": "^14.0.0",
"ignore": "^5.2.0", "ignore": "^5.2.0",
"import-fresh": "^3.2.1", "import-fresh": "^3.2.1",
"js-yaml": "^4.1.1", "js-yaml": "^4.1.1",
"minimatch": "^3.1.2", "minimatch": "^3.1.5",
"strip-json-comments": "^3.1.1" "strip-json-comments": "^3.1.1"
}, },
"engines": { "engines": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "@eslint/js", "name": "@eslint/js",
"version": "9.39.2", "version": "9.39.4",
"description": "ESLint JavaScript language implementation", "description": "ESLint JavaScript language implementation",
"funding": "https://eslint.org/donate", "funding": "https://eslint.org/donate",
"main": "./src/index.js", "main": "./src/index.js",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@rollup/rollup-darwin-arm64", "name": "@rollup/rollup-darwin-arm64",
"version": "4.57.1", "version": "4.59.0",
"os": [ "os": [
"darwin" "darwin"
], ],

2
node_modules/@types/node/README.md generated vendored
View File

@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v24. Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v24.
### Additional Details ### Additional Details
* Last updated: Tue, 10 Feb 2026 14:48:58 GMT * Last updated: Fri, 06 Mar 2026 05:19:15 GMT
* Dependencies: [undici-types](https://npmjs.com/package/undici-types) * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
# Credits # Credits

View File

@@ -5,6 +5,7 @@
* *
* ```js * ```js
* import { spawn } from 'node:child_process'; * import { spawn } from 'node:child_process';
* import { once } from 'node:events';
* const ls = spawn('ls', ['-lh', '/usr']); * const ls = spawn('ls', ['-lh', '/usr']);
* *
* ls.stdout.on('data', (data) => { * ls.stdout.on('data', (data) => {
@@ -15,9 +16,8 @@
* console.error(`stderr: ${data}`); * console.error(`stderr: ${data}`);
* }); * });
* *
* ls.on('close', (code) => { * const [code] = await once(ls, 'close');
* console.log(`child process exited with code ${code}`); * console.log(`child process exited with code ${code}`);
* });
* ``` * ```
* *
* By default, pipes for `stdin`, `stdout`, and `stderr` are established between * By default, pipes for `stdin`, `stdout`, and `stderr` are established between
@@ -719,6 +719,7 @@ declare module "child_process" {
* *
* ```js * ```js
* import { spawn } from 'node:child_process'; * import { spawn } from 'node:child_process';
* import { once } from 'node:events';
* const ls = spawn('ls', ['-lh', '/usr']); * const ls = spawn('ls', ['-lh', '/usr']);
* *
* ls.stdout.on('data', (data) => { * ls.stdout.on('data', (data) => {
@@ -729,9 +730,8 @@ declare module "child_process" {
* console.error(`stderr: ${data}`); * console.error(`stderr: ${data}`);
* }); * });
* *
* ls.on('close', (code) => { * const [code] = await once(ls, 'close');
* console.log(`child process exited with code ${code}`); * console.log(`child process exited with code ${code}`);
* });
* ``` * ```
* *
* Example: A very elaborate way to run `ps ax | grep ssh` * Example: A very elaborate way to run `ps ax | grep ssh`

16
node_modules/@types/node/crypto.d.ts generated vendored
View File

@@ -2709,12 +2709,12 @@ declare module "crypto" {
privateKey: T2; privateKey: T2;
} }
/** /**
* Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC, * Generates a new asymmetric key pair of the given `type`.
* Ed25519, Ed448, X25519, X448, DH, and ML-DSA are currently supported. * See the supported [asymmetric key types](https://nodejs.org/docs/latest-v24.x/api/crypto.html#asymmetric-key-types).
* *
* If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
* behaves as if `keyObject.export()` had been called on its result. Otherwise, * behaves as if {@link KeyObject.export `keyObject.export()`} had been called on its result. Otherwise,
* the respective part of the key is returned as a `KeyObject`. * the respective part of the key is returned as a {@link KeyObject `KeyObject`}.
* *
* When encoding public keys, it is recommended to use `'spki'`. When encoding * When encoding public keys, it is recommended to use `'spki'`. When encoding
* private keys, it is recommended to use `'pkcs8'` with a strong passphrase, * private keys, it is recommended to use `'pkcs8'` with a strong passphrase,
@@ -3007,12 +3007,12 @@ declare module "crypto" {
options?: SLHDSAKeyPairKeyObjectOptions, options?: SLHDSAKeyPairKeyObjectOptions,
): KeyPairKeyObjectResult; ): KeyPairKeyObjectResult;
/** /**
* Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC, * Generates a new asymmetric key pair of the given `type`.
* Ed25519, Ed448, X25519, X448, and DH are currently supported. * See the supported [asymmetric key types](https://nodejs.org/docs/latest-v24.x/api/crypto.html#asymmetric-key-types).
* *
* If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
* behaves as if `keyObject.export()` had been called on its result. Otherwise, * behaves as if {@link KeyObject.export `keyObject.export()`} had been called on its result. Otherwise,
* the respective part of the key is returned as a `KeyObject`. * the respective part of the key is returned as a {@link KeyObject `KeyObject`}.
* *
* It is recommended to encode public keys as `'spki'` and private keys as `'pkcs8'` with encryption for long-term storage: * It is recommended to encode public keys as `'spki'` and private keys as `'pkcs8'` with encryption for long-term storage:
* *

42
node_modules/@types/node/http.d.ts generated vendored
View File

@@ -357,6 +357,14 @@ declare module "http" {
* @since v18.17.0, v20.2.0 * @since v18.17.0, v20.2.0
*/ */
rejectNonStandardBodyWrites?: boolean | undefined; rejectNonStandardBodyWrites?: boolean | undefined;
/**
* If set to `true`, requests without `Content-Length` or `Transfer-Encoding` headers (indicating no body)
* will be initialized with an already-ended body stream, so they will never emit any stream events
* (like `'data'` or `'end'`). You can use `req.readableEnded` to detect this case.
* @default false
* @since v24.12.0
*/
optimizeEmptyRequests?: boolean | undefined;
} }
type RequestListener< type RequestListener<
Request extends typeof IncomingMessage = typeof IncomingMessage, Request extends typeof IncomingMessage = typeof IncomingMessage,
@@ -939,7 +947,7 @@ declare module "http" {
* been transmitted are equal or not. * been transmitted are equal or not.
* *
* Attempting to set a header field name or value that contains invalid characters * Attempting to set a header field name or value that contains invalid characters
* will result in a \[`Error`\]\[\] being thrown. * will result in a `Error` being thrown.
* @since v0.1.30 * @since v0.1.30
*/ */
writeHead( writeHead(
@@ -1020,6 +1028,7 @@ declare module "http" {
* *
* ```js * ```js
* import http from 'node:http'; * import http from 'node:http';
* const agent = new http.Agent({ keepAlive: true });
* *
* // Server has a 5 seconds keep-alive timeout by default * // Server has a 5 seconds keep-alive timeout by default
* http * http
@@ -1661,20 +1670,31 @@ declare module "http" {
/** /**
* Produces a socket/stream to be used for HTTP requests. * Produces a socket/stream to be used for HTTP requests.
* *
* By default, this function is the same as `net.createConnection()`. However, * By default, this function behaves identically to `net.createConnection()`, synchronously
* custom agents may override this method in case greater flexibility is desired. * returning the created socket. The optional `callback` parameter in the signature is not
* used by this default implementation.
* *
* A socket/stream can be supplied in one of two ways: by returning the * However, custom agents may override this method to provide greater flexibility,
* socket/stream from this function, or by passing the socket/stream to `callback`. * for example, to create sockets asynchronously. When overriding `createConnection`:
* *
* This method is guaranteed to return an instance of the `net.Socket` class, * 1. **Synchronous socket creation**: The overriding method can return the socket/stream directly.
* a subclass of `stream.Duplex`, unless the user specifies a socket * 2. **Asynchronous socket creation**: The overriding method can accept the `callback` and pass
* type other than `net.Socket`. * the created socket/stream to it (e.g., `callback(null, newSocket)`). If an error occurs during
* socket creation, it should be passed as the first argument to the `callback` (e.g., `callback(err)`).
* *
* `callback` has a signature of `(err, stream)`. * The agent will call the provided `createConnection` function with `options` and this internal
* `callback`. The `callback` provided by the agent has a signature of `(err, stream)`.
* @since v0.11.4 * @since v0.11.4
* @param options Options containing connection details. Check `createConnection` for the format of the options * @param options Options containing connection details. Check `net.createConnection()`
* @param callback Callback function that receives the created socket * for the format of the options. For custom agents, this object is passed
* to the custom `createConnection` function.
* @param callback (Optional, primarily for custom agents) A function to be called by a custom
* `createConnection` implementation when the socket is created, especially for
* asynchronous operations.
* @returns `stream.Duplex` The created socket. This is returned by the default implementation
* or by a custom synchronous `createConnection` implementation. If a
* custom `createConnection` uses the `callback` for asynchronous operation,
* this return value might not be the primary way to obtain the socket.
*/ */
createConnection( createConnection(
options: ClientRequestArgs, options: ClientRequestArgs,

View File

@@ -25,6 +25,12 @@ declare module "https" {
} }
/** /**
* An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information. * An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information.
*
* Like `http.Agent`, the `createConnection(options[, callback])` method can be overridden to customize
* how TLS connections are established.
*
* > See [`agent.createConnection()`](https://nodejs.org/docs/latest-v24.x/api/http.html#agentcreateconnectionoptions-callback)
* for details on overriding this method, including asynchronous socket creation with a callback.
* @since v0.4.5 * @since v0.4.5
*/ */
class Agent extends http.Agent { class Agent extends http.Agent {

View File

@@ -1791,6 +1791,18 @@ declare module "inspector" {
*/ */
headers: Headers; headers: Headers;
} }
interface EnableParameterType {
/**
* Buffer size in bytes to use when preserving network payloads (XHRs, etc).
* @experimental
*/
maxTotalBufferSize?: number | undefined;
/**
* Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).
* @experimental
*/
maxResourceBufferSize?: number | undefined;
}
interface GetRequestPostDataParameterType { interface GetRequestPostDataParameterType {
/** /**
* Identifier of the network request to get content for. * Identifier of the network request to get content for.
@@ -2379,6 +2391,7 @@ declare module "inspector" {
/** /**
* Enables network tracking, network events will now be delivered to the client. * Enables network tracking, network events will now be delivered to the client.
*/ */
post(method: "Network.enable", params?: Network.EnableParameterType, callback?: (err: Error | null) => void): void;
post(method: "Network.enable", callback?: (err: Error | null) => void): void; post(method: "Network.enable", callback?: (err: Error | null) => void): void;
/** /**
* Returns post data sent with the request. Returns an error when no data was sent with the request. * Returns post data sent with the request. Returns an error when no data was sent with the request.
@@ -3477,7 +3490,7 @@ declare module "inspector/promises" {
/** /**
* Enables network tracking, network events will now be delivered to the client. * Enables network tracking, network events will now be delivered to the client.
*/ */
post(method: "Network.enable"): Promise<void>; post(method: "Network.enable", params?: Network.EnableParameterType): Promise<void>;
/** /**
* Returns post data sent with the request. Returns an error when no data was sent with the request. * Returns post data sent with the request. Returns an error when no data was sent with the request.
*/ */

43
node_modules/@types/node/module.d.ts generated vendored
View File

@@ -80,37 +80,48 @@ declare module "module" {
*/ */
directory?: string; directory?: string;
} }
interface EnableCompileCacheOptions {
/**
* Optional. Directory to store the compile cache. If not specified, the directory specified by
* the [`NODE_COMPILE_CACHE=dir`](https://nodejs.org/docs/latest-v24.x/api/cli.html#node_compile_cachedir)
* environment variable will be used if it's set, or `path.join(os.tmpdir(), 'node-compile-cache')` otherwise.
* @since v24.12.0
*/
directory?: string | undefined;
/**
* Optional. If `true`, enables portable compile cache so that the cache can be reused even if the project directory
* is moved. This is a best-effort feature. If not specified, it will depend on whether the environment variable
* [NODE_COMPILE_CACHE_PORTABLE=1](https://nodejs.org/docs/latest-v24.x/api/cli.html#node_compile_cache_portable1) is set.
* @since v24.12.0
*/
portable?: boolean | undefined;
}
/** /**
* Enable [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache) * Enable [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache)
* in the current Node.js instance. * in the current Node.js instance.
* *
* If `cacheDir` is not specified, Node.js will either use the directory specified by the * For general use cases, it's recommended to call `module.enableCompileCache()` without specifying the
* `NODE_COMPILE_CACHE=dir` environment variable if it's set, or use * `options.directory`, so that the directory can be overridden by the `NODE_COMPILE_CACHE` environment
* `path.join(os.tmpdir(), 'node-compile-cache')` otherwise. For general use cases, it's
* recommended to call `module.enableCompileCache()` without specifying the `cacheDir`,
* so that the directory can be overridden by the `NODE_COMPILE_CACHE` environment
* variable when necessary. * variable when necessary.
* *
* Since compile cache is supposed to be a quiet optimization that is not required for the * Since compile cache is supposed to be a optimization that is not mission critical, this method is
* application to be functional, this method is designed to not throw any exception when the * designed to not throw any exception when the compile cache cannot be enabled. Instead, it will return
* compile cache cannot be enabled. Instead, it will return an object containing an error * an object containing an error message in the `message` field to aid debugging. If compile cache is
* message in the `message` field to aid debugging. * enabled successfully, the `directory` field in the returned object contains the path to the directory
* If compile cache is enabled successfully, the `directory` field in the returned object * where the compile cache is stored. The `status` field in the returned object would be one of the
* contains the path to the directory where the compile cache is stored. The `status` * `module.constants.compileCacheStatus` values to indicate the result of the attempt to enable the
* field in the returned object would be one of the `module.constants.compileCacheStatus`
* values to indicate the result of the attempt to enable the
* [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache). * [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache).
* *
* This method only affects the current Node.js instance. To enable it in child worker threads, * This method only affects the current Node.js instance. To enable it in child worker threads,
* either call this method in child worker threads too, or set the * either call this method in child worker threads too, or set the
* `process.env.NODE_COMPILE_CACHE` value to compile cache directory so the behavior can * `process.env.NODE_COMPILE_CACHE` value to compile cache directory so the behavior can
* be inherited into the child workers. The directory can be obtained either from the * be inherited into the child workers. The directory can be obtained either from the
* `directory` field returned by this method, or with {@link getCompileCacheDir}. * `directory` field returned by this method, or with {@link getCompileCacheDir `module.getCompileCacheDir()`}.
* @since v22.8.0 * @since v22.8.0
* @param cacheDir Optional path to specify the directory where the compile cache * @param options Optional. If a string is passed, it is considered to be `options.directory`.
* will be stored/retrieved. * will be stored/retrieved.
*/ */
function enableCompileCache(cacheDir?: string): EnableCompileCacheResult; function enableCompileCache(options?: string | EnableCompileCacheOptions): EnableCompileCacheResult;
/** /**
* Flush the [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache) * Flush the [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache)
* accumulated from modules already loaded * accumulated from modules already loaded

View File

@@ -1,6 +1,6 @@
{ {
"name": "@types/node", "name": "@types/node",
"version": "24.10.13", "version": "24.12.0",
"description": "TypeScript definitions for node", "description": "TypeScript definitions for node",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
"license": "MIT", "license": "MIT",
@@ -150,6 +150,6 @@
"undici-types": "~7.16.0" "undici-types": "~7.16.0"
}, },
"peerDependencies": {}, "peerDependencies": {},
"typesPublisherContentHash": "2ec3065bf306401d19db2ee65619ca53b48d5461db1133c7eeb53d407b8dcbc8", "typesPublisherContentHash": "2bd5c87e6ae2c44201cb3aab9e54edcee1ed9555c740d1b7788d5f9e9defded9",
"typeScriptVersion": "5.2" "typeScriptVersion": "5.2"
} }

View File

@@ -200,14 +200,6 @@ declare module "perf_hooks" {
active: number; active: number;
utilization: number; utilization: number;
} }
/**
* @param utilization1 The result of a previous call to `eventLoopUtilization()`.
* @param utilization2 The result of a previous call to `eventLoopUtilization()` prior to `utilization1`.
*/
type EventLoopUtilityFunction = (
utilization1?: EventLoopUtilization,
utilization2?: EventLoopUtilization,
) => EventLoopUtilization;
interface MarkOptions { interface MarkOptions {
/** /**
* Additional optional detail to include with the mark. * Additional optional detail to include with the mark.
@@ -264,11 +256,19 @@ declare module "perf_hooks" {
*/ */
clearResourceTimings(name?: string): void; clearResourceTimings(name?: string): void;
/** /**
* eventLoopUtilization is similar to CPU utilization except that it is calculated using high precision wall-clock time. * This is an alias of `perf_hooks.eventLoopUtilization()`.
* It represents the percentage of time the event loop has spent outside the event loop's event provider (e.g. epoll_wait). *
* No other CPU idle time is taken into consideration. * _This property is an extension by Node.js. It is not available in Web browsers._
* @since v14.10.0, v12.19.0
* @param utilization1 The result of a previous call to
* `eventLoopUtilization()`.
* @param utilization2 The result of a previous call to
* `eventLoopUtilization()` prior to `utilization1`.
*/ */
eventLoopUtilization: EventLoopUtilityFunction; eventLoopUtilization(
utilization1?: EventLoopUtilization,
utilization2?: EventLoopUtilization,
): EventLoopUtilization;
/** /**
* Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`. * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`.
* If you are only interested in performance entries of certain types or that have certain names, see * If you are only interested in performance entries of certain types or that have certain names, see
@@ -371,41 +371,12 @@ declare module "perf_hooks" {
*/ */
readonly timeOrigin: number; readonly timeOrigin: number;
/** /**
* This is an alias of `perf_hooks.timerify()`.
*
* _This property is an extension by Node.js. It is not available in Web browsers._ * _This property is an extension by Node.js. It is not available in Web browsers._
* * @since v8.5.0
* Wraps a function within a new function that measures the running time of the wrapped function.
* A `PerformanceObserver` must be subscribed to the `'function'` event type in order for the timing details to be accessed.
*
* ```js
* import {
* performance,
* PerformanceObserver,
* } from 'node:perf_hooks';
*
* function someFunction() {
* console.log('hello world');
* }
*
* const wrapped = performance.timerify(someFunction);
*
* const obs = new PerformanceObserver((list) => {
* console.log(list.getEntries()[0].duration);
*
* performance.clearMarks();
* performance.clearMeasures();
* obs.disconnect();
* });
* obs.observe({ entryTypes: ['function'] });
*
* // A performance timeline entry will be created
* wrapped();
* ```
*
* If the wrapped function returns a promise, a finally handler will be attached to the promise and the duration will be reported
* once the finally handler is invoked.
* @param fn
*/ */
timerify<T extends (...params: any[]) => any>(fn: T, options?: TimerifyOptions): T; timerify<T extends (...args: any[]) => any>(fn: T, options?: TimerifyOptions): T;
/** /**
* An object which is JSON representation of the performance object. It is similar to * An object which is JSON representation of the performance object. It is similar to
* [`window.performance.toJSON`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/toJSON) in browsers. * [`window.performance.toJSON`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/toJSON) in browsers.
@@ -844,6 +815,83 @@ declare module "perf_hooks" {
*/ */
add(other: RecordableHistogram): void; add(other: RecordableHistogram): void;
} }
interface CreateHistogramOptions {
/**
* The lowest discernible value. Must be an integer value greater than 0.
* @default 1
*/
lowest?: number | bigint | undefined;
/**
* The highest recordable value. Must be an integer value that is equal to
* or greater than two times `lowest`.
* @default Number.MAX_SAFE_INTEGER
*/
highest?: number | bigint | undefined;
/**
* The number of accuracy digits. Must be a number between `1` and `5`.
* @default 3
*/
figures?: number | undefined;
}
/**
* Returns a {@link RecordableHistogram `RecordableHistogram`}.
* @since v15.9.0, v14.18.0
*/
function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
/**
* The `eventLoopUtilization()` function returns an object that contains the
* cumulative duration of time the event loop has been both idle and active as a
* high resolution milliseconds timer. The `utilization` value is the calculated
* Event Loop Utilization (ELU).
*
* If bootstrapping has not yet finished on the main thread the properties have
* the value of `0`. The ELU is immediately available on
* [Worker threads](https://nodejs.org/docs/latest-v24.x/api/worker_threads.html#worker-threads)
* since bootstrap happens within the event loop.
*
* Both `utilization1` and `utilization2` are optional parameters.
*
* If `utilization1` is passed, then the delta between the current call's `active`
* and `idle` times, as well as the corresponding `utilization` value are
* calculated and returned (similar to `process.hrtime()`).
*
* If `utilization1` and `utilization2` are both passed, then the delta is
* calculated between the two arguments. This is a convenience option because,
* unlike `process.hrtime()`, calculating the ELU is more complex than a
* single subtraction.
*
* ELU is similar to CPU utilization, except that it only measures event loop
* statistics and not CPU usage. It represents the percentage of time the event
* loop has spent outside the event loop's event provider (e.g. `epoll_wait`).
* No other CPU idle time is taken into consideration. The following is an example
* of how a mostly idle process will have a high ELU.
*
* ```js
* import { eventLoopUtilization } from 'node:perf_hooks';
* import { spawnSync } from 'node:child_process';
*
* setImmediate(() => {
* const elu = eventLoopUtilization();
* spawnSync('sleep', ['5']);
* console.log(eventLoopUtilization(elu).utilization);
* });
* ```
*
* Although the CPU is mostly idle while running this script, the value of `utilization`
* is `1`. This is because the call to `child_process.spawnSync()` blocks the event loop
* from proceeding.
*
* Passing in a user-defined object instead of the result of a previous call to
* `eventLoopUtilization()` will lead to undefined behavior. The return values are not
* guaranteed to reflect any correct state of the event loop.
* @since v24.12.0
* @param utilization1 The result of a previous call to `eventLoopUtilization()`.
* @param utilization2 The result of a previous call to `eventLoopUtilization()` prior to `utilization1`.
*/
function eventLoopUtilization(
utilization1?: EventLoopUtilization,
utilization2?: EventLoopUtilization,
): EventLoopUtilization;
/** /**
* _This property is an extension by Node.js. It is not available in Web browsers._ * _This property is an extension by Node.js. It is not available in Web browsers._
* *
@@ -873,28 +921,40 @@ declare module "perf_hooks" {
* @since v11.10.0 * @since v11.10.0
*/ */
function monitorEventLoopDelay(options?: EventLoopMonitorOptions): IntervalHistogram; function monitorEventLoopDelay(options?: EventLoopMonitorOptions): IntervalHistogram;
interface CreateHistogramOptions {
/** /**
* The minimum recordable value. Must be an integer value greater than 0. * _This property is an extension by Node.js. It is not available in Web browsers._
* @default 1 *
* Wraps a function within a new function that measures the running time of the
* wrapped function. A `PerformanceObserver` must be subscribed to the `'function'`
* event type in order for the timing details to be accessed.
*
* ```js
* import { timerify, performance, PerformanceObserver } from 'node:perf_hooks';
*
* function someFunction() {
* console.log('hello world');
* }
*
* const wrapped = timerify(someFunction);
*
* const obs = new PerformanceObserver((list) => {
* console.log(list.getEntries()[0].duration);
*
* performance.clearMarks();
* performance.clearMeasures();
* obs.disconnect();
* });
* obs.observe({ entryTypes: ['function'] });
*
* // A performance timeline entry will be created
* wrapped();
* ```
*
* If the wrapped function returns a promise, a finally handler will be attached
* to the promise and the duration will be reported once the finally handler is invoked.
* @since v24.12.0
*/ */
lowest?: number | bigint | undefined; function timerify<T extends (...params: any[]) => any>(fn: T, options?: TimerifyOptions): T;
/**
* The maximum recordable value. Must be an integer value greater than min.
* @default Number.MAX_SAFE_INTEGER
*/
highest?: number | bigint | undefined;
/**
* The number of accuracy digits. Must be a number between 1 and 5.
* @default 3
*/
figures?: number | undefined;
}
/**
* Returns a `RecordableHistogram`.
* @since v15.9.0, v14.18.0
*/
function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
import { import {
performance as _performance, performance as _performance,
PerformanceEntry as _PerformanceEntry, PerformanceEntry as _PerformanceEntry,

View File

@@ -235,7 +235,7 @@ declare module "process" {
/** /**
* A value that is `"strip"` by default, * A value that is `"strip"` by default,
* `"transform"` if Node.js is run with `--experimental-transform-types`, and `false` if * `"transform"` if Node.js is run with `--experimental-transform-types`, and `false` if
* Node.js is run with `--no-experimental-strip-types`. * Node.js is run with `--no-strip-types`.
* @since v22.10.0 * @since v22.10.0
*/ */
readonly typescript: "strip" | "transform" | false; readonly typescript: "strip" | "transform" | false;
@@ -344,12 +344,7 @@ declare module "process" {
isTTY?: true | undefined; isTTY?: true | undefined;
} }
// Alias for compatibility // Alias for compatibility
interface ProcessEnv extends Dict<string> { interface ProcessEnv extends Dict<string> {}
/**
* Can be used to change the default timezone at runtime
*/
TZ?: string | undefined;
}
interface HRTime { interface HRTime {
/** /**
* This is the legacy version of {@link process.hrtime.bigint()} * This is the legacy version of {@link process.hrtime.bigint()}

41
node_modules/@types/node/sqlite.d.ts generated vendored
View File

@@ -6,12 +6,7 @@
* import sqlite from 'node:sqlite'; * import sqlite from 'node:sqlite';
* ``` * ```
* *
* This module is only available under the `node:` scheme. The following will not * This module is only available under the `node:` scheme.
* work:
*
* ```js
* import sqlite from 'sqlite';
* ```
* *
* The following example shows the basic usage of the `node:sqlite` module to open * The following example shows the basic usage of the `node:sqlite` module to open
* an in-memory database, write data to the database, and then read the data back. * an in-memory database, write data to the database, and then read the data back.
@@ -123,6 +118,14 @@ declare module "node:sqlite" {
* @default false * @default false
*/ */
allowUnknownNamedParameters?: boolean | undefined; allowUnknownNamedParameters?: boolean | undefined;
/**
* If `true`, enables the defensive flag. When the defensive flag is enabled,
* language features that allow ordinary SQL to deliberately corrupt the database
* file are disabled. The defensive flag can also be set using `enableDefensive()`.
* @since v24.12.0
* @default true
*/
defensive?: boolean | undefined;
} }
interface CreateSessionOptions { interface CreateSessionOptions {
/** /**
@@ -294,6 +297,16 @@ declare module "node:sqlite" {
* @param allow Whether to allow loading extensions. * @param allow Whether to allow loading extensions.
*/ */
enableLoadExtension(allow: boolean): void; enableLoadExtension(allow: boolean): void;
/**
* Enables or disables the defensive flag. When the defensive flag is active,
* language features that allow ordinary SQL to deliberately corrupt the
* database file are disabled.
* See [`SQLITE_DBCONFIG_DEFENSIVE`](https://www.sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigdefensive)
* in the SQLite documentation for details.
* @since v24.12.0
* @param active Whether to set the defensive flag.
*/
enableDefensive(active: boolean): void;
/** /**
* This method is a wrapper around [`sqlite3_db_filename()`](https://sqlite.org/c3ref/db_filename.html) * This method is a wrapper around [`sqlite3_db_filename()`](https://sqlite.org/c3ref/db_filename.html)
* @since v24.0.0 * @since v24.0.0
@@ -413,7 +426,7 @@ declare module "node:sqlite" {
*/ */
prepare(sql: string): StatementSync; prepare(sql: string): StatementSync;
/** /**
* Creates a new `SQLTagStore`, which is an LRU (Least Recently Used) cache for * Creates a new {@link SQLTagStore `SQLTagStore`}, which is an LRU (Least Recently Used) cache for
* storing prepared statements. This allows for the efficient reuse of prepared * storing prepared statements. This allows for the efficient reuse of prepared
* statements by tagging them with a unique identifier. * statements by tagging them with a unique identifier.
* *
@@ -427,7 +440,7 @@ declare module "node:sqlite" {
* import { DatabaseSync } from 'node:sqlite'; * import { DatabaseSync } from 'node:sqlite';
* *
* const db = new DatabaseSync(':memory:'); * const db = new DatabaseSync(':memory:');
* const sql = db.createSQLTagStore(); * const sql = db.createTagStore();
* *
* db.exec('CREATE TABLE users (id INT, name TEXT)'); * db.exec('CREATE TABLE users (id INT, name TEXT)');
* *
@@ -450,6 +463,7 @@ declare module "node:sqlite" {
* // ] * // ]
* ``` * ```
* @since v24.9.0 * @since v24.9.0
* @param maxSize The maximum number of prepared statements to cache. **Default**: `1000`.
* @returns A new SQL tag store for caching prepared statements. * @returns A new SQL tag store for caching prepared statements.
*/ */
createTagStore(maxSize?: number): SQLTagStore; createTagStore(maxSize?: number): SQLTagStore;
@@ -468,6 +482,8 @@ declare module "node:sqlite" {
* [`sqlite3changeset_apply()`](https://www.sqlite.org/session/sqlite3changeset_apply.html). * [`sqlite3changeset_apply()`](https://www.sqlite.org/session/sqlite3changeset_apply.html).
* *
* ```js * ```js
* import { DatabaseSync } from 'node:sqlite';
*
* const sourceDb = new DatabaseSync(':memory:'); * const sourceDb = new DatabaseSync(':memory:');
* const targetDb = new DatabaseSync(':memory:'); * const targetDb = new DatabaseSync(':memory:');
* *
@@ -525,19 +541,24 @@ declare module "node:sqlite" {
* [`sqlite3session_delete()`](https://www.sqlite.org/session/sqlite3session_delete.html). * [`sqlite3session_delete()`](https://www.sqlite.org/session/sqlite3session_delete.html).
*/ */
close(): void; close(): void;
/**
* Closes the session. If the session is already closed, does nothing.
* @since v24.9.0
*/
[Symbol.dispose](): void;
} }
/** /**
* This class represents a single LRU (Least Recently Used) cache for storing * This class represents a single LRU (Least Recently Used) cache for storing
* prepared statements. * prepared statements.
* *
* Instances of this class are created via the database.createSQLTagStore() method, * Instances of this class are created via the database.createTagStore() method,
* not by using a constructor. The store caches prepared statements based on the * not by using a constructor. The store caches prepared statements based on the
* provided SQL query string. When the same query is seen again, the store * provided SQL query string. When the same query is seen again, the store
* retrieves the cached statement and safely applies the new values through * retrieves the cached statement and safely applies the new values through
* parameter binding, thereby preventing attacks like SQL injection. * parameter binding, thereby preventing attacks like SQL injection.
* *
* The cache has a maxSize that defaults to 1000 statements, but a custom size can * The cache has a maxSize that defaults to 1000 statements, but a custom size can
* be provided (e.g., database.createSQLTagStore(100)). All APIs exposed by this * be provided (e.g., database.createTagStore(100)). All APIs exposed by this
* class execute synchronously. * class execute synchronously.
* @since v24.9.0 * @since v24.9.0
*/ */

14
node_modules/@types/node/tls.d.ts generated vendored
View File

@@ -15,31 +15,31 @@ declare module "tls" {
import * as stream from "stream"; import * as stream from "stream";
const CLIENT_RENEG_LIMIT: number; const CLIENT_RENEG_LIMIT: number;
const CLIENT_RENEG_WINDOW: number; const CLIENT_RENEG_WINDOW: number;
interface Certificate { interface Certificate extends NodeJS.Dict<string | string[]> {
/** /**
* Country code. * Country code.
*/ */
C: string; C?: string | string[];
/** /**
* Street. * Street.
*/ */
ST: string; ST?: string | string[];
/** /**
* Locality. * Locality.
*/ */
L: string; L?: string | string[];
/** /**
* Organization. * Organization.
*/ */
O: string; O?: string | string[];
/** /**
* Organizational unit. * Organizational unit.
*/ */
OU: string; OU?: string | string[];
/** /**
* Common name. * Common name.
*/ */
CN: string; CN?: string | string[];
} }
interface PeerCertificate { interface PeerCertificate {
/** /**

4
node_modules/@types/node/url.d.ts generated vendored
View File

@@ -80,7 +80,7 @@ declare module "url" {
* function getURL(req) { * function getURL(req) {
* const proto = req.headers['x-forwarded-proto'] || 'https'; * const proto = req.headers['x-forwarded-proto'] || 'https';
* const host = req.headers['x-forwarded-host'] || req.headers.host || 'example.com'; * const host = req.headers['x-forwarded-host'] || req.headers.host || 'example.com';
* return new URL(req.url || '/', `${proto}://${host}`); * return new URL(`${proto}://${host}${req.url || '/'}`);
* } * }
* ``` * ```
* *
@@ -90,7 +90,7 @@ declare module "url" {
* *
* ```js * ```js
* function getURL(req) { * function getURL(req) {
* return new URL(req.url || '/', 'https://example.com'); * return new URL(`https://example.com${req.url || '/'}`);
* } * }
* ``` * ```
* @since v0.1.25 * @since v0.1.25

10
node_modules/@types/node/util.d.ts generated vendored
View File

@@ -792,6 +792,14 @@ declare module "util" {
*/ */
export function debuglog(section: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger; export function debuglog(section: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger;
export { debuglog as debug }; export { debuglog as debug };
export interface DeprecateOptions {
/**
* When false do not change the prototype of object while emitting the deprecation warning.
* @since v24.12.0
* @default true
*/
modifyPrototype?: boolean | undefined;
}
/** /**
* The `util.deprecate()` method wraps `fn` (which may be a function or class) in * The `util.deprecate()` method wraps `fn` (which may be a function or class) in
* such a way that it is marked as deprecated. * such a way that it is marked as deprecated.
@@ -852,7 +860,7 @@ declare module "util" {
* @param code A deprecation code. See the `list of deprecated APIs` for a list of codes. * @param code A deprecation code. See the `list of deprecated APIs` for a list of codes.
* @return The deprecated function wrapped to emit a warning. * @return The deprecated function wrapped to emit a warning.
*/ */
export function deprecate<T extends Function>(fn: T, msg: string, code?: string): T; export function deprecate<T extends Function>(fn: T, msg: string, code?: string, options?: DeprecateOptions): T;
export interface IsDeepStrictEqualOptions { export interface IsDeepStrictEqualOptions {
/** /**
* If `true`, prototype and constructor * If `true`, prototype and constructor

26
node_modules/@types/node/v8.d.ts generated vendored
View File

@@ -401,6 +401,21 @@ declare module "v8" {
* @since v12.8.0 * @since v12.8.0
*/ */
function getHeapCodeStatistics(): HeapCodeStatistics; function getHeapCodeStatistics(): HeapCodeStatistics;
/**
* @since v24.12.0
*/
interface SyncCPUProfileHandle {
/**
* Stopping collecting the profile and return the profile data.
* @since v24.12.0
*/
stop(): string;
/**
* Stopping collecting the profile and the profile will be discarded.
* @since v24.12.0
*/
[Symbol.dispose](): void;
}
/** /**
* @since v24.8.0 * @since v24.8.0
*/ */
@@ -466,6 +481,17 @@ declare module "v8" {
* @since v23.10.0, v22.15.0 * @since v23.10.0, v22.15.0
*/ */
function isStringOneByteRepresentation(content: string): boolean; function isStringOneByteRepresentation(content: string): boolean;
/**
* Starting a CPU profile then return a `SyncCPUProfileHandle` object. This API supports `using` syntax.
*
* ```js
* const handle = v8.startCpuProfile();
* const profile = handle.stop();
* console.log(profile);
* ```
* @since v24.12.0
*/
function startCpuProfile(): SyncCPUProfileHandle;
/** /**
* @since v8.0.0 * @since v8.0.0
*/ */

39
node_modules/@types/node/vm.d.ts generated vendored
View File

@@ -748,8 +748,8 @@ declare module "vm" {
* // The "secret" variable refers to the global variable we added to * // The "secret" variable refers to the global variable we added to
* // "contextifiedObject" when creating the context. * // "contextifiedObject" when creating the context.
* export default secret; * export default secret;
* `, { context: referencingModule.context }); * `, { context: module.context });
* moduleMap.set(specifier, linkedModule); * moduleMap.set(specifier, requestedModule);
* // Resolve the dependencies of the new module as well. * // Resolve the dependencies of the new module as well.
* resolveAndLinkDependencies(requestedModule); * resolveAndLinkDependencies(requestedModule);
* } * }
@@ -819,19 +819,34 @@ declare module "vm" {
*/ */
status: ModuleStatus; status: ModuleStatus;
/** /**
* Evaluate the module. * Evaluate the module and its depenendencies. Corresponds to the [Evaluate() concrete method](https://tc39.es/ecma262/#sec-moduleevaluation)
* field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records)s in the ECMAScript specification.
* *
* This must be called after the module has been linked; otherwise it will reject. * If the module is a `vm.SourceTextModule`, `evaluate()` must be called after the module has been instantiated;
* It could be called also when the module has already been evaluated, in which * otherwise `evaluate()` will return a rejected promise.
* case it will either do nothing if the initial evaluation ended in success
* (`module.status` is `'evaluated'`) or it will re-throw the exception that the
* initial evaluation resulted in (`module.status` is `'errored'`).
* *
* This method cannot be called while the module is being evaluated * For a `vm.SourceTextModule`, the promise returned by `evaluate()` may be fulfilled either synchronously or asynchronously:
* (`module.status` is `'evaluating'`). * 1. If the `vm.SourceTextModule` has no top-level `await` in itself or any of its dependencies, the promise will be
* fulfilled synchronously after the module and all its dependencies have been evaluated.
* 1. If the evaluation succeeds, the promise will be _synchronously_ resolved to `undefined`.
* 2. If the evaluation results in an exception, the promise will be _synchronously_ rejected with the exception that causes the evaluation to fail, which is the same as `module.error`.
* 2. If the `vm.SourceTextModule` has top-level `await` in itself or any of its dependencies, the promise will be fulfilled asynchronously after the module and all its dependencies have been evaluated.
* 1. If the evaluation succeeds, the promise will be _asynchronously_ resolved to `undefined`.
* 2. If the evaluation results in an exception, the promise will be _asynchronously_ rejected with the exception that causes the evaluation to fail.
* *
* Corresponds to the [Evaluate() concrete method](https://tc39.es/ecma262/#sec-moduleevaluation) field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) s in the * If the module is a `vm.SyntheticModule`, `evaluate()` always returns a promise that fulfills synchronously,
* ECMAScript specification. * see the specification of [Evaluate() of a Synthetic Module Record](https://tc39.es/ecma262/#sec-smr-Evaluate):
* 1. If the `evaluateCallback` passed to its constructor throws an exception synchronously, `evaluate()` returns a promise that will be synchronously rejected with that exception.
* 2. If the `evaluateCallback` does not throw an exception, `evaluate()` returns a promise that will be synchronously resolved to `undefined`.
*
* The `evaluateCallback` of a `vm.SyntheticModule` is executed synchronously within the `evaluate()` call, and its return value is discarded. This means if `evaluateCallback` is an asynchronous function, the promise
* returned by `evaluate()` will not reflect its asynchronous behavior, and any rejections from an asynchronous `evaluateCallback` will be lost.
*
* evaluate() could also be called again after the module has already been evaluated, in which case:
* 1. If the initial evaluation ended in success (`module.status` is `'evaluated'`), it will do nothing and return a promise that resolves to `undefined`.
* 2. If the initial evaluation resulted in an exception (`module.status` is `'errored'`), it will re-reject the exception that the initial evaluation resulted in.
*
* This method cannot be called while the module is being evaluated (`module.status` is `'evaluating'`).
* @return Fulfills with `undefined` upon success. * @return Fulfills with `undefined` upon success.
*/ */
evaluate(options?: ModuleEvaluateOptions): Promise<void>; evaluate(options?: ModuleEvaluateOptions): Promise<void>;

View File

@@ -3,7 +3,7 @@
* JavaScript in parallel. To access it: * JavaScript in parallel. To access it:
* *
* ```js * ```js
* import worker from 'node:worker_threads'; * import worker_threads from 'node:worker_threads';
* ``` * ```
* *
* Workers (threads) are useful for performing CPU-intensive JavaScript operations. * Workers (threads) are useful for performing CPU-intensive JavaScript operations.
@@ -57,8 +57,8 @@
declare module "worker_threads" { declare module "worker_threads" {
import { Context } from "node:vm"; import { Context } from "node:vm";
import { EventEmitter, NodeEventTarget } from "node:events"; import { EventEmitter, NodeEventTarget } from "node:events";
import { EventLoopUtilityFunction } from "node:perf_hooks";
import { FileHandle } from "node:fs/promises"; import { FileHandle } from "node:fs/promises";
import { Performance } from "node:perf_hooks";
import { Readable, Writable } from "node:stream"; import { Readable, Writable } from "node:stream";
import { ReadableStream, TransformStream, WritableStream } from "node:stream/web"; import { ReadableStream, TransformStream, WritableStream } from "node:stream/web";
import { URL } from "node:url"; import { URL } from "node:url";
@@ -91,9 +91,7 @@ declare module "worker_threads" {
readonly port1: MessagePort; readonly port1: MessagePort;
readonly port2: MessagePort; readonly port2: MessagePort;
} }
interface WorkerPerformance { interface WorkerPerformance extends Pick<Performance, "eventLoopUtilization"> {}
eventLoopUtilization: EventLoopUtilityFunction;
}
type Transferable = type Transferable =
| ArrayBuffer | ArrayBuffer
| MessagePort | MessagePort
@@ -410,7 +408,7 @@ declare module "worker_threads" {
readonly resourceLimits?: ResourceLimits | undefined; readonly resourceLimits?: ResourceLimits | undefined;
/** /**
* An object that can be used to query performance information from a worker * An object that can be used to query performance information from a worker
* instance. Similar to `perf_hooks.performance`. * instance.
* @since v15.1.0, v14.17.0, v12.22.0 * @since v15.1.0, v14.17.0, v12.22.0
*/ */
readonly performance: WorkerPerformance; readonly performance: WorkerPerformance;
@@ -446,8 +444,8 @@ declare module "worker_threads" {
*/ */
terminate(): Promise<number>; terminate(): Promise<number>;
/** /**
* This method returns a `Promise` that will resolve to an object identical to `process.threadCpuUsage()`, * This method returns a `Promise` that will resolve to an object identical to {@link process.threadCpuUsage()},
* or reject with an `ERR_WORKER_NOT_RUNNING` error if the worker is no longer running. * or reject with an [`ERR_WORKER_NOT_RUNNING`](https://nodejs.org/docs/latest-v24.x/api/errors.html#err_worker_not_running) error if the worker is no longer running.
* This methods allows the statistics to be observed from outside the actual thread. * This methods allows the statistics to be observed from outside the actual thread.
* @since v24.6.0 * @since v24.6.0
*/ */
@@ -556,49 +554,49 @@ declare module "worker_threads" {
* @since v24.2.0 * @since v24.2.0
*/ */
[Symbol.asyncDispose](): Promise<void>; [Symbol.asyncDispose](): Promise<void>;
addListener(event: "error", listener: (err: Error) => void): this; addListener(event: "error", listener: (err: any) => void): this;
addListener(event: "exit", listener: (exitCode: number) => void): this; addListener(event: "exit", listener: (exitCode: number) => void): this;
addListener(event: "message", listener: (value: any) => void): this; addListener(event: "message", listener: (value: any) => void): this;
addListener(event: "messageerror", listener: (error: Error) => void): this; addListener(event: "messageerror", listener: (error: Error) => void): this;
addListener(event: "online", listener: () => void): this; addListener(event: "online", listener: () => void): this;
addListener(event: string | symbol, listener: (...args: any[]) => void): this; addListener(event: string | symbol, listener: (...args: any[]) => void): this;
emit(event: "error", err: Error): boolean; emit(event: "error", err: any): boolean;
emit(event: "exit", exitCode: number): boolean; emit(event: "exit", exitCode: number): boolean;
emit(event: "message", value: any): boolean; emit(event: "message", value: any): boolean;
emit(event: "messageerror", error: Error): boolean; emit(event: "messageerror", error: Error): boolean;
emit(event: "online"): boolean; emit(event: "online"): boolean;
emit(event: string | symbol, ...args: any[]): boolean; emit(event: string | symbol, ...args: any[]): boolean;
on(event: "error", listener: (err: Error) => void): this; on(event: "error", listener: (err: any) => void): this;
on(event: "exit", listener: (exitCode: number) => void): this; on(event: "exit", listener: (exitCode: number) => void): this;
on(event: "message", listener: (value: any) => void): this; on(event: "message", listener: (value: any) => void): this;
on(event: "messageerror", listener: (error: Error) => void): this; on(event: "messageerror", listener: (error: Error) => void): this;
on(event: "online", listener: () => void): this; on(event: "online", listener: () => void): this;
on(event: string | symbol, listener: (...args: any[]) => void): this; on(event: string | symbol, listener: (...args: any[]) => void): this;
once(event: "error", listener: (err: Error) => void): this; once(event: "error", listener: (err: any) => void): this;
once(event: "exit", listener: (exitCode: number) => void): this; once(event: "exit", listener: (exitCode: number) => void): this;
once(event: "message", listener: (value: any) => void): this; once(event: "message", listener: (value: any) => void): this;
once(event: "messageerror", listener: (error: Error) => void): this; once(event: "messageerror", listener: (error: Error) => void): this;
once(event: "online", listener: () => void): this; once(event: "online", listener: () => void): this;
once(event: string | symbol, listener: (...args: any[]) => void): this; once(event: string | symbol, listener: (...args: any[]) => void): this;
prependListener(event: "error", listener: (err: Error) => void): this; prependListener(event: "error", listener: (err: any) => void): this;
prependListener(event: "exit", listener: (exitCode: number) => void): this; prependListener(event: "exit", listener: (exitCode: number) => void): this;
prependListener(event: "message", listener: (value: any) => void): this; prependListener(event: "message", listener: (value: any) => void): this;
prependListener(event: "messageerror", listener: (error: Error) => void): this; prependListener(event: "messageerror", listener: (error: Error) => void): this;
prependListener(event: "online", listener: () => void): this; prependListener(event: "online", listener: () => void): this;
prependListener(event: string | symbol, listener: (...args: any[]) => void): this; prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
prependOnceListener(event: "error", listener: (err: Error) => void): this; prependOnceListener(event: "error", listener: (err: any) => void): this;
prependOnceListener(event: "exit", listener: (exitCode: number) => void): this; prependOnceListener(event: "exit", listener: (exitCode: number) => void): this;
prependOnceListener(event: "message", listener: (value: any) => void): this; prependOnceListener(event: "message", listener: (value: any) => void): this;
prependOnceListener(event: "messageerror", listener: (error: Error) => void): this; prependOnceListener(event: "messageerror", listener: (error: Error) => void): this;
prependOnceListener(event: "online", listener: () => void): this; prependOnceListener(event: "online", listener: () => void): this;
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
removeListener(event: "error", listener: (err: Error) => void): this; removeListener(event: "error", listener: (err: any) => void): this;
removeListener(event: "exit", listener: (exitCode: number) => void): this; removeListener(event: "exit", listener: (exitCode: number) => void): this;
removeListener(event: "message", listener: (value: any) => void): this; removeListener(event: "message", listener: (value: any) => void): this;
removeListener(event: "messageerror", listener: (error: Error) => void): this; removeListener(event: "messageerror", listener: (error: Error) => void): this;
removeListener(event: "online", listener: () => void): this; removeListener(event: "online", listener: () => void): this;
removeListener(event: string | symbol, listener: (...args: any[]) => void): this; removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
off(event: "error", listener: (err: Error) => void): this; off(event: "error", listener: (err: any) => void): this;
off(event: "exit", listener: (exitCode: number) => void): this; off(event: "exit", listener: (exitCode: number) => void): this;
off(event: "message", listener: (value: any) => void): this; off(event: "message", listener: (value: any) => void): this;
off(event: "messageerror", listener: (error: Error) => void): this; off(event: "messageerror", listener: (error: Error) => void): this;
@@ -691,7 +689,7 @@ declare module "worker_threads" {
var locks: LockManager; var locks: LockManager;
/** /**
* Mark an object as not transferable. If `object` occurs in the transfer list of * Mark an object as not transferable. If `object` occurs in the transfer list of
* a `port.postMessage()` call, it is ignored. * a {@link MessagePort.postMessage port.postMessage()} call, it is ignored.
* *
* In particular, this makes sense for objects that can be cloned, rather than * In particular, this makes sense for objects that can be cloned, rather than
* transferred, and which are used by other objects on the sending side. * transferred, and which are used by other objects on the sending side.
@@ -813,13 +811,13 @@ declare module "worker_threads" {
* *
* if (isMainThread) { * if (isMainThread) {
* setEnvironmentData('Hello', 'World!'); * setEnvironmentData('Hello', 'World!');
* const worker = new Worker(__filename); * const worker = new Worker(new URL(import.meta.url));
* } else { * } else {
* console.log(getEnvironmentData('Hello')); // Prints 'World!'. * console.log(getEnvironmentData('Hello')); // Prints 'World!'.
* } * }
* ``` * ```
* @since v15.12.0, v14.18.0 * @since v15.12.0, v14.18.0
* @param key Any arbitrary, cloneable JavaScript value that can be used as a {Map} key. * @param key Any arbitrary, cloneable JavaScript value that can be used as a {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map Map} key.
*/ */
function getEnvironmentData(key: Serializable): Serializable; function getEnvironmentData(key: Serializable): Serializable;
/** /**

72
node_modules/@types/node/zlib.d.ts generated vendored
View File

@@ -108,10 +108,14 @@ declare module "zlib" {
*/ */
chunkSize?: number | undefined; chunkSize?: number | undefined;
windowBits?: number | undefined; windowBits?: number | undefined;
level?: number | undefined; // compression only /** compression only */
memLevel?: number | undefined; // compression only level?: number | undefined;
strategy?: number | undefined; // compression only /** compression only */
dictionary?: NodeJS.ArrayBufferView | ArrayBuffer | undefined; // deflate/inflate only, empty dictionary by default memLevel?: number | undefined;
/** compression only */
strategy?: number | undefined;
/** deflate/inflate only, empty dictionary by default */
dictionary?: NodeJS.ArrayBufferView | ArrayBuffer | undefined;
/** /**
* If `true`, returns an object with `buffer` and `engine`. * If `true`, returns an object with `buffer` and `engine`.
*/ */
@@ -201,24 +205,84 @@ declare module "zlib" {
interface ZlibReset { interface ZlibReset {
reset(): void; reset(): void;
} }
/**
* @since v10.16.0
*/
class BrotliCompress extends stream.Transform {
constructor(options?: BrotliOptions);
}
interface BrotliCompress extends stream.Transform, Zlib {} interface BrotliCompress extends stream.Transform, Zlib {}
/**
* @since v10.16.0
*/
class BrotliDecompress extends stream.Transform {
constructor(options?: BrotliOptions);
}
interface BrotliDecompress extends stream.Transform, Zlib {} interface BrotliDecompress extends stream.Transform, Zlib {}
/**
* @since v0.5.8
*/
class Gzip extends stream.Transform {
constructor(options?: ZlibOptions);
}
interface Gzip extends stream.Transform, Zlib {} interface Gzip extends stream.Transform, Zlib {}
/**
* @since v0.5.8
*/
class Gunzip extends stream.Transform {
constructor(options?: ZlibOptions);
}
interface Gunzip extends stream.Transform, Zlib {} interface Gunzip extends stream.Transform, Zlib {}
/**
* @since v0.5.8
*/
class Deflate extends stream.Transform {
constructor(options?: ZlibOptions);
}
interface Deflate extends stream.Transform, Zlib, ZlibReset, ZlibParams {} interface Deflate extends stream.Transform, Zlib, ZlibReset, ZlibParams {}
/**
* @since v0.5.8
*/
class Inflate extends stream.Transform {
constructor(options?: ZlibOptions);
}
interface Inflate extends stream.Transform, Zlib, ZlibReset {} interface Inflate extends stream.Transform, Zlib, ZlibReset {}
/**
* @since v0.5.8
*/
class DeflateRaw extends stream.Transform {
constructor(options?: ZlibOptions);
}
interface DeflateRaw extends stream.Transform, Zlib, ZlibReset, ZlibParams {} interface DeflateRaw extends stream.Transform, Zlib, ZlibReset, ZlibParams {}
/**
* @since v0.5.8
*/
class InflateRaw extends stream.Transform {
constructor(options?: ZlibOptions);
}
interface InflateRaw extends stream.Transform, Zlib, ZlibReset {} interface InflateRaw extends stream.Transform, Zlib, ZlibReset {}
/**
* @since v0.5.8
*/
class Unzip extends stream.Transform {
constructor(options?: ZlibOptions);
}
interface Unzip extends stream.Transform, Zlib {} interface Unzip extends stream.Transform, Zlib {}
/** /**
* @since v22.15.0 * @since v22.15.0
* @experimental * @experimental
*/ */
class ZstdCompress extends stream.Transform {
constructor(options?: ZstdOptions);
}
interface ZstdCompress extends stream.Transform, Zlib {} interface ZstdCompress extends stream.Transform, Zlib {}
/** /**
* @since v22.15.0 * @since v22.15.0
* @experimental * @experimental
*/ */
class ZstdDecompress extends stream.Transform {
constructor(options?: ZstdOptions);
}
interface ZstdDecompress extends stream.Transform, Zlib {} interface ZstdDecompress extends stream.Transform, Zlib {}
/** /**
* Computes a 32-bit [Cyclic Redundancy Check](https://en.wikipedia.org/wiki/Cyclic_redundancy_check) checksum of `data`. * Computes a 32-bit [Cyclic Redundancy Check](https://en.wikipedia.org/wiki/Cyclic_redundancy_check) checksum of `data`.

View File

@@ -8,7 +8,7 @@ This package contains type definitions for react (https://react.dev/).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react. Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react.
### Additional Details ### Additional Details
* Last updated: Thu, 05 Feb 2026 10:12:25 GMT * Last updated: Wed, 11 Feb 2026 11:44:57 GMT
* Dependencies: [csstype](https://npmjs.com/package/csstype) * Dependencies: [csstype](https://npmjs.com/package/csstype)
# Credits # Credits

View File

@@ -174,4 +174,11 @@ declare module "." {
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES { interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES {
srcObject: Blob | MediaSource | MediaStream; srcObject: Blob | MediaSource | MediaStream;
} }
// @enableOptimisticKey
export const optimisticKey: unique symbol;
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_KEY_TYPES {
optimisticKey: typeof optimisticKey;
}
} }

10
node_modules/@types/react/index.d.ts generated vendored
View File

@@ -226,12 +226,20 @@ declare namespace React {
type ComponentState = any; type ComponentState = any;
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_KEY_TYPES {}
/** /**
* A value which uniquely identifies a node among items in an array. * A value which uniquely identifies a node among items in an array.
* *
* @see {@link https://react.dev/learn/rendering-lists#keeping-list-items-in-order-with-key React Docs} * @see {@link https://react.dev/learn/rendering-lists#keeping-list-items-in-order-with-key React Docs}
*/ */
type Key = string | number | bigint; type Key =
| string
| number
| bigint
| DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_KEY_TYPES[
keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_KEY_TYPES
];
/** /**
* @internal The props any component can receive. * @internal The props any component can receive.

View File

@@ -1,6 +1,6 @@
{ {
"name": "@types/react", "name": "@types/react",
"version": "19.2.13", "version": "19.2.14",
"description": "TypeScript definitions for react", "description": "TypeScript definitions for react",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
"license": "MIT", "license": "MIT",
@@ -205,6 +205,6 @@
"csstype": "^3.2.2" "csstype": "^3.2.2"
}, },
"peerDependencies": {}, "peerDependencies": {},
"typesPublisherContentHash": "20f3b89e619c9f614e881f4a928351ed1d1a9c228d36dccb133288229bc0aff6", "typesPublisherContentHash": "daae8d23e06b3d45da3803abb3f0bad661cffb4c40282d6886d8dfde7d5eea01",
"typeScriptVersion": "5.2" "typeScriptVersion": "5.2"
} }

View File

@@ -174,4 +174,11 @@ declare module "." {
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES { interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES {
srcObject: Blob | MediaSource | MediaStream; srcObject: Blob | MediaSource | MediaStream;
} }
// @enableOptimisticKey
export const optimisticKey: unique symbol;
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_KEY_TYPES {
optimisticKey: typeof optimisticKey;
}
} }

View File

@@ -226,12 +226,20 @@ declare namespace React {
type ComponentState = any; type ComponentState = any;
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_KEY_TYPES {}
/** /**
* A value which uniquely identifies a node among items in an array. * A value which uniquely identifies a node among items in an array.
* *
* @see {@link https://react.dev/learn/rendering-lists#keeping-list-items-in-order-with-key React Docs} * @see {@link https://react.dev/learn/rendering-lists#keeping-list-items-in-order-with-key React Docs}
*/ */
type Key = string | number | bigint; type Key =
| string
| number
| bigint
| DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_KEY_TYPES[
keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_KEY_TYPES
];
/** /**
* @internal The props any component can receive. * @internal The props any component can receive.

View File

@@ -98,7 +98,7 @@ exports.default = (0, util_1.createRule)({
} }
return; return;
} }
const isolatedDeclarations = context.parserOptions.isolatedDeclarations; const isolatedDeclarations = context.languageOptions.parserOptions.isolatedDeclarations;
if (!isolatedDeclarations && lhs?.typeArguments && !rhs.typeArguments) { if (!isolatedDeclarations && lhs?.typeArguments && !rhs.typeArguments) {
const hasParens = context.sourceCode.getTokenAfter(rhs.callee)?.value === '('; const hasParens = context.sourceCode.getTokenAfter(rhs.callee)?.value === '(';
const extraComments = new Set(context.sourceCode.getCommentsInside(lhs.parent)); const extraComments = new Set(context.sourceCode.getCommentsInside(lhs.parent));

View File

@@ -269,17 +269,15 @@ exports.default = (0, util_1.createRule)({
continue; continue;
} }
const declarations = candidate.getDeclarations(); const declarations = candidate.getDeclarations();
// If there are multiple declarations, at least one of them must not be if (!declarations?.length) {
// the default object toString.
//
// This may only matter for older versions of TS
// see https://github.com/typescript-eslint/typescript-eslint/issues/8585
if (declarations?.length !== 1) {
continue; continue;
} }
// Not being the Object interface means this is user-defined. // If any declaration is not from the Object interface, this is
if (!ts.isInterfaceDeclaration(declarations[0].parent) || // user-defined (e.g. overloaded toString on a class or module).
declarations[0].parent.name.text !== 'Object') { // see https://github.com/typescript-eslint/typescript-eslint/issues/8585
// see https://github.com/typescript-eslint/typescript-eslint/issues/11945
if (declarations.some(declaration => !(ts.isInterfaceDeclaration(declaration.parent) &&
declaration.parent.name.text === 'Object'))) {
return false; return false;
} }
foundFallbackOnObject = true; foundFallbackOnObject = true;

View File

@@ -69,7 +69,7 @@ exports.default = (0, util_1.createRule)({
}, },
], ],
create(context, [options]) { create(context, [options]) {
const { jsDocParsingMode } = context.parserOptions; const { jsDocParsingMode } = context.languageOptions.parserOptions;
const allow = options.allow; const allow = options.allow;
if (jsDocParsingMode === 'none' || jsDocParsingMode === 'type-info') { if (jsDocParsingMode === 'none' || jsDocParsingMode === 'type-info') {
throw new Error(`Cannot be used with jsDocParsingMode: '${jsDocParsingMode}'.`); throw new Error(`Cannot be used with jsDocParsingMode: '${jsDocParsingMode}'.`);

View File

@@ -46,7 +46,7 @@ exports.default = (0, util_1.createRule)({
return initializer.operator === '-' ? -inner : inner; return initializer.operator === '-' ? -inner : inner;
} }
case isStaticTemplateLiteral(initializer): case isStaticTemplateLiteral(initializer):
return initializer.quasis[0].value.cooked; return initializer.quasis[0].value.cooked ?? undefined;
default: default:
return undefined; return undefined;
} }

View File

@@ -396,14 +396,6 @@ exports.default = (0, util_1.createRule)({
// The right side will be checked if the LogicalExpression is used in a conditional context // The right side will be checked if the LogicalExpression is used in a conditional context
checkNode(node.left); checkNode(node.left);
} }
function checkIfWhileLoopIsNecessaryConditional(node) {
if (allowConstantLoopConditionsOption === 'only-allowed-literals' &&
node.test.type === utils_1.AST_NODE_TYPES.Literal &&
constantLoopConditionsAllowedLiterals.has(node.test.value)) {
return;
}
checkIfLoopIsNecessaryConditional(node);
}
/** /**
* Checks that a testable expression of a loop is necessarily conditional, reports otherwise. * Checks that a testable expression of a loop is necessarily conditional, reports otherwise.
*/ */
@@ -412,6 +404,11 @@ exports.default = (0, util_1.createRule)({
// e.g. `for(;;)` // e.g. `for(;;)`
return; return;
} }
if (allowConstantLoopConditionsOption === 'only-allowed-literals' &&
node.test.type === utils_1.AST_NODE_TYPES.Literal &&
constantLoopConditionsAllowedLiterals.has(node.test.value)) {
return;
}
if (allowConstantLoopConditionsOption === 'always' && if (allowConstantLoopConditionsOption === 'always' &&
tsutils.isTrueLiteralType((0, util_1.getConstrainedTypeAtLocation)(services, node.test))) { tsutils.isTrueLiteralType((0, util_1.getConstrainedTypeAtLocation)(services, node.test))) {
return; return;
@@ -663,7 +660,7 @@ exports.default = (0, util_1.createRule)({
checkIfBoolExpressionIsNecessaryConditional(test, parent.discriminant, test, '==='); checkIfBoolExpressionIsNecessaryConditional(test, parent.discriminant, test, '===');
} }
}, },
WhileStatement: checkIfWhileLoopIsNecessaryConditional, WhileStatement: checkIfLoopIsNecessaryConditional,
}; };
}, },
}); });

View File

@@ -169,7 +169,8 @@ exports.default = (0, util_1.createRule)({
} }
else if (receiverProperty.key.type === utils_1.AST_NODE_TYPES.TemplateLiteral && else if (receiverProperty.key.type === utils_1.AST_NODE_TYPES.TemplateLiteral &&
receiverProperty.key.quasis.length === 1) { receiverProperty.key.quasis.length === 1) {
key = receiverProperty.key.quasis[0].value.cooked; const cooked = (0, util_1.nullThrows)(receiverProperty.key.quasis[0].value.cooked, 'cooked can only be null inside a TaggedTemplateExpression, which is not possible here');
key = cooked;
} }
else { else {
// can't figure out the name, so skip it // can't figure out the name, so skip it

View File

@@ -236,6 +236,9 @@ exports.default = (0, util_1.createRule)({
if (signature.thisParameter) { if (signature.thisParameter) {
paramIndex--; paramIndex--;
} }
if (paramIndex < 0 || paramIndex >= params.length) {
return null;
}
return checker.getTypeOfSymbol(params[paramIndex]); return checker.getTypeOfSymbol(params[paramIndex]);
} }
if (parent.type === utils_1.AST_NODE_TYPES.AssignmentPattern) { if (parent.type === utils_1.AST_NODE_TYPES.AssignmentPattern) {

View File

@@ -87,6 +87,7 @@ const NULLISH_FLAGS = ts.TypeFlags.Null | ts.TypeFlags.Undefined;
function isValidFalseBooleanCheckType(node, disallowFalseyLiteral, parserServices, options) { function isValidFalseBooleanCheckType(node, disallowFalseyLiteral, parserServices, options) {
const type = parserServices.getTypeAtLocation(node); const type = parserServices.getTypeAtLocation(node);
const types = (0, ts_api_utils_1.unionConstituents)(type); const types = (0, ts_api_utils_1.unionConstituents)(type);
const primitiveAndObjectParts = types.flatMap(type => (0, ts_api_utils_1.intersectionConstituents)(type));
if (disallowFalseyLiteral && if (disallowFalseyLiteral &&
/* /*
``` ```
@@ -98,10 +99,10 @@ function isValidFalseBooleanCheckType(node, disallowFalseyLiteral, parserService
We don't want to consider these two cases because the boolean expression We don't want to consider these two cases because the boolean expression
narrows out the non-nullish falsy cases - so converting the chain to `x?.a` narrows out the non-nullish falsy cases - so converting the chain to `x?.a`
would introduce a build error would introduce a build error
*/ (types.some(t => (0, ts_api_utils_1.isBooleanLiteralType)(t) && t.intrinsicName === 'false') || */ (primitiveAndObjectParts.some(t => (0, ts_api_utils_1.isBooleanLiteralType)(t) && t.intrinsicName === 'false') ||
types.some(t => (0, ts_api_utils_1.isStringLiteralType)(t) && t.value === '') || primitiveAndObjectParts.some(t => (0, ts_api_utils_1.isStringLiteralType)(t) && t.value === '') ||
types.some(t => (0, ts_api_utils_1.isNumberLiteralType)(t) && t.value === 0) || primitiveAndObjectParts.some(t => (0, ts_api_utils_1.isNumberLiteralType)(t) && t.value === 0) ||
types.some(t => (0, ts_api_utils_1.isBigIntLiteralType)(t) && t.value.base10Value === '0'))) { primitiveAndObjectParts.some(t => (0, ts_api_utils_1.isBigIntLiteralType)(t) && t.value.base10Value === '0'))) {
return false; return false;
} }
let allowedFlags = NULLISH_FLAGS | ts.TypeFlags.Object; let allowedFlags = NULLISH_FLAGS | ts.TypeFlags.Object;
@@ -123,7 +124,7 @@ function isValidFalseBooleanCheckType(node, disallowFalseyLiteral, parserService
if (options.checkBigInt === true) { if (options.checkBigInt === true) {
allowedFlags |= ts.TypeFlags.BigIntLike; allowedFlags |= ts.TypeFlags.BigIntLike;
} }
return types.every(t => (0, util_1.isTypeFlagSet)(t, allowedFlags)); return primitiveAndObjectParts.every(t => (0, util_1.isTypeFlagSet)(t, allowedFlags));
} }
function gatherLogicalOperands(node, parserServices, sourceCode, options) { function gatherLogicalOperands(node, parserServices, sourceCode, options) {
const result = []; const result = [];

View File

@@ -1,6 +1,8 @@
import type { TypeOrValueSpecifier } from '../util';
export type MessageIds = 'rejectAnError'; export type MessageIds = 'rejectAnError';
export type Options = [ export type Options = [
{ {
allow?: TypeOrValueSpecifier[];
allowEmptyReject?: boolean; allowEmptyReject?: boolean;
allowThrowingAny?: boolean; allowThrowingAny?: boolean;
allowThrowingUnknown?: boolean; allowThrowingUnknown?: boolean;

View File

@@ -20,6 +20,10 @@ exports.default = (0, util_1.createRule)({
type: 'object', type: 'object',
additionalProperties: false, additionalProperties: false,
properties: { properties: {
allow: {
...util_1.typeOrValueSpecifiersSchema,
description: 'Type specifiers that can be used as Promise rejection reasons.',
},
allowEmptyReject: { allowEmptyReject: {
type: 'boolean', type: 'boolean',
description: 'Whether to allow calls to `Promise.reject()` with no arguments.', description: 'Whether to allow calls to `Promise.reject()` with no arguments.',
@@ -38,6 +42,7 @@ exports.default = (0, util_1.createRule)({
}, },
defaultOptions: [ defaultOptions: [
{ {
allow: [],
allowEmptyReject: false, allowEmptyReject: false,
allowThrowingAny: false, allowThrowingAny: false,
allowThrowingUnknown: false, allowThrowingUnknown: false,
@@ -49,6 +54,9 @@ exports.default = (0, util_1.createRule)({
const argument = callExpression.arguments.at(0); const argument = callExpression.arguments.at(0);
if (argument) { if (argument) {
const type = services.getTypeAtLocation(argument); const type = services.getTypeAtLocation(argument);
if ((0, util_1.typeMatchesSomeSpecifier)(type, options.allow, services.program)) {
return;
}
if (options.allowThrowingAny && (0, util_1.isTypeAnyType)(type)) { if (options.allowThrowingAny && (0, util_1.isTypeAnyType)(type)) {
return; return;
} }

View File

@@ -222,7 +222,11 @@ exports.default = (0, util_1.createRule)({
name: context.sourceCode.getText(nameNode), name: context.sourceCode.getText(nameNode),
}, },
*fix(fixer) { *fix(fixer) {
yield fixer.insertTextBefore(nameNode, 'readonly '); const readonlyInsertionTarget = esNode.type === utils_1.AST_NODE_TYPES.PropertyDefinition &&
esNode.computed
? (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(nameNode), 'Expected to find a token before computed property name')
: nameNode;
yield fixer.insertTextBefore(readonlyInsertionTarget, 'readonly ');
if (typeAnnotation) { if (typeAnnotation) {
yield fixer.insertTextAfter(nameNode, `: ${typeAnnotation}`); yield fixer.insertTextAfter(nameNode, `: ${typeAnnotation}`);
} }
@@ -239,9 +243,25 @@ exports.default = (0, util_1.createRule)({
} }
}, },
MemberExpression(node) { MemberExpression(node) {
if (classScopeStack.length !== 0 && !node.computed) { if (classScopeStack.length === 0) {
return;
}
const classScope = classScopeStack[classScopeStack.length - 1];
if (!node.computed) {
const tsNode = services.esTreeNodeToTSNodeMap.get(node); const tsNode = services.esTreeNodeToTSNodeMap.get(node);
handlePropertyAccessExpression(tsNode, tsNode.parent, classScopeStack[classScopeStack.length - 1]); handlePropertyAccessExpression(tsNode, tsNode.parent, classScope);
}
else {
const tsNode = services.esTreeNodeToTSNodeMap.get(node);
if (ts.isElementAccessExpression(tsNode) &&
ts.isBinaryExpression(tsNode.parent) &&
tsNode.parent.left === tsNode &&
tsutils.isAssignmentKind(tsNode.parent.operatorToken.kind)) {
const memberName = (0, util_1.getStaticMemberAccessValue)(node, context);
if (typeof memberName === 'string') {
classScope.addVariableModificationByName(tsNode.expression, memberName);
}
}
} }
}, },
}; };
@@ -285,8 +305,7 @@ class ClassScope {
addDeclaredVariable(node) { addDeclaredVariable(node) {
if (!(tsutils.isModifierFlagSet(node, ts.ModifierFlags.Private) || if (!(tsutils.isModifierFlagSet(node, ts.ModifierFlags.Private) ||
node.name.kind === ts.SyntaxKind.PrivateIdentifier) || node.name.kind === ts.SyntaxKind.PrivateIdentifier) ||
tsutils.isModifierFlagSet(node, ts.ModifierFlags.Accessor | ts.ModifierFlags.Readonly) || tsutils.isModifierFlagSet(node, ts.ModifierFlags.Accessor | ts.ModifierFlags.Readonly)) {
ts.isComputedPropertyName(node.name)) {
return; return;
} }
if (this.onlyInlineLambdas && if (this.onlyInlineLambdas &&
@@ -294,25 +313,32 @@ class ClassScope {
!ts.isArrowFunction(node.initializer)) { !ts.isArrowFunction(node.initializer)) {
return; return;
} }
const memberName = getMemberName(node.name);
if (memberName == null) {
return;
}
(tsutils.isModifierFlagSet(node, ts.ModifierFlags.Static) (tsutils.isModifierFlagSet(node, ts.ModifierFlags.Static)
? this.privateModifiableStatics ? this.privateModifiableStatics
: this.privateModifiableMembers).set(node.name.getText(), node); : this.privateModifiableMembers).set(memberName, node);
} }
addVariableModification(node) { addVariableModification(node) {
const modifierType = this.checker.getTypeAtLocation(node.expression); this.addVariableModificationByName(node.expression, node.name.text);
}
addVariableModificationByName(expression, memberName) {
const modifierType = this.checker.getTypeAtLocation(expression);
const relationOfModifierTypeToClass = this.getTypeToClassRelation(modifierType); const relationOfModifierTypeToClass = this.getTypeToClassRelation(modifierType);
if (relationOfModifierTypeToClass === TypeToClassRelation.Instance && if (relationOfModifierTypeToClass === TypeToClassRelation.Instance &&
this.constructorScopeDepth === DIRECTLY_INSIDE_CONSTRUCTOR) { this.constructorScopeDepth === DIRECTLY_INSIDE_CONSTRUCTOR) {
this.memberVariableWithConstructorModifications.add(node.name.text); this.memberVariableWithConstructorModifications.add(memberName);
return; return;
} }
if (relationOfModifierTypeToClass === TypeToClassRelation.Instance || if (relationOfModifierTypeToClass === TypeToClassRelation.Instance ||
relationOfModifierTypeToClass === TypeToClassRelation.ClassAndInstance) { relationOfModifierTypeToClass === TypeToClassRelation.ClassAndInstance) {
this.memberVariableModifications.add(node.name.text); this.memberVariableModifications.add(memberName);
} }
if (relationOfModifierTypeToClass === TypeToClassRelation.Class || if (relationOfModifierTypeToClass === TypeToClassRelation.Class ||
relationOfModifierTypeToClass === TypeToClassRelation.ClassAndInstance) { relationOfModifierTypeToClass === TypeToClassRelation.ClassAndInstance) {
this.staticVariableModifications.add(node.name.text); this.staticVariableModifications.add(memberName);
} }
} }
enterConstructor(node) { enterConstructor(node) {
@@ -390,3 +416,24 @@ class ClassScope {
return this.memberVariableWithConstructorModifications.has(name); return this.memberVariableWithConstructorModifications.has(name);
} }
} }
function getMemberName(name) {
if (ts.isIdentifier(name) ||
ts.isPrivateIdentifier(name) ||
ts.isStringLiteral(name) ||
ts.isNoSubstitutionTemplateLiteral(name) ||
ts.isNumericLiteral(name)) {
return name.text;
}
if (ts.isComputedPropertyName(name)) {
const expression = name.expression;
if (ts.isNumericLiteral(expression)) {
return expression.text;
}
if (ts.isPropertyAccessExpression(expression) &&
ts.isIdentifier(expression.expression) &&
expression.expression.text === 'Symbol') {
return expression.getText();
}
}
return undefined;
}

View File

@@ -164,11 +164,7 @@ exports.default = util.createRule({
if (argNode.type === utils_1.AST_NODE_TYPES.SpreadElement) { if (argNode.type === utils_1.AST_NODE_TYPES.SpreadElement) {
continue; continue;
} }
// Check against the contextual type first // Collect the types from all of the call signatures
if (checkExpressionNode(argNode)) {
continue;
}
// Check against the types from all of the call signatures
const argExpectedReturnTypes = funcSignatures const argExpectedReturnTypes = funcSignatures
.map(s => s.parameters[argIdx]) .map(s => s.parameters[argIdx])
.filter(Boolean) .filter(Boolean)
@@ -176,20 +172,44 @@ exports.default = util.createRule({
.flatMap(paramType => tsutils.unionConstituents(paramType)) .flatMap(paramType => tsutils.unionConstituents(paramType))
.flatMap(paramType => paramType.getCallSignatures()) .flatMap(paramType => paramType.getCallSignatures())
.map(paramSignature => paramSignature.getReturnType()); .map(paramSignature => paramSignature.getReturnType());
const hasSingleSignature = funcSignatures.length === 1;
const allSignaturesReturnVoid = argExpectedReturnTypes.every(type => isVoid(type) ||
// Treat as void even though it might be technically any.
isNullishOrAny(type) ||
// `getTypeOfSymbolAtLocation` returns unresolved type parameters
// (e.g. `T`), even for overloads that match the call.
//
// Since we can't tell whether a generic overload currently matches,
// we treat TypeParameters similar to void.
tsutils.isTypeParameter(type));
// Check against the contextual type first, but only when there is a
// single signature or when all signatures return void, because
// `getContextualType` resolves to the first overload's return type even
// though there may be another one that matches the call.
if ((hasSingleSignature || allSignaturesReturnVoid) &&
checkExpressionNode(argNode)) {
continue;
}
if ( if (
// At least one return type is void // At least one return type is void
argExpectedReturnTypes.some(type => tsutils.isTypeFlagSet(type, ts.TypeFlags.Void)) && argExpectedReturnTypes.some(isVoid) &&
// The rest are nullish or any // The rest are nullish or any
argExpectedReturnTypes.every(type => tsutils.isTypeFlagSet(type, ts.TypeFlags.VoidLike | argExpectedReturnTypes.every(isNullishOrAny)) {
ts.TypeFlags.Undefined |
ts.TypeFlags.Null |
ts.TypeFlags.Any |
ts.TypeFlags.Never))) {
// We treat this argument as void even though it might be technically any. // We treat this argument as void even though it might be technically any.
reportIfNonVoidFunction(argNode); reportIfNonVoidFunction(argNode);
} }
} }
} }
function isNullishOrAny(type) {
return tsutils.isTypeFlagSet(type, ts.TypeFlags.VoidLike |
ts.TypeFlags.Undefined |
ts.TypeFlags.Null |
ts.TypeFlags.Any |
ts.TypeFlags.Never);
}
function isVoid(type) {
return tsutils.isTypeFlagSet(type, ts.TypeFlags.Void);
}
/** /**
* Finds errors in an object property. * Finds errors in an object property.
* *

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{ {
"name": "@typescript-eslint/eslint-plugin", "name": "@typescript-eslint/eslint-plugin",
"version": "8.55.0", "version": "8.57.1",
"description": "TypeScript plugin for ESLint", "description": "TypeScript plugin for ESLint",
"files": [ "files": [
"dist", "dist",
@@ -52,39 +52,39 @@
"ignore": "^7.0.5", "ignore": "^7.0.5",
"natural-compare": "^1.4.0", "natural-compare": "^1.4.0",
"ts-api-utils": "^2.4.0", "ts-api-utils": "^2.4.0",
"@typescript-eslint/scope-manager": "8.55.0", "@typescript-eslint/scope-manager": "8.57.1",
"@typescript-eslint/type-utils": "8.55.0", "@typescript-eslint/visitor-keys": "8.57.1",
"@typescript-eslint/visitor-keys": "8.55.0", "@typescript-eslint/utils": "8.57.1",
"@typescript-eslint/utils": "8.55.0" "@typescript-eslint/type-utils": "8.57.1"
}, },
"devDependencies": { "devDependencies": {
"@types/json-schema": "^7.0.15", "@types/json-schema": "^7.0.15",
"@types/mdast": "^4.0.4", "@types/mdast": "^4.0.4",
"@types/natural-compare": "*", "@types/natural-compare": "^1.4.3",
"@types/react": "^18.3.21", "@types/react": "^18.3.21",
"@vitest/coverage-v8": "^3.2.4", "@vitest/coverage-v8": "^4.0.18",
"ajv": "^6.12.6", "ajv": "^6.12.6",
"eslint": "*", "eslint": "^10.0.0",
"json-schema": "*", "json-schema": "^0.4.0",
"markdown-table": "^3.0.4", "markdown-table": "^3.0.4",
"marked": "^15.0.12", "marked": "^15.0.12",
"mdast-util-from-markdown": "^2.0.2", "mdast-util-from-markdown": "^2.0.2",
"mdast-util-mdx": "^3.0.0", "mdast-util-mdx": "^3.0.0",
"micromark-extension-mdxjs": "^3.0.0", "micromark-extension-mdxjs": "^3.0.0",
"prettier": "3.8.0", "prettier": "3.8.0",
"rimraf": "*", "rimraf": "^5.0.10",
"title-case": "^4.3.2", "title-case": "^4.3.2",
"tsx": "*", "tsx": "^4.7.2",
"typescript": "*", "typescript": ">=4.8.4 <6.0.0",
"unist-util-visit": "^5.0.0", "unist-util-visit": "^5.0.0",
"vitest": "^3.2.4", "vitest": "^4.0.18",
"@typescript-eslint/rule-schema-to-typescript-types": "8.55.0", "@typescript-eslint/rule-tester": "8.57.1",
"@typescript-eslint/rule-tester": "8.55.0" "@typescript-eslint/rule-schema-to-typescript-types": "8.57.1"
}, },
"peerDependencies": { "peerDependencies": {
"eslint": "^8.57.0 || ^9.0.0", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
"typescript": ">=4.8.4 <6.0.0", "typescript": ">=4.8.4 <6.0.0",
"@typescript-eslint/parser": "^8.55.0" "@typescript-eslint/parser": "^8.57.1"
}, },
"funding": { "funding": {
"type": "opencollective", "type": "opencollective",

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{ {
"name": "@typescript-eslint/parser", "name": "@typescript-eslint/parser",
"version": "8.55.0", "version": "8.57.1",
"description": "An ESLint custom parser which leverages TypeScript ESTree", "description": "An ESLint custom parser which leverages TypeScript ESTree",
"files": [ "files": [
"dist", "dist",
@@ -39,23 +39,23 @@
"eslint" "eslint"
], ],
"peerDependencies": { "peerDependencies": {
"eslint": "^8.57.0 || ^9.0.0", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
"typescript": ">=4.8.4 <6.0.0" "typescript": ">=4.8.4 <6.0.0"
}, },
"dependencies": { "dependencies": {
"debug": "^4.4.3", "debug": "^4.4.3",
"@typescript-eslint/scope-manager": "8.55.0", "@typescript-eslint/scope-manager": "8.57.1",
"@typescript-eslint/types": "8.55.0", "@typescript-eslint/types": "8.57.1",
"@typescript-eslint/typescript-estree": "8.55.0", "@typescript-eslint/typescript-estree": "8.57.1",
"@typescript-eslint/visitor-keys": "8.55.0" "@typescript-eslint/visitor-keys": "8.57.1"
}, },
"devDependencies": { "devDependencies": {
"@vitest/coverage-v8": "^3.2.4", "@vitest/coverage-v8": "^4.0.18",
"eslint": "*", "eslint": "^10.0.0",
"glob": "*", "glob": "^11.1.0",
"rimraf": "*", "rimraf": "^5.0.10",
"typescript": "*", "typescript": ">=4.8.4 <6.0.0",
"vitest": "^3.2.4" "vitest": "^4.0.18"
}, },
"funding": { "funding": {
"type": "opencollective", "type": "opencollective",

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{ {
"name": "@typescript-eslint/project-service", "name": "@typescript-eslint/project-service",
"version": "8.55.0", "version": "8.57.1",
"description": "Standalone TypeScript project service wrapper for linting.", "description": "Standalone TypeScript project service wrapper for linting.",
"files": [ "files": [
"dist", "dist",
@@ -41,14 +41,14 @@
}, },
"dependencies": { "dependencies": {
"debug": "^4.4.3", "debug": "^4.4.3",
"@typescript-eslint/tsconfig-utils": "^8.55.0", "@typescript-eslint/tsconfig-utils": "^8.57.1",
"@typescript-eslint/types": "^8.55.0" "@typescript-eslint/types": "^8.57.1"
}, },
"devDependencies": { "devDependencies": {
"@vitest/coverage-v8": "^3.2.4", "@vitest/coverage-v8": "^4.0.18",
"rimraf": "*", "rimraf": "^5.0.10",
"typescript": "*", "typescript": ">=4.8.4 <6.0.0",
"vitest": "^3.2.4" "vitest": "^4.0.18"
}, },
"funding": { "funding": {
"type": "opencollective", "type": "opencollective",

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{ {
"name": "@typescript-eslint/scope-manager", "name": "@typescript-eslint/scope-manager",
"version": "8.55.0", "version": "8.57.1",
"description": "TypeScript scope analyser for ESLint", "description": "TypeScript scope analyser for ESLint",
"files": [ "files": [
"dist", "dist",
@@ -37,18 +37,18 @@
"estree" "estree"
], ],
"dependencies": { "dependencies": {
"@typescript-eslint/types": "8.55.0", "@typescript-eslint/types": "8.57.1",
"@typescript-eslint/visitor-keys": "8.55.0" "@typescript-eslint/visitor-keys": "8.57.1"
}, },
"devDependencies": { "devDependencies": {
"@vitest/coverage-v8": "^3.2.4", "@vitest/coverage-v8": "^4.0.18",
"@vitest/pretty-format": "^3.2.4", "@vitest/pretty-format": "^4.0.18",
"eslint": "*", "eslint": "^10.0.0",
"glob": "*", "glob": "^11.1.0",
"rimraf": "*", "rimraf": "^5.0.10",
"typescript": "*", "typescript": ">=4.8.4 <6.0.0",
"vitest": "^3.2.4", "vitest": "^4.0.18",
"@typescript-eslint/typescript-estree": "8.55.0" "@typescript-eslint/typescript-estree": "8.57.1"
}, },
"funding": { "funding": {
"type": "opencollective", "type": "opencollective",

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{ {
"name": "@typescript-eslint/tsconfig-utils", "name": "@typescript-eslint/tsconfig-utils",
"version": "8.55.0", "version": "8.57.1",
"description": "Utilities for collecting TSConfigs for linting scenarios.", "description": "Utilities for collecting TSConfigs for linting scenarios.",
"files": [ "files": [
"dist", "dist",
@@ -39,10 +39,10 @@
"typescript": ">=4.8.4 <6.0.0" "typescript": ">=4.8.4 <6.0.0"
}, },
"devDependencies": { "devDependencies": {
"@vitest/coverage-v8": "^3.2.4", "@vitest/coverage-v8": "^4.0.18",
"rimraf": "*", "rimraf": "^5.0.10",
"typescript": "*", "typescript": ">=4.8.4 <6.0.0",
"vitest": "^3.2.4" "vitest": "^4.0.18"
}, },
"funding": { "funding": {
"type": "opencollective", "type": "opencollective",

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{ {
"name": "@typescript-eslint/type-utils", "name": "@typescript-eslint/type-utils",
"version": "8.55.0", "version": "8.57.1",
"description": "Type utilities for working with TypeScript + ESLint together", "description": "Type utilities for working with TypeScript + ESLint together",
"files": [ "files": [
"dist", "dist",
@@ -38,23 +38,23 @@
"dependencies": { "dependencies": {
"debug": "^4.4.3", "debug": "^4.4.3",
"ts-api-utils": "^2.4.0", "ts-api-utils": "^2.4.0",
"@typescript-eslint/types": "8.55.0", "@typescript-eslint/types": "8.57.1",
"@typescript-eslint/utils": "8.55.0", "@typescript-eslint/utils": "8.57.1",
"@typescript-eslint/typescript-estree": "8.55.0" "@typescript-eslint/typescript-estree": "8.57.1"
}, },
"peerDependencies": { "peerDependencies": {
"eslint": "^8.57.0 || ^9.0.0", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
"typescript": ">=4.8.4 <6.0.0" "typescript": ">=4.8.4 <6.0.0"
}, },
"devDependencies": { "devDependencies": {
"@types/babel__code-frame": "^7.0.6", "@types/babel__code-frame": "^7.0.6",
"@vitest/coverage-v8": "^3.2.4", "@vitest/coverage-v8": "^4.0.18",
"ajv": "^6.12.6", "ajv": "^6.12.6",
"eslint": "*", "eslint": "^10.0.0",
"rimraf": "*", "rimraf": "^5.0.10",
"typescript": "*", "typescript": ">=4.8.4 <6.0.0",
"vitest": "^3.2.4", "vitest": "^4.0.18",
"@typescript-eslint/parser": "8.55.0" "@typescript-eslint/parser": "8.57.1"
}, },
"funding": { "funding": {
"type": "opencollective", "type": "opencollective",

View File

@@ -1348,7 +1348,7 @@ export declare interface TemplateElement extends BaseNode {
type: AST_NODE_TYPES.TemplateElement; type: AST_NODE_TYPES.TemplateElement;
tail: boolean; tail: boolean;
value: { value: {
cooked: string; cooked: string | null;
raw: string; raw: string;
}; };
} }

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{ {
"name": "@typescript-eslint/types", "name": "@typescript-eslint/types",
"version": "8.55.0", "version": "8.57.1",
"description": "Types for the TypeScript-ESTree AST spec", "description": "Types for the TypeScript-ESTree AST spec",
"files": [ "files": [
"dist", "dist",
@@ -37,12 +37,12 @@
"estree" "estree"
], ],
"devDependencies": { "devDependencies": {
"@vitest/coverage-v8": "^3.2.4", "@vitest/coverage-v8": "^4.0.18",
"eslint": "*", "eslint": "^10.0.0",
"rimraf": "*", "rimraf": "^5.0.10",
"tsx": "*", "tsx": "^4.7.2",
"typescript": "*", "typescript": ">=4.8.4 <6.0.0",
"vitest": "^3.2.4" "vitest": "^4.0.18"
}, },
"funding": { "funding": {
"type": "opencollective", "type": "opencollective",
@@ -60,6 +60,9 @@
"build": { "build": {
"dependsOn": [ "dependsOn": [
"copy-ast-spec" "copy-ast-spec"
],
"inputs": [
"{projectRoot}/src/generated/**/*"
] ]
}, },
"copy-ast-spec": { "copy-ast-spec": {

View File

@@ -125,11 +125,6 @@ function nodeHasIllegalDecorators(node) {
return !!('illegalDecorators' in node && return !!('illegalDecorators' in node &&
node.illegalDecorators?.length); node.illegalDecorators?.length);
} }
function getModifiers(node) {
return (
// @ts-expect-error intentional to access `node.modifiers` instead of `ts.getModifiers(node)` to access all modifiers
(node.modifiers ?? []).filter((modifier) => !ts.isDecorator(modifier)));
}
function checkModifiers(node) { function checkModifiers(node) {
// typescript<5.0.0 // typescript<5.0.0
if (nodeHasIllegalDecorators(node)) { if (nodeHasIllegalDecorators(node)) {
@@ -147,7 +142,8 @@ function checkModifiers(node) {
} }
} }
} }
for (const modifier of getModifiers(node)) { const modifiers = (0, getModifiers_1.getModifiers)(node, /* includeIllegalModifiers */ true) ?? [];
for (const modifier of modifiers) {
if (modifier.kind !== SyntaxKind.ReadonlyKeyword) { if (modifier.kind !== SyntaxKind.ReadonlyKeyword) {
if (node.kind === SyntaxKind.PropertySignature || if (node.kind === SyntaxKind.PropertySignature ||
node.kind === SyntaxKind.MethodSignature) { node.kind === SyntaxKind.MethodSignature) {
@@ -233,7 +229,7 @@ function checkModifiers(node) {
if (modifier.kind === SyntaxKind.PublicKeyword || if (modifier.kind === SyntaxKind.PublicKeyword ||
modifier.kind === SyntaxKind.ProtectedKeyword || modifier.kind === SyntaxKind.ProtectedKeyword ||
modifier.kind === SyntaxKind.PrivateKeyword) { modifier.kind === SyntaxKind.PrivateKeyword) {
for (const anotherModifier of getModifiers(node)) { for (const anotherModifier of modifiers) {
if (anotherModifier !== modifier && if (anotherModifier !== modifier &&
(anotherModifier.kind === SyntaxKind.PublicKeyword || (anotherModifier.kind === SyntaxKind.PublicKeyword ||
anotherModifier.kind === SyntaxKind.ProtectedKeyword || anotherModifier.kind === SyntaxKind.ProtectedKeyword ||
@@ -264,11 +260,28 @@ function checkModifiers(node) {
throw (0, node_utils_1.createError)(modifier, 'A parameter property may not be declared using a binding pattern.'); throw (0, node_utils_1.createError)(modifier, 'A parameter property may not be declared using a binding pattern.');
} }
} }
checkObjectPropertyModifier(node, modifier);
}
// `ts.getModifiers()` can't access invalid modifiers on object properties
// Eg: `({declare a: 1})`
// See https://github.com/typescript-eslint/typescript-eslint/pull/11931#discussion_r2678961730
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- incorrect type
if (node.parent?.kind === SyntaxKind.ObjectLiteralExpression) {
// @ts-expect-error intentional to access deprecated `node.modifiers`
for (const modifier of node.modifiers ??
[]) {
if (ts.isDecorator(modifier) || modifiers.includes(modifier)) {
continue;
}
checkObjectPropertyModifier(node, modifier);
}
}
}
function checkObjectPropertyModifier(node, modifier) {
// From `checkGrammarObjectLiteralExpression` function in `typescript` // From `checkGrammarObjectLiteralExpression` function in `typescript`
if ((modifier.kind !== SyntaxKind.AsyncKeyword || if ((modifier.kind !== SyntaxKind.AsyncKeyword ||
node.kind !== SyntaxKind.MethodDeclaration) && node.kind !== SyntaxKind.MethodDeclaration) &&
node.parent.kind === SyntaxKind.ObjectLiteralExpression) { node.parent.kind === SyntaxKind.ObjectLiteralExpression) {
throw (0, node_utils_1.createError)(modifier, `'${ts.tokenToString(modifier.kind)}' modifier cannot be used here.`); throw (0, node_utils_1.createError)(modifier, `'${ts.tokenToString(modifier.kind)}' modifier cannot be used here.`);
} }
}
} }

View File

@@ -73,6 +73,14 @@ class Converter {
} }
(0, check_syntax_errors_1.checkSyntaxError)(node, parent, this.allowPattern); (0, check_syntax_errors_1.checkSyntaxError)(node, parent, this.allowPattern);
} }
#isValidEscape(text) {
if (/\\[xu]/.test(text)) {
const hasInvalidUnicodeEscape = /\\u(?![0-9a-fA-F]{4}|{)/.test(text);
const hasInvalidHexEscape = /\\x(?![0-9a-fA-F]{2})/.test(text);
return !hasInvalidUnicodeEscape && !hasInvalidHexEscape;
}
return true;
}
#throwError(node, message) { #throwError(node, message) {
if (this.options.allowInvalidAST) { if (this.options.allowInvalidAST) {
return; return;
@@ -1067,7 +1075,8 @@ class Converter {
argument: this.convertChild(node.expression), argument: this.convertChild(node.expression),
}); });
// Template Literals // Template Literals
case SyntaxKind.NoSubstitutionTemplateLiteral: case SyntaxKind.NoSubstitutionTemplateLiteral: {
const rawText = this.ast.text.slice(node.getStart(this.ast) + 1, node.end - 1);
return this.createNode(node, { return this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.TemplateLiteral, type: ts_estree_1.AST_NODE_TYPES.TemplateLiteral,
expressions: [], expressions: [],
@@ -1076,12 +1085,16 @@ class Converter {
type: ts_estree_1.AST_NODE_TYPES.TemplateElement, type: ts_estree_1.AST_NODE_TYPES.TemplateElement,
tail: true, tail: true,
value: { value: {
cooked: node.text, cooked: node.parent.kind === SyntaxKind.TaggedTemplateExpression &&
raw: this.ast.text.slice(node.getStart(this.ast) + 1, node.end - 1), !this.#isValidEscape(rawText)
? null
: node.text,
raw: rawText,
}, },
}), }),
], ],
}); });
}
case SyntaxKind.TemplateExpression: { case SyntaxKind.TemplateExpression: {
const result = this.createNode(node, { const result = this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.TemplateLiteral, type: ts_estree_1.AST_NODE_TYPES.TemplateLiteral,
@@ -1106,12 +1119,17 @@ class Converter {
case SyntaxKind.TemplateMiddle: case SyntaxKind.TemplateMiddle:
case SyntaxKind.TemplateTail: { case SyntaxKind.TemplateTail: {
const tail = node.kind === SyntaxKind.TemplateTail; const tail = node.kind === SyntaxKind.TemplateTail;
const rawText = this.ast.text.slice(node.getStart(this.ast) + 1, node.end - (tail ? 1 : 2));
const isTagged = node.kind === SyntaxKind.TemplateHead
? node.parent.parent.kind === SyntaxKind.TaggedTemplateExpression
: node.parent.parent.parent.kind ===
SyntaxKind.TaggedTemplateExpression;
return this.createNode(node, { return this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.TemplateElement, type: ts_estree_1.AST_NODE_TYPES.TemplateElement,
tail, tail,
value: { value: {
cooked: node.text, cooked: isTagged && !this.#isValidEscape(rawText) ? null : node.text,
raw: this.ast.text.slice(node.getStart(this.ast) + 1, node.end - (tail ? 1 : 2)), raw: rawText,
}, },
}); });
} }

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,23 @@
(MIT)
Original code Copyright Julian Gruber <julian@juliangruber.com>
Port to TypeScript Copyright Isaac Z. Schlueter <i@izs.me>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,57 @@
# balanced-match
Match balanced string pairs, like `{` and `}` or `<b>` and
`</b>`. Supports regular expressions as well!
## Example
Get the first matching pair of braces:
```js
import { balanced } from 'balanced-match'
console.log(balanced('{', '}', 'pre{in{nested}}post'))
console.log(balanced('{', '}', 'pre{first}between{second}post'))
console.log(
balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post'),
)
```
The matches are:
```bash
$ node example.js
{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }
{ start: 3,
end: 9,
pre: 'pre',
body: 'first',
post: 'between{second}post' }
{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' }
```
## API
### const m = balanced(a, b, str)
For the first non-nested matching pair of `a` and `b` in `str`, return an
object with those keys:
- **start** the index of the first match of `a`
- **end** the index of the matching `b`
- **pre** the preamble, `a` and `b` not included
- **body** the match, `a` and `b` not included
- **post** the postscript, `a` and `b` not included
If there's no match, `undefined` will be returned.
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`.
### const r = balanced.range(a, b, str)
For the first non-nested matching pair of `a` and `b` in `str`, return an
array with indexes: `[ <a index>, <b index> ]`.
If there's no match, `undefined` will be returned.
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`.

View File

@@ -0,0 +1,9 @@
export declare const balanced: (a: string | RegExp, b: string | RegExp, str: string) => false | {
start: number;
end: number;
pre: string;
body: string;
post: string;
} | undefined;
export declare const range: (a: string, b: string, str: string) => undefined | [number, number];
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,GACnB,GAAG,MAAM,GAAG,MAAM,EAClB,GAAG,MAAM,GAAG,MAAM,EAClB,KAAK,MAAM;;;;;;aAgBZ,CAAA;AAOD,eAAO,MAAM,KAAK,GAChB,GAAG,MAAM,EACT,GAAG,MAAM,EACT,KAAK,MAAM,KACV,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,CA2C7B,CAAA"}

View File

@@ -0,0 +1,59 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.range = exports.balanced = void 0;
const balanced = (a, b, str) => {
const ma = a instanceof RegExp ? maybeMatch(a, str) : a;
const mb = b instanceof RegExp ? maybeMatch(b, str) : b;
const r = ma !== null && mb != null && (0, exports.range)(ma, mb, str);
return (r && {
start: r[0],
end: r[1],
pre: str.slice(0, r[0]),
body: str.slice(r[0] + ma.length, r[1]),
post: str.slice(r[1] + mb.length),
});
};
exports.balanced = balanced;
const maybeMatch = (reg, str) => {
const m = str.match(reg);
return m ? m[0] : null;
};
const range = (a, b, str) => {
let begs, beg, left, right = undefined, result;
let ai = str.indexOf(a);
let bi = str.indexOf(b, ai + 1);
let i = ai;
if (ai >= 0 && bi > 0) {
if (a === b) {
return [ai, bi];
}
begs = [];
left = str.length;
while (i >= 0 && !result) {
if (i === ai) {
begs.push(i);
ai = str.indexOf(a, i + 1);
}
else if (begs.length === 1) {
const r = begs.pop();
if (r !== undefined)
result = [r, bi];
}
else {
beg = begs.pop();
if (beg !== undefined && beg < left) {
left = beg;
right = bi;
}
bi = str.indexOf(b, i + 1);
}
i = ai < bi && ai >= 0 ? ai : bi;
}
if (begs.length && right !== undefined) {
result = [left, right];
}
}
return result;
};
exports.range = range;
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAO,MAAM,QAAQ,GAAG,CACtB,CAAkB,EAClB,CAAkB,EAClB,GAAW,EACX,EAAE;IACF,MAAM,EAAE,GAAG,CAAC,YAAY,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IACvD,MAAM,EAAE,GAAG,CAAC,YAAY,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAEvD,MAAM,CAAC,GAAG,EAAE,KAAK,IAAI,IAAI,EAAE,IAAI,IAAI,IAAI,IAAA,aAAK,EAAC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAA;IAEzD,OAAO,CACL,CAAC,IAAI;QACH,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;QACX,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;QACT,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACvB,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;KAClC,CACF,CAAA;AACH,CAAC,CAAA;AAnBY,QAAA,QAAQ,YAmBpB;AAED,MAAM,UAAU,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,EAAE;IAC9C,MAAM,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACxB,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;AACxB,CAAC,CAAA;AAEM,MAAM,KAAK,GAAG,CACnB,CAAS,EACT,CAAS,EACT,GAAW,EACmB,EAAE;IAChC,IAAI,IAAc,EAChB,GAAuB,EACvB,IAAY,EACZ,KAAK,GAAuB,SAAS,EACrC,MAAoC,CAAA;IACtC,IAAI,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IACvB,IAAI,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,CAAA;IAC/B,IAAI,CAAC,GAAG,EAAE,CAAA;IAEV,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;QACtB,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACZ,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;QACjB,CAAC;QACD,IAAI,GAAG,EAAE,CAAA;QACT,IAAI,GAAG,GAAG,CAAC,MAAM,CAAA;QAEjB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACzB,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC;gBACb,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;gBACZ,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;YAC5B,CAAC;iBAAM,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC7B,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;gBACpB,IAAI,CAAC,KAAK,SAAS;oBAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;YACvC,CAAC;iBAAM,CAAC;gBACN,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;gBAChB,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,GAAG,IAAI,EAAE,CAAC;oBACpC,IAAI,GAAG,GAAG,CAAA;oBACV,KAAK,GAAG,EAAE,CAAA;gBACZ,CAAC;gBAED,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;YAC5B,CAAC;YAED,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;QAClC,CAAC;QAED,IAAI,IAAI,CAAC,MAAM,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACvC,MAAM,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QACxB,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AA/CY,QAAA,KAAK,SA+CjB","sourcesContent":["export const balanced = (\n a: string | RegExp,\n b: string | RegExp,\n str: string,\n) => {\n const ma = a instanceof RegExp ? maybeMatch(a, str) : a\n const mb = b instanceof RegExp ? maybeMatch(b, str) : b\n\n const r = ma !== null && mb != null && range(ma, mb, str)\n\n return (\n r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + ma.length, r[1]),\n post: str.slice(r[1] + mb.length),\n }\n )\n}\n\nconst maybeMatch = (reg: RegExp, str: string) => {\n const m = str.match(reg)\n return m ? m[0] : null\n}\n\nexport const range = (\n a: string,\n b: string,\n str: string,\n): undefined | [number, number] => {\n let begs: number[],\n beg: number | undefined,\n left: number,\n right: number | undefined = undefined,\n result: undefined | [number, number]\n let ai = str.indexOf(a)\n let bi = str.indexOf(b, ai + 1)\n let i = ai\n\n if (ai >= 0 && bi > 0) {\n if (a === b) {\n return [ai, bi]\n }\n begs = []\n left = str.length\n\n while (i >= 0 && !result) {\n if (i === ai) {\n begs.push(i)\n ai = str.indexOf(a, i + 1)\n } else if (begs.length === 1) {\n const r = begs.pop()\n if (r !== undefined) result = [r, bi]\n } else {\n beg = begs.pop()\n if (beg !== undefined && beg < left) {\n left = beg\n right = bi\n }\n\n bi = str.indexOf(b, i + 1)\n }\n\n i = ai < bi && ai >= 0 ? ai : bi\n }\n\n if (begs.length && right !== undefined) {\n result = [left, right]\n }\n }\n\n return result\n}\n"]}

View File

@@ -0,0 +1,3 @@
{
"type": "commonjs"
}

View File

@@ -0,0 +1,9 @@
export declare const balanced: (a: string | RegExp, b: string | RegExp, str: string) => false | {
start: number;
end: number;
pre: string;
body: string;
post: string;
} | undefined;
export declare const range: (a: string, b: string, str: string) => undefined | [number, number];
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,GACnB,GAAG,MAAM,GAAG,MAAM,EAClB,GAAG,MAAM,GAAG,MAAM,EAClB,KAAK,MAAM;;;;;;aAgBZ,CAAA;AAOD,eAAO,MAAM,KAAK,GAChB,GAAG,MAAM,EACT,GAAG,MAAM,EACT,KAAK,MAAM,KACV,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,CA2C7B,CAAA"}

View File

@@ -0,0 +1,54 @@
export const balanced = (a, b, str) => {
const ma = a instanceof RegExp ? maybeMatch(a, str) : a;
const mb = b instanceof RegExp ? maybeMatch(b, str) : b;
const r = ma !== null && mb != null && range(ma, mb, str);
return (r && {
start: r[0],
end: r[1],
pre: str.slice(0, r[0]),
body: str.slice(r[0] + ma.length, r[1]),
post: str.slice(r[1] + mb.length),
});
};
const maybeMatch = (reg, str) => {
const m = str.match(reg);
return m ? m[0] : null;
};
export const range = (a, b, str) => {
let begs, beg, left, right = undefined, result;
let ai = str.indexOf(a);
let bi = str.indexOf(b, ai + 1);
let i = ai;
if (ai >= 0 && bi > 0) {
if (a === b) {
return [ai, bi];
}
begs = [];
left = str.length;
while (i >= 0 && !result) {
if (i === ai) {
begs.push(i);
ai = str.indexOf(a, i + 1);
}
else if (begs.length === 1) {
const r = begs.pop();
if (r !== undefined)
result = [r, bi];
}
else {
beg = begs.pop();
if (beg !== undefined && beg < left) {
left = beg;
right = bi;
}
bi = str.indexOf(b, i + 1);
}
i = ai < bi && ai >= 0 ? ai : bi;
}
if (begs.length && right !== undefined) {
result = [left, right];
}
}
return result;
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,CAAkB,EAClB,CAAkB,EAClB,GAAW,EACX,EAAE;IACF,MAAM,EAAE,GAAG,CAAC,YAAY,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IACvD,MAAM,EAAE,GAAG,CAAC,YAAY,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAEvD,MAAM,CAAC,GAAG,EAAE,KAAK,IAAI,IAAI,EAAE,IAAI,IAAI,IAAI,KAAK,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAA;IAEzD,OAAO,CACL,CAAC,IAAI;QACH,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;QACX,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;QACT,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACvB,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;KAClC,CACF,CAAA;AACH,CAAC,CAAA;AAED,MAAM,UAAU,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,EAAE;IAC9C,MAAM,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACxB,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;AACxB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,CACnB,CAAS,EACT,CAAS,EACT,GAAW,EACmB,EAAE;IAChC,IAAI,IAAc,EAChB,GAAuB,EACvB,IAAY,EACZ,KAAK,GAAuB,SAAS,EACrC,MAAoC,CAAA;IACtC,IAAI,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IACvB,IAAI,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,CAAA;IAC/B,IAAI,CAAC,GAAG,EAAE,CAAA;IAEV,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;QACtB,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACZ,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;QACjB,CAAC;QACD,IAAI,GAAG,EAAE,CAAA;QACT,IAAI,GAAG,GAAG,CAAC,MAAM,CAAA;QAEjB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACzB,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC;gBACb,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;gBACZ,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;YAC5B,CAAC;iBAAM,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC7B,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;gBACpB,IAAI,CAAC,KAAK,SAAS;oBAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;YACvC,CAAC;iBAAM,CAAC;gBACN,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;gBAChB,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,GAAG,IAAI,EAAE,CAAC;oBACpC,IAAI,GAAG,GAAG,CAAA;oBACV,KAAK,GAAG,EAAE,CAAA;gBACZ,CAAC;gBAED,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;YAC5B,CAAC;YAED,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;QAClC,CAAC;QAED,IAAI,IAAI,CAAC,MAAM,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACvC,MAAM,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QACxB,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA","sourcesContent":["export const balanced = (\n a: string | RegExp,\n b: string | RegExp,\n str: string,\n) => {\n const ma = a instanceof RegExp ? maybeMatch(a, str) : a\n const mb = b instanceof RegExp ? maybeMatch(b, str) : b\n\n const r = ma !== null && mb != null && range(ma, mb, str)\n\n return (\n r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + ma.length, r[1]),\n post: str.slice(r[1] + mb.length),\n }\n )\n}\n\nconst maybeMatch = (reg: RegExp, str: string) => {\n const m = str.match(reg)\n return m ? m[0] : null\n}\n\nexport const range = (\n a: string,\n b: string,\n str: string,\n): undefined | [number, number] => {\n let begs: number[],\n beg: number | undefined,\n left: number,\n right: number | undefined = undefined,\n result: undefined | [number, number]\n let ai = str.indexOf(a)\n let bi = str.indexOf(b, ai + 1)\n let i = ai\n\n if (ai >= 0 && bi > 0) {\n if (a === b) {\n return [ai, bi]\n }\n begs = []\n left = str.length\n\n while (i >= 0 && !result) {\n if (i === ai) {\n begs.push(i)\n ai = str.indexOf(a, i + 1)\n } else if (begs.length === 1) {\n const r = begs.pop()\n if (r !== undefined) result = [r, bi]\n } else {\n beg = begs.pop()\n if (beg !== undefined && beg < left) {\n left = beg\n right = bi\n }\n\n bi = str.indexOf(b, i + 1)\n }\n\n i = ai < bi && ai >= 0 ? ai : bi\n }\n\n if (begs.length && right !== undefined) {\n result = [left, right]\n }\n }\n\n return result\n}\n"]}

Some files were not shown because too many files have changed in this diff Show More