diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index 7c0bbc3a86..5f128f7df6 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -31,7 +31,7 @@ jobs: - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 with: - ref: refs/pull/${{ github.event.issue.number }}/merge + ref: ${{ github.event.issue.pull_request.head.sha }} fetch-depth: 0 - run: corepack enable diff --git a/packages/nuxt/.gitignore b/packages/nuxt/.gitignore new file mode 100644 index 0000000000..95c0486757 --- /dev/null +++ b/packages/nuxt/.gitignore @@ -0,0 +1,6 @@ +src/app/components/error-404.vue +src/app/components/error-500.vue +src/app/components/error-dev.vue +src/app/components/welcome.vue +src/core/runtime/nitro/error-500.ts +src/core/runtime/nitro/error-dev.ts diff --git a/packages/nuxt/src/app/components/error-404.vue b/packages/nuxt/src/app/components/error-404.vue deleted file mode 120000 index c2b73ea4bf..0000000000 --- a/packages/nuxt/src/app/components/error-404.vue +++ /dev/null @@ -1 +0,0 @@ -../../../../ui-templates/dist/templates/error-404.vue \ No newline at end of file diff --git a/packages/nuxt/src/app/components/error-500.vue b/packages/nuxt/src/app/components/error-500.vue deleted file mode 120000 index 8d3d1c8b9d..0000000000 --- a/packages/nuxt/src/app/components/error-500.vue +++ /dev/null @@ -1 +0,0 @@ -../../../../ui-templates/dist/templates/error-500.vue \ No newline at end of file diff --git a/packages/nuxt/src/app/components/error-dev.vue b/packages/nuxt/src/app/components/error-dev.vue deleted file mode 120000 index b793df3c2f..0000000000 --- a/packages/nuxt/src/app/components/error-dev.vue +++ /dev/null @@ -1 +0,0 @@ -../../../../ui-templates/dist/templates/error-dev.vue \ No newline at end of file diff --git a/packages/nuxt/src/app/components/welcome.vue b/packages/nuxt/src/app/components/welcome.vue deleted file mode 120000 index e2e9ab51e4..0000000000 --- a/packages/nuxt/src/app/components/welcome.vue +++ /dev/null @@ -1 +0,0 @@ -../../../../ui-templates/dist/templates/welcome.vue \ No newline at end of file diff --git a/packages/nuxt/src/core/runtime/nitro/error-500.ts b/packages/nuxt/src/core/runtime/nitro/error-500.ts deleted file mode 120000 index 7c4f86d19f..0000000000 --- a/packages/nuxt/src/core/runtime/nitro/error-500.ts +++ /dev/null @@ -1 +0,0 @@ -../../../../../ui-templates/dist/templates/error-500.ts \ No newline at end of file diff --git a/packages/nuxt/src/core/runtime/nitro/error-dev.ts b/packages/nuxt/src/core/runtime/nitro/error-dev.ts deleted file mode 120000 index b14fdaa625..0000000000 --- a/packages/nuxt/src/core/runtime/nitro/error-dev.ts +++ /dev/null @@ -1 +0,0 @@ -../../../../../ui-templates/dist/templates/error-dev.ts \ No newline at end of file diff --git a/packages/ui-templates/lib/render.ts b/packages/ui-templates/lib/render.ts index 34ba7c189c..27f0c3bf4a 100644 --- a/packages/ui-templates/lib/render.ts +++ b/packages/ui-templates/lib/render.ts @@ -1,5 +1,6 @@ import { fileURLToPath } from 'node:url' import { readFileSync, rmdirSync, unlinkSync, writeFileSync } from 'node:fs' +import { copyFile } from 'node:fs/promises' import { basename, dirname, join, resolve } from 'pathe' import type { Plugin } from 'vite' // @ts-expect-error https://github.com/GoogleChromeLabs/critters/pull/151 @@ -167,6 +168,15 @@ export const RenderPlugin = () => { unlinkSync(fileName) rmdirSync(dirname(fileName)) } + + // we manually copy files across rather than using symbolic links for better windows support + const nuxtRoot = r('../nuxt') + for (const file of ['error-404.vue', 'error-500.vue', 'error-dev.vue', 'welcome.vue']) { + await copyFile(r(`dist/templates/${file}`), join(nuxtRoot, 'src/app/components', file)) + } + for (const file of ['error-500.ts', 'error-dev.ts']) { + await copyFile(r(`dist/templates/${file}`), join(nuxtRoot, 'src/core/runtime/nitro', file)) + } }, } }