Skip to content

Commit 5ce1870

Browse files
committed
Merge branch 'main' of github.com:redwoodjs/redwood into feat/dbauth-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)
2 parents 0d62479 + 80e4a4f commit 5ce1870

File tree

238 files changed

+8323
-1011
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

238 files changed

+8323
-1011
lines changed

.github/workflows/ci.yml

+124-10
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
matrix:
9191
os: [ubuntu-latest, windows-latest]
9292

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

9696
steps:
@@ -144,7 +144,7 @@ jobs:
144144
matrix:
145145
os: [ubuntu-latest, windows-latest]
146146

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

150150
steps:
@@ -157,7 +157,7 @@ jobs:
157157
matrix:
158158
bundler: [vite, webpack]
159159

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

163163
steps:
@@ -235,7 +235,7 @@ jobs:
235235
matrix:
236236
bundler: [vite, webpack]
237237

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

241241
steps:
@@ -249,7 +249,7 @@ jobs:
249249
os: [ubuntu-latest, windows-latest]
250250
bundler: [vite, webpack]
251251

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

255255
env:
@@ -427,7 +427,7 @@ jobs:
427427
#
428428
# ```
429429
# env:
430-
# RECORD_REPLAY_METADATA_TEST_RUN_TITLE: 🔄 Smoke tests / ${{ matrix.os }} / node 18 latest
430+
# RECORD_REPLAY_METADATA_TEST_RUN_TITLE: 🔄 Smoke tests / ${{ matrix.os }} / node 20 latest
431431
# RECORD_REPLAY_TEST_METRICS: 1
432432
# ```
433433
#
@@ -446,7 +446,7 @@ jobs:
446446
os: [ubuntu-latest, windows-latest]
447447
bundler: [vite, webpack]
448448

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

452452
steps:
@@ -459,7 +459,7 @@ jobs:
459459
matrix:
460460
os: [ubuntu-latest, windows-latest]
461461

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

465465
env:
@@ -506,7 +506,7 @@ jobs:
506506
matrix:
507507
os: [ubuntu-latest, windows-latest]
508508

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

512512
steps:
@@ -702,6 +702,96 @@ jobs:
702702
steps:
703703
- run: echo "Skipped"
704704

705+
fragments-smoke-tests:
706+
needs: check
707+
708+
strategy:
709+
matrix:
710+
os: [ubuntu-latest, windows-latest]
711+
712+
name: 📄 Fragments Smoke tests / ${{ matrix.os }}
713+
runs-on: ${{ matrix.os }}
714+
715+
env:
716+
REDWOOD_CI: 1
717+
REDWOOD_VERBOSE_TELEMETRY: 1
718+
719+
steps:
720+
- uses: actions/checkout@v4
721+
722+
- name: Enable Corepack
723+
run: corepack enable
724+
725+
- name: ⬢ Set up Node.js
726+
uses: actions/setup-node@v4
727+
with:
728+
node-version: 20
729+
730+
- name: Enable Corepack
731+
run: corepack enable
732+
733+
- name: 🐈 Set up yarn cache
734+
uses: ./.github/actions/set-up-yarn-cache
735+
736+
- name: 🐈 Yarn install
737+
run: yarn install --inline-builds
738+
env:
739+
GITHUB_TOKEN: ${{ github.token }}
740+
741+
- name: 🔨 Build
742+
run: yarn build
743+
744+
- name: 🌲 Set up test project
745+
id: set-up-test-project
746+
uses: ./.github/actions/set-up-test-project
747+
with:
748+
bundler: vite
749+
canary: true
750+
env:
751+
REDWOOD_DISABLE_TELEMETRY: 1
752+
YARN_ENABLE_IMMUTABLE_INSTALLS: false
753+
754+
- name: Run Fragments codemods on test project
755+
run: npx -y tsx ./tasks/test-project/add-gql-fragments ${{ steps.set-up-test-project.outputs.test-project-path }}
756+
env:
757+
REDWOOD_DISABLE_TELEMETRY: 1
758+
759+
- name: 🎭 Install playwright dependencies
760+
run: npx playwright install --with-deps chromium
761+
762+
- name: Run Fragments dev smoke tests
763+
working-directory: ./tasks/smoke-tests/fragments-dev
764+
run: npx playwright test
765+
env:
766+
REDWOOD_TEST_PROJECT_PATH: '${{ steps.set-up-test-project.outputs.test-project-path }}'
767+
REDWOOD_DISABLE_TELEMETRY: 1
768+
769+
- name: Build for production
770+
working-directory: ${{ steps.set-up-test-project.outputs.test-project-path }}
771+
run: yarn rw build
772+
env:
773+
REDWOOD_DISABLE_TELEMETRY: 1
774+
775+
- name: Run Fragments serve smoke tests
776+
working-directory: ./tasks/smoke-tests/fragments-serve
777+
run: npx playwright test
778+
env:
779+
REDWOOD_TEST_PROJECT_PATH: '${{ steps.set-up-test-project.outputs.test-project-path }}'
780+
REDWOOD_DISABLE_TELEMETRY: 1
781+
782+
fragments-smoke-tests-skip:
783+
needs: detect-changes
784+
785+
strategy:
786+
matrix:
787+
os: [ubuntu-latest, windows-latest]
788+
789+
name: 📄 Fragments Smoke tests / ${{ matrix.os }}
790+
runs-on: ${{ matrix.os }}
791+
792+
steps:
793+
- run: echo "Skipped"
794+
705795
crwa:
706796
needs: check
707797

@@ -750,11 +840,13 @@ jobs:
750840
env:
751841
PROJECT_PATH: ${{ env.PROJECT_PATH }}
752842

753-
- name: Prompt tests
843+
- name: Install expect
754844
run: |
755845
sudo apt-get update
756846
sudo apt-get install expect
757847
848+
- name: Prompt tests
849+
run: |
758850
./tests/e2e_prompts.sh
759851
./tests/e2e_prompts_git.sh
760852
./tests/e2e_prompts_m.sh
@@ -764,6 +856,28 @@ jobs:
764856
env:
765857
PROJECT_PATH: ${{ env.PROJECT_PATH }}
766858

859+
- name: ⬢ Set up Node.js
860+
uses: actions/setup-node@v4
861+
with:
862+
node-version: 18
863+
864+
- name: Prompt tests
865+
run: ./tests/e2e_prompts_node_less.sh
866+
working-directory: ./packages/create-redwood-app
867+
env:
868+
PROJECT_PATH: ${{ env.PROJECT_PATH }}
869+
870+
- name: ⬢ Set up Node.js
871+
uses: actions/setup-node@v4
872+
with:
873+
node-version: 21
874+
875+
- name: Prompt tests
876+
run: ./tests/e2e_prompts_node_greater.sh
877+
working-directory: ./packages/create-redwood-app
878+
env:
879+
PROJECT_PATH: ${{ env.PROJECT_PATH }}
880+
767881
crwa-skip:
768882
needs: detect-changes
769883
if: needs.detect-changes.outputs.onlydocs == 'true'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# These environment variables will be used by default if you do not create any
2+
# yourself in .env. This file should be safe to check into your version control
3+
# system. Any custom values should go in .env and .env should *not* be checked
4+
# into version control.
5+
6+
# schema.prisma defaults
7+
DATABASE_URL=file:./dev.db
8+
9+
# location of the test database for api service scenarios (defaults to ./.redwood/test.db if not set)
10+
# TEST_DATABASE_URL=file:./.redwood/test.db
11+
12+
# disables Prisma CLI update notifier
13+
PRISMA_HIDE_UPDATE_MESSAGE=true
14+
15+
# Option to override the current environment's default api-side log level
16+
# See: https://redwoodjs.com/docs/logger for level options, defaults to "trace" otherwise.
17+
# Most applications want "debug" or "info" during dev, "trace" when you have issues and "warn" in production.
18+
# Ordered by how verbose they are: trace | debug | info | warn | error | silent
19+
# LOG_LEVEL=debug
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# DATABASE_URL=file:./dev.db
2+
# TEST_DATABASE_URL=file:./.redwood/test.db
3+
# PRISMA_HIDE_UPDATE_MESSAGE=true
4+
# LOG_LEVEL=trace
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.idea
2+
.DS_Store
3+
.env
4+
.netlify
5+
.redwood/*
6+
!.redwood/README.md
7+
dev.db*
8+
dist
9+
dist-babel
10+
node_modules
11+
yarn-error.log
12+
web/public/mockServiceWorker.js
13+
web/types/graphql.d.ts
14+
api/types/graphql.d.ts
15+
api/src/lib/generateGraphiQLHeader.*
16+
.pnp.*
17+
.yarn/*
18+
!.yarn/patches
19+
!.yarn/plugins
20+
!.yarn/releases
21+
!.yarn/sdks
22+
!.yarn/versions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# .redwood
2+
3+
## What is this directory?
4+
5+
Redwood uses this `.redwood` directory to store transitory data that aids in the smooth and convenient operation of your Redwood project.
6+
7+
## Do I need to do anything with this directory?
8+
9+
No. You shouldn't have to create, edit or delete anything in this directory in your day-to-day work with Redwood.
10+
11+
You don't need to commit any other contents of this directory to your version control system. It's ignored by default.
12+
13+
## What's in this directory?
14+
15+
### Files
16+
17+
| Name | Description |
18+
| :---------------- | :------- |
19+
| commandCache.json | This file contains mappings to assist the Redwood CLI in efficiently executing commands. |
20+
| schema.graphql | This is the GraphQL schema which has been automatically generated from your Redwood project. |
21+
| studio.db | The sqlite database used by the experimental `rw exp studio` feature. |
22+
| telemetry.txt | Contains a unique ID used for telemetry. This value is rotated every 24 hours to protect your project's anonymity. |
23+
| test.db | The sqlite database used when running tests. |
24+
25+
### Directories
26+
27+
| Name | Description |
28+
| :---------- | :------- |
29+
| locks | Stores temporary files that Redwood uses to keep track of the execution of async/background tasks between processes. |
30+
| logs | Stores log files for background tasks such as update checking. |
31+
| prebuild | Stores transpiled JavaScript that is generated as part of Redwood's build process. |
32+
| telemetry | Stores the recent telemetry that the Redwood CLI has generated. You may inspect these files to see everything Redwood is anonymously collecting. |
33+
| types | Stores the results of type generation. |
34+
| updateCheck | Stores a file which contains the results of checking for Redwood updates. |
35+
36+
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.
37+
38+
### Telemetry
39+
40+
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).
41+
42+
### Have any questions?
43+
44+
Feel free to reach out to us in the [RedwoodJS Community](https://community.redwoodjs.com/) forum if you have any questions.

0 commit comments

Comments
 (0)