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

Use self-hosted Playground package tarballs #892

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

brandonpayton
Copy link
Member

Related issues

  • Fixes # TBD

Proposed Changes

This PR shows how Studio can reference self-hosted Playground package releases.

Testing Instructions

TBD

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@brandonpayton brandonpayton requested a review from a team February 4, 2025 20:06
@brandonpayton
Copy link
Member Author

brandonpayton commented Feb 4, 2025

This PR is mainly just an example of how to reference self-hosted Playground package releases.

At a glance, the packages appear to be installed properly via npm install, but in the post-install hook, there is a patching error related to @php-wasm/universal:

> [email protected] postinstall                                                                                                                                                                    
> patch-package && ts-node scripts/download-wp-server-files.ts && node ./scripts/download-available-site-translations.mjs                                                                           
                                                                                                                                                                                                    
patch-package 8.0.0                                                                                                                                                                                 
Applying patches...                                                                                                                                                                                 
@automattic/[email protected] ✔                                                                                                                                                               
@wordpress/[email protected] ✔                                                                                                                                                                         
                                                                                                                                                                                                    
**ERROR** Failed to apply patch for package @php-wasm/universal at path                                                                                                                             
                                                                                                                                                                                                    
    node_modules/@php-wasm/universal                                                                                                                                                                
                                                                                                                                                                                                    
  This error was caused because @php-wasm/universal has changed since you                                                                                                                           
  made the patch file for it. This introduced conflicts with your patch,                                                                                                                            
  just like a merge conflict in Git when separate incompatible changes are                                                                                                                          
  made to the same piece of code.                                                                                                                                                                   
                                                                                                                                                                                                    
  Maybe this means your patch file is no longer necessary, in which case                                                                                                                            
  hooray! Just delete it!                                                                                                                                                                           
                                                                                                                                                                                                    
  Otherwise, you need to generate a new patch file.                                                                                                                                                 
                                                                                                                                                                                                    Th 

To generate a new one, just repeat the steps you made to generate the first                                                                                                                       
  one.                                                                                                                                                                                              
                                                                                                                                                                                                    
  i.e. manually make the appropriate file changes, then run                                                                                                                                         
                                                                                                                                                                                                    
    patch-package @php-wasm/universal                                                                                                                                                               
                                                                                                                                                                                                    
  Info:                                                                                                                                                                                             
    Patch file: patches/@php-wasm+universal+0.9.44.patch                                                                                                                                            
    Patch was made for version: 0.9.44                                                                                                                                                              
    Installed version: 1.0.26                               

@sejas
Copy link
Member

sejas commented Feb 6, 2025

Thank you for creating this PR example on how to upgrade the dependencies! 🙌

Yes, we added a temporary patch, which I believe we can remove once we update the Playground dependencies. 👍

I’ve confirmed that the packages are being downloaded. The Buildkite CI jobs are failing because we didn’t commit package-lock.json, and a few tests/features will fail due to changes in Playground functions that we’ll need to update.

@bgrgicak
Copy link
Contributor

bgrgicak commented Feb 7, 2025

Thanks @brandonpayton for starting the PR! I've been working on a Playground update for a while now and the only thing that's missing is Store WordPress site cookies in the browser instead of a custom Cookie Store .

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

Successfully merging this pull request may close these issues.

4 participants