Update @astrojs/check, @astrojs/vercel and astro packages versions

Updated the versions of @astrojs/check, @astrojs/vercel and astro packages in package.json and package-lock.json. Also enabled the directRenderScript experimental feature in astro.config.mjs. Refactored navigation link active class logic in NavLink.astro to use 'DOMContentLoaded' event for better performance.
This commit is contained in:
Emil Gulamov 2024-03-11 21:22:51 +04:00
parent a338bfbf71
commit 33f667cd55
4 changed files with 130 additions and 69 deletions

View file

@ -15,7 +15,8 @@ export default defineConfig({
integrations: [tailwind(), sitemap(), compressor({ gzip: false, brotli: true })],
output: 'static',
experimental: {
clientPrerender: true
clientPrerender: true,
directRenderScript: true
},
adapter: vercelStatic()
});

158
package-lock.json generated
View file

@ -7,11 +7,11 @@
"": {
"version": "0.0.1",
"dependencies": {
"@astrojs/check": "^0.5.6",
"@astrojs/check": "^0.5.7",
"@astrojs/sitemap": "^3.1.1",
"@astrojs/tailwind": "^5.1.0",
"@astrojs/vercel": "^7.3.5",
"astro": "^4.4.15",
"@astrojs/vercel": "^7.3.6",
"astro": "^4.5.0",
"astro-compressor": "^0.4.1",
"globby": "^14.0.1",
"html-minifier": "^4.0.0",
@ -50,11 +50,11 @@
}
},
"node_modules/@astrojs/check": {
"version": "0.5.6",
"resolved": "https://registry.npmjs.org/@astrojs/check/-/check-0.5.6.tgz",
"integrity": "sha512-i7j5ogoSg/Bu2NV5zVvwCo9R4kGWXWsJDejxpCu9F7iNNlR333u8EwpP4bpeKASDtjOA1rXKo9ogUTEVlIAHqA==",
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/@astrojs/check/-/check-0.5.7.tgz",
"integrity": "sha512-ymJRoC8rb6rfCaLXej5fcgmxIdzea1xFHM2jAb15kGO2hfD/E10fzk5CTcFnuRUO38x9yYAjuFIn/y0QXdxBkA==",
"dependencies": {
"@astrojs/language-server": "^2.7.6",
"@astrojs/language-server": "^2.7.7",
"chokidar": "^3.5.3",
"fast-glob": "^3.3.1",
"kleur": "^4.1.5",
@ -68,19 +68,19 @@
}
},
"node_modules/@astrojs/compiler": {
"version": "2.5.3",
"resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-2.5.3.tgz",
"integrity": "sha512-jzj01BRv/fmo+9Mr2FhocywGzEYiyiP2GVHje1ziGNU6c97kwhYGsnvwMkHrncAy9T9Vi54cjaMK7UE4ClX4vA=="
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-2.7.0.tgz",
"integrity": "sha512-XpC8MAaWjD1ff6/IfkRq/5k1EFj6zhCNqXRd5J43SVJEBj/Bsmizkm8N0xOYscGcDFQkRgEw6/eKnI5x/1l6aA=="
},
"node_modules/@astrojs/internal-helpers": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/@astrojs/internal-helpers/-/internal-helpers-0.2.1.tgz",
"integrity": "sha512-06DD2ZnItMwUnH81LBLco3tWjcZ1lGU9rLCCBaeUCGYe9cI0wKyY2W3kDyoW1I6GmcWgt1fu+D1CTvz+FIKf8A=="
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/@astrojs/internal-helpers/-/internal-helpers-0.3.0.tgz",
"integrity": "sha512-tGmHvrhpzuz0JBHaJX8GywN9g4rldVNHtkoVDC3m/DdzBO70jGoVuc0uuNVglRYnsdwkbG0K02Iw3nOOR3/Y4g=="
},
"node_modules/@astrojs/language-server": {
"version": "2.7.6",
"resolved": "https://registry.npmjs.org/@astrojs/language-server/-/language-server-2.7.6.tgz",
"integrity": "sha512-NhMSmMAuKBMXnvpfn9eYPR7R6zOasAjRb+ta8L+rCHHuKzUc0lBgAF5M6rx01FJqlpGqeqao13eYt4287Ze49g==",
"version": "2.7.7",
"resolved": "https://registry.npmjs.org/@astrojs/language-server/-/language-server-2.7.7.tgz",
"integrity": "sha512-1DdYlIGqzIpuHFMECDCFrOYvwhrRGnB7mCwSSyNdIUXFx9QIUgFJoZUR2/gYk0y8L2hpwm7Wa5d8NuiRv5V9kg==",
"dependencies": {
"@astrojs/compiler": "^2.4.0",
"@jridgewell/sourcemap-codec": "^1.4.15",
@ -116,12 +116,14 @@
}
},
"node_modules/@astrojs/markdown-remark": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/@astrojs/markdown-remark/-/markdown-remark-4.2.1.tgz",
"integrity": "sha512-2RQBIwrq+2qPYtp99bH+eL5hfbK0BoxXla85lHsRpIX/IsGqFrPX6pXI2cbWPihBwGbKCdxS6uZNX2QerZWwpQ==",
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/@astrojs/markdown-remark/-/markdown-remark-4.3.0.tgz",
"integrity": "sha512-iZOgYj/yNDvBRfKqkGuAvjeONhjQPq8Uk3HjyIgcTK5valq03NiUgSc5Ovq00yUVBeYJ/5EDx23c8xqtkkBlPw==",
"dependencies": {
"@astrojs/prism": "^3.0.0",
"github-slugger": "^2.0.0",
"hast-util-from-html": "^2.0.0",
"hast-util-to-text": "^4.0.0",
"import-meta-resolve": "^4.0.0",
"mdast-util-definitions": "^6.0.0",
"rehype-raw": "^7.0.0",
@ -130,9 +132,11 @@
"remark-parse": "^11.0.0",
"remark-rehype": "^11.0.0",
"remark-smartypants": "^2.0.0",
"shikiji": "^0.9.18",
"shiki": "^1.1.2",
"unified": "^11.0.4",
"unist-util-remove-position": "^5.0.0",
"unist-util-visit": "^5.0.0",
"unist-util-visit-parents": "^6.0.0",
"vfile": "^6.0.1"
}
},
@ -202,11 +206,11 @@
}
},
"node_modules/@astrojs/vercel": {
"version": "7.3.5",
"resolved": "https://registry.npmjs.org/@astrojs/vercel/-/vercel-7.3.5.tgz",
"integrity": "sha512-fWfWu1jHDKJnNp2qJfX+EjDtM7uV6od+D2UHvIwfGu12YFmqggwmuukntvB/X+b/E/AVBA8geftHobpoBJEY0g==",
"version": "7.3.6",
"resolved": "https://registry.npmjs.org/@astrojs/vercel/-/vercel-7.3.6.tgz",
"integrity": "sha512-dQj3cvTOsgOj/V8EVya16X1L3PCJ9aw0rWCggsFcERI72qEDXctd7l+K/iZC1dOvsM3k6VhwiacwsETowsctAA==",
"dependencies": {
"@astrojs/internal-helpers": "0.2.1",
"@astrojs/internal-helpers": "0.3.0",
"@vercel/analytics": "^1.0.2",
"@vercel/nft": "^0.26.4",
"esbuild": "^0.19.6",
@ -1017,11 +1021,6 @@
"node-pre-gyp": "bin/node-pre-gyp"
}
},
"node_modules/@medv/finder": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@medv/finder/-/finder-3.1.0.tgz",
"integrity": "sha512-ojkXjR3K0Zz3jnCR80tqPL+0yvbZk/lEodb6RIVjLz7W8RVA2wrw8ym/CzCpXO9SYVUIKHFUpc7jvf8UKfIM3w=="
},
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@ -1245,6 +1244,11 @@
"win32"
]
},
"node_modules/@shikijs/core": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.1.7.tgz",
"integrity": "sha512-gTYLUIuD1UbZp/11qozD3fWpUTuMqPSf3svDMMrL0UmlGU7D9dPw/V1FonwAorCUJBltaaESxq90jrSjQyGixg=="
},
"node_modules/@sindresorhus/merge-streams": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.2.1.tgz",
@ -1719,13 +1723,13 @@
}
},
"node_modules/astro": {
"version": "4.4.15",
"resolved": "https://registry.npmjs.org/astro/-/astro-4.4.15.tgz",
"integrity": "sha512-RTiAnlO8hDp6GqMVvaeJxyuCJhHNEho09lHshMNQBqgRabYPOJGW0HZZrbLRGNOqN9I14ivhZIunYGgAaGQpWw==",
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/astro/-/astro-4.5.0.tgz",
"integrity": "sha512-NyBePQs0MqsLLde2hOuZO6eiLY2SzpDDeDQDfx39r2Ho2wmlaRFiWxIvcI5vAw75UNVUQuLWRDe+ZNl29AossQ==",
"dependencies": {
"@astrojs/compiler": "^2.5.3",
"@astrojs/internal-helpers": "0.2.1",
"@astrojs/markdown-remark": "4.2.1",
"@astrojs/compiler": "^2.7.0",
"@astrojs/internal-helpers": "0.3.0",
"@astrojs/markdown-remark": "4.3.0",
"@astrojs/telemetry": "3.0.4",
"@babel/core": "^7.23.3",
"@babel/generator": "^7.23.3",
@ -1733,7 +1737,7 @@
"@babel/plugin-transform-react-jsx": "^7.22.5",
"@babel/traverse": "^7.23.3",
"@babel/types": "^7.23.3",
"@medv/finder": "^3.1.0",
"@shikijs/core": "^1.1.2",
"@types/babel__core": "^7.20.4",
"acorn": "^8.11.2",
"aria-query": "^5.3.0",
@ -1775,8 +1779,7 @@
"rehype": "^13.0.1",
"resolve": "^1.22.4",
"semver": "^7.5.4",
"shikiji": "^0.9.19",
"shikiji-core": "^0.9.19",
"shiki": "^1.1.2",
"string-width": "^7.0.0",
"strip-ansi": "^7.1.0",
"tsconfck": "^3.0.0",
@ -1786,7 +1789,8 @@
"vitefu": "^0.2.5",
"which-pm": "^2.1.1",
"yargs-parser": "^21.1.1",
"zod": "^3.22.4"
"zod": "^3.22.4",
"zod-to-json-schema": "^3.22.4"
},
"bin": {
"astro": "astro.js"
@ -3235,6 +3239,18 @@
"url": "https://opencollective.com/unified"
}
},
"node_modules/hast-util-is-element": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/hast-util-is-element/-/hast-util-is-element-3.0.0.tgz",
"integrity": "sha512-Val9mnv2IWpLbNPqc/pUem+a7Ipj2aHacCwgNfTiK0vJKl0LF+4Ba4+v1oPHFpf3bLYmreq0/l3Gud9S5OH42g==",
"dependencies": {
"@types/hast": "^3.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/hast-util-parse-selector": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-4.0.0.tgz",
@ -3312,6 +3328,21 @@
"url": "https://opencollective.com/unified"
}
},
"node_modules/hast-util-to-text": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/hast-util-to-text/-/hast-util-to-text-4.0.0.tgz",
"integrity": "sha512-EWiE1FSArNBPUo1cKWtzqgnuRQwEeQbQtnFJRYV1hb1BWDgrAlBU0ExptvZMM/KSA82cDpm2sFGf3Dmc5Mza3w==",
"dependencies": {
"@types/hast": "^3.0.0",
"@types/unist": "^3.0.0",
"hast-util-is-element": "^3.0.0",
"unist-util-find-after": "^5.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/hast-util-whitespace": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz",
@ -6648,19 +6679,14 @@
"node": ">=8"
}
},
"node_modules/shikiji": {
"version": "0.9.19",
"resolved": "https://registry.npmjs.org/shikiji/-/shikiji-0.9.19.tgz",
"integrity": "sha512-Kw2NHWktdcdypCj1GkKpXH4o6Vxz8B8TykPlPuLHOGSV8VkhoCLcFOH4k19K4LXAQYRQmxg+0X/eM+m2sLhAkg==",
"node_modules/shiki": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/shiki/-/shiki-1.1.7.tgz",
"integrity": "sha512-9kUTMjZtcPH3i7vHunA6EraTPpPOITYTdA5uMrvsJRexktqP0s7P3s9HVK80b4pP42FRVe03D7fT3NmJv2yYhw==",
"dependencies": {
"shikiji-core": "0.9.19"
"@shikijs/core": "1.1.7"
}
},
"node_modules/shikiji-core": {
"version": "0.9.19",
"resolved": "https://registry.npmjs.org/shikiji-core/-/shikiji-core-0.9.19.tgz",
"integrity": "sha512-AFJu/vcNT21t0e6YrfadZ+9q86gvPum6iywRyt1OtIPjPFe25RQnYJyxHQPMLKCCWA992TPxmEmbNcOZCAJclw=="
},
"node_modules/signal-exit": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
@ -7323,6 +7349,19 @@
"url": "https://opencollective.com/unified"
}
},
"node_modules/unist-util-find-after": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/unist-util-find-after/-/unist-util-find-after-5.0.0.tgz",
"integrity": "sha512-amQa0Ep2m6hE2g72AugUItjbuM8X8cGQnFoHk0pGfrFeT9GZhzN5SW8nRsiGKK7Aif4CrACPENkA6P/Lw6fHGQ==",
"dependencies": {
"@types/unist": "^3.0.0",
"unist-util-is": "^6.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/unist-util-is": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.0.tgz",
@ -7365,6 +7404,19 @@
"url": "https://opencollective.com/unified"
}
},
"node_modules/unist-util-remove-position": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-5.0.0.tgz",
"integrity": "sha512-Hp5Kh3wLxv0PHj9m2yZhhLt58KzPtEYKQQ4yxfYFEO7EvHwzyDYnduhHnY1mDxoqr7VUwVuHXk9RXKIiYS1N8Q==",
"dependencies": {
"@types/unist": "^3.0.0",
"unist-util-visit": "^5.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/unist-util-stringify-position": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz",
@ -8134,6 +8186,14 @@
"url": "https://github.com/sponsors/colinhacks"
}
},
"node_modules/zod-to-json-schema": {
"version": "3.22.4",
"resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.22.4.tgz",
"integrity": "sha512-2Ed5dJ+n/O3cU383xSY28cuVi0BCQhF8nYqWU5paEpl7fVdqdAmiLdqLyfblbNdfOFwFfi/mqU4O1pwc60iBhQ==",
"peerDependencies": {
"zod": "^3.22.4"
}
},
"node_modules/zwitch": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz",

