Skip to content

Commit

Permalink
chore(turborepo): add Nitro's env var pattern (#8725)
Browse files Browse the repository at this point in the history
### Description

Nitro pattern uses `NITRO_*`.
Reference:
[nitro.unjs.io/config#runtimeconfig](https://nitro.unjs.io/config#runtimeconfig)

fixes #8504

Co-authored-by: Anthony Shew <[email protected]>
  • Loading branch information
samydoesit and anthonyshew authored Jul 23, 2024
1 parent 60b5bf0 commit 65cb125
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
12 changes: 10 additions & 2 deletions crates/turborepo-lib/src/framework.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl Framework {
}
}

static FRAMEWORKS: OnceLock<[Framework; 12]> = OnceLock::new();
static FRAMEWORKS: OnceLock<[Framework; 13]> = OnceLock::new();

fn get_frameworks() -> &'static [Framework] {
FRAMEWORKS.get_or_init(|| {
Expand Down Expand Up @@ -100,9 +100,17 @@ fn get_frameworks() -> &'static [Framework] {
dependencies: vec!["react-scripts", "react-dev-utils"],
},
},
Framework {
slug: "nitro",
env_wildcards: vec!["NITRO_*"],
dependency_match: Matcher {
strategy: Strategy::Some,
dependencies: vec!["nitropack", "nitropack-nightly"],
},
},
Framework {
slug: "nuxtjs",
env_wildcards: vec!["NUXT_*"],
env_wildcards: vec!["NUXT_*", "NITRO_*"],
dependency_match: Matcher {
strategy: Strategy::Some,
dependencies: vec!["nuxt", "nuxt-edge", "nuxt3", "nuxt3-edge"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ Turborepo automatically adds prefix wildcards to your [`env`](/repo/docs/referen
| Create React App | `REACT_APP_*` |
| Gatsby | `GATSBY_*` |
| Next.js | `NEXT_PUBLIC_*` |
| Nuxt.js | `NUXT_*` |
| Nitro | `NITRO_*` |
| Nuxt.js | `NUXT_*`, `NITRO_*`|
| RedwoodJS | `REDWOOD_ENV_*` |
| Sanity Studio | `SANITY_STUDIO_*` |
| Solid | `VITE_*` |
Expand Down

0 comments on commit 65cb125

Please sign in to comment.