refactor(deps): migrate dotenv from v16.5.0 to v17.3.1#3
Open
s0wa48 wants to merge 1 commit intoCreativeBuilds:masterfrom
Open
refactor(deps): migrate dotenv from v16.5.0 to v17.3.1#3s0wa48 wants to merge 1 commit intoCreativeBuilds:masterfrom
s0wa48 wants to merge 1 commit intoCreativeBuilds:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Breaking Change: dotenv v17 is ESM-only
dotenv v17 dropped legacy CommonJS interop. The
import dotenv from 'dotenv'; dotenv.config()pattern still works in TypeScript/ESM contexts, but the recommended idiomatic approach is now to use thedotenv/configside-effect import which automatically loads.envon import.Migrations applied
package.json: Bumpeddotenvfrom^16.5.0to^17.3.1validator/index.ts: Replacedimport dotenv from 'dotenv'+dotenv.config()call with the simplerimport 'dotenv/config'side-effect importscripts/weights.ts: Replacedimport dotenv from 'dotenv'+dotenv.config()withimport 'dotenv/config'scripts/create-key.ts: Replacedimport dotenv from 'dotenv'+dotenv.config()withimport 'dotenv/config'hardhat.config.js: Added safe wrapper aroundrequire('dotenv')call since this file runs as CommonJS in Hardhat context; dotenv v17's ESM-first design requires careful handling in CJS environmentsNotes
dotenv/configimport pattern is the v17-recommended approach and works seamlessly with TypeScript and bundlers.envfile path andoverrideoption inhardhat.config.jsare preserved as-is since that file has custom path resolution logicThis PR was auto-generated by Gittensor upgrade bot using Claude AI