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

@babel-bot
Copy link
Collaborator

@babel-bot babel-bot commented Oct 15, 2020

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

@JLHwung JLHwung force-pushed the JLHwung:fix-12125 branch from 235979b to 37fbab3 Oct 15, 2020
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

I hate this 😂

@codesandbox
Copy link

@codesandbox codesandbox bot commented Oct 15, 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 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
15 of 17 checks passed
15 of 17 checks passed
Prepare Cache
Details
Test on Node.js Latest
Details
Build Babel Artifacts
Details
Test on Node.js (13)
Details
Test on Node.js (12)
Details
Test on Node.js (10)
Details
Test on Node.js (8)
Details
Test on Node.js (6)
Details
Travis CI - Pull Request Build Created
Details
test262-pr Workflow: test262-pr
Details
Gitpod Open an online workspace in Gitpod
Details
Travis CI - Pull Request Build Passed
Details
babel/repl REPL preview is available
Details
build-standalone Workflow: build-standalone
Details
ci/codesandbox Building packages succeeded.
Details
codecov/project 91.81% (target 90.00%)
Details
e2e Workflow: e2e
Details
@nicolo-ribaudo nicolo-ribaudo deleted the JLHwung:fix-12125 branch Oct 15, 2020
@arcanis
Copy link
Contributor

@arcanis arcanis commented Oct 15, 2020

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

@nicolo-ribaudo
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo commented Oct 15, 2020

Hopefylly we'll remove this hack soon 😛 🤣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.