View file

@ -10,11 +10,11 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/check": "^0.5.6",
"@astrojs/check": "^0.5.7",
"@astrojs/sitemap": "^3.1.1",
"@astrojs/tailwind": "^5.1.0",
"@astrojs/vercel": "^7.3.5",
"astro": "^4.4.15",
"@astrojs/vercel": "^7.3.6",
"astro": "^4.5.0",
"astro-compressor": "^0.4.1",
"globby": "^14.0.1",
"html-minifier": "^4.0.0",

View file

@ -25,20 +25,20 @@ If URL is '/' (home page), assign ID as 'home'
</a>
<script>
window.onload = function () {
let url = window.location.pathname;
let firstPathSegment = url.split("/")[1];
let navId = firstPathSegment ? firstPathSegment : "home";
let nav = document.getElementById(navId);
if (nav) {
nav.classList.remove(
"text-neutral-600",
"dark:text-neutral-400",
"hover:text-neutral-500",
"dark:hover:text-neutral-500",
);
nav.classList.add("text-[#fa5a15]", "dark:text-[#fb713b]");
nav.setAttribute("aria-current", "page");
}
};
document.addEventListener('DOMContentLoaded', function () {
let url = window.location.pathname;
let firstPathSegment = url.split("/")[1];
let navId = firstPathSegment ? firstPathSegment : "home";
let nav = document.getElementById(navId);
if (nav) {
nav.classList.remove(
"text-neutral-600",
"dark:text-neutral-400",
"hover:text-neutral-500",
"dark:hover:text-neutral-500",
);
nav.classList.add("text-[#fa5a15]", "dark:text-[#fb713b]");
nav.setAttribute("aria-current", "page");
}
});
</script>