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

Drop unique-string dependency #94

Merged
merged 3 commits into from
Jul 13, 2024
Merged

Conversation

fregante
Copy link
Contributor

index.js Outdated Show resolved Hide resolved
path.join('configstore', `${id}.json`);

this._path = options.configPath || path.join(configDirectory, pathPrefix);
this._path = options.configPath ?? getConfigDirectory(id, options.globalConfigPath);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Behavior change:

  • a new folder is created for every instantiation of Configstore, whereas until now the folder path was decided once on load

Which behavior is preferable? I can wrap getConfigDirectory in a once call if you want to preserve the previous behavior

Copy link
Member

Choose a reason for hiding this comment

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

I think that's fine. It's only a fallback anyway.

@sindresorhus sindresorhus merged commit 6985be5 into yeoman:main Jul 13, 2024
3 checks passed
@fregante fregante deleted the native-temp-folder branch July 13, 2024 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Secure temp dir in NodeJS without dependencies
2 participants