Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix .env parsing #1104

Merged
merged 1 commit into from
Oct 21, 2024
Merged

Conversation

codykaup
Copy link
Contributor

@codykaup codykaup commented Oct 21, 2024

Closes #1103

When fixing unicorn/prefer-module errors in #1061, I moved the import to the top of the file but since dotenv hasn't ran yet, the .env file is parsed after those imports. Simply moving those to dynamic imports fixes that issue!

📦 Published PR as canary version: 11.13.1--canary.1104.11444006930.0

✨ Test out this PR locally via:

npm install chromatic@11.13.1--canary.1104.11444006930.0
# or 
yarn add chromatic@11.13.1--canary.1104.11444006930.0

@codykaup codykaup added release Auto: Create a `latest` release when merged patch Auto: Increment the patch version when merged labels Oct 21, 2024
@codykaup codykaup self-assigned this Oct 21, 2024
@codykaup codykaup force-pushed the cody/cap-2332-env-file-is-not-read-correctly branch from 484ef2e to 94a114e Compare October 21, 2024 14:53
Copy link
Contributor

github-actions bot commented Oct 21, 2024

📦 Package Size: 5300 KB
⚠️ Compared to main: +36 KB 94f914e (5264 KB)

Copy link

codacy-production bot commented Oct 21, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.04% (target: -1.00%) 0.00% (target: 80.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (94f914e) 8545 4677 54.73%
Head commit (ea6ae9e) 8539 (-6) 4677 (+0) 54.77% (+0.04%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1104) 6 0 0.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@codykaup codykaup force-pushed the cody/cap-2332-env-file-is-not-read-correctly branch from 94a114e to 828cb5a Compare October 21, 2024 15:15
@codykaup codykaup marked this pull request as ready for review October 21, 2024 15:20
@codykaup codykaup requested a review from a team October 21, 2024 15:20
@codykaup codykaup force-pushed the cody/cap-2332-env-file-is-not-read-correctly branch from 828cb5a to ea6ae9e Compare October 21, 2024 15:38
@@ -140,7 +140,7 @@
"cross-env": "^7.0.3",
"cross-spawn": "^7.0.2",
"debug": "^4.3.2",
"dotenv": "^8.2.0",
"dotenv": "^16.4.5",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had to bump this for import 'dotenv/config'; support.

@codykaup codykaup added this pull request to the merge queue Oct 21, 2024
Merged via the queue into main with commit 650f3e9 Oct 21, 2024
20 of 21 checks passed
@codykaup codykaup deleted the cody/cap-2332-env-file-is-not-read-correctly branch October 21, 2024 15:56
@chromatic-ci-bot
Copy link
Collaborator

🚀 PR was released in v11.13.0 🚀

@chromatic-ci-bot chromatic-ci-bot added the released Verdict: This issue/pull request has been released label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Auto: Increment the patch version when merged release Auto: Create a `latest` release when merged released Verdict: This issue/pull request has been released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.env file is not read correctly
3 participants