From c071458257b014efcae7ec7e29d5d87d5ecaf8b6 Mon Sep 17 00:00:00 2001 From: Arsh <69170106+lilnasy@users.noreply.github.com> Date: Tue, 10 Oct 2023 14:06:35 +0000 Subject: [PATCH] chore: removed adapters cleanup (#8726) * update ci, readme, comments, remote workspaces * fix hosted test fixture * keep adapter config typedocs --- .Dockerfile | 8 ----- .devcontainer/Dockerfile | 4 --- .devcontainer/deno/devcontainer.json | 34 ------------------- .devcontainer/examples.deno.Dockerfile | 10 ------ .github/workflows/ci.yml | 5 --- .github/workflows/test-hosts.yml | 22 +++++------- .gitpod.yml | 2 -- .gitpod/gitpod-setup.sh | 3 ++ README.md | 2 -- examples/integration/index.ts | 6 ++-- packages/astro/src/cli/add/index.ts | 1 - .../hosted/hosted-astro-project/src/env.d.ts | 2 +- 12 files changed, 16 insertions(+), 83 deletions(-) delete mode 100644 .Dockerfile delete mode 100644 .devcontainer/deno/devcontainer.json delete mode 100644 .devcontainer/examples.deno.Dockerfile diff --git a/.Dockerfile b/.Dockerfile deleted file mode 100644 index b5c205734..000000000 --- a/.Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM gitpod/workspace-node - -# Install latest pnpm -RUN curl -fsSL https://get.pnpm.io/install.sh | SHELL=`which bash` bash - - -# Install deno in gitpod -RUN curl -fsSL https://deno.land/x/install/install.sh | sh -RUN /home/gitpod/.deno/bin/deno completions bash > /home/gitpod/.bashrc.d/90-deno && echo 'export DENO_INSTALL="/home/gitpod/.deno"' >> /home/gitpod/.bashrc.d/90-deno && echo 'export PATH="$DENO_INSTALL/bin:$PATH"' >> /home/gitpod/.bashrc.d/90-deno diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index de1541343..85a51017b 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -6,10 +6,6 @@ RUN npm install -g @playwright/test # Install latest pnpm RUN npm install -g pnpm -# Install deno -ENV DENO_INSTALL=/usr/local -RUN curl -fsSL https://deno.land/x/install/install.sh | sh - RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ && curl -sSL https://dl.google.com/linux/direct/google-chrome-stable_current_$(dpkg --print-architecture).deb -o /tmp/chrome.deb \ && apt-get -y install /tmp/chrome.deb diff --git a/.devcontainer/deno/devcontainer.json b/.devcontainer/deno/devcontainer.json deleted file mode 100644 index 05b733527..000000000 --- a/.devcontainer/deno/devcontainer.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "Deno", - "build": { - "dockerfile": "../examples.deno.Dockerfile" - }, - - "workspaceFolder": "/workspaces/astro/examples/deno", - - "portsAttributes": { - "4321": { - "label": "Application", - "onAutoForward": "openPreview" - } - }, - - "forwardPorts": [4321], - - "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", - - "waitFor": "postCreateCommand", - - "postAttachCommand": { - "Server": "pnpm start --host" - }, - - "customizations": { - "codespaces": { - "openFiles": ["src/pages/index.astro"] - }, - "vscode": { - "extensions": ["astro-build.astro-vscode", "esbenp.prettier-vscode"] - } - } -} diff --git a/.devcontainer/examples.deno.Dockerfile b/.devcontainer/examples.deno.Dockerfile deleted file mode 100644 index e4526f1ac..000000000 --- a/.devcontainer/examples.deno.Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM mcr.microsoft.com/devcontainers/javascript-node:0-18 - -# Install latest pnpm -RUN npm install -g pnpm - -# Install deno -ENV DENO_INSTALL=/usr/local -RUN curl -fsSL https://deno.land/x/install/install.sh | sh - -COPY example-welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aebf825ef..43da12b5d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -133,11 +133,6 @@ jobs: node-version: ${{ matrix.NODE_VERSION }} cache: "pnpm" - - name: Use Deno - uses: denoland/setup-deno@v1 - with: - deno-version: v1.35.0 - - name: Install dependencies run: pnpm install diff --git a/.github/workflows/test-hosts.yml b/.github/workflows/test-hosts.yml index 906e35aa4..c60d80e31 100644 --- a/.github/workflows/test-hosts.yml +++ b/.github/workflows/test-hosts.yml @@ -11,8 +11,6 @@ env: VERCEL_ORG_ID: ${{ secrets.VERCEL_TEST_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_TEST_PROJECT_ID }} VERCEL_TOKEN: ${{ secrets.VERCEL_TEST_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_TEST_SITE_ID }} - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_TEST_AUTH_TOKEN }} FORCE_COLOR: true jobs: @@ -34,22 +32,20 @@ jobs: - name: Install dependencies run: pnpm install + + - name: Build Astro + run: pnpm turbo build --filter astro --filter @astrojs/vercel - - name: Install Hosts CLIs - run: pnpm install --global netlify-cli vercel - - - name: Deploy Vercel + - name: Build test project working-directory: ./packages/integrations/vercel/test/hosted/hosted-astro-project run: pnpm run build - vercel --prod --prebuilt - - - name: Deploy Netlify - working-directory: ./packages/integrations/netlify/test/hosted/hosted-astro-project + + - name: Deploy to Vercel + working-directory: ./packages/integrations/vercel/test/hosted/hosted-astro-project run: - pnpm run build - netlify deploy --prod + pnpm dlx vercel --prod --prebuilt - - name: Test both hosts + - name: Test run: pnpm run test:e2e:hosts diff --git a/.gitpod.yml b/.gitpod.yml index 28e02e923..367ddf4fe 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,6 +1,4 @@ --- -image: - file: .Dockerfile # Commands to start on workspace startup tasks: - before: | diff --git a/.gitpod/gitpod-setup.sh b/.gitpod/gitpod-setup.sh index 6186117fe..b1ba15d2d 100755 --- a/.gitpod/gitpod-setup.sh +++ b/.gitpod/gitpod-setup.sh @@ -3,6 +3,9 @@ # Convert context URL to an array mapfile -t CONTEXT_URL_ITEMS < <(echo "$GITPOD_WORKSPACE_CONTEXT_URL" | tr '/' '\n') +# Install latest pnpm +curl -fsSL https://get.pnpm.io/install.sh | SHELL=`which bash` bash - + # Check if Gitpod started from a specific example directory in the repository if [ "${CONTEXT_URL_ITEMS[7]}" = "examples" ]; then EXAMPLE_PROJECT=${CONTEXT_URL_ITEMS[8]} diff --git a/README.md b/README.md index c49b4760e..3ec82bbfd 100644 --- a/README.md +++ b/README.md @@ -52,8 +52,6 @@ Join us on [Discord](https://astro.build/chat) to meet other maintainers. We'll | [@astrojs/svelte](packages/integrations/svelte) | [![astro version](https://img.shields.io/npm/v/@astrojs/svelte.svg?label=%20)](packages/integrations/svelte/CHANGELOG.md) | | [@astrojs/vue](packages/integrations/vue) | [![astro version](https://img.shields.io/npm/v/@astrojs/vue.svg?label=%20)](packages/integrations/vue/CHANGELOG.md) | | [@astrojs/lit](packages/integrations/lit) | [![astro version](https://img.shields.io/npm/v/@astrojs/lit.svg?label=%20)](packages/integrations/lit/CHANGELOG.md) | -| [@astrojs/deno](packages/integrations/deno) | [![astro version](https://img.shields.io/npm/v/@astrojs/deno.svg?label=%20)](packages/integrations/deno/CHANGELOG.md) | -| [@astrojs/netlify](packages/integrations/netlify) | [![astro version](https://img.shields.io/npm/v/@astrojs/netlify.svg?label=%20)](packages/integrations/netlify/CHANGELOG.md) | | [@astrojs/node](packages/integrations/node) | [![astro version](https://img.shields.io/npm/v/@astrojs/node.svg?label=%20)](packages/integrations/node/CHANGELOG.md) | | [@astrojs/vercel](packages/integrations/vercel) | [![astro version](https://img.shields.io/npm/v/@astrojs/vercel.svg?label=%20)](packages/integrations/vercel/CHANGELOG.md) | | [@astrojs/cloudflare](packages/integrations/cloudflare) | [![astro version](https://img.shields.io/npm/v/@astrojs/cloudflare.svg?label=%20)](packages/integrations/cloudflare/CHANGELOG.md) | diff --git a/examples/integration/index.ts b/examples/integration/index.ts index 8c6cb35bf..54d917e78 100644 --- a/examples/integration/index.ts +++ b/examples/integration/index.ts @@ -10,9 +10,9 @@ export default function createIntegration(): AstroIntegration { // See the @astrojs/react integration for an example // https://github.com/withastro/astro/blob/main/packages/integrations/react/src/index.ts }, - 'astro:build:setup': ({ config, updateConfig }) => { - // See the @astrojs/netlify integration for an example - // https://github.com/withastro/astro/blob/main/packages/integrations/netlify/src/integration-functions.ts + 'astro:build:setup': ({ pages, updateConfig }) => { + // See the @astrojs/lit integration for an example + // https://github.com/withastro/astro/blob/main/packages/integrations/lit/src/index.ts }, 'astro:build:done': ({ dir, routes }) => { // See the @astrojs/partytown integration for an example diff --git a/packages/astro/src/cli/add/index.ts b/packages/astro/src/cli/add/index.ts index 859a95c0a..b63f693aa 100644 --- a/packages/astro/src/cli/add/index.ts +++ b/packages/astro/src/cli/add/index.ts @@ -74,7 +74,6 @@ const OFFICIAL_ADAPTER_TO_IMPORT_MAP: Record = { vercel: '@astrojs/vercel/serverless', cloudflare: '@astrojs/cloudflare', node: '@astrojs/node', - deno: '@astrojs/deno', }; // Users might lack access to the global npm registry, this function diff --git a/packages/integrations/vercel/test/hosted/hosted-astro-project/src/env.d.ts b/packages/integrations/vercel/test/hosted/hosted-astro-project/src/env.d.ts index f7cbe9c1d..f964fe0cf 100644 --- a/packages/integrations/vercel/test/hosted/hosted-astro-project/src/env.d.ts +++ b/packages/integrations/vercel/test/hosted/hosted-astro-project/src/env.d.ts @@ -1 +1 @@ -/// +///