From 6252758a8f5fc7713fb6f0e4a5fb8626af3d40b7 Mon Sep 17 00:00:00 2001 From: Yufan Sheng Date: Mon, 17 Jun 2024 23:45:27 +0800 Subject: [PATCH] chore: monkey patch the astro. --- Dockerfile | 1 + README.md | 1 + patches/astro+4.10.3.patch | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 patches/astro+4.10.3.patch diff --git a/Dockerfile b/Dockerfile index f367eaa..ca267f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,7 @@ COPY . . ENV ASTRO_TELEMETRY_DISABLED=1 RUN NODE_ENV=development npm install +RUN npm i patch-package && npm exec patch-package RUN npm run build FROM base AS runtime diff --git a/README.md b/README.md index 741ac93..12379d4 100644 --- a/README.md +++ b/README.md @@ -179,6 +179,7 @@ For instance, the [giscus](https://giscus.app) is an opinionated choice. - [ ] Check article grammar errors by using ChatGPT. Remain **54** posts. - [ ] Add music to the articles. Remain **54** posts. +- [ ] Use Astro new Action definition. - [ ] External the article inner links with different target. - [ ] Slide share components integration. diff --git a/patches/astro+4.10.3.patch b/patches/astro+4.10.3.patch new file mode 100644 index 0000000..4144be3 --- /dev/null +++ b/patches/astro+4.10.3.patch @@ -0,0 +1,22 @@ +diff --git a/node_modules/astro/dist/content/types-generator.js b/node_modules/astro/dist/content/types-generator.js +index af976bb..b03e214 100644 +--- a/node_modules/astro/dist/content/types-generator.js ++++ b/node_modules/astro/dist/content/types-generator.js +@@ -351,8 +351,6 @@ async function writeContentFiles({ + collection: ${collectionKey}; + data: ${dataType} + }; +-`; +- dataTypesStr += `}; + `; + } + if (settings.config.experimental.contentCollectionJsonSchema && collectionConfig?.schema) { +@@ -382,6 +380,8 @@ async function writeContentFiles({ + ); + } + } ++ dataTypesStr += `}; ++`; + break; + } + }