Skip to content

Use self-hosted Playground package tarballs - #892

Closed
brandonpayton wants to merge 1 commit into
trunkfrom
use-self-hosted-playground-packages
Closed

Use self-hosted Playground package tarballs#892
brandonpayton wants to merge 1 commit into
trunkfrom
use-self-hosted-playground-packages

Conversation

@brandonpayton

Copy link
Copy Markdown
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

brandonpayton commented Feb 4, 2025

Copy link
Copy Markdown
Member Author

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:

> studio@1.3.3-beta5 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/generate-password@0.1.0 ✔                                                                                                                                                               
@wordpress/compose@6.27.0 ✔                                                                                                                                                                         
                                                                                                                                                                                                    
**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

sejas commented Feb 6, 2025

Copy link
Copy Markdown
Member

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

bgrgicak commented Feb 7, 2025

Copy link
Copy Markdown
Contributor

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 .

@wojtekn

wojtekn commented Feb 28, 2025

Copy link
Copy Markdown
Contributor

Closing as it was done in #959.

Thanks for exploring that @brandonpayton !

@wojtekn wojtekn closed this Feb 28, 2025
@wojtekn
wojtekn deleted the use-self-hosted-playground-packages branch May 13, 2025 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants