This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Downgrade @babel/core to 7.12.9 (fixes the github package in --dev mode) #21923
+8
−7
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.
Requirements for Contributing a Bug Fix (from template, click to expand):
Identify the Bug
This PR fixes the
githubpackage for use with Atom's "dev mode".See atom/github#2620 for background info and confirmation from a babel maintainer.
Details
(Brief summary: Atom's custom
require.resolve()function breaks the latest@babel/corerelease's ability to load babel plugins with relative paths (./[path]). This in turn breaks thegithubpackage. We should consider updating our customrequire.resolve()logic, perhaps. But for now, using the previous@babel/corerelease avoids the problem.)(Only the
githubpackage needs@babel/core, so this only affects thegithubpackage. Even then, this fix is only needed for Atom's--devmode, because duringscript/buildthegithubpackage is built with its exact dependencies from itspackage-lock.jsonlockfile. (Thegithubpackage's lockfile uses@babel/core7.3.4). In--devmode, thegithubpackage is loaded from the repository with dependencies listed in the Atom repo's mainpackage-lock.json. So this PR fixesgithubin Atom'sdevmode.)Description of the Change
Downgrade
@babel/coreto the last compatible version for thegithubpackage, 7.12.9.Alternate Designs
None.
Possible Drawbacks
None.
Verification Process
With this change checked out, and doing a quick
apm installto update@babel/corein thenode_modulesfolder, thegithubpackage now loads properly again when loading the repo contents withatom --dev("dev mode").(To reproduce the issue and verify the fix, you may need to delete the compile cache under
~/.atom/compile-cache.)Release Notes
N/A