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

Guard against yarn-issue-1882 #12188

Merged
merged 1 commit into from Oct 15, 2020
Merged

Guard against yarn-issue-1882 #12188

merged 1 commit into from Oct 15, 2020

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Oct 15, 2020

Q                       A
Fixed Issues? Fixes #12125
Patch: Bug Fix? Yes
Tests Added + Pass? Yes
Any Dependency Changes? Yarn 2.3.1 is patched with sed -i -e "s/3155328/4567890/g"
License MIT

This PR find & replace the magic number 3155328e5 to 4567890e5 in the bundled yarn package. It is meant to workaround yarnpkg/berry#1882.

The replaced binary now uses new Date(4567890e5) // Fri Jun 22 1984 21:50:00 GMT as the timestamp of the ZIP file. It is randomly chosen because it is easier to type.

Note that it seems that we are safe to replace 3155328e5 since there is only one 3155328e5 occurrence in yarn.

grep -o '3155328e5' .yarn/releases/yarn-2.3.1.cjs | wc -l
// prints 1

@JLHwung JLHwung added the PR: Internal 🏠 A type of pull request used for our changelog categories label Oct 15, 2020
@babel-bot
Copy link
Collaborator

babel-bot commented Oct 15, 2020

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

Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

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

I hate this 😂

@codesandbox-ci
Copy link

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 37fbab3:

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

@nicolo-ribaudo nicolo-ribaudo merged commit 19dc038 into babel:main Oct 15, 2020
@nicolo-ribaudo nicolo-ribaudo deleted the fix-12125 branch October 15, 2020 22:15
@arcanis
Copy link
Contributor

arcanis commented Oct 15, 2020

I'm almost tempted to add if (3155328 === 4567890) somewhere... 😄

@nicolo-ribaudo
Copy link
Member

Hopefylly we'll remove this hack soon 😛 🤣

@JLHwung JLHwung mentioned this pull request Dec 14, 2020
@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 Jan 15, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 15, 2021
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 PR: Internal 🏠 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot Zip project when babel is installed: ZIP does not support timestamps before 1980
4 participants