<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Alexander Zibert on Medium]]></title>
        <description><![CDATA[Stories by Alexander Zibert on Medium]]></description>
        <link>https://medium.com/@alexander.zibert?source=rss-95e8605051bc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*MtK4HetDloujGxYc.jpg</url>
            <title>Stories by Alexander Zibert on Medium</title>
            <link>https://medium.com/@alexander.zibert?source=rss-95e8605051bc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 19:17:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alexander.zibert/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How I improved Vue, and so can you]]></title>
            <link>https://medium.com/bauer-kirch/how-i-improved-vue-and-so-can-you-1ae74cf975d3?source=rss-95e8605051bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ae74cf975d3</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Alexander Zibert]]></dc:creator>
            <pubDate>Mon, 21 Oct 2019 10:53:12 GMT</pubDate>
            <atom:updated>2019-10-21T10:53:12.125Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="I don’t fix mistakes — Just happy little accidents" src="https://cdn-images-1.medium.com/max/716/1*XXbh8J7yEeBY_pOWztAcxA.jpeg" /></figure><p>Do you have some experience with web development but don’t know how to start contributing to an open-source project?</p><p>That was me a few days ago. There are <a href="https://www.firsttimersonly.com/">many</a> <a href="https://www.codetriage.com/">resources</a> on <strong>what</strong> to contribute to as first project. This piece of <a href="https://kentcdodds.com/blog/what-open-source-project-should-i-contribute-to">advice</a> from Kent C. Dodds, for example, has stuck with me for a long time:</p><blockquote>You contribute best to something you use regularly</blockquote><p>This is all good and well. But I could not find many detailed guides on how people really started contributing. So today, I am going to tell you <strong>how</strong> I used Kent’s advice and show you how exactly I started my journey into open-source.</p><h3>What’s in it for you?</h3><p>In this article, you will learn:</p><ul><li>that you don’t need to be exceptionally smart or knowledgeable about a project to start contributing</li><li>which files to check first in a new JavaScript project and how to navigate in a big open-source repo</li><li>how to run the vue-next unit tests</li><li>about the package structure of vue-next</li></ul><h3>Vue 3 Repo is Live</h3><p>Evan You released <a href="https://github.com/vuejs/vue-next">vue-next</a> on October 4th, to the public, which will be Vue 3 in the future. It’s currently in a pre-alpha stage, which means it’s not yet feature-complete. It‘s a <a href="https://medium.com/vue-mastery/evan-you-previews-vue-js-3-0-ab063dec3547">faster, smaller, and more maintainable</a> rewrite of the Vue framework in <a href="http://www.typescriptlang.org/">TypeScript</a>. Because I love using Vue, I checked vue-next out to learn about the new features more in-depth.</p><p>Little did I know that, in doing so, I was on the path to creating my very first open-source contribution.</p><h3>Basic Setup</h3><p>Only people from the Vue team can submit pull-requests directly from the <a href="https://github.com/vuejs/vue-next">vue-next repository</a>. Everybody else has to create a fork of the repository by clicking on the fork button in the GitHub GUI. By forking a project, you copy the project’s complete git history to your own GitHub account. You can then test it out, do some edits, and maybe submit a change request.</p><p>After creating a fork, I cloned it to my local machine to edit the source and use the more powerful search features of my trusted IDE:</p><pre>git clone <a href="https://github.com/alexander-zibert/vue-next">https://github.com/your-user-name/vue-next</a></pre><p>Next, I added the original vue-next repo as my upstream repository so that I could sync it with my repo if new changes are committed to the upstream repo.</p><pre>git remote add upstream <a href="https://github.com/vuejs/vue-next.git">https://github.com/vuejs/vue-next.git</a></pre><p>In case you want to sync new changes, just run following git commands on your fork’s master branch:</p><pre>git pull upstream master<br>git push</pre><h3>Start Learning</h3><p>Instead of looking at code, in this blog post I want to focus on the high-level structure of the vue-next repo to speed up further learning.</p><h4>Contributing Guide</h4><p>The first things you should search for with your IDE are README.md files and a <a href="https://github.com/vuejs/vue-next/blob/master/.github/contributing.md">contributing guide</a>.</p><p>The vue-next contributing guide will give you information about:</p><ul><li>the development setup and how to run tests</li><li>the vue-next project structure and a high-level overview of the packages</li><li>the pull request guidelines and how to format your commit</li><li>how <a href="https://lerna.js.org/">Lerna</a> helps to manage all Vue packages in a monorepo</li></ul><h4>package.json</h4><p>There are also smaller projects than Vue. These projects have only a small number of contributing people and because of that often don’t have a contributing guide. A helpful approach to find out more about the project is to look at the <a href="https://github.com/vuejs/vue-next/blob/master/package.json">root package.json</a>, which defines the development workflow and the tech stack.</p><p>Under the scripts section, you can find the development commands that we already saw in the <a href="https://github.com/vuejs/vue-next/blob/master/.github/contributing.md">contributing guide</a>:</p><ul><li>build: compiles and bundles the typescript files with rollup into one JavaScript file</li><li>dev: watch all files and rebuild if they change</li><li>lint: runs prettier over every TypeScript file</li><li>test: runs the jest tests</li></ul><p>You can also find out more about how vue-next uses git-hooks with <a href="https://github.com/yyx990803/yorkie">yorkie</a> to lint your committed code and verify that you follow the commit message guidelines.</p><p>The devDependencies reveal a project&#39;s tech stack. From this section, we can learn that vue-next uses typescript (as promised), rollup for bundling the files into a single entry point for the browser and lerna to manage the subrepos.</p><h4>Project Structure</h4><p>At the time of writing, there are nine sub-packages in the vue-next monorepo. Each such package also has one package.json file, where internal dependencies are declared under the dependencies section. Let’s chart the internal package dependency graph to have a look at the package structure:</p><figure><img alt="Diagram — vue-next package dependency graph" src="https://cdn-images-1.medium.com/max/801/1*o4bx3aH54WzeYU2yR_i0jQ.png" /></figure><p>Compared to Vue 2, the packages are much more modularized and can be installed independently in the future. One of the main reasons to do this was to enable easier development of native runtimes (iOS, Android, …). Such packages would just use the runtime-core abstraction to get basic reactivity as well as Vue lifecycle features, but then enhance them with native code. At the moment, there already exists the runtime-test package. It is used to run tests without needing a browser-like environment.</p><p>Besides the dependency structure, we can also see packages marked with a blue background. These have no internal dependencies and should be a good starting point for learning.</p><h4>Digging Deeper — Reactivity package</h4><p>The packages without internal dependencies are the shared, compiler-core and reactivity package. The shared package only contains basic functionality like isObject which you could find in any project, so it wasn’t of much interest to me. The compiler-core package has some external dependencies you need to understand first, and I didn’t want to dig <em>that </em>deep. So I started with the reactivity package.</p><p>To get a high-level overview of the reactivity package, I looked at the package’s <a href="https://github.com/vuejs/vue-next/blob/caaeaff2fdfa29ccfad2a562bddb21d9c4f03b74/packages/reactivity/README.md">README</a> file. Unfortunately, this didn’t provide much information about the concrete implementation of this package. Next, let’s look at the tests to collect more information:</p><p><strong>Learning with Tests</strong></p><p>The tests for the reactivity package are <a href="https://github.com/vuejs/vue-next/tree/caaeaff2fdfa29ccfad2a562bddb21d9c4f03b74/packages/reactivity/__tests__">here</a>. From the test names alone, we can gather that these are some of the core functionality you have to look at:</p><ul><li>computed</li><li>effect</li><li>reactive</li><li>readonly</li><li>ref</li></ul><p>Some of them have already been published in the <a href="https://vue-composition-api-rfc.netlify.com/">composition API RFC</a>, which is a delightful read about Vue 3.</p><p>While further looking inside the tests, there it was: the code I could contribute to. Here is an excerpt of the WeakSet.spec.ts as it used to be:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b16b2e2393fdcca45610f63d19707910/href">https://medium.com/media/b16b2e2393fdcca45610f63d19707910/href</a></iframe><p>Can you spot the mistake?</p><p>The WeakSet instance test does not test that it is an instance of WeakSet, but instead only tests the normal Set again. It is a simple copy &amp; paste mistake.</p><h3>How to contribute?</h3><p>I didn’t expect to find something like this on my journey to learning Vue 3, and I wasn’t prepared for it. I didn’t know how to make a pull-request for an open-source repo where you do not have the master rights.</p><p>In case you don’t have much experience with git, this helpful<a href="http://makeapullrequest.com/"> resource</a> explains the process with videos in great detail.</p><p>For my specific case, I created a new branch:</p><pre>git checkout -b test/reactivity-collections</pre><p>There I corrected the test. Afterwards, I made sure that there weren’t more copy &amp; paste mistakes in the other tests. As it turns out, there was another one:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8a853c36f58604cfca8e520f2a3492e0/href">https://medium.com/media/8a853c36f58604cfca8e520f2a3492e0/href</a></iframe><p>I reran the tests (only for the reactivity package because I only fixed tests there):</p><pre>yarn test reactivity</pre><p>Everything passed!</p><p>Now I tried to commit my work:</p><pre>git commit -am &quot;fixed a small copy &amp; paste mistake in the reactivity/collections tests&quot;</pre><p>Oh no, what happened? A quite frightening error message was presented to me:</p><pre>ERROR invalid commit message format.<br>Proper commit message format is required for automated changelog generation. Examples:</pre><pre>feat(compiler): add ‘comments’ option<br>  fix(v-model): handle events on blur (close #28)</pre><pre>See .github/commit-convention.md for more details.<br>You can also use npm run commit to interactively generate a commit message.</pre><p>This was the vue-next commit-msg hook at work: it didn’t validate my commit message because it did not follow the <a href="https://github.com/vuejs/vue-next/blob/master/.github/commit-convention.md">commit conventions</a>.</p><p>I quickly fixed this and committed again:</p><pre>git commit -am &quot;test(reactivity): fixed small copy &amp; paste error&quot;<br>git push -u origin test/reactivity-collections</pre><p>Back in GitHub, its GUI immediately asked me if I wanted to submit this change as a pull request to the main vue-next project. And so I did just that. After their CI-pipeline and a person called <a href="https://github.com/znck">znck</a> (a member of the <a href="https://github.com/orgs/vuejs/people">Vue team</a>) validated my changes, it was merged after a few hours by Evan You.</p><p>It wasn’t as difficult as I expected, and I hope to contribute more while learning more about Vue. Now it‘s your turn!</p><h4>“But I do not have enough experience to contribute!”</h4><p>First of all, there are many things an outsider of a project is even more suited to discovering than the insiders themselves: Missing tests, weird code constructs, misleading comments, …</p><p>Here are some more ideas to start learning about, and possibly contributing to, a new project:</p><ul><li>try to understand tests and think of edge cases they do not yet cover</li><li>read the code and documentation — you will probably find small things that are easy to improve</li><li>try to find out the root cause of reported issues (not yet relevant for vue-next because they have not enabled issue-tracking for now)</li><li>sharing things you learned with the community</li></ul><p>If you need more guidance on how to contribute to open-source, check out these articles:</p><ul><li>an <a href="https://kentcdodds.com/blog/how-getting-into-open-source-has-been-awesome-for-me">article</a> by Kent C. Dodds where he also talks about his first open-source contribution</li><li><a href="https://twitter.com/dan_abramov/status/819555257055322112?lang=en">a small tip</a> from Dan Abramov: Just “watch” all GitHub activity for vue-next (top right corner in the GUI)</li><li>a comprehensive <a href="https://opensource.guide/how-to-contribute/">guide</a> on why and how to contribute</li></ul><h3>Conclusion</h3><p>In this article, you learned:</p><ul><li>how to get a high-level overview of an open-source project</li><li>the new and improved package structure of vue-next</li><li>how to make a pull-request, specifically for vue-next</li><li>that no contribution is too small</li><li>that learning about your favorite open-source software is a good way to get started with open-source contributions</li></ul><h3>Next Topics</h3><p>The next blog post will be a bit more technical. We will dive more deeply into the new reactivity package and learn more about ES6 Proxies, Symbols, and WeakMaps.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ae74cf975d3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bauer-kirch/how-i-improved-vue-and-so-can-you-1ae74cf975d3">How I improved Vue, and so can you</a> was originally published in <a href="https://medium.com/bauer-kirch">Bauer + Kirch</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>