<?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[JavaScript Studio - Medium]]></title>
        <description><![CDATA[The ground-breaking new way to find runtime errors - Medium]]></description>
        <link>https://medium.com/javascript-studio?source=rss----70f64391272d---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>JavaScript Studio - Medium</title>
            <link>https://medium.com/javascript-studio?source=rss----70f64391272d---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 09:47:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/javascript-studio" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ Studio Log v1.5 released]]></title>
            <link>https://medium.com/javascript-studio/studio-log-v1-5-released-a076485216f6?source=rss----70f64391272d---4</link>
            <guid isPermaLink="false">https://medium.com/p/a076485216f6</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[logging]]></category>
            <category><![CDATA[release-notes]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[emoji]]></category>
            <dc:creator><![CDATA[Maximilian Antoni]]></dc:creator>
            <pubDate>Tue, 19 Sep 2017 08:49:56 GMT</pubDate>
            <atom:updated>2017-09-19T08:49:55.786Z</atom:updated>
            <content:encoded><![CDATA[<h4>Now serializing error codes and causing exceptions</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cL8JA9WupOTZqWkO0_B6sA.png" /><figcaption>Photo by <a href="https://unsplash.com/@chuttersnap">chuttersnap</a></figcaption></figure><p>Studio Log is the tiny <a href="http://ndjson.org/">ndjson</a> logger that <a href="https://javascript.studio/">JavaScript Studio</a> uses in the CLI and on the server. The open source library comes with the emojilog pretty printer and it just received a little feature update to provide more information when serializing errors.</p><h4>Error codes</h4><p>It’s a common convention to put a code property on an error object with an enum-style string. For example, the <a href="https://github.com/javascript-studio/studio-json-request">Studio JSON Request</a> library uses the error code E_JSON if the response could not be parsed, and E_EXPECT to signal that the response status code does not meet the expectation. When handling an error, this information can be used to react accordingly.</p><p>While the error message hopefully explains what the issue is, having the error code in a machine readable structure has some advantages. It allows to apply queries or run statistics on the log data. With the latest release, Studio Log adds this information to the ndjson log entry automatically:</p><pre>log.error(&#39;Oh noes!&#39;, err);</pre><p>As an example, AWS CloudWatch allows you to filter logs with a query like this:</p><pre>{ $.topic = &quot;error&quot; &amp;&amp; $.data.code = &quot;E_EXPECT&quot; }</pre><h4>Error cause</h4><p>Together with error code support, Studio Log is now also aware of cause properties on errors. If a cause is found, it’s stack is added to the log output. Consider a source file called stacks.js with this content:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*miqz0It6-m66uKqw6-40_A.png" /></figure><p>Running it with node stacks.js | emojilog --stack shows this output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VniWaGpGpLFApoaj0LQKpQ.png" /></figure><h4>More information</h4><p>Check out the refreshed setup instructions and API docs in <a href="https://github.com/javascript-studio/studio-log">the project README</a>. If you like the tiny logger, please leave a star on the GitHub repository.</p><p><a href="https://github.com/javascript-studio/studio-log">javascript-studio/studio-log</a></p><p>Thanks for reading and happy logging!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a076485216f6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/javascript-studio/studio-log-v1-5-released-a076485216f6">📦 Studio Log v1.5 released</a> was originally published in <a href="https://medium.com/javascript-studio">JavaScript Studio</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing a new ndjson logger with ]]></title>
            <link>https://medium.com/javascript-studio/introducing-a-new-ndjson-logger-with-7bb5b95e3b?source=rss----70f64391272d---4</link>
            <guid isPermaLink="false">https://medium.com/p/7bb5b95e3b</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[logging]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[emoji]]></category>
            <dc:creator><![CDATA[Maximilian Antoni]]></dc:creator>
            <pubDate>Sat, 11 Feb 2017 14:39:53 GMT</pubDate>
            <atom:updated>2017-09-07T06:17:29.537Z</atom:updated>
            <content:encoded><![CDATA[<p>Emojis are everywhere. They can be used to 📣 in a compact form or simply add some 👻 to your message. For <a href="https://javascript.studio/">JavaScript Studio</a>, I started using emoji in log messages to highlight ⚠️ and 🚨, and I found that it actually adds readability. However, putting plain emoji directly into log files is not what I wanted. My preferred log file format is <a href="http://ndjson.org/">ndjson</a> and I would like to have emoji as an optional UI bling ✨.</p><p>So I made a tiny ndjson logger, and a CLI to format the logs ✅. I released it as open source software under the MIT license, and this is what it looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0qYFdLerTwrtvs6Qa_uTbw.png" /></figure><p>You can install it with npm install @studio/log -S. Read all about the API on the GitHub page.</p><p><a href="https://github.com/javascript-studio/studio-log">javascript-studio/studio-log</a></p><h3>Disabled by default</h3><p>There is no default output stream configured to prevent unwanted log output in test cases or when reusing libraries for a command line tool. Set stdout as the log destination like this:</p><pre>require(&#39;@studio/log&#39;).out(process.stdout);</pre><h3>A different approach to log levels</h3><p>There is another fundamental difference to other log libraries: There are no log levels. Yes, no “info” or “debug” anymore. And while “warn” and “error” are a thing in @studio.log, there is no severity level associated with any of the logger functions. So why did I do that?</p><p>Whenever I used log files to trace an issue, the most important logs where the debug entries. They tend to have the relevant details about HTTP requests or configs in use. The screaming error is just where the problem surfaces, but the stack trace does not help with reproducing an issue. Therefore I never filter logs based on log levels in production environments of a server application. However, when you have a command line tool, you might want some control over what is logged and what is not. In this case, I want to mute certain types of logs, and this is what @studio/log allows me to do. I can mute logs by namespace, by topic or only a specific combination of namespace and topic.</p><h3>What are namespaces and topics?</h3><p>While namespaces work like the “classic” log instance names, topics are the functions that the logger instances expose. They make the log statements a bit more expressive and the topics are mapped to emojis in the emojilog CLI to ✅ ⚠️ 🐛 🚨 🙈 🔺 🔻 📤 📥 📡 🏁 🚀 ⛔️ ✨ 📣 💾 ⏱ 💰 🔢 and 👻.</p><pre>const logger = require(&#39;<a href="http://twitter.com/studio/log">@studio/log</a>&#39;);</pre><pre>const log = logger(&#39;app&#39;); // &quot;app&quot; is the namespace</pre><pre>log.launch(&#39;my service&#39;, { port: 433 }); // &quot;launch&quot; is the topic</pre><h3>Why not Bunjan, Bole or Pino?</h3><p>I like <a href="https://github.com/trentm/node-bunyan">Bunjan</a>, <a href="https://github.com/rvagg/bole">Bole</a> and <a href="https://github.com/pinojs/pino">Pino</a>. They’re all great when you need a logger for a Node server application. They add the hostname and process ID by default and, in case of Bunjan, have nice built-in features for log file rotation and more. The environments I’m targeting are AWS Lambda functions and command line tools where these features have no value. Especially for Lambda functions, the size of the deployed source is important for fast cold starts. I use browserify to merge all sources into a single file and @studio/log has a minimal footprint when used like this.</p><p>If you like the project and need an advanced feature, it can be added with a custom transform stream. See the project readme for details.</p><p>🏁 Thanks for reading and happy logging.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7bb5b95e3b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/javascript-studio/introducing-a-new-ndjson-logger-with-7bb5b95e3b">Introducing a new ndjson logger with 🚀</a> was originally published in <a href="https://medium.com/javascript-studio">JavaScript Studio</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Nice and easy module releases]]></title>
            <link>https://medium.com/javascript-studio/nice-and-easy-module-releases-a32c906b564e?source=rss----70f64391272d---4</link>
            <guid isPermaLink="false">https://medium.com/p/a32c906b564e</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[npm]]></category>
            <category><![CDATA[release-notes]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Maximilian Antoni]]></dc:creator>
            <pubDate>Tue, 20 Dec 2016 13:53:42 GMT</pubDate>
            <atom:updated>2016-12-23T08:04:28.819Z</atom:updated>
            <content:encoded><![CDATA[<h4>Generate a changelog as part of the npm version command</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sArSgREgG8C7lVrZFOxFsg.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@spacex">SpaceX</a></figcaption></figure><p>I like building small, focused modules which get released frequently, often multiple times per day. Therefore it’s critical for me to have a release process that makes me feel confident and is highly automated. I use <a href="https://www.keithcirkel.co.uk/how-to-use-npm-as-a-build-tool/">npm as a build tool</a>, so every module ships with all the development tools required to lint the code and run the tests using <a href="https://docs.npmjs.com/misc/scripts">npm scripts</a>. When I started building the first couple of modules for <a href="https://medium.com/javascript-studio/hello-javascript-studio-2a091542e1a2">the JavaScript Studio project</a>, I wanted the release process to fit into this model.</p><p>Many module authors already use <a href="https://docs.npmjs.com/cli/version">npm version</a> to prepare their releases. For example, when you run npm version minor, npm will bump the minor version in the package.json file and create a version commit with the new version number as the commit message. Using npm is a natural fit for my needs, but I want to write release notes based on the commit history and added to the release commit. This is exactly what the@studio/changes module allows me to do.</p><p><a href="https://www.npmjs.com/package/@studio/changes">@studio/changes</a></p><h3>How does it work?</h3><p>You can add the changes module to your release process in two steps:</p><ol><li>npm install @studio/changes --save-dev</li><li>Add a version script to your package.json which simply calls changes <em>(npm makes it available on the </em><em>PATH already)</em>.</li></ol><p>That’s it! Now just run npm version [patch|minor|major] and your default text editor will open either with your existing, or a new CHANGES.md file. It will have a new heading with the version number and a list of changes, populated from your commit log as a starting point. Once you finished editing the release notes, simply save and close the editor and the CHANGES.md file will be added to the version commit.</p><h3>More automation!</h3><p>The npm version command calls the following scripts:</p><ul><li>preversion is called before the package.json file has been changed. We can use this to run npm test, so that the release process is aborted if the tests don’t pass. Note that this will also trigger any pretest or posttest scripts which you can use to run a linter.</li><li>version is called right after the package.json file has been changed, but before npm creates the commit.</li><li>postversion is called after the commit. To fully automate the release process, you can even run git push --follow-tags &amp;&amp; npm publish here.</li></ul><p>This is what it looks like all together:</p><pre>&quot;scripts&quot;: {<br>  &quot;preversion&quot;: &quot;npm test&quot;,<br>  &quot;version&quot;: &quot;changes&quot;,<br>  &quot;postversion&quot;: &quot;git push --follow-tags &amp;&amp; npm publish&quot;<br>},<br>&quot;devDependencies&quot;: {<br>  &quot;<a href="http://twitter.com/studio/changes">@studio/changes</a>&quot;: &quot;^1.0.0&quot;<br>}</pre><p>Pushing and publishing in the postversion script might seem quite radical, but here’s the thing: When your editor opens with the CHANGES.md file, it acts as a confirmation, like editing a git commit message. If you want to abort the release, simply remove the line with the version heading. The changes script will exit with a non-zero exit code, causing npm to abort the release.</p><p>Now, the only command you need to remember to do a release is npm version and everything else happens automagically. Needless to say that @studio/changes is released this way with itself 🤓</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*PjXCNFFNNA4604pnH9cxMA.gif" /></figure><p>I’d love to hear your thoughts! If you like this approach, pop by the GitHub repository and leave a ⭐️</p><p><a href="https://github.com/javascript-studio/studio-changes">javascript-studio/studio-changes</a></p><h3>More changelog tools</h3><ul><li>There is <a href="https://www.npmjs.com/package/changelog">changelog</a>, which operates on any given npm module or a github repository, should the changelog be missing 🙊, or if you need a special format.</li><li>If you’re into 100% automated releasing, check out <a href="https://www.npmjs.com/package/semantic-release">semantic-release</a>.</li></ul><p><strong>Thanks for reading!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a32c906b564e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/javascript-studio/nice-and-easy-module-releases-a32c906b564e">Nice and easy module releases</a> was originally published in <a href="https://medium.com/javascript-studio">JavaScript Studio</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hello JavaScript Studio]]></title>
            <link>https://medium.com/javascript-studio/hello-javascript-studio-2a091542e1a2?source=rss----70f64391272d---4</link>
            <guid isPermaLink="false">https://medium.com/p/2a091542e1a2</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Maximilian Antoni]]></dc:creator>
            <pubDate>Tue, 29 Nov 2016 16:23:16 GMT</pubDate>
            <atom:updated>2017-09-07T06:13:28.812Z</atom:updated>
            <content:encoded><![CDATA[<h4>Building a cloud service to find runtime errors in JavaScript</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i9J3UlbnWzQoi03xU2CQXg.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@laurenmancke">Lauren Mancke</a></figcaption></figure><p>More than a year ago, I started playing with an idea to build a dynamic analyzer for JavaScript. While static analysis is very limited in JavaScript, dynamic analysis usually takes too much time. I was curious to find out if it could be done faster. To free up some time to build a prototype, I reduced my day-job to 80%, allowing me to work on the idea every Friday. The outcome was promising, so after one year of doing this on the side, I’ve quit my job and started my own company 🎉</p><p>I love JavaScript. I’ve spend the last 7 years working on some ridiculously large JavaScript code bases, building trading applications for Swiss banks. Especially in the financial industry, production errors have a tendency to be really expensive. So a lot of time went into our test suite. It’s great to have tests for a new feature, or to make sure that bug never bites you again, but writing tests just to make sure all code paths have been executed … not so much fun.</p><p>This is where <a href="https://javascript.studio/">JavaScript Studio</a> will come in. It evaluates all code branches in a custom runtime and extracts type information from plain JavaScript. It does not require any annotations or language extensions. It’s going to be available as a cloud service to integrate with continuous integration systems and pull requests. The plan is to launch a private beta early 2017. It will be a minimal implementation, only supporting ES 2015 and Node 0.12 compatible libraries. From there, I will continuously add more language features and runtime environments. If you’re interested, leave your email address at <a href="https://javascript.studio/">https://javascript.studio</a> to get on the list.</p><p>There will be a free offering for open source projects. I’m also planing to open source some general purpose projects that I’m building to run JavaScript Studio on serverless infrastructure. Make sure to subscribe here for further announcements, or follow <a href="https://github.com/javascript-studio">javascript-studio on GitHub</a>.</p><p><strong>Edit:</strong> How would you like to use JavaScript Studio? I’ve made a <a href="http://bit.ly/2hsY8wQ">survey with 10 short questions</a> <em>(closed)</em>.</p><p><strong>Edit II</strong>: The survey results can be found in the “<a href="https://medium.com/javascript-studio/javascript-studio-publicly-available-28522e325037">JavaScript Studio publicly available</a>” post.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a091542e1a2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/javascript-studio/hello-javascript-studio-2a091542e1a2">Hello JavaScript Studio</a> was originally published in <a href="https://medium.com/javascript-studio">JavaScript Studio</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>