From c60e45c354fa0a970ea8fa49296ee3937d877bc2 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 1 Feb 2024 09:04:44 +1300 Subject: [PATCH] fix types --- package.json | 4 +- pnpm-lock.yaml | 104 +++++++++++++++++++++++------------------- src/content/config.ts | 44 ++++++++---------- 3 files changed, 77 insertions(+), 75 deletions(-) diff --git a/package.json b/package.json index 72f3d44..9aa5184 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,8 @@ "@astrojs/sitemap": "3.0.4", "@astrojs/tailwind": "5.1.0", "@orama/plugin-astro": "2.0.0-beta.12", - "astro": "4.1.2", - "astro-expressive-code": "0.31.0", + "astro": "4.2.3", + "astro-expressive-code": "0.32.2", "astro-icon": "1.0.2", "astro-seo": "0.8.0", "clsx": "2.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a1e7aff..65808df 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,16 +16,16 @@ dependencies: version: 3.0.4 '@astrojs/tailwind': specifier: 5.1.0 - version: 5.1.0(astro@4.1.2)(tailwindcss@3.4.1) + version: 5.1.0(astro@4.2.3)(tailwindcss@3.4.1) '@orama/plugin-astro': specifier: 2.0.0-beta.12 - version: 2.0.0-beta.12(astro@4.1.2) + version: 2.0.0-beta.12(astro@4.2.3) astro: - specifier: 4.1.2 - version: 4.1.2(@types/node@20.11.0)(typescript@5.3.3) + specifier: 4.2.3 + version: 4.2.3(@types/node@20.11.0)(typescript@5.3.3) astro-expressive-code: - specifier: 0.31.0 - version: 0.31.0(astro@4.1.2) + specifier: 0.32.2 + version: 0.32.2(astro@4.2.3) astro-icon: specifier: 1.0.2 version: 1.0.2 @@ -162,6 +162,11 @@ packages: /@astrojs/compiler@2.4.0: resolution: {integrity: sha512-LUN/iG8KcStfChHwTvCg/t91IQFQxguF3CkDLW3tdY2vBKZmOJy9MgtRl20ZGgPtgrykGCtnr4AellEm0bPuFg==} + dev: true + + /@astrojs/compiler@2.5.1: + resolution: {integrity: sha512-o2hKiFJXZOm1Gov+RGXSWnKlnb/UF7KRTx/Y2uazYe3+MrLY+sqLN+yB4EH2bElc0l1K9cDb4mZSejuq563rGQ==} + dev: false /@astrojs/internal-helpers@0.2.1: resolution: {integrity: sha512-06DD2ZnItMwUnH81LBLco3tWjcZ1lGU9rLCCBaeUCGYe9cI0wKyY2W3kDyoW1I6GmcWgt1fu+D1CTvz+FIKf8A==} @@ -179,7 +184,7 @@ packages: prettier-plugin-astro: optional: true dependencies: - '@astrojs/compiler': 2.4.0 + '@astrojs/compiler': 2.5.1 '@jridgewell/sourcemap-codec': 1.4.15 '@volar/kit': 1.11.1(typescript@5.3.3) '@volar/language-core': 1.11.1 @@ -203,8 +208,8 @@ packages: - typescript dev: false - /@astrojs/markdown-remark@4.0.1: - resolution: {integrity: sha512-RU4ESnqvyLpj8WZs0n5elS6idaDdtIIm7mIpMaRNPCebpxMjfcfdwcmBwz83ktAj5d2eO5bC3z92TcGdli+lRw==} + /@astrojs/markdown-remark@4.2.0: + resolution: {integrity: sha512-qQB+LoxmIqzkhLXaQAzfzlBxZU1jeQYailsifurz89WeY0Q8ywIj8uQQSyqxb7rPPg3ZfdNdxsN9lF5UaCRn0w==} dependencies: '@astrojs/prism': 3.0.0 github-slugger: 2.0.0 @@ -216,7 +221,7 @@ packages: remark-parse: 11.0.0 remark-rehype: 11.0.0 remark-smartypants: 2.0.0 - shikiji: 0.6.13 + shikiji: 0.9.19 unified: 11.0.4 unist-util-visit: 5.0.0 vfile: 6.0.1 @@ -245,13 +250,13 @@ packages: zod: 3.22.4 dev: false - /@astrojs/tailwind@5.1.0(astro@4.1.2)(tailwindcss@3.4.1): + /@astrojs/tailwind@5.1.0(astro@4.2.3)(tailwindcss@3.4.1): resolution: {integrity: sha512-BJoCDKuWhU9FT2qYg+fr6Nfb3qP4ShtyjXGHKA/4mHN94z7BGcmauQK23iy+YH5qWvTnhqkd6mQPQ1yTZTe9Ig==} peerDependencies: astro: ^3.0.0 || ^4.0.0 tailwindcss: ^3.0.24 dependencies: - astro: 4.1.2(@types/node@20.11.0)(typescript@5.3.3) + astro: 4.2.3(@types/node@20.11.0)(typescript@5.3.3) autoprefixer: 10.4.16(postcss@8.4.32) postcss: 8.4.32 postcss-load-config: 4.0.2(postcss@8.4.32) @@ -856,8 +861,8 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@expressive-code/core@0.31.0: - resolution: {integrity: sha512-zeCuojWRYeFs0UDOhzpKMzpjI/tJPCQna4jcVp5SJLMn4qNtHXgVmz3AngoMFoFcAlK6meE3wxzy//0d6K4NPw==} + /@expressive-code/core@0.32.2: + resolution: {integrity: sha512-b4/LuslONCqyT48eKlcxsbnIqGw4CSe/aW4Co58UvKrtDMXKtr4erpVx/EE2emszotWt0xtkOjCnS6o171+E4A==} dependencies: '@ctrl/tinycolor': 3.6.1 hast-util-to-html: 8.0.4 @@ -866,24 +871,24 @@ packages: postcss-nested: 6.0.1(postcss@8.4.32) dev: false - /@expressive-code/plugin-frames@0.31.0: - resolution: {integrity: sha512-eYWfK3i4w2gSpOGBFNnu05JKSXC90APgUNdam8y5i0Ie2CVAwpxDtEp0NRqugvEKC0aMJe6ZmHN5Hu2WAVJmig==} + /@expressive-code/plugin-frames@0.32.2: + resolution: {integrity: sha512-QKoL5jNCjQnz5GpQMBtZ8Gb1bNXxjarIBkMc8CIugdlvniA442latUKsH1fhacG1UQieSiADctSHjIvVH8Qm9A==} dependencies: - '@expressive-code/core': 0.31.0 + '@expressive-code/core': 0.32.2 hastscript: 7.2.0 dev: false - /@expressive-code/plugin-shiki@0.31.0: - resolution: {integrity: sha512-fU5wPPfV1LGcS+Z1wcEkzI1fzBq9IAdt0DN0ni8sT7E+gpkULda4GA4IFD9iWKCGIhSDsBbG+bjc9hrYoJsDIQ==} + /@expressive-code/plugin-shiki@0.32.2: + resolution: {integrity: sha512-ulNi/NAGMnx8qGBlRTGrH7qHeGV6r15MrkjY/AaTQNImnqory05DF4qOF/dqxe7WywawwsHQ2a4BzsoGYLjicA==} dependencies: - '@expressive-code/core': 0.31.0 + '@expressive-code/core': 0.32.2 shikiji: 0.8.7 dev: false - /@expressive-code/plugin-text-markers@0.31.0: - resolution: {integrity: sha512-32o3pPMBq6bVUfRsAfFyqNpHbD1Z3iftoX9yt95F5zakLMsmHzZL4f0jyNr8XpXe7qcTnl0kIijBkUpvS6Pxfg==} + /@expressive-code/plugin-text-markers@0.32.2: + resolution: {integrity: sha512-1fAkWkQ7qcb6DDqV3ILB1uMi7yvSIu6AHFW+bSzNcgXBl/KCudoUtmZ/YRBnNKbUqH8WSYUA41Yr/SeFwEGmbQ==} dependencies: - '@expressive-code/core': 0.31.0 + '@expressive-code/core': 0.32.2 hastscript: 7.2.0 unist-util-visit-parents: 5.1.3 dev: false @@ -1316,14 +1321,14 @@ packages: engines: {node: '>= 16.0.0'} dev: false - /@orama/plugin-astro@2.0.0-beta.12(astro@4.1.2): + /@orama/plugin-astro@2.0.0-beta.12(astro@4.2.3): resolution: {integrity: sha512-xtLIVBSM2FCn2hNW6+R9o9oNZx8AFPQxztbbriBE0AWs10f9KULUtx44BWfpJR/K/oVicGez8Dcc2AlrBgAHmw==} engines: {node: '>=18.0.0'} peerDependencies: astro: ^2.0.4 dependencies: '@orama/orama': 2.0.0-beta.12 - astro: 4.1.2(@types/node@20.11.0)(typescript@5.3.3) + astro: 4.2.3(@types/node@20.11.0)(typescript@5.3.3) html-to-text: 9.0.5 dev: false @@ -2158,13 +2163,14 @@ packages: - supports-color dev: true - /astro-expressive-code@0.31.0(astro@4.1.2): - resolution: {integrity: sha512-o6eFrRSYLnlM/2FKkO3MgkbmVxT8N6DJcKvbRf1wbUcRXpz7s1KfugbdsaGw3ABEWUBuQIBsRppcGGw2L816Vg==} + /astro-expressive-code@0.32.2(astro@4.2.3): + resolution: {integrity: sha512-uJbgSCl9F9NGjdfTmBHci5Ws0/zMUNk9dWfOl6rvYaOL6NZha+NNjnmB3Aza7GnxP+NvQt3RV8M2vpcZnaudSw==} peerDependencies: astro: ^3.3.0 || ^4.0.0-beta dependencies: - astro: 4.1.2(@types/node@20.11.0)(typescript@5.3.3) - remark-expressive-code: 0.31.0 + astro: 4.2.3(@types/node@20.11.0)(typescript@5.3.3) + hast-util-to-html: 8.0.4 + remark-expressive-code: 0.32.2 dev: false /astro-icon@1.0.2: @@ -2181,14 +2187,14 @@ packages: resolution: {integrity: sha512-7gq6lhibCM8FuzZIJlbLLWP5EJ9KL2/4XqeFrAg9O6ZK2xMFxJ5ubKf+a0VJwwTu8W8Xr421CmpiXu6Hq7n/7Q==} dev: false - /astro@4.1.2(@types/node@20.11.0)(typescript@5.3.3): - resolution: {integrity: sha512-C/CrsIjRnRZYsLIBquAoTKj3ZPyGPVRByEcPMs6CrJLiHmcYnjpRMVd7oBFepU6772U1ZcXLy0zdxoRYjHFf5w==} + /astro@4.2.3(@types/node@20.11.0)(typescript@5.3.3): + resolution: {integrity: sha512-6bfSogmcwMdaTRAxuhJ7aISGin/T3ovI/69JWPRYOHBkPZxA/EfsNQOI2TiRHFJSF9XtoMnFlgvT+iYapkhOwg==} engines: {node: '>=18.14.1', npm: '>=6.14.0'} hasBin: true dependencies: - '@astrojs/compiler': 2.4.0 + '@astrojs/compiler': 2.5.1 '@astrojs/internal-helpers': 0.2.1 - '@astrojs/markdown-remark': 4.0.1 + '@astrojs/markdown-remark': 4.2.0 '@astrojs/telemetry': 3.0.4 '@babel/core': 7.23.7 '@babel/generator': 7.23.6 @@ -2238,7 +2244,7 @@ packages: resolve: 1.22.8 semver: 7.5.4 server-destroy: 1.0.1 - shikiji: 0.6.13 + shikiji: 0.9.19 string-width: 7.0.0 strip-ansi: 7.1.0 tsconfck: 3.0.1(typescript@5.3.3) @@ -3596,13 +3602,13 @@ packages: dev: false optional: true - /expressive-code@0.31.0: - resolution: {integrity: sha512-rxKGYS8iRwNUbRNfyCyoe3XQvBLTtGdXbNKM+ODDWCn4VL2DVT1gD1M2N2Alg8HQHIWZJsZIMsYbziO0MRjPlw==} + /expressive-code@0.32.2: + resolution: {integrity: sha512-fUwnj9O6/5HKSniD/nXLEGKmcwqL+ipWyZAFjxp9weI9AkTiya3bVAo9gVUquM4jXRHSs8pgsRMQgRtKItlriA==} dependencies: - '@expressive-code/core': 0.31.0 - '@expressive-code/plugin-frames': 0.31.0 - '@expressive-code/plugin-shiki': 0.31.0 - '@expressive-code/plugin-text-markers': 0.31.0 + '@expressive-code/core': 0.32.2 + '@expressive-code/plugin-frames': 0.32.2 + '@expressive-code/plugin-shiki': 0.32.2 + '@expressive-code/plugin-text-markers': 0.32.2 dev: false /extend-shallow@2.0.1: @@ -6417,10 +6423,10 @@ packages: engines: {node: '>= 0.10'} dev: true - /remark-expressive-code@0.31.0: - resolution: {integrity: sha512-ZnKXo9lB0kBUHZIlw2NdqMMgXriVVajEhtQfJ+MWeibMpyM1kuOa28jefNfNFd3FAoNPrc/A3M0fDRkYvWw9Gw==} + /remark-expressive-code@0.32.2: + resolution: {integrity: sha512-UnCUlu+Q2FO8glmtlEnjIN6V8IKfbGlYLSTDokbd9VCZHkI0+FeHcCc/5WpzGY2CSSPL02AC5rHUfvAZV7tZzQ==} dependencies: - expressive-code: 0.31.0 + expressive-code: 0.32.2 hast-util-to-html: 8.0.4 unist-util-visit: 4.1.2 dev: false @@ -6801,10 +6807,8 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - /shikiji@0.6.13: - resolution: {integrity: sha512-4T7X39csvhT0p7GDnq9vysWddf2b6BeioiN3Ymhnt3xcy9tXmDcnsEFVxX18Z4YcQgEE/w48dLJ4pPPUcG9KkA==} - dependencies: - hast-util-to-html: 9.0.0 + /shikiji-core@0.9.19: + resolution: {integrity: sha512-AFJu/vcNT21t0e6YrfadZ+9q86gvPum6iywRyt1OtIPjPFe25RQnYJyxHQPMLKCCWA992TPxmEmbNcOZCAJclw==} dev: false /shikiji@0.8.7: @@ -6813,6 +6817,12 @@ packages: hast-util-to-html: 9.0.0 dev: false + /shikiji@0.9.19: + resolution: {integrity: sha512-Kw2NHWktdcdypCj1GkKpXH4o6Vxz8B8TykPlPuLHOGSV8VkhoCLcFOH4k19K4LXAQYRQmxg+0X/eM+m2sLhAkg==} + dependencies: + shikiji-core: 0.9.19 + dev: false + /side-channel@1.0.4: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} dependencies: diff --git a/src/content/config.ts b/src/content/config.ts index 4b02dc0..e1677ff 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -1,18 +1,12 @@ import { defineCollection, z, reference } from "astro:content"; -const pages = defineCollection({ - type: "content", - schema: () => z.object({}), -}); - const tools = defineCollection({ type: "content", - schema: () => - z.object({ - name: z.string(), - url: z.string(), - order: z.number(), - }), + schema: z.object({ + name: z.string(), + url: z.string(), + order: z.number(), + }), }); const projects = defineCollection({ @@ -32,24 +26,22 @@ const projects = defineCollection({ const tags = defineCollection({ type: "content", - schema: () => - z.object({ - name: z.string(), - url: z.string(), - }), + schema: z.object({ + name: z.string(), + url: z.string(), + }), }); const posts = defineCollection({ type: "content", - schema: () => - z.object({ - title: z.string(), - date: z.date(), - lastUpdated: z.date().optional(), - tags: z.array(reference("tags")), - description: z.string(), - published: z.boolean(), - }), + schema: z.object({ + title: z.string(), + date: z.date(), + lastUpdated: z.date().optional(), + tags: z.array(reference("tags")), + description: z.string(), + published: z.boolean(), + }), }); -export const collections = { pages, tools, projects, tags, posts }; +export const collections = { tools, projects, tags, posts };