chore(repo): Add yarn yalc:publish scripts#7502
Merged
Conversation
yarn yalk:publish scripts
AbhiPrasad
reviewed
Mar 17, 2023
| @@ -0,0 +1,51 @@ | |||
| # Using `yalc` for Local SDK Testing | |||
Contributor
There was a problem hiding this comment.
m: Let's add a link to these doc to the main CONTRIBUTING doc.
Member
Author
There was a problem hiding this comment.
good point. f6ba80f
(I think at some point we had a sentence about linking packages in there but not anymore. I added it back)
yarn yalk:publish scriptsyarn yalc:publish scripts
AbhiPrasad
approved these changes
Mar 17, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new yarn script to all SDK packages:
yalc:publish. This script will publish locally built SDK packages to a local yalc repository which we can use as an alternative toyarn linkfor using our SDKs locally in test projects.To make use of this,
yalcneeds to be installed globally or in the respective test projectMore specifically:
yalc:publishscript to publish all packagesbuild(/npm?)directory of each package, meaning the structure is identical to our published tarballs. IMO this is good because we can test w/ the same structure that our users will get.yalc:publishprogramm callsyalc publishwith the--pushflag, meaning that it automatically updates the published package in the test projects that added them with yalc.Reason for this PR: We noticed that
yarn linkdoesn't work for the SvelteKit SDK, as linked dependencies apparently aren't processed identically as downloaded ones by Vite. The manual alternative is to build a tarball and install it locally. We also have other SDKs (e.g. Angular) where linking doesn't always work well, so IMO it's good to have another alternative.