<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Danielle Adams</title>
    <description>The latest articles on DEV Community by Danielle Adams (@danielleadams).</description>
    <link>https://dev.to/danielleadams</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F275207%2F807c7c0f-74ca-40aa-84de-d00f4e85b823.jpeg</url>
      <title>DEV Community: Danielle Adams</title>
      <link>https://dev.to/danielleadams</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/danielleadams"/>
    <language>en</language>
    <item>
      <title>Building a Monorepo with Yarn 2</title>
      <dc:creator>Danielle Adams</dc:creator>
      <pubDate>Tue, 22 Dec 2020 21:19:13 +0000</pubDate>
      <link>https://dev.to/heroku/building-a-monorepo-with-yarn-2-o14</link>
      <guid>https://dev.to/heroku/building-a-monorepo-with-yarn-2-o14</guid>
      <description>&lt;p&gt;In true JavaScript fashion, there was no shortage of releases in the JavaScript ecosystem this year. This includes the Yarn project’s release of Yarn 2 with a compressed cache of JavaScript dependencies, including a Yarn binary to reference,  that can be used for a zero-install deployment. &lt;/p&gt;

&lt;p&gt;Yarn is a package manager that also provides developers a project management toolset. Now, Yarn 2 is now officially supported by Heroku, and Heroku developers are able to take advantage of leveraging zero-installs during their Node.js builds. We’ll go over a popular use case for Yarn that is enhanced by Yarn 2: using workspaces to manage dependencies for your monorepo.&lt;/p&gt;

&lt;p&gt;We will cover taking advantage of Yarn 2’s cache to manage monorepo dependencies. Prerequisites for this include a development environment with Node installed. To follow these guides, set up an existing Node project that makes use of a &lt;code&gt;package.json&lt;/code&gt; too. If you don’t have one, use the &lt;a href="https://github.com/heroku/node-js-getting-started"&gt;Heroku Getting Started with Node.js Project&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Workspaces
&lt;/h2&gt;

&lt;p&gt;First off, what are workspaces? Workspaces is Yarn’s solution to a monorepo structure for a JavaScript app or Node.js project. A monorepo refers to a project, in this case, a JavaScript project, that has more than one section of the code base. For example, you may have the following set up:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/app
 - package.json
 - /server
   - package.json
 - /ui
   - package.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your JavaScript server has source code, but there’s an additional front end application that will be built and made available to users separately. This is a popular pattern for setting up a separation of concerns with a custom API client, a build or testing tool, or something else that may not have a place in the application logic. Each of the subdirectory’s &lt;code&gt;package.json&lt;/code&gt; will have their own dependencies. How can we manage them? How do we optimize caching? This is where Yarn workspaces comes in.&lt;/p&gt;

&lt;p&gt;In the root &lt;code&gt;package.json&lt;/code&gt;, set up the subdirectories under the &lt;code&gt;workspaces&lt;/code&gt; key. You should add this to your &lt;code&gt;package.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"workspaces"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"server"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"ui"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For more on workspaces, visit here: &lt;a href="https://yarnpkg.com/features/workspaces"&gt;https://yarnpkg.com/features/workspaces&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Additionally, add the &lt;code&gt;workspaces-tools&lt;/code&gt; plugin. This will be useful when running workspace scripts that you’ll use later. You can do this by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn plugin import workspace-tools
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Setting up Yarn
&lt;/h2&gt;

&lt;p&gt;If you’re already using Yarn, you have a &lt;code&gt;yarn.lock&lt;/code&gt; file already checked into your code base’s git repository. There’s other files and directories that you’ll need up to set up the cache. If you aren’t already using Yarn, install it globally.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; yarn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Note: If you don’t have Yarn &amp;gt;=1.22.10 installed on your computer, update it with the same install command.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Next, set up your Yarn version for this code base. One of the benefits of using Yarn 2 is that you’ll have a checked in Yarn binary that will be used by anyone that works on this code base and eliminates version conflicts between environments.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn &lt;span class="nb"&gt;set &lt;/span&gt;version berry
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A &lt;code&gt;.yarn&lt;/code&gt; directory and &lt;code&gt;.yarnrc.yml&lt;/code&gt; file will both be created that need to be checked into git. These are the files that will set up your project’s local Yarn instance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up the Dependency Cache
&lt;/h2&gt;

