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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not cache non-existent config files forever #11906

Merged
merged 1 commit into from Aug 4, 2020

Conversation

devongovett
Copy link
Contributor

@devongovett devongovett commented Aug 2, 2020

We use babelCore.loadPartialConfig in Parcel and noticed that after creating a .babelrc in a directory where non previously existed, this config was not picked up without restarting the process. This was due to Babel caching the fact that the file did not exist indefinitely. This is not a safe assumption, as the user can create a config file without restarting the process. Always checking the mtime should do the trick.

Happy to add a test if someone can point me to a good place to do it. 馃槃

Q 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 A
Fixed Issues?
Patch: Bug Fix? Yes
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass?
Documentation PR Link
Any Dependency Changes?
License MIT

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 2, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 62d71a7:

Sandbox Source
babel-repl-custom-plugin Configuration
babel-plugin-multi-config Configuration

@babel-bot
Copy link
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/26818/

@JLHwung JLHwung added PR: Bug Fix 馃悰 A type of pull request used for our changelog categories pkg: core labels Aug 4, 2020
@JLHwung JLHwung merged commit c29138f into babel:main Aug 4, 2020
devongovett added a commit to devongovett/babel that referenced this pull request Oct 18, 2020
Missed a spot in babel#11906. Currently if you don't have a JS config file and then add one to your project, it will not be picked up without restarting the process. Changing from caching forever to never caching when files don't exist fixes the issue.
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Nov 4, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: core PR: Bug Fix 馃悰 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants