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

feat: make filepath relative for cache portability #852

Merged
merged 17 commits into from
Jan 22, 2025

Conversation

mellyeliu
Copy link
Member

What changed / motivation ?

Final follow up to #790 for cache portability/reusability

Testing

tests pass~~

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 13, 2025
@mellyeliu mellyeliu changed the base branch from main to cli-cache-read-fix January 13, 2025 01:32
@mellyeliu mellyeliu requested a review from nmn January 13, 2025 01:34
Copy link

github-actions bot commented Jan 13, 2025

workflow: benchmarks/size

Comparison of minified (terser) and compressed (brotli) size results, measured in bytes. Smaller is better.

@stylexjs/[email protected] size:compare
./size-compare.js /tmp/tmp.ZLPs0y3fzw /tmp/tmp.7jMDXEcmqv

Results Base Patch Ratio
stylex/lib/stylex.js
· compressed 729 729 1.00
· minified 2,541 2,541 1.00
stylex/lib/StyleXSheet.js
· compressed 1,266 1,266 1.00
· minified 3,776 3,776 1.00
rollup-example/.build/bundle.js
· compressed 567,110 567,110 1.00
· minified 10,232,512 10,232,512 1.00
rollup-example/.build/stylex.css
· compressed 100,628 100,628 1.00
· minified 755,718 755,718 1.00

@mellyeliu mellyeliu force-pushed the feat-relative-cache-path branch from 567c014 to 8710eb4 Compare January 13, 2025 03:47
Copy link
Contributor

@nmn nmn left a comment

Choose a reason for hiding this comment

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

Also a breaking test.

@mellyeliu mellyeliu requested a review from nmn January 13, 2025 03:54
packages/cli/src/cache.js Outdated Show resolved Hide resolved
@mellyeliu mellyeliu force-pushed the feat-relative-cache-path branch from b64b9eb to 6a77536 Compare January 14, 2025 00:25
@mellyeliu mellyeliu requested a review from nmn January 14, 2025 11:22
@mellyeliu mellyeliu marked this pull request as ready for review January 14, 2025 11:23
Base automatically changed from cli-cache-read-fix to main January 17, 2025 21:43
Copy link
Contributor

@nmn nmn left a comment

Choose a reason for hiding this comment

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

Doesn't quite look right. We can chat further if I'm wrong.

packages/cli/src/cache.js Outdated Show resolved Hide resolved
while (currentDir !== path.parse(currentDir).root) {
const packageJsonPath = path.join(currentDir, 'package.json');
try {
await fs.access(packageJsonPath);
Copy link
Contributor

Choose a reason for hiding this comment

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

TODO:

Check for deno.json and other similar files that may exist. This is fine for now.

@nmn
Copy link
Contributor

nmn commented Jan 22, 2025

This PR has more changes than just what is expected. Can you please rebase, or change the branch it merges into?

I think you have stacked PRs but this is on the top of the stack and reapplies changes from your other PRs.

@mellyeliu mellyeliu merged commit b070c56 into main Jan 22, 2025
8 checks passed
@mellyeliu mellyeliu deleted the feat-relative-cache-path branch January 22, 2025 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants