Closed aqandrew closed 3 weeks ago
Reviewed PR #1822 dependency and it's looking great. Appreciate the clean up in the DbProvider.
For existing developers, modifying the checkEnv.js file sounds like a great idea. It'd be nice to take into account those previous devs who aren't aware of this change too.
For new developers, we can update the .example.env
file and pre-pend VITE_
for the env variables there. So that cp .example.env .env
reflect these changes. Refering to the command in the (README.md) steps.
Updating .example.env
is a great idea. I'll do that + update/test checkEnv.js and include them in the PR.
Since checkEnv.js isn't mentioned in the README, I'll add some instructions for it there as well.
@traycn @aqandrew I'm going to modify the ticket in a couple of different ways:
dev leads are going to take care of this in a separate issue:
.env
file since this is not checked into git)regarding automation of checking VITE_
prefix, we will make a dev ticket to update checkEnv.js to throw error (e.g. "Vite prefix needed in .env
file")
This ticket is now dedicated to modifying the CheckEnv.js file. Changes to .example.env will be done on this ticket's PR
After discussing this ticket, we've decided this work should be done as part of the existing PR. @aqandrew will get started on this, the work needs to be completed before the PR is merged.
Moved to In Review since I've been re-requested on the PR.
Overview
We need to modify our
check-env
script to notify the dev if they are using non-vite compatible environment variables so that we can ensure previous devs have migrated to Vite.Action Items
Resources
Info about relevant files
"start": "npm run check-env && npm run dev",
"node ./utils/checkEnv"
utils/checkEnv.js
Archived Info
Details
> > ### Overview > > This change is a simple variable renaming, which must be done for everyone running 311-Data after we switch from webpack to Vite. It could be done manually by inserting `VITE_` at the beginning of their .env file. Or we could automate it, for example by modifying [checkEnv.js](https://github.com/hackforla/311-data/blob/d68ff874b7433344d26fe0f92865a9502e700cc8/utils/checkEnv.js). > > Additionally, the repository secret must be updated so that the Mapbox API key is available in GitHub Actions. See https://github.com/hackforla/311-data/issues/1778#issuecomment-2316193782 > > ### Action Items > - [x] determine the best method for renaming this variable for all 311-Data developers (manual or using a script) > - [ ] ensure that this variable is renamed for everyone by the time #1822 is merged > - [ ] add/update the correctly-named repository secret by the time #1822 is merged > > ### Resources/Instructions > None