The App Framework for Startups
feat(upgrade): Use GitHub token if available when downloading patches (#10515) by @Tobbe
When you upgrade via yarn rw upgrade
and require yarn patches, we will now use a GitHub token if it is available in your environment when fetching the git tree from GitHub. We support GH_TOKEN
, GITHUB_TOKEN
and REDWOOD_GITHUB_TOKEN
as the env var names.
feat(baremetal): Add verbose output to ssh exec (#10525) by @Tobbe
This change adds additional logging to the ssh during baremetal when you use --verbose
. Allowing you to see exactly what SSH commands are being run, and in what path.
Standard output without --verbose
- this remains unchanged
Before (verbose output)
After (verbose output)
feat(baremetal): Add more details to error messages (#10527) by @Tobbe
Now when an ssh command execution fails the error message will additionally include the directory it was executed in and the full stderr message
Before
After
Add redwood.toml to yarn rw info
(#10518) by @Tobbe
The project redwood.toml
file is now included in the yarn rw info
output to make it easier and faster to provide enough details for issues to be debugged quickly
Before
System:
OS: macOS 14.1.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.11.0 - /usr/local/bin/node
Yarn: 4.1.1 - /usr/local/bin/yarn
Databases:
SQLite: 3.39.5 - /usr/bin/sqlite3
Browsers:
Safari: 17.1
After
System:
OS: macOS 14.1.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.11.0 - /usr/local/bin/node
Yarn: 4.1.1 - /usr/local/bin/yarn
Databases:
SQLite: 3.39.5 - /usr/bin/sqlite3
Browsers:
Safari: 17.1
redwood.toml:
[web]
title = "Redwood App"
port = 8910
apiUrl = "/.redwood/functions" # You can customize graphql and dbauth urls individually too: see https://redwoodjs.com/docs/app-configuration-redwood-toml#api-paths
includeEnvironmentVariables = [
# Add any ENV vars that should be available to the web side to this array
# See https://redwoodjs.com/docs/environment-variables#web
]
[api]
port = 8911
[browser]
open = true
[notifications]
versionUpdates = ["latest"]
Fix invisible tags in MetaTag & Metadata JSDoc (#10504) by @Philzen
This change fixes the common pitfall that tags of all kind are not visible in JSDoc view because it will try to interpret them as HTML. Now these tags should be visible when the JSDoc is rendered. See #10504 for more information
docs: Adds GraphQL Caching docs for Client and Response caching (#10054) by @dthyresson
This PR introduces new GraphQL documentation to cover both client and server (aka response) caching.
deps: Upgrade to React Testing Library 14.3.1 (#10514) by @Tobbe
Fix invisible tags in MetaTag & Metadata JSDoc (#10504) by @Philzen
This change fixes the common pitfall that tags of all kind are not visible in JSDoc view because it will try to interpret them as HTML. Now these tags should be visible when the JSDoc is rendered. See #10504 for more information
feat(upgrade): Use GitHub token if available when downloading patches (#10515) by @Tobbe
If a GitHub token is available in the environment we use that when fetching the git tree from GitHub. That way we're less likely to be rate limited. For most users the token shouldn't be needed. The free allowance/usage of the GitHub API should be enough.
We support GH_TOKEN
, GITHUB_TOKEN
and REDWOOD_GITHUB_TOKEN
as the env var names
Add redwood.toml to yarn rw info
(#10518) by @Tobbe
The project redwood.toml
file is now included in the yarn rw info
output to
make it easier and faster to help with issue reports
Before
System:
OS: macOS 14.1.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.11.0 - /usr/local/bin/node
Yarn: 4.1.1 - /usr/local/bin/yarn
Databases:
SQLite: 3.39.5 - /usr/bin/sqlite3
Browsers:
Safari: 17.1
After
System:
OS: macOS 14.1.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.11.0 - /usr/local/bin/node
Yarn: 4.1.1 - /usr/local/bin/yarn
Databases:
SQLite: 3.39.5 - /usr/bin/sqlite3
Browsers:
Safari: 17.1
redwood.toml:
[web]
title = "Redwood App"
port = 8910
apiUrl = "/.redwood/functions" # You can customize graphql and dbauth urls individually too: see https://redwoodjs.com/docs/app-configuration-redwood-toml#api-paths
includeEnvironmentVariables = [
# Add any ENV vars that should be available to the web side to this array
# See https://redwoodjs.com/docs/environment-variables#web
]
[api]
port = 8911
[browser]
open = true
[notifications]
versionUpdates = ["latest"]
feat(baremetal): Add verbose output to ssh exec (#10525) by @Tobbe
Passing --verbose
to the baremetal deploy command is supposed to give you
more detailed info about what's happening. Previously however passing
--verbose
didn't actually provide any extra information. This PR adds logging
to the new SshExecutor class so that you can see exactly what SSH commands are
being run, and in what path.
Standard output (this stays the same before and after)
Before (verbose output) Doesn't really help much compared to the standard output 😅
After (verbose output)
feat(baremetal): Add more details to error messages (#10527) by @Tobbe
Now when an ssh command execution fails the error message will additionally include the directory it was executed in and the full stderr message
Before
After
Modified type for describeScenario (https://github.com/redwoodjs/redwood/pull/10468) by @cjreimer
This change corrects the return type of getScenario
. See: https://github.com/redwoodjs/redwood/pull/10468 for more information.
fix(cli): avoid npx
during upgrade command (#10479) by @Josh-Walker-GM
This change fixes a problem with the yarn rw upgrade
command when you don't have npx
installed. If you don't have npx
installed you will now have to manually run a command to dedupe dependencies rather than this being done for you automatically during the upgrade command. If this is the case, the npx
command will be logged to the console when you run yarn rw upgrade
. See #10466 for more information.
fix: Fixes Unknown Fragment issues due to GraphQL Tag type mismatch in web (#10357) by @dthyresson
Users reported in #10322 an incompatibility with fragments and when using gql from global web. The TS errors were caused by the global web gql type not being compatible with the standard graphql-tag type. This change corrects this issue.
chore(deps): update dependency typescript to v5.4.5 (#10452)
This dependency upgrade includes fixes that address a bug that caused auto-complete and auto-import functionality to be broken in Javascript projects.
docs(redirect): Add docs for redirect routes (#10374) by @Tobbe
There were no docs for <Route path="/some/path" redirect="/some/other/path" />
. This change introduces docs for the redirect
prop.
feat(router): Allow redirect routes to use route names as target (#10376) by @Tobbe
When specifying a redirect route like
<Route path="/simple" redirect="/newSimple" name="simple" />
the value of redirect
is the path of the page the user should be redirected to. However, the paths can be long and annoying to type out. And if they ever change the redirect would now be broken.
Also, for private routes we do this:
<Router>
<Route path="/" page={HomePage} name="home" />
<PrivateSet unauthenticated="home">
<Route path="/admin" page={AdminPage} name="admin" />
</PrivateSet>
</Router>
Here, if a user isn't authenticated, the user will be redirected to the home
route. Notice how the target route is specified by its name (home
) instead of its path (/
).
With this it's now also possible to redirect using the name of the target route, making our route behavior more consistent. So this will now work
<Router>
<Route path="/" page={HomePage} name="home" />
<Route path="/no-longer-exists" redirect="home" />
</Router>
Old style paths still works. The logic is super simple. If the redirect
value starts with /
it's assumed to be a path. If not, it's assumed to be a route name. This should make this change fully backwards compatible.
docs: Adds important admonition for generate dbAuth to clarify that must setup dbAuth not just generate the pages (#10293) by @dthyresson
docs: Add information about how to turn off Prisma/db operations during a Vercel deploy to reduce Postgres Storage use (#10294) by @dthyresson
chore(CLI): build with esbuild (#10323) by @jtoar
This change speeds up the CLI by up to 50ms.
fix(auth): Handle when authorization header is lowercased (#10442) by @dac09
This fix handles an authentication error that occurred when the 'Authorization' header was presented in lowercase as 'authorization'.
fix(vercel): write vercel.json
as a part of setup (#10355) by @jtoar
This fix smooths initial deploys to Vercel by writing a vercel.json
file that specifies an env var that enables Corepack. Users that already successfully deploy to Vercel don't need to introduce this file.
fix(cli): only show webpack options for dev if bundler = "webpack"
(#10359) by @jtoar
A few flags for yarn rw dev
don't apply to Vite but are shown nevertheless. One of them, watchNodeModules
, is legacy at this point. It's only useful for testing out framework changes on a project using webpack. It makes the webpack dev server reload on changes to node_modules. The other, forward
(aliased fwd
) isn't fundamentally Webpack specific, but has been broken for quite a while because the fix is nontrivial. It seems better to hide these flags for now, otherwise we're just advertising broken or no-op behavior.
[!NOTE]
There was a hiccup in our release tooling for the
v7.2.0
release so we're skipping that one here.v7.3.0
is the next release afterv7.1.3
.
fix(deps): update prisma monorepo to v5.11.0 #10262
fix(deps): update dependency @apollo/client to v3.9.9 #10297
chore(deps): update dependency typescript to v5.4.3 #10308
fix(cli): Update build and serve to handle the absence of the api side (#10265) by @Josh-Walker-GM
This change allows you to successfully build your app with yarn rw build
even when you choose to totally delete your api side. Previously you would have seen errors related to both Prisma and GraphQL. It also improves the error messages produced by yarn rw serve
in this case.
fix(esm): get lint working (#10152) by @jtoar
This PR fixes yarn rw lint
and some generators and setup commands for ESM projects.
Before projects would get the following error:
Oops! Something went wrong! :(
ESLint: 8.55.0
Error [ERR_REQUIRE_ESM]: require() of ES Module ~/redwood-app/prettier.config.js from ~/redwood-app/node_modules/prettier/third-party.js not supported.
Instead change the require of prettier.config.js in ~/redwood-app/node_modules/prettier/third-party.js to a dynamic import() which is available in all CommonJS modules.
chore(babel-config): Fix error message grammar (#10280) by @Tobbe
Fixed the grammar of the error message you see if you have more than one Page file in a single Page directory.
Fix react docs links (#10278) by @rxx
Update deployment.md (#10267) by @LAdanimo
Update Prisma Dataguide Link (#10254) by @pantheredeye
docs: fix typo on router page (#10251) by @thenewnickyzz
Update first-test.md (#10244) by @LAdanimo
fix(dbAuth): restore behavior of checking whether a search query is present (#10204) by @cannikin
Previously dbAuth would check whether or not query string variables were present at all before invoking the proper function. During a refactor we updated this code to assume a query would always be present. Which it would be during normal browser behavior. But, we had a complaint from a user who relied on this optional check in one of their tests. So we're restoring the optional check here.