Skip to content

Conversation

@mofeiZ
Copy link
Contributor

@mofeiZ mofeiZ commented Aug 8, 2024

@vercel
Copy link

vercel bot commented Aug 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 8, 2024 10:46pm


const environment = parseEnvironmentConfig(pass.opts.environment ?? {});
/*
* TODO(lauren): Remove pass.opts.environment nullcheck once PluginOptions
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, we waited until compiling a function to validate environment configs. Let's just do this unconditionally -- this should be a fatal error and hopefully never happens in prod

}

const lowerContextAccess = pass.opts.environment?.lowerContextAccess;
const lowerContextAccess = environment.lowerContextAccess;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now we're able to rely on the parsed / validated EnvironmentConfig, which comes with default values (instead of using a PartialEnvironmentConfig and duplicating defaults

@mofeiZ mofeiZ marked this pull request as ready for review August 8, 2024 22:32
…ram"

---
Drive-by cleanup when writing #30643


[ghstack-poisoned]
@mofeiZ mofeiZ merged commit 6764a8c into gh/mofeiZ/15/base Aug 9, 2024
mofeiZ added a commit that referenced this pull request Aug 9, 2024
@mofeiZ mofeiZ deleted the gh/mofeiZ/15/head branch August 9, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants