refactor: replace temp package with Node built-in fs.mkdtemp#584
Open
jb217 wants to merge 1 commit intoelectron:mainfrom
Open
refactor: replace temp package with Node built-in fs.mkdtemp#584jb217 wants to merge 1 commit intoelectron:mainfrom
jb217 wants to merge 1 commit intoelectron:mainfrom
Conversation
The temp package depends on rimraf@2.6.3 which depends on glob@7.2.3, both of which are deprecated and no longer maintained. The only usage of temp in this project is creating a single temporary directory via createTempDir, which maps directly to Node's built-in fs.mkdtemp combined with os.tmpdir. This removes the temp and @types/temp dependencies entirely, eliminating the deprecated transitive dependency chain: temp -> rimraf@2.6.3 -> glob@7.2.3 -> inflight@1.0.6 fs.mkdtemp has been stable since Node 5.10.0 and promisify since Node 8.0.0, both within the existing engine requirement of >=8.0.0.
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.
Summary
The
temppackage depends onrimraf@2.6.3which depends onglob@7.2.3, both of which are deprecated and no longer maintained. The only usage oftempin this project is creating a single temporary directory viacreateTempDir, which maps directly to Node's built-infs.mkdtempcombined withos.tmpdir.This removes the
tempand@types/tempdependencies entirely, eliminating the deprecated transitive dependency chain:All four packages in that chain are deprecated.
Changes
temp.mkdirwithfs.mkdtemp+os.tmpdir+path.jointempfrom dependencies and@types/tempfrom devDependenciesCompatibility
fs.mkdtemphas been stable since Node 5.10.0 andutil.promisifysince Node 8.0.0, both within the existing engine requirement of>=8.0.0. The exportedcreateTempDirfunction signature and return type are unchanged.Verification
npm installproduces no deprecation warnings from this dependency chain