Skip to content

Commit

Permalink
Merge branch 'main' of github.com:redwoodjs/redwood into feat/dbauth-…
Browse files Browse the repository at this point in the history
…cookie+generic-handler

* 'main' of github.com:redwoodjs/redwood:
  chore: Improved Possible Types DX and Framework integration for GraphQL Fragments with Union and Interface support (redwoodjs#9594)
  fix(server): error early on incompatible config (apiHost and apiUrl) (redwoodjs#9808)
  chore(esm): convert crwa to esm and bundle (redwoodjs#9786)
  chore(cli): More robust isAwaitable (redwoodjs#9806)
  chore(ci): Update task names to say "node 20" (redwoodjs#9805)
  Use TS for rebuild-test-project-fixture script (redwoodjs#9804)
  chore: bump TSTyche (redwoodjs#9803)
  docs(fragments): Typo, grammar and formatting fixes (redwoodjs#9802)
  Revert accidental changes to test-project
  chore(deps): update dependency @apollo/experimental-nextjs-app-support to v0.5.2 (redwoodjs#9716)
  fix(deps): update dependency react-helmet-async to v2 (redwoodjs#9697)
  fix(deps): update dependency sqlite to v5 (redwoodjs#9698)
  data migrate: Clean up upHandler test (redwoodjs#9796)
  chore(data-migration): Fix test exit code (redwoodjs#9795)
  Add routeParams to useMatch (redwoodjs#9793)
  fix(fastify): Prevent duplicate `@fastify/url-data` registration (redwoodjs#9794)
  useRoutePath(): Get the path for the current route by default (redwoodjs#9790)
  Router: Use a single RouterContext (redwoodjs#9792)
  • Loading branch information
dac09 committed Jan 9, 2024
2 parents 0d62479 + 80e4a4f commit 5ce1870
Show file tree
Hide file tree
Showing 238 changed files with 8,323 additions and 1,011 deletions.
134 changes: 124 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest]

name: 🏗 Build, lint, test / ${{ matrix.os }} / node 18 latest
name: 🏗 Build, lint, test / ${{ matrix.os }} / node 20 latest
runs-on: ${{ matrix.os }}

steps:
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest]

name: 🏗 Build, lint, test / ${{ matrix.os }} / node 18 latest
name: 🏗 Build, lint, test / ${{ matrix.os }} / node 20 latest
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -157,7 +157,7 @@ jobs:
matrix:
bundler: [vite, webpack]

name: 🌲 Tutorial E2E / ${{ matrix.bundler }} / node 18 latest
name: 🌲 Tutorial E2E / ${{ matrix.bundler }} / node 20 latest
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -235,7 +235,7 @@ jobs:
matrix:
bundler: [vite, webpack]

name: 🌲 Tutorial E2E / ${{ matrix.bundler }} / node 18 latest
name: 🌲 Tutorial E2E / ${{ matrix.bundler }} / node 20 latest
runs-on: ubuntu-latest

steps:
Expand All @@ -249,7 +249,7 @@ jobs:
os: [ubuntu-latest, windows-latest]
bundler: [vite, webpack]

name: 🔄 Smoke tests / ${{ matrix.os }} / ${{ matrix.bundler }} / node 18 latest
name: 🔄 Smoke tests / ${{ matrix.os }} / ${{ matrix.bundler }} / node 20 latest
runs-on: ${{ matrix.os }}

env:
Expand Down Expand Up @@ -427,7 +427,7 @@ jobs:
#
# ```
# env:
# RECORD_REPLAY_METADATA_TEST_RUN_TITLE: 🔄 Smoke tests / ${{ matrix.os }} / node 18 latest
# RECORD_REPLAY_METADATA_TEST_RUN_TITLE: 🔄 Smoke tests / ${{ matrix.os }} / node 20 latest
# RECORD_REPLAY_TEST_METRICS: 1
# ```
#
Expand All @@ -446,7 +446,7 @@ jobs:
os: [ubuntu-latest, windows-latest]
bundler: [vite, webpack]

name: 🔄 Smoke tests / ${{ matrix.os }} / ${{ matrix.bundler }} / node 18 latest
name: 🔄 Smoke tests / ${{ matrix.os }} / ${{ matrix.bundler }} / node 20 latest
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -459,7 +459,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest]

name: 🔭 Telemetry check / ${{ matrix.os }} / node 18 latest
name: 🔭 Telemetry check / ${{ matrix.os }} / node 20 latest
runs-on: ${{ matrix.os }}

env:
Expand Down Expand Up @@ -506,7 +506,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest]

name: 🔭 Telemetry check / ${{ matrix.os }} / node 18 latest
name: 🔭 Telemetry check / ${{ matrix.os }} / node 20 latest
runs-on: ${{ matrix.os }}

steps:
Expand Down Expand Up @@ -702,6 +702,96 @@ jobs:
steps:
- run: echo "Skipped"

fragments-smoke-tests:
needs: check

strategy:
matrix:
os: [ubuntu-latest, windows-latest]

name: 📄 Fragments Smoke tests / ${{ matrix.os }}
runs-on: ${{ matrix.os }}

env:
REDWOOD_CI: 1
REDWOOD_VERBOSE_TELEMETRY: 1

steps:
- uses: actions/checkout@v4

- name: Enable Corepack
run: corepack enable

- name: ⬢ Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Enable Corepack
run: corepack enable

- name: 🐈 Set up yarn cache
uses: ./.github/actions/set-up-yarn-cache

- name: 🐈 Yarn install
run: yarn install --inline-builds
env:
GITHUB_TOKEN: ${{ github.token }}

- name: 🔨 Build
run: yarn build

- name: 🌲 Set up test project
id: set-up-test-project
uses: ./.github/actions/set-up-test-project
with:
bundler: vite
canary: true
env:
REDWOOD_DISABLE_TELEMETRY: 1
YARN_ENABLE_IMMUTABLE_INSTALLS: false

- name: Run Fragments codemods on test project
run: npx -y tsx ./tasks/test-project/add-gql-fragments ${{ steps.set-up-test-project.outputs.test-project-path }}
env:
REDWOOD_DISABLE_TELEMETRY: 1

- name: 🎭 Install playwright dependencies
run: npx playwright install --with-deps chromium

- name: Run Fragments dev smoke tests
working-directory: ./tasks/smoke-tests/fragments-dev
run: npx playwright test
env:
REDWOOD_TEST_PROJECT_PATH: '${{ steps.set-up-test-project.outputs.test-project-path }}'
REDWOOD_DISABLE_TELEMETRY: 1

- name: Build for production
working-directory: ${{ steps.set-up-test-project.outputs.test-project-path }}
run: yarn rw build
env:
REDWOOD_DISABLE_TELEMETRY: 1

- name: Run Fragments serve smoke tests
working-directory: ./tasks/smoke-tests/fragments-serve
run: npx playwright test
env:
REDWOOD_TEST_PROJECT_PATH: '${{ steps.set-up-test-project.outputs.test-project-path }}'
REDWOOD_DISABLE_TELEMETRY: 1

fragments-smoke-tests-skip:
needs: detect-changes

strategy:
matrix:
os: [ubuntu-latest, windows-latest]

name: 📄 Fragments Smoke tests / ${{ matrix.os }}
runs-on: ${{ matrix.os }}

steps:
- run: echo "Skipped"

crwa:
needs: check

Expand Down Expand Up @@ -750,11 +840,13 @@ jobs:
env:
PROJECT_PATH: ${{ env.PROJECT_PATH }}

- name: Prompt tests
- name: Install expect
run: |
sudo apt-get update
sudo apt-get install expect
- name: Prompt tests
run: |
./tests/e2e_prompts.sh
./tests/e2e_prompts_git.sh
./tests/e2e_prompts_m.sh
Expand All @@ -764,6 +856,28 @@ jobs:
env:
PROJECT_PATH: ${{ env.PROJECT_PATH }}

- name: ⬢ Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Prompt tests
run: ./tests/e2e_prompts_node_less.sh
working-directory: ./packages/create-redwood-app
env:
PROJECT_PATH: ${{ env.PROJECT_PATH }}

- name: ⬢ Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 21

- name: Prompt tests
run: ./tests/e2e_prompts_node_greater.sh
working-directory: ./packages/create-redwood-app
env:
PROJECT_PATH: ${{ env.PROJECT_PATH }}

crwa-skip:
needs: detect-changes
if: needs.detect-changes.outputs.onlydocs == 'true'
Expand Down
19 changes: 19 additions & 0 deletions __fixtures__/fragment-test-project/.env.defaults
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# These environment variables will be used by default if you do not create any
# yourself in .env. This file should be safe to check into your version control
# system. Any custom values should go in .env and .env should *not* be checked
# into version control.

# schema.prisma defaults
DATABASE_URL=file:./dev.db

# location of the test database for api service scenarios (defaults to ./.redwood/test.db if not set)
# TEST_DATABASE_URL=file:./.redwood/test.db

# disables Prisma CLI update notifier
PRISMA_HIDE_UPDATE_MESSAGE=true

# Option to override the current environment's default api-side log level
# See: https://redwoodjs.com/docs/logger for level options, defaults to "trace" otherwise.
# Most applications want "debug" or "info" during dev, "trace" when you have issues and "warn" in production.
# Ordered by how verbose they are: trace | debug | info | warn | error | silent
# LOG_LEVEL=debug
4 changes: 4 additions & 0 deletions __fixtures__/fragment-test-project/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# DATABASE_URL=file:./dev.db
# TEST_DATABASE_URL=file:./.redwood/test.db
# PRISMA_HIDE_UPDATE_MESSAGE=true
# LOG_LEVEL=trace
22 changes: 22 additions & 0 deletions __fixtures__/fragment-test-project/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.idea
.DS_Store
.env
.netlify
.redwood/*
!.redwood/README.md
dev.db*
dist
dist-babel
node_modules
yarn-error.log
web/public/mockServiceWorker.js
web/types/graphql.d.ts
api/types/graphql.d.ts
api/src/lib/generateGraphiQLHeader.*
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
44 changes: 44 additions & 0 deletions __fixtures__/fragment-test-project/.redwood/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# .redwood

## What is this directory?

Redwood uses this `.redwood` directory to store transitory data that aids in the smooth and convenient operation of your Redwood project.

## Do I need to do anything with this directory?

No. You shouldn't have to create, edit or delete anything in this directory in your day-to-day work with Redwood.

You don't need to commit any other contents of this directory to your version control system. It's ignored by default.

## What's in this directory?

### Files

| Name | Description |
| :---------------- | :------- |
| commandCache.json | This file contains mappings to assist the Redwood CLI in efficiently executing commands. |
| schema.graphql | This is the GraphQL schema which has been automatically generated from your Redwood project. |
| studio.db | The sqlite database used by the experimental `rw exp studio` feature. |
| telemetry.txt | Contains a unique ID used for telemetry. This value is rotated every 24 hours to protect your project's anonymity. |
| test.db | The sqlite database used when running tests. |

### Directories

| Name | Description |
| :---------- | :------- |
| locks | Stores temporary files that Redwood uses to keep track of the execution of async/background tasks between processes. |
| logs | Stores log files for background tasks such as update checking. |
| prebuild | Stores transpiled JavaScript that is generated as part of Redwood's build process. |
| telemetry | Stores the recent telemetry that the Redwood CLI has generated. You may inspect these files to see everything Redwood is anonymously collecting. |
| types | Stores the results of type generation. |
| updateCheck | Stores a file which contains the results of checking for Redwood updates. |

We try to keep this README up to date but you may, from time to time, find other files or directories in this `.redwood` directory that have not yet been documented here. This is likely nothing to worry about but feel free to let us know and we'll update this list.

### Telemetry

RedwoodJS collects completely anonymous telemetry data about general usage. For transparency, that data is viewable in the respective directories and files. To learn more and manage your project's settings, visit [telemetry.redwoodjs.com](https://telemetry.redwoodjs.com).

### Have any questions?

Feel free to reach out to us in the [RedwoodJS Community](https://community.redwoodjs.com/) forum if you have any questions.
Loading

0 comments on commit 5ce1870

Please sign in to comment.