&lt;p&gt;Once Yarn is set up, you can set up your cache. Run yarn install:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before anything else, make sure to add the following to the &lt;code&gt;.gitignore&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Yarn
.yarn/*
!.yarn/cache
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The files that are ignored will be machine specific, and the remaining files you’ll want to check in. If you run &lt;code&gt;git status&lt;/code&gt;, you’ll see the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Untracked files:
  (use "git add &amp;lt;file&amp;gt;..." to include in what will be committed)
    .gitignore
    .pnp.js
    .yarn/cache/
    yarn.lock
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ve created new files that will speed up your install process:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;.pnp.js&lt;/code&gt; - This is the Plug’n’Play (PnP) file. The PnP file tells your Node app or build how to find the dependencies that are stored in &lt;code&gt;.yarn/cache&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.yarn/cache&lt;/code&gt; - This directory will have the dependencies that are needed to run and build your app.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;yarn.lock&lt;/code&gt; - The lock file still is used to lock the versions that are resolved from the &lt;code&gt;package.json&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check all of this in to git, and you’re set. For more information about Yarn 2’s zero-install philosophy, read here: &lt;a href="https://yarnpkg.com/features/zero-installs"&gt;https://yarnpkg.com/features/zero-installs&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding Dependencies to Subdirectories
&lt;/h2&gt;

&lt;p&gt;Now that Yarn and the cache are set up, we can start adding dependencies. As initially shown, we have a &lt;code&gt;server&lt;/code&gt; directory and a &lt;code&gt;ui&lt;/code&gt; directory. We can assume that each of these will be built and hosted differently. For example, my server is written in TypeScript, using Express.js for routing, and running on a Heroku web dyno. For the front end app, it is using Next.js. The build will be run during the app’s build process.&lt;/p&gt;

&lt;p&gt;Add &lt;code&gt;express&lt;/code&gt; to the server &lt;code&gt;dependencies&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn workspace server add express
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Additionally, add &lt;code&gt;@types/express&lt;/code&gt; and &lt;code&gt;typescript&lt;/code&gt; to the &lt;code&gt;devDependencies&lt;/code&gt;. You can use the &lt;code&gt;-D&lt;/code&gt; flag to indicate that you’re adding &lt;code&gt;devDependencies&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn workspace server add @types/express typescript &lt;span class="nt"&gt;-D&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We now have our dependencies in our &lt;code&gt;server&lt;/code&gt; workspace. We just need to create our &lt;code&gt;ui&lt;/code&gt; workspace. Next, build a Next.js app with the &lt;code&gt;yarn create&lt;/code&gt; command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn create next-app ui
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, run &lt;code&gt;yarn&lt;/code&gt; again to update the cache and check these changes into git.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running Scripts with Workspaces
&lt;/h2&gt;

&lt;p&gt;The last piece is to run scripts within the workspaces. If you look through your source code, you’ll see that there’s one global cache for all dependencies under your app’s root directory. Run the following to see all the compressed dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; .yarn/cache
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, lets run build scripts with workspaces. First, set up the workspace. For server, use &lt;code&gt;tsc&lt;/code&gt; to build the TypeScript app. You’ll need to set up a TypeScript config and a &lt;code&gt;.ts&lt;/code&gt; file first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;server
yarn dlx &lt;span class="nt"&gt;--package&lt;/span&gt; typescript tsc &lt;span class="nt"&gt;--init&lt;/span&gt;
&lt;span class="nb"&gt;touch &lt;/span&gt;index.ts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;yarn dlx&lt;/code&gt; will run a command from a package so that it doesn’t need to be installed globally. It’s useful for one-off initializing commands, like initializing a TypeScript app.&lt;/p&gt;

&lt;p&gt;Next, add the build step to the &lt;code&gt;server/package.json&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"tsc"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"node index.js"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Change directories back to the application level, and run the build.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ..
yarn workspace server build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll see that a &lt;code&gt;server/index.js&lt;/code&gt; file is created. Add &lt;code&gt;server/*.js&lt;/code&gt; to the &lt;code&gt;.gitignore&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Since we already have &lt;code&gt;build&lt;/code&gt; and &lt;code&gt;start&lt;/code&gt; scripts in our Next.js app (created by the &lt;code&gt;yarn create&lt;/code&gt; command), add a build script at the root level &lt;code&gt;package.json&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"yarn workspaces foreach run build"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is when the &lt;code&gt;workspaces-tool&lt;/code&gt; plugin is used. Run &lt;code&gt;yarn build&lt;/code&gt; from your app’s root, and both of your workspaces will build. Open a second terminal, and you’ll be able to run &lt;code&gt;yarn workspace server start&lt;/code&gt; and &lt;code&gt;yarn workspace ui start&lt;/code&gt; in each terminal and run the Express and Next servers in parallel.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploy to Heroku
&lt;/h2&gt;

&lt;p&gt;Finally, we can deploy our code to Heroku. Since Heroku will run the script is in the &lt;code&gt;package.json&lt;/code&gt; under &lt;code&gt;start&lt;/code&gt;, add a script to the &lt;code&gt;package.json&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"yarn workspaces foreach run build"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"yarn workspaces server start"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://devcenter.heroku.com/articles/deploying-nodejs#specifying-a-start-script"&gt;Heroku will use the &lt;code&gt;start&lt;/code&gt; script&lt;/a&gt; from the &lt;code&gt;package.json&lt;/code&gt; to start the &lt;code&gt;web&lt;/code&gt; process on your app.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;There are &lt;a href="https://yarnpkg.com/features"&gt;plenty more features&lt;/a&gt; that Yarn, and specifically Yarn 2, offers that are useful for Heroku developers. Check out the Yarn docs to see if there are additional workspace features that may work nicely with Heroku integration. As always, if you have any feedback or issues, please &lt;a href="https://github.com/heroku/heroku-buildpack-nodejs/issues/new/choose"&gt;open an Issue on GitHub&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Celebrating 25 Years of JavaScript</title>
      <dc:creator>Danielle Adams</dc:creator>
      <pubDate>Fri, 04 Dec 2020 22:04:10 +0000</pubDate>
      <link>https://dev.to/heroku/celebrating-25-years-of-javascript-2c29</link>
      <guid>https://dev.to/heroku/celebrating-25-years-of-javascript-2c29</guid>
      <description>&lt;p&gt;JavaScript turns 25 years old today. While it’s made an impact on my career as a developer, it has also impacted many developers like me and users around the world. To commemorate our favorite language, we’ve collected 25 landmark events that have shaped the path of what the JavaScript ecosystem looks like today.&lt;/p&gt;

&lt;h2&gt;
  
  
  1995
&lt;/h2&gt;

&lt;h4&gt;
  
  
  1) JavaScript is created
&lt;/h4&gt;

&lt;p&gt;In 1995, Brendan Eich, a developer at Netscape, known for their Netscape browser, was tasked with building a client-side scripting language that paired well with Java. While it may not be the language that you know and love today, JavaScript was written in 10 days with features we still use today, such as first-class functions. &lt;/p&gt;

&lt;h2&gt;
  
  
  1997
&lt;/h2&gt;

&lt;h4&gt;
  
  
  2) ECMAScript is released
&lt;/h4&gt;

&lt;p&gt;Despite JavaScript being created 2 years before, there was a need to create open standards for the language if it would be used across multiple browser types. In 1997, Netscape and Microsoft came together under Ecma International to form the first standardization of the JavaScript language, resulting in the first iteration of ECMAScript.&lt;/p&gt;

&lt;h2&gt;
  
  
  1999
&lt;/h2&gt;

&lt;h4&gt;
  
  
  3) Internet Explorer gets an early XMLHTTP Object
&lt;/h4&gt;

&lt;p&gt;Some will recall using &lt;code&gt;iframe&lt;/code&gt; tags in the browser to avoid reloading a user’s page with a new request. In March of 1999, Internet Explorer 5.0 is shipped with &lt;code&gt;XMLHTTP&lt;/code&gt;, a browser API that could enable developers to take advantage of background requests.&lt;/p&gt;

&lt;h2&gt;
  
  
  2001
&lt;/h2&gt;

&lt;h4&gt;
  
  
  4) JavaScript gets its own data format
&lt;/h4&gt;

&lt;p&gt;In 2001, JSON was first introduced via &lt;a href="http://json.org/"&gt;json.org&lt;/a&gt;. In 2006, an RFC proposing JSON, JavaScript Object Notation, was opened for review with the proposal of more than one type of HTTP call to fulfill a website: one that would fulfill a browser’s needs and the other would provide application state. Thanks to its simplicity, JSON would gain traction as the standard and continues to be used today. (&lt;a href="http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf"&gt;Source&lt;/a&gt;)&lt;/p&gt;

&lt;h2&gt;
  
  
  2005
&lt;/h2&gt;

&lt;h4&gt;
  
  
  5) Shifts towards AJAX
&lt;/h4&gt;

&lt;p&gt;After other browsers followed Internet Explorer in supporting background requests for updating clients without reloading pages, a researcher penned the term as Asynchronous JavaScript and XML, or AJAX, highlighting the shift in web development and JavaScript to asynchronous code. (&lt;a href="https://web.archive.org/web/20150910072359/http://adaptivepath.org/ideas/ajax-new-approach-web-applications/"&gt;Source&lt;/a&gt;)&lt;/p&gt;

&lt;h2&gt;
  
  
  2006
&lt;/h2&gt;

&lt;h4&gt;
  
  
  6) First publicly released Developer Tools
&lt;/h4&gt;

&lt;p&gt;With more complexity being enabled in the browser, there was a need for tooling to keep up. Firebug was created in 2005 as the first Developer Tool to debug in Mozilla’s Firefox browser. It was the first piece of tooling that provided developers the ability to inspect and debug directly from the browser. (&lt;a href="https://hacks.mozilla.org/2017/10/saying-goodbye-to-firebug/"&gt;Source&lt;/a&gt;)&lt;/p&gt;

&lt;h4&gt;
  
  
  7) jQuery is released
&lt;/h4&gt;

&lt;p&gt;jQuery can be considered the pioneer of what we know today as modern front-end web development, and it has gone to influence many libraries and frameworks today. At its height, being a JavaScript developer and being a jQuery developer were interchangeable. The library extends the JavaScript language to easily create single-page applications with DOM-traversal, event handling, and more.&lt;/p&gt;

&lt;h2&gt;
  
  
  2008
&lt;/h2&gt;

&lt;h4&gt;
  
  
  8) Creation of V8
&lt;/h4&gt;

&lt;p&gt;As websites went from HTML pages to JavaScript applications, it was imperative that the browsers hosting these applications keep up. From 2007 to 2010, many browsers made major releases to keep up with the growing demand from JavaScript compute power. When Chrome was released, the browser’s JavaScript engine, V8, was released as a separate project. V8 was a landmark project with Its “just-in-time” compiler and would be used in future projects as a reliable and fast JavaScript runtime. &lt;/p&gt;

&lt;h4&gt;
  
  
  9) The first native Developer Tools
&lt;/h4&gt;

&lt;p&gt;In addition to the release of V8, Chrome introduced developers to another innovation: Developer Tools that are native to the browser. At the time, features only included element inspection and looking at resources, but the tool was an upgrade from the current tooling and would influence an entire suite of developer tools for front-end development. (&lt;a href="https://web.archive.org/web/20080923064954/http://blogs.computerworld.com/three_hidden_chrome_features_youll_love"&gt;Source&lt;/a&gt;)&lt;/p&gt;

&lt;h2&gt;
  
  
  2009
&lt;/h2&gt;

&lt;h4&gt;
  
  
  10) CommonJS moves to standardize modules
&lt;/h4&gt;

&lt;p&gt;In an effort to modularize JavaScript code and take code bases from single file scripts to multi-file source code, the CommonJS project was an effort to elevate JavaScript into language for application development. CommonJS modules would influence the Node.js module system.&lt;/p&gt;

&lt;h4&gt;
  
  
  11) Node.js takes JavaScript to the back-end
&lt;/h4&gt;

&lt;p&gt;JavaScript had gained momentum as a language for the browser for many years before making its way to the back-end. In 2009, an engineer at Joyent, Ryan Dahl, introduced Node.js, an asynchronous event-driven JavaScript runtime at JSConf EU.&lt;/p&gt;

&lt;h4&gt;
  
  
  12) CoffeeScript sprinkles syntactic sugar
&lt;/h4&gt;

&lt;p&gt;Long before types were popularized in JavaScript, there was CoffeeScript, a programming language that compiles to JavaScript and was inspired by Ruby, Python and Haskell. The compiler was originally written in Ruby and didn’t require compatibility from dependencies because it compiled to JavaScript, and it gained traction for exposing the good parts of JavaScript in a simple way. &lt;/p&gt;

&lt;h2&gt;
  
  
  2010
&lt;/h2&gt;

&lt;h4&gt;
  
  
  13) Node.js gets its first package manager
&lt;/h4&gt;

&lt;p&gt;Shortly after Node.js was introduced, npm was created. npm (short for Node package manager) would eventually create the standard in managing dependencies for both front-end and back-end applications making it easier to publish, install, and manage shared source code with a project file, the package.json. npm also provided the npm registry, which would supply hundreds of thousands of applications a database to retrieve Node.js dependencies.&lt;/p&gt;

&lt;h4&gt;
  
  
  14) Express has it’s initial release
&lt;/h4&gt;

&lt;p&gt;Inspired by Ruby’s Sinatra, Express.js was released in 2010. It was released with the intention of being a minimal, un-opinionated web framework that provided routing, middleware, and other HTTP utilities. According to GitHub, Express remains the most popular framework for back-end JavaScript developers to date.&lt;/p&gt;

&lt;h4&gt;
  
  
  15) Modern JavaScript MVC frameworks are born
&lt;/h4&gt;

&lt;p&gt;While back-end JavaScript was gaining traction, front-end MVC frameworks were starting to pop up. Most notably, Backbone.js and AngularJS (later rewritten and released as Angular) were starting to be adopted and loved by JavaScript developers. Backbone’s approach to front-end was well-suited for mirroring an application’s business logic, while Angular took a declarative approach that enables a robust web application in the browser. Both frameworks would go on to influence later front-end libraries and frameworks, such as React, Ember.js, and Vue.js.&lt;/p&gt;

&lt;h2&gt;
  
  
  2011
&lt;/h2&gt;

&lt;h4&gt;
  
  
  16) Ember.js stresses convention over configuration
&lt;/h4&gt;

&lt;p&gt;In 2011, a forked version of an earlier project called SproutCore, is renamed to Ember.js. Ember introduces JavaScript developers the concept of convention over configuration, in which the developer does not have to think about design decisions that can be standardized across code bases.&lt;/p&gt;

&lt;h2&gt;
  
  
  2012
&lt;/h2&gt;

&lt;h4&gt;
  
  
  17) Static types are introduced to JavaScript developers
&lt;/h4&gt;

&lt;p&gt;2012 was a big year for static typed languages. JavaScript was, until then, a dynamically typed language by design, in that it doesn’t require the developer to declare types when initializing variables or other data structures. Enter TypeScript - an extension of JavaScript that allows developers to write typed JavaScript that is syntactically similar to JavaScript and compiles to JavaScript. Microsoft made the initial release of the project in October of 2012.&lt;/p&gt;

&lt;h2&gt;
  
  
  2013
&lt;/h2&gt;

&lt;h4&gt;
  
  
  18) The world reacts to React
&lt;/h4&gt;

&lt;p&gt;In 2013, a developer at Facebook, Jordan Walke, presents a new JavaScript library that does not follow the then-popular MVC convention of JS frameworks. (&lt;a href="https://www.youtube.com/watch?v=GW0rj4sNH2w"&gt;Source&lt;/a&gt;) React, a component-based library that was simply the V of MVC, would go on to become one of the most popular libraries of today. &lt;/p&gt;

&lt;h4&gt;
  
  
  19) Electron puts Node.js into desktop applications
&lt;/h4&gt;

&lt;p&gt;Additionally, with the rising popularity of Node.js, there was momentum to repurpose the runtime or other uses. GitHub made use of Node.js as a library with Chromium’s rendering engine and created Electron for desktop applications. Notable desktop applications that use Electron include GitHub Desktop, Slack, and Visual Studio Code.&lt;/p&gt;

&lt;h2&gt;
  
  
  2015
&lt;/h2&gt;

&lt;h4&gt;
  
  
  20) Release of ES2015/ES6
&lt;/h4&gt;

&lt;p&gt;The 6th edition of ECMAScript was released in June of 2015. This specification was anticipated by many JavaScript developers for its inclusion of popular features such as support for export and import of modules (ES modules), declaring constants, and more. (Source (&lt;a href="http://es6-features.org/)"&gt;http://es6-features.org/)&lt;/a&gt;) While the previous version of ECMAScript (ES5) had been released 6 years before, much of the standards released had been worked on since ES3, which was released 16 years before. (&lt;a href="http://www.ecma-international.org/ecma-262/6.0/index.html"&gt;Source&lt;/a&gt;)&lt;/p&gt;

&lt;h4&gt;
  
  
  21) GraphQL emerges as a REST alternative
&lt;/h4&gt;

&lt;p&gt;In 2015, Facebook released GraphQL as an open source project, a querying language for APIs that simplifies request calls between clients and servers to resolve the differences between server-side data schemas and client-side data needs. (&lt;a href="https://engineering.fb.com/2015/09/14/core-data/graphql-a-data-query-language/"&gt;Source&lt;/a&gt;) Due to its popularity, the project would eventually be moved to its own GraphQL Foundation.&lt;/p&gt;

&lt;h4&gt;
  
  
  22) Node v4 is released
&lt;/h4&gt;

&lt;p&gt;2015 was notable for back-end JavaScript developers because it marked the merging of io.js back into Node.js. Just a year before, Node was forked as io.js in an effort adapt quicker release cycles. When io.js was merged back in, it had already released v3, so it was natural to release Node v4 after the merge as a fresh start for the combined projects. Hereafter, Node would adapt a release cycle that would keep it up to date with the latest V8 releases.&lt;/p&gt;

&lt;h2&gt;
  
  
  2016
&lt;/h2&gt;

&lt;h4&gt;
  
  
  23) JavaScript developers are introduced to lock files
&lt;/h4&gt;

&lt;p&gt;In the months following an infamous “left-pad” incident (&lt;a href="https://blog.npmjs.org/post/141577284765/kik-left-pad-and-npm"&gt;Source&lt;/a&gt;), Yarn was released to the JavaScript ecosystem. Yarn was created out of need for more consistency across machines and offline environments running the same JavaScript applications. Yarn introduced the autogenerated lockfile to the JavaScript ecosystem, which would influence package managers to look at developer experience differently moving forward. (&lt;a href="https://engineering.fb.com/2016/10/11/web/yarn-a-new-package-manager-for-javascript/"&gt;Source&lt;/a&gt;)&lt;/p&gt;

&lt;h2&gt;
  
  
  2019
&lt;/h2&gt;

&lt;h4&gt;
  
  
  24) Node + JS = OpenJS
&lt;/h4&gt;

&lt;p&gt;After years of the JS Foundation and Node.js Foundation operating separately, the two organizations merge and become the OpenJS Foundation with goals to increase collaboration and provide a united home for projects across the JavaScript ecosystem. (&lt;a href="https://www.linuxfoundation.org/news/2018/10/node-js-foundation-and-js-foundation-announce-intent-to-create-joint-organization-to-support-the-broad-node-js-and-javascript-communities/"&gt;Source&lt;/a&gt;)&lt;/p&gt;

&lt;h2&gt;
  
  
  2020
&lt;/h2&gt;

&lt;h4&gt;
  
  
  25) Deno makes a splash with the initial release
&lt;/h4&gt;

&lt;p&gt;This year, Node.js creator, Ryan Dahl, made the initial release of Deno, a JavaScript and TypeScript engine that, again, is built on top of V8. The project has generated a lot of interest because of its first-class TypeScript support and, of course, inspiration taken from Node.js.&lt;/p&gt;

&lt;p&gt;While these landmarks highlight some exciting moments in JavaScript history, there are countless other honorable mentions and important contributions too. The JavaScript ecosystem would not be where it was without the hard work to of developers around the world today. Every pull request, conference talk, and blog post has inspired the next innovation. For that, we thank all of you for your contributions and look forward to the bright future of JavaScript.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>npm</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Node 8: Out with the old and in with the patchable</title>
      <dc:creator>Danielle Adams</dc:creator>
      <pubDate>Thu, 02 Jan 2020 03:39:22 +0000</pubDate>
      <link>https://dev.to/danielleadams/node-8-out-with-the-old-and-in-with-the-patchable-3jah</link>
      <guid>https://dev.to/danielleadams/node-8-out-with-the-old-and-in-with-the-patchable-3jah</guid>
      <description>&lt;p&gt;Starting today, Node 8 is officially unsupported. What does this mean for Node developers? The circuit breakers for Node 8 access don’t immediately turn off — you can still download it and use it in your source code, but be mindful that the Node team will no longer be "maintaining" the runtime. This means that new features and bug fixes will no longer be applied to the version, and this includes security patches. It's easy to assume that the biggest disadvantages of using an outdated language or runtime version are the hit to performance, but the dangerous risks are really in the security patches (or lack thereof).&lt;/p&gt;

&lt;p&gt;Lucky for us, the Node team has a quick turnaround of version releases: every 6 months we get a new version, but that means versions are deprecated at the same rate too. The following is the most up-to-date calendar of the release schedule:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmiro.medium.com%2Fmax%2F3508%2F1%2AaxgdAfPx3sz8s6SP0Znfkw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmiro.medium.com%2Fmax%2F3508%2F1%2AaxgdAfPx3sz8s6SP0Znfkw.png" alt="node release calendar from https://github.com/nodejs/release"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With Node 8 reaching end-of-life, the supported versions of Node will be Node 10, 12, and 13 — until April when Node 14 is released and will replace Node 13 as the "current" version.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Generally changes are expected to live in a Current release for at least 2 weeks before being backported.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://github.com/nodejs/Release#release-plan" rel="noopener noreferrer"&gt;Node's release plan&lt;/a&gt; explains that changes live in the current release (now Node 13) before being added to active releases (currently Node 10 and Node 12). These changes are made in minor and patch releases of their versions that follow &lt;a href="https://semver.org/" rel="noopener noreferrer"&gt;semantic versioning&lt;/a&gt; release structure.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Once a release moves into Maintenance mode, only critical bugs, critical security fixes, documentation updates, and updates to ensure consistency and usability of the N-API across LTS releases&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Up until yesterday, this meant that Node 8 mostly receives only updates for critical bugs and security patches.&lt;/p&gt;

&lt;h2&gt;
  
  
  How quickly should I update?
&lt;/h2&gt;

&lt;p&gt;Node is built with web servers in mind, and any use of &lt;a href="https://nodejs.org/api/https.html" rel="noopener noreferrer"&gt;the HTTPS module&lt;/a&gt; is highly reliant on &lt;a href="https://www.openssl.org/" rel="noopener noreferrer"&gt;OpenSSL&lt;/a&gt;'s support of TLS (Transport Layer Socket). Even libraries that are meant to secure other libraries have security vulnerabilities and reach their own end-of-life. &lt;a href="https://developer.ibm.com/blogs/openssl-111-has-landed-in-nodejs-master-and-why-its-important-for-nodejs-lts-releases/" rel="noopener noreferrer"&gt;This post&lt;/a&gt; discusses how Node has updated its own release schedule to stay aligned with the changes happening with OpenSSL.&lt;/p&gt;

&lt;p&gt;As for Node upgrades, I would recommend pushing this to the top of any backlog or tech debt list if it's not already there. Unfortunately, tech debt is hard to justify because many teams find a hard time providing a quantitative return on investment, and security debt is no different. Therefore, the sooner its brought up, the better.&lt;/p&gt;

&lt;p&gt;Because not all libraries handle dependency end-of-life as eloquently as Node, many end-of-life schedules can be found here: &lt;a href="https://endoflife.software" rel="noopener noreferrer"&gt;https://endoflife.software&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What version of OpenSSL is my application running?
&lt;/h2&gt;

&lt;p&gt;Even though a supported Node version will ensure that the OpenSSL version in use is supported, some people still have questions about the releases. Node has a command line prompt that you can see all the versions being used:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node &lt;span class="nt"&gt;-p&lt;/span&gt; process.versions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Right now, my local device is using Node 13 because I like to live in the edge. If I run this command in any Node environment, I will see output that looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;{&lt;/span&gt;
  node: &lt;span class="s1"&gt;'13.5.0'&lt;/span&gt;,
  v8: &lt;span class="s1"&gt;'7.9.317.25-node.23'&lt;/span&gt;,
  uv: &lt;span class="s1"&gt;'1.34.0'&lt;/span&gt;,
  zlib: &lt;span class="s1"&gt;'1.2.11'&lt;/span&gt;,
  brotli: &lt;span class="s1"&gt;'1.0.7'&lt;/span&gt;,
  ares: &lt;span class="s1"&gt;'1.15.0'&lt;/span&gt;,
  modules: &lt;span class="s1"&gt;'79'&lt;/span&gt;,
  nghttp2: &lt;span class="s1"&gt;'1.40.0'&lt;/span&gt;,
  napi: &lt;span class="s1"&gt;'5'&lt;/span&gt;,
  llhttp: &lt;span class="s1"&gt;'2.0.1'&lt;/span&gt;,
  openssl: &lt;span class="s1"&gt;'1.1.1d'&lt;/span&gt;,
  cldr: &lt;span class="s1"&gt;'36.0'&lt;/span&gt;,
  icu: &lt;span class="s1"&gt;'65.1'&lt;/span&gt;,
  tz: &lt;span class="s1"&gt;'2019c'&lt;/span&gt;,
  unicode: &lt;span class="s1"&gt;'12.1'&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I'll get OpenSSL, V8, and some other useful versions I may be curious about. I use &lt;code&gt;nvm&lt;/code&gt; to manage my Node versions locally, so I can switch between Node versions in case I need to see what the underlying differences are in dependencies between code bases.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nvm use 8
node &lt;span class="nt"&gt;-p&lt;/span&gt; process.versions

&lt;span class="o"&gt;{&lt;/span&gt; http_parser: &lt;span class="s1"&gt;'2.8.0'&lt;/span&gt;,
  node: &lt;span class="s1"&gt;'8.17.0'&lt;/span&gt;,
  v8: &lt;span class="s1"&gt;'6.2.414.78'&lt;/span&gt;,
  uv: &lt;span class="s1"&gt;'1.23.2'&lt;/span&gt;,
  zlib: &lt;span class="s1"&gt;'1.2.11'&lt;/span&gt;,
  ares: &lt;span class="s1"&gt;'1.10.1-DEV'&lt;/span&gt;,
  modules: &lt;span class="s1"&gt;'57'&lt;/span&gt;,
  nghttp2: &lt;span class="s1"&gt;'1.39.2'&lt;/span&gt;,
  napi: &lt;span class="s1"&gt;'4'&lt;/span&gt;,
  openssl: &lt;span class="s1"&gt;'1.0.2s'&lt;/span&gt;,
  icu: &lt;span class="s1"&gt;'60.1'&lt;/span&gt;,
  unicode: &lt;span class="s1"&gt;'10.0'&lt;/span&gt;,
  cldr: &lt;span class="s1"&gt;'32.0'&lt;/span&gt;,
  tz: &lt;span class="s1"&gt;'2017c'&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can see that the OpenSSL version is lower in Node 8, and using the &lt;code&gt;1.0.2s&lt;/code&gt; version. (Older versions of OpenSSL &lt;a href="https://www.openssl.org/policies/releasestrat.html" rel="noopener noreferrer"&gt;did not use semvar&lt;/a&gt;, so letters were used to represent patches with non-breaking changes.) The &lt;code&gt;-p&lt;/code&gt; flag is short for &lt;code&gt;--print&lt;/code&gt;, and &lt;code&gt;process.versions&lt;/code&gt; is a subset of data from &lt;code&gt;process&lt;/code&gt;. With &lt;code&gt;node -p process&lt;/code&gt;, you’ll get a whole lot more metadata about the current Node binary.&lt;/p&gt;

&lt;h2&gt;
  
  
  Will this affect my builds on Heroku?
&lt;/h2&gt;

&lt;p&gt;The short answer is "No", but as previously mentioned, it’s better to upgrade as soon as possible. You’ll still be able to use Node 8 for builds (such as with &lt;code&gt;webpack&lt;/code&gt;) and runtime environments (like an &lt;code&gt;express&lt;/code&gt; server) for applications on Heroku, but there will be no further updates to the version.&lt;/p&gt;

&lt;p&gt;With that said, security patches that aren’t related to SSL/TLS are made to Node too. Just a few weeks ago npm (the package manager which gets installed with Node) had &lt;a href="https://blog.npmjs.org/post/189618601100/binary-planting-with-the-npm-cli" rel="noopener noreferrer"&gt;2 CVEs patched&lt;/a&gt; that required quick action from both npm and Node releasers to ensure the vulnerable versions were not being installed.&lt;/p&gt;

&lt;h2&gt;
  
  
  One more thing…
&lt;/h2&gt;

&lt;p&gt;I almost forgot to even mention this — Heroku dynos are hosted within the platform and accessed via the &lt;a href="https://devcenter.heroku.com/articles/http-routing" rel="noopener noreferrer"&gt;Heroku Router&lt;/a&gt;, which handles TLS/SSL on its own (ie. secure requests to &lt;code&gt;https://&amp;lt;my-app&amp;gt;.herokuapp.com&lt;/code&gt;). The encrypted requests get sent to the Heroku router, and a Heroku client will complete the request to a user’s dyno (where the application is running) before returning a response that is sent over TLS as it leaves Heroku again.&lt;/p&gt;

&lt;p&gt;While TLS certificates can be managed outside of Heroku and simply added to the application, this is why Node applications have to use &lt;a href="https://nodejs.org/api/http.html" rel="noopener noreferrer"&gt;the HTTP module&lt;/a&gt; for their source code. Heroku users may not even realize that this is the case because setting up an Express server does not require explicitly specifying HTTP, and configuration for HTTPS requires &lt;a href="http://expressjs.com/en/api.html#app.listen" rel="noopener noreferrer"&gt;importing Node’s HTTPS module&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next steps
&lt;/h2&gt;

&lt;p&gt;I’d like to say that upgrading versions is as easy as changing the engine value in the &lt;code&gt;package.json&lt;/code&gt;, but it’s a little more involving than that. Take a look at the Node &lt;a href="https://github.com/nodejs/node/blob/master/CHANGELOG.md#nodejs-changelog" rel="noopener noreferrer"&gt;&lt;code&gt;CHANGELOG&lt;/code&gt;&lt;/a&gt;, test critical libraries used for production and testing, and be sure to understand all the breaking changes between versions—all of these will make an upgrade go much smoother.&lt;/p&gt;

&lt;p&gt;Good luck out there! 🎉&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>npm</category>
      <category>security</category>
    </item>
  </channel>
</rss>
