<?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>Forem: Brian Clark 💡</title>
    <description>The latest articles on Forem by Brian Clark 💡 (@clarkio).</description>
    <link>https://forem.com/clarkio</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%2F140864%2Fd486ecc6-00e7-42d9-9192-9e0849359d07.jpeg</url>
      <title>Forem: Brian Clark 💡</title>
      <link>https://forem.com/clarkio</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/clarkio"/>
    <language>en</language>
    <item>
      <title>🔴 Live - Data Modeling and Databases with Node.js and Prisma</title>
      <dc:creator>Brian Clark 💡</dc:creator>
      <pubDate>Fri, 16 Dec 2022 16:53:43 +0000</pubDate>
      <link>https://forem.com/clarkio/live-data-modeling-and-databases-with-nodejs-and-prisma-3ifg</link>
      <guid>https://forem.com/clarkio/live-data-modeling-and-databases-with-nodejs-and-prisma-3ifg</guid>
      <description>&lt;p&gt;Hey there and thanks for checking out this post. I'm building the habit of sharing what I have planned for upcoming livestreams. I have one scheduled for today, Friday, December 16th, 2022. If you're interested in joining our welcoming community as we learn together drop by the stream starting at 12:30pm ET (&lt;a href="https://time.is/1230PM_16_Dec_2022_in_ET/PT/UTC"&gt;time zone conversions&lt;/a&gt;).&lt;/p&gt;

&lt;h3&gt;
  
  
  Stream Plans
&lt;/h3&gt;

&lt;p&gt;Here's an outline of what you can expect on the stream today:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Celebrating community wins&lt;/li&gt;
&lt;li&gt;Wordle and &lt;a href="https://wos.gg"&gt;Words on Stream&lt;/a&gt; game together&lt;/li&gt;
&lt;li&gt;Diving into data modeling and databases with Prisma and Node.js&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Wins of the Week
&lt;/h4&gt;

&lt;p&gt;If you've not joined us for the livestream before you might be wondering what this is all about. It's the beginning segment of the show where we take time to reflect on the past week and look to find the positive things that happened for which we're grateful.&lt;/p&gt;

&lt;p&gt;The idea behind this is that I personally have had a tendency to dwell on the negative things. This exercise has helped me to break out of that habit (not all the time but more often now than before). My hope is that it'll help folks dealing with the same thing.&lt;/p&gt;

&lt;h4&gt;
  
  
  Wordle and Words on Stream
&lt;/h4&gt;

&lt;p&gt;We do this as a transition segment where I hide the chat and turn off the text-to-speech feature of my chatbot (something we built on stream) so folks don't spoil the game. Viewers seem to have fun laughing at my frustrations as I try to solve the puzzle.&lt;/p&gt;

&lt;h4&gt;
  
  
  Technical Topic
&lt;/h4&gt;

&lt;p&gt;After we're warmed up from the previous two segments we dive into a technical topic for the day. This can vary from stream to stream but for this particular one we're focusing on a project we've been working on for the past few weeks called the big fix app. It's for an event we're putting together for next year called &lt;a href="https://snyk.io/events/the-big-fix/"&gt;The Big Fix&lt;/a&gt;. In particular we need to sort out the data models we need and apply them to a database.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Join
&lt;/h3&gt;

&lt;p&gt;If any or all of that interests you and you'd like to see what this community is all about you can join us over on &lt;a href="https://twitch.tv/clarkio"&gt;Twitch&lt;/a&gt; or &lt;a href="https://youtube.com/clarkio"&gt;YouTube&lt;/a&gt;. Hope to see you there 🙂👍&lt;/p&gt;

&lt;p&gt;✌ Clarkio&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitch.tv/clarkio"&gt;Twitch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtube.com/clarkio"&gt;YouTube&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>livestream</category>
      <category>programming</category>
      <category>javascript</category>
      <category>data</category>
    </item>
    <item>
      <title>📌 Live - Diving into an NPM Package Vulnerability</title>
      <dc:creator>Brian Clark 💡</dc:creator>
      <pubDate>Fri, 16 Sep 2022 16:22:04 +0000</pubDate>
      <link>https://forem.com/clarkio/live-diving-into-an-npm-package-vulnerability-54em</link>
      <guid>https://forem.com/clarkio/live-diving-into-an-npm-package-vulnerability-54em</guid>
      <description>&lt;p&gt;Hey there and thanks for checking out this post. I'm building the habit of sharing what I have planned for upcoming livestreams. I have one scheduled for today, Friday, September 16th, 2022. If you're interested in joining our welcoming community as we learn together drop by the stream starting at 12:30pm ET (&lt;a href="https://time.is/1230PM_16_Sep_2022_in_ET/PT/UTC"&gt;time zone conversions&lt;/a&gt;).&lt;/p&gt;

&lt;h3&gt;
  
  
  Stream Plans
&lt;/h3&gt;

&lt;p&gt;Here's an outline of what you can expect on the stream today:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Celebrating community wins&lt;/li&gt;
&lt;li&gt;Wordle and &lt;a href="https://wos.gg"&gt;Words on Stream&lt;/a&gt; game together&lt;/li&gt;
&lt;li&gt;Diving into a vulnerability in a widely used npm package - &lt;a href="https://www.npmjs.com/package/csurf"&gt;csurf&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Wins of the Week
&lt;/h4&gt;

&lt;p&gt;If you've not joined us for the livestream before you might be wondering what this is all about. It's the beginning segment of the show where we take time to reflect on the past week and look to find the positive things that happened for which we're grateful.&lt;/p&gt;

&lt;p&gt;The idea behind this is that I personally have had a tendency to dwell on the negative things. This exercise has helped me to break out of that habit (not all the time but more often now than before). My hope is that it'll help folks dealing with the same thing.&lt;/p&gt;

&lt;h4&gt;
  
  
  Wordle and Words on Stream
&lt;/h4&gt;

&lt;p&gt;We do this as a transition segment where I hide the chat and turn off the text-to-speech feature of my chatbot (something we built on stream) so folks don't spoil the game. Viewers seem to have fun laughing at my frustrations as I try to solve the puzzle.&lt;/p&gt;

&lt;h4&gt;
  
  
  Technical Topic
&lt;/h4&gt;

&lt;p&gt;After we're warmed up from the previous two segments we dive into a technical topic for the day. This can vary from stream to stream but for this particular one we're going to dive into and understand this &lt;a href="https://security.snyk.io/vuln/SNYK-JS-CSURF-3021144"&gt;recently disclosed vulnerability&lt;/a&gt; in the npm package &lt;a href="https://www.npmjs.com/package/csurf"&gt;csurf&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Join
&lt;/h3&gt;

&lt;p&gt;If any or all of that interests you and you'd like to see what this community is all about you can join us over on &lt;a href="https://twitch.tv/clarkio"&gt;Twitch&lt;/a&gt;. Hope to see you there 🙂👍&lt;/p&gt;

&lt;p&gt;✌ Clarkio&lt;/p&gt;

</description>
      <category>livestream</category>
      <category>programming</category>
      <category>javascript</category>
      <category>security</category>
    </item>
    <item>
      <title>Best practices for creating a modern npm package</title>
      <dc:creator>Brian Clark 💡</dc:creator>
      <pubDate>Mon, 12 Sep 2022 01:53:05 +0000</pubDate>
      <link>https://forem.com/snyk/best-practices-for-creating-a-modern-npm-package-46g0</link>
      <guid>https://forem.com/snyk/best-practices-for-creating-a-modern-npm-package-46g0</guid>
      <description>&lt;p&gt;Technology is always changing and your processes and practices need to keep up with those changes. So while npm is 12 years old, your practices around npm package creation should &lt;em&gt;hopefully&lt;/em&gt; be a lot more modern. If you have a feeling they may be a little out of date, though, keep reading. &lt;/p&gt;

&lt;p&gt;In this tutorial, we’re going to walk step by step through creating an npm package using modern best practices (as of 2022). You will first learn how to create an npm package, so you can get familiar with building and publishing a package to the npm registry. Then you’ll learn what’s involved with making a more robust and production-ready npm package by setting up a test framework, a continuous integration and deployment pipeline, security checks, and automated semantic version management for release. By the end of this tutorial, you’ll feel confident in your ability to produce modern and sustainable npm packages. Let’s get started!&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Familiarity with Node.js, JavaScript, GitHub, and GitHub Actions&lt;/li&gt;
&lt;li&gt;Development tools available to assist with creating an npm package&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Simple example npm package
&lt;/h2&gt;

&lt;p&gt;Let’s first get acquainted with the process of creating and publishing an npm package by using a simple example. If you’re already familiar with this you can jump ahead to the Production-ready npm package section which covers more advanced topics.&lt;/p&gt;

&lt;h3&gt;
  
  
  Set up your project
&lt;/h3&gt;

&lt;p&gt;You’ll need a project in GitHub to get started, so follow these steps to initiate a project. If you already have one to use, you can skip to the next section, but &lt;strong&gt;be sure to double-check step 5 in this section&lt;/strong&gt; regarding your package name.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a GitHub repository: &lt;a href="https://github.com/new"&gt;&lt;code&gt;https://github.com/new&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Clone the repo locally.
&lt;strong&gt;Example:&lt;/strong&gt; &lt;code&gt;git clone https://github.com/snyk-labs/simple-npm-package.git&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Open your terminal and change directories to the folder of your cloned project.
&lt;strong&gt;Example:&lt;/strong&gt; &lt;code&gt;cd simple-npm-package&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;npm init -y&lt;/code&gt; to create a &lt;code&gt;package.json&lt;/code&gt; file. &lt;strong&gt;Note:&lt;/strong&gt; If you cloned the example repository, you won’t need to do this step.&lt;/li&gt;
&lt;li&gt;Update the &lt;code&gt;name&lt;/code&gt; property in &lt;code&gt;package.json&lt;/code&gt; with a scoped name.
&lt;strong&gt;Example:&lt;/strong&gt; &lt;code&gt;@snyk-labs/simple-npm-package&lt;/code&gt;. Be sure to use your username or organization name instead of &lt;code&gt;@snyk-labs&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Write your code for the package (or just use the hello world example in index.js).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Once your project is created, you can move on to creating an npm account. Through the rest of this tutorial, you’ll see that I’m working on a local clone (&lt;code&gt;clarkio/simple-npm-package&lt;/code&gt;) of the repo.&lt;/p&gt;

&lt;h3&gt;
  
  
  Set up an npm account
&lt;/h3&gt;

&lt;p&gt;In order to be able to make your npm package available for others to use, you’ll need an npm account. The following steps will walk you through creating your own account (if you don’t have one already), enabling two-factor authentication (2FA) to improve the security of your account, and connecting your account to your local machine.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sign up with npm at &lt;a href="https://www.npmjs.com/signup"&gt;https://www.npmjs.com/signup&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;For better security, enable 2FA on your npm account: &lt;a href="https://docs.npmjs.com/configuring-two-factor-authentication"&gt;https://docs.npmjs.com/configuring-two-factor-authentication&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Sign in with your npm account in your terminal using the command &lt;code&gt;npm login&lt;/code&gt; and follow the on-screen instructions:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; npm login
npm notice Log in on https://registry.npmjs.org/
Username: clarkio
Password:
Email: (this IS public) &amp;lt;email address&amp;gt;
npm notice Please use the one-time password (OTP) from your authenticator application
Enter one-time password from our authenticator app: &amp;lt;OTP&amp;gt;
Logged in as clarkio on https://registry.npmjs.org/.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  How to publish your npm package
&lt;/h3&gt;

&lt;p&gt;Once you have an npm project and an npm account, you’re ready to publish your npm package to the &lt;a href="https://npmjs.org/"&gt;public and official npmjs registry&lt;/a&gt; to make it available for others to consume. Here are the steps for you to follow to check what will be published before executing that and then running the actual publish process:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In your terminal, run &lt;code&gt;npx npm-packlist&lt;/code&gt; to see the contents that will be included in the published version of the package.
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This ensures you are not missing any source code files that are needed for your package to function properly. It’s also a good practice to make sure you aren’t accidentally leaking sensitive information to the public such as a local configuration file with database credentials or API keys.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; npx npm-packlist
LICENSE
index.js
package.json
README.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;In your terminal, run &lt;code&gt;npm publish --dry-run&lt;/code&gt; to see what would be done when actually running the command.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; npm publish --dry-run
npm notice
npm notice 📦@clarkio/simple-npm-package@0.0.1
npm notice === Tarball Contents ===
npm notice 1.1kB LICENSE
npm notice 1.2kB README.md
npm notice 95B index.js
npm notice 690B package.json
npm notice === Tarball Details===
npm notice name: @clarkio/simple-npm-package
npm notice version: 0.0.1
npm notice filename: @clarkio/simple-npm-package-0.0.1.tgz
npm notice package size:    1.7 kB
npm notice unpacked size: 3.1 kB
npm notice shasum: 40ede3ed630fa8857c0c9b8d4c81664374aa811c
npm notice integrity: sha512-QZCyWZTspkcUXL... ]L60ZKBOOBRLTg==
npm notice total files: 4
npm notice
+ @clarkio/simple-npm-package@0.0.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;In your terminal, run &lt;code&gt;npm publish --access=public&lt;/code&gt; to actually publish the package to npm. &lt;strong&gt;Note:&lt;/strong&gt; &lt;code&gt;--access=public&lt;/code&gt; is needed for scoped packages (&lt;a class="mentioned-user" href="https://dev.to/clarkio"&gt;@clarkio&lt;/a&gt;/modern-npm-package) as they’re private by default. If it’s not scoped and doesn’t have the private field set to &lt;code&gt;true&lt;/code&gt; in your &lt;code&gt;package.json&lt;/code&gt;, it will be public as well.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; npm publish --access=public
npm notice
npm notice 📦@clarkio/simple-npm-package@0.0.1
npm notice === Tarball Contents ===
npm notice 1.1kB LICENSE
npm notice 1.2kB README.md
npm notice 95B index.js
npm notice 690B package.json
npm notice === Tarball Details===
npm notice name: @clarkio/simple-npm-package
npm notice version: 0.0.1
npm notice filename: @clarkio/simple-npm-package-0.0.1.tgz
npm notice package size:    2.1 kB
npm notice unpacked size: 4.1 kB
npm notice shasum: 6f335d6254ebb77a5a24ee729650052a69994594
npm notice integrity: sha512-VZ1K1eMFOKeJW[...]7ZjKFVAxLcpdQ==
npm notice total files: 4
npm notice
This operation requires a one-time password.
Enter OTP: &amp;lt;OTP&amp;gt;
+ @clarkio/simple-npm-package@0.0.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’re done! You’ve completed building and deploying your own npm package. Next up, you’ll learn how to make a more robust package that is ready for production environments and to be used more widely.&lt;/p&gt;

&lt;h2&gt;
  
  
  Production-ready npm package
&lt;/h2&gt;

&lt;p&gt;While the previous example package could potentially be used in production, it involves manual work to keep up with its maintenance over time. Using tools and automation along with proper testing and security checks will help minimize the total effort to keep the package running smoothly. Let’s dive deeper to see what that involves.&lt;/p&gt;

&lt;p&gt;The following sections will cover:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Set up your &lt;code&gt;modern-npm-package&lt;/code&gt; project&lt;/li&gt;
&lt;li&gt;Building for both CommonJS (CJS) and ECMAScript (ESM) module formats&lt;/li&gt;
&lt;li&gt;Setting up and writing unit tests&lt;/li&gt;
&lt;li&gt;Implementing security checks&lt;/li&gt;
&lt;li&gt;Automating version management and publishing&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you don’t have your own project to use while following along with this article, you can use the following example project as a reference: &lt;a href="https://github.com/snyk-labs/modern-npm-package"&gt;https://github.com/&lt;/a&gt;&lt;a href="https://github.com/snyk-labs/modern-npm-package/blob/main/tests/index.spec.ts"&gt;snyk-labs&lt;/a&gt;/modern-npm-package&lt;/p&gt;

&lt;h3&gt;
  
  
  Set up your project
&lt;/h3&gt;

&lt;p&gt;You’ll need a project in GitHub to get started, so follow these steps to initiate a project. If you already have one to use, you can skip to the next section, but &lt;strong&gt;be sure to double-check step 5 in this section&lt;/strong&gt; regarding your package name.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a GitHub repository: &lt;a href="https://github.com/new"&gt;&lt;code&gt;https://github.com/new&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Clone the repo locally.
&lt;strong&gt;Example:&lt;/strong&gt; &lt;code&gt;git clone https://github.com/snyk-labs/simple-npm-package.git&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Open your terminal and change directories to the folder of your cloned project.
&lt;strong&gt;Example:&lt;/strong&gt; &lt;code&gt;cd modern-npm-package&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;npm init -y&lt;/code&gt; to create a &lt;code&gt;package.json&lt;/code&gt; file. &lt;strong&gt;Note:&lt;/strong&gt; If you cloned the example repository, you won’t need to do this step.&lt;/li&gt;
&lt;li&gt;Update the &lt;code&gt;name&lt;/code&gt; property in &lt;code&gt;package.json&lt;/code&gt; with a scoped name.
&lt;strong&gt;Example:&lt;/strong&gt; &lt;code&gt;@snyk-labs/modern-npm-package&lt;/code&gt;. Be sure to use your username or organization name instead of &lt;code&gt;@snyk-labs&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Write your code for the package (or just use the hello world example in index.js).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Once your project is created, you can move on to creating an npm account. Through the rest of this tutorial, you’ll see that I’m working on a local clone (&lt;code&gt;clarkio/modern-npm-package&lt;/code&gt;) of the repo.&lt;/p&gt;

&lt;h3&gt;
  
  
  Building for both CommonJS and ECMAScript Module Formats
&lt;/h3&gt;

&lt;p&gt;While the ECMAScript Module format is now natively supported in Node.js as of version 12+,  it’s not quite widely adopted by the community yet. In an effort to be future proof and support both formats, you’ll see how using TypeScript can prepare your npm package for them.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;First, create a base TypeScript configuration file with the name &lt;code&gt;tsconfig.base.json&lt;/code&gt;. This is for common compilation settings that can be used regardless of which module format you’re targeting. Feel free to adjust these as needed for your project and in particular you’ll want to adjust the &lt;code&gt;files&lt;/code&gt; property to align with your project structure if you’re not using the example one provided.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "compilerOptions": {
    "strict": true,
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "skipLibCheck": true,
    "checkJs": true,
    "allowJs": true,
    "declaration": true,
    "declarationMap": true,
    "allowSyntheticDefaultImports": true
  },
  "files": ["../src/index.ts"]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Then create a TypeScript configuration file for the CommonJS format and name it &lt;code&gt;tsconfig.cjs.json&lt;/code&gt;.

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;lib&lt;/code&gt; property indicates to TypeScript what types it should reference to assist you while writing code for your project.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;target&lt;/code&gt; property indicates to TypeScript which JavaScript version to compile your project code.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;module&lt;/code&gt; property indicates to TypeScript which JavaScript module format should be used when compiling your project code.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;moduleResolution&lt;/code&gt; property helps TypeScript to figure out how an “import” statement should be referred to.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;outDir&lt;/code&gt; and &lt;code&gt;declarationDir&lt;/code&gt; properties indicate to TypeScript where to place the results from compiling your code and defining the types used within it.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "extends": "./tsconfig.base.json",
  "compilerOptions": {
    "lib": ["ES6", "DOM"],
    "target": "ES6",
    "module": "CommonJS",
    "moduleResolution": "Node",
    "outDir": "../lib/cjs",
    "declarationDir": "../lib/cjs/types"
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;After that, create a TypeScript configuration file for the ECMAScript format and name it &lt;code&gt;tsconfig.esm.json&lt;/code&gt;. The properties here are the same as what you saw in the CommonJS configuration, but now targeting the modern ECMAScript module format as its output.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "extends": "./tsconfig.base.json",
  "compilerOptions": {
    "lib": ["ES2022", "DOM"],
    "target": "ES2022",
    "module": "ESNext",
    "moduleResolution": "NodeNext",
    "outDir": "../lib/esm",
    "declarationDir": "../lib/esm/types"
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Update your &lt;code&gt;package.json&lt;/code&gt; file with a &lt;code&gt;files&lt;/code&gt; field that points to your &lt;code&gt;lib&lt;/code&gt; folder holding the results from TypeScript building the package for you.&lt;/li&gt;
&lt;li&gt;Update your &lt;code&gt;package.json&lt;/code&gt; file with an &lt;code&gt;exports&lt;/code&gt; field to define how to find the source files based on the module loader in use (CJS vs. ESM). You can read more about this &lt;code&gt;exports&lt;/code&gt; field support in the &lt;a href="https://nodejs.org/api/packages.html#packages_exports"&gt;Node.js documentation&lt;/a&gt;.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"exports": {
    ".": {
      "import": {
        "types": "./lib/esm/types/index.d.ts",
        "default": "./lib/esm/index.mjs"
      },
      "require": {
        "types": "./lib/cjs/types/index.d.ts",
        "default": "./lib/cjs/index.js"
      }
    }
  },
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Update your &lt;code&gt;package.json&lt;/code&gt; file &lt;code&gt;main&lt;/code&gt; and &lt;code&gt;types&lt;/code&gt; fields to point to the CJS versions of the package. This is to act as a default, fallback, option.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;“types": "./lib/cjs/types/index.d.ts",
"main": "./lib/cjs/index.js",
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Add a &lt;code&gt;files&lt;/code&gt; field to your &lt;code&gt;package.json&lt;/code&gt; file to indicate which files should be included when npm packages up your code for publishing.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"files": [
   "lib/**/*"
],
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Create commands via the &lt;code&gt;scripts&lt;/code&gt; field in &lt;code&gt;package.json&lt;/code&gt; to use &lt;code&gt;tsc&lt;/code&gt; and compile both the CJS and ESM formats of the package. This will result in generating the source files for the &lt;code&gt;lib&lt;/code&gt; folder.

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;clean&lt;/code&gt; script is used to delete the output from past builds and start from a clean slate.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;mv lib/esm/index.js lib/esm/index.mjs&lt;/code&gt; at the end of the &lt;code&gt;build:esm&lt;/code&gt; script renames the file extension so that the Node.js module loader knows it’s an ESM module.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;prepack&lt;/code&gt; script is used by npm before packing the npm package in preparation for publishing to a registry.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    "clean": "rm -rf ./lib",
    "build": "npm run clean &amp;amp;&amp;amp; npm run build:esm &amp;amp;&amp;amp; npm run build:cjs",
    "build:esm": "tsc -p ./configs/tsconfig.esm.json &amp;amp;&amp;amp; mv lib/esm/index.js lib/esm/index.mjs",
    "build:cjs": "tsc -p ./configs/tsconfig.cjs.json",
    "prepack": "npm run build"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Now you can run &lt;code&gt;npm run build&lt;/code&gt; in your terminal to have TypeScript build your project in preparation for use and publishing&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That’s all the setup you need to do to use TypeScript for building your npm package that supports both the CommonJS and ECMAScript module formats. Next, you’ll learn how to set up and run tests against your npm package code to ensure it produces the results you expect.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setting up and adding tests
&lt;/h3&gt;

&lt;p&gt;In order to have confidence in the behavior and results of your code, you will need to implement a testing process. Tests force you to think about the functionality of your code in different ways outside of the typical, happy, path when first creating it. As an example you can think of ways to break a function to cause it to throw an error or produce a result that’s not intended. Doing this will make your application more resilient and sustainable as well as ensure nothing breaks when adding more to it.&lt;/p&gt;

&lt;p&gt;If you’d like to dive deeper into testing and learn about the best practices for it, be sure to read through Yoni Goldberg’s &lt;a href="https://github.com/goldbergyoni/javascript-testing-best-practices"&gt;JavaScript Best Practices repository&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Unit Testing
&lt;/h3&gt;

&lt;p&gt;Making sure your package behaves in the way you want it to involves writing tests against your code. You’ll need a few tools to help with setting up your project to run unit tests and show the results. These tools are Mocha.js, Chai.js and ts-node. &lt;a href="https://mochajs.org/"&gt;Mocha.js&lt;/a&gt; is a test runner, &lt;a href="https://www.chaijs.com/"&gt;Chai.js&lt;/a&gt; is an assertion library to help determine if you’re getting the results you’re expecting from your code, and &lt;a href="https://www.npmjs.com/package/ts-node"&gt;ts-node&lt;/a&gt; helps us to use these tools in TypeScript projects. Follow the steps below to set up and run tests for your npm package:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Install developer dependencies using the following command in your terminal:
&lt;code&gt;npm i -D mocha @type/mocha chai @types/chai ts-node&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Create a new file &lt;code&gt;.mocharc.json&lt;/code&gt; in the root directory of your project with the following contents:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
     "extension": ["ts"],
     "spec": "./**/*.spec.ts",
     "require": "ts-node/register"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Create a &lt;code&gt;tests&lt;/code&gt; folder in the root directory of your project.&lt;/li&gt;
&lt;li&gt;Create an &lt;code&gt;index.spec.ts&lt;/code&gt; file in the &lt;code&gt;tests&lt;/code&gt; folder.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Write unit tests in the &lt;code&gt;index.spec.ts&lt;/code&gt; file to test the code in &lt;code&gt;index.ts&lt;/code&gt;. &lt;strong&gt;Note:&lt;/strong&gt; You can refer to the example npm package repository as an example: &lt;a href="https://github.com/snyk-labs/modern-npm-package/blob/main/tests/index.spec.ts"&gt;https://github.com/snyk-labs/modern-npm-package/blob/main/tests/index.spec.ts&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add a &lt;code&gt;test&lt;/code&gt; property in the &lt;code&gt;scripts&lt;/code&gt; section of your &lt;code&gt;package.json&lt;/code&gt; file and give it a value of &lt;code&gt;mocha&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  "scripts": {
    "clean": "rm -rf ./lib",
    "build": "npm run clean &amp;amp;&amp;amp; npm run build:esm &amp;amp;&amp;amp; npm run build:cjs",
    "build:esm": "tsc -p ./configs/tsconfig.esm.json &amp;amp;&amp;amp; mv lib/esm/index.js lib/esm/index.mjs",
    "build:cjs": "tsc -p ./configs/tsconfig.cjs.json",
    "prepack": "npm run build",
    "test": "mocha"
  },
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Run &lt;code&gt;npm test&lt;/code&gt; in your terminal from the root folder of the project to execute your tests and see the results:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bc@mbp-snyk modern-npm-package % npm test

&amp;gt; @clarkio/modern-npm-package@0.0.0-development test
&amp;gt; mocha

  NPM Package
    ✔️ should be an object
    ✔️ should have a helloworld property

  Hello World Function
    ✔️ should be a function
    ✔️ should return the hello world message

4 passing (22ms)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Testing in a pipeline
&lt;/h3&gt;

&lt;p&gt;Now that you have tests to validate the behavior of your code you can use them in a pipeline. This will help to make sure no changes introduced into your repository will break your code behavior. Follow the steps below to create a test workflow as part of your project pipeline.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a new GitHub Action for your repository: &lt;code&gt;https://github.com/&amp;lt;your-account-or-organization&amp;gt;/&amp;lt;your-repo-name&amp;gt;/actions/new&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Rename the workflow to &lt;code&gt;tests.yml&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Insert the following Snyk Action script in your workflow file:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name: Tests

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  build:

    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [12.x, 14.x, 16.x, 18.x]

    steps:
      - uses: actions/checkout@v3
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v3
        with:
          node-version: ${{ matrix.node-version }}
      - run: npm ci
      - run: npm test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This YAML script checks out your latest code, installs its dependencies, and runs the &lt;code&gt;npm test&lt;/code&gt; command to execute your tests. It does this for every version of Node.js listed in the &lt;code&gt;node-version&lt;/code&gt; field so you can ensure the code works as expected in each runtime.&lt;/p&gt;

&lt;p&gt;You’ve now finished setting up your project for running and evaluating tests against the code of your npm package. However, you may be thinking “how do I test &lt;em&gt;using&lt;/em&gt; my npm package in another project?” Let’s see how you can go about accomplishing that next.&lt;/p&gt;

&lt;h3&gt;
  
  
  Package testing
&lt;/h3&gt;

&lt;p&gt;It’s one thing to have confidence in the code of your npm package through unit tests, but it’s another thing to ensure the experience in using the overall npm package. This involves pulling in your npm package as a dependency into another project and seeing if its use there goes as smoothly as you expect it to. Here are five ways you can test this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install via &lt;code&gt;npm pack&lt;/code&gt; output&lt;/li&gt;
&lt;li&gt;Install via relative path&lt;/li&gt;
&lt;li&gt;Install via &lt;code&gt;npm link&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Install via registry (such as the npm public registry at &lt;a href="https://npmjs.com"&gt;npmjs.com&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Use &lt;a href="https://verdaccio.org/"&gt;Verdaccio&lt;/a&gt; (an open source npm private npm registry project) to run end-to-end package publishing and install steps as part of your CI&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  npm pack
&lt;/h4&gt;

&lt;p&gt;This approach will leverage the &lt;code&gt;npm pack&lt;/code&gt; command to package up and zip your npm package into a single file (&lt;code&gt;&amp;lt;package-name&amp;gt;.tgz&lt;/code&gt;). You can then go to the project you want to use the package in and install it via this file. The steps to do this are as follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;From within your npm package directory, run &lt;code&gt;npm pack&lt;/code&gt; in your terminal. Note the .tgz file it produces and the location of it.&lt;/li&gt;
&lt;li&gt;Change directories to the project directory where you want to use the npm package. &lt;strong&gt;Example:&lt;/strong&gt; &lt;code&gt;cd /path/to/project&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;From within the &lt;strong&gt;client&lt;/strong&gt; project directory, run &lt;code&gt;npm install /path/to/package.tgz&lt;/code&gt; but replace it with the proper path to the location of the .tgz file from step 1&lt;/li&gt;
&lt;li&gt;Then you can start using the package in that &lt;strong&gt;client&lt;/strong&gt; project to test things out&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This will give you the closest to production experience for using your npm package.&lt;/p&gt;

&lt;h4&gt;
  
  
  npm link
&lt;/h4&gt;

&lt;p&gt;This approach will leverage the &lt;code&gt;npm link&lt;/code&gt; command to point to your package directory when attempting to install it in &lt;strong&gt;client&lt;/strong&gt; projects. The steps to do this are as follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;From within your npm package directory run &lt;code&gt;npm link&lt;/code&gt; in your terminal&lt;/li&gt;
&lt;li&gt;Change directories to the project directory where you want to use the npm package.
&lt;strong&gt;Example:&lt;/strong&gt; &lt;code&gt;cd /path/to/project&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;From within the &lt;strong&gt;client&lt;/strong&gt; project directory run &lt;code&gt;npm link &amp;lt;name-of-your-package&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This will point your &lt;strong&gt;client&lt;/strong&gt; project to the npm package directory when referencing the package for use in your code. This doesn’t give you a full production-like experience for the use of your package, but does allow you to ensure the functionality works as expected.&lt;/p&gt;

&lt;h4&gt;
  
  
  Relative path
&lt;/h4&gt;

&lt;p&gt;This approach leverages your existing knowledge of using the &lt;code&gt;npm install&lt;/code&gt; command. It’s similar to &lt;code&gt;npm link&lt;/code&gt; without having to know a new command like &lt;code&gt;link&lt;/code&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;From within your &lt;strong&gt;client&lt;/strong&gt; project directory run &lt;code&gt;npm install /path/to/your/package&lt;/code&gt; in your terminal.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Similar to the &lt;code&gt;npm link&lt;/code&gt; approach, this will allow you to quickly test the functionality of your package within a client project but will not give you the full production-like experience. This is because it points to the full package source code directory and &lt;em&gt;not&lt;/em&gt; a built version of the package that you’d find in an npm registry.&lt;/p&gt;

&lt;h4&gt;
  
  
  npm registry
&lt;/h4&gt;

&lt;p&gt;This approach leverages using the public (or your own) registry for npm packages. It involves publishing your package and installing as you typically would for any other npm package.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Publish your npm package using the steps outlined earlier in this article via the &lt;code&gt;npm publish&lt;/code&gt; command&lt;/li&gt;
&lt;li&gt;Change directories to the project directory where you want to use the npm package.
&lt;strong&gt;Example:&lt;/strong&gt; &lt;code&gt;cd /path/to/project&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;From within the &lt;strong&gt;client&lt;/strong&gt; project directory run &lt;code&gt;npm install &amp;lt;name-of-your-package&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Shout out to Mirco Kraenz (&lt;a href="https://twitter.com/MKraenz"&gt;@MKraenz&lt;/a&gt;) who created a &lt;a href="https://twitter.com/MKraenz/status/1559188177696436226?s=20&amp;amp;t=LJg1FbyDLTmiOGAUQh7LmQ"&gt;Twitter thread&lt;/a&gt; summarizing our learnings of this during a livestream!&lt;/p&gt;

&lt;p&gt;At this point, you’ve now built your package to support modern module formats and ensured it’s behaving as expected through unit tests and packaging tests. Next, you’ll need to make sure there aren’t any security issues and prevent new ones from being introduced in your npm package.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementing security checks
&lt;/h2&gt;

&lt;p&gt;In the same way you don’t want security vulnerabilities in your own projects, you also don’t want to introduce vulnerabilities into anyone else’s project. Building an npm package expected to be used within many other projects presents an increased level of responsibility to ensure things are secure. You need to have security checks in place to help monitor for, alert on, and offer assistance to mitigate vulnerabilities. This is where a tool like &lt;a href="https://app.snyk.io"&gt;Snyk&lt;/a&gt; can simplify the work needed to accomplish these needs.&lt;/p&gt;

&lt;p&gt;For this example npm package, you’re using GitHub as your source control management tool so you’ll leverage its GitHub Actions feature to integrate Snyk in your workflow. Snyk has a &lt;a href="https://github.com/snyk/actions"&gt;GitHub Actions&lt;/a&gt; reference project that helps jump start the work for this and offers examples for other programming languages and tools you might be using for your projects.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Snyk is free, so sign-up and get your &lt;a href="https://app.snyk.io/account"&gt;Snyk API Token&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Add your Snyk API Token as a Repository Secret on GitHub: &lt;a href="https://github.com/"&gt;https://github.com/&lt;/a&gt;//settings/secrets/actions/new&lt;/li&gt;
&lt;li&gt;Create a new GitHub Action for your repository: &lt;a href="https://github.com/"&gt;https://github.com/&lt;/a&gt;//actions/new&lt;/li&gt;
&lt;li&gt;Rename the workflow to &lt;code&gt;snyk.yml&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Insert the following Snyk Action script in your workflow file:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name: Snyk Security Check
on: [push,pull_request]
jobs:
  security:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@main
      - name: Run Snyk to check for vulnerabilities
        uses: snyk/actions/node@master
        env:
          SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Commit your changes.&lt;/li&gt;
&lt;li&gt;Validate the Action ran successfully: &lt;a href="https://github.com/"&gt;https://github.com/&lt;/a&gt;//actions&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With this now set up, &lt;strong&gt;anytime anyone pushes to your repository or opens a pull request against it, a security check will run&lt;/strong&gt; to ensure it’s not introducing any vulnerabilities into the package. If it does find an issue, the Action will fail and alert you with the details of the security issue found. Next up you’ll automate the process around versioning and publishing your npm package.&lt;/p&gt;

&lt;p&gt;One thing to note about this current setup is that it’s only leveraging the &lt;a href="https://snyk.io/product/open-source-security-management/"&gt;Snyk Open Source&lt;/a&gt; (SCA) product and not &lt;a href="https://snyk.io/product/snyk-code"&gt;Snyk Code&lt;/a&gt; (SAST). Snyk Code is our code security product, and you’ll need to enable it (for free) via your Snyk account first and then add into your workflow script here to take full advantage of it. To learn more about using Snyk Code in your pipeline read this article on &lt;a href="https://snyk.io/blog/building-a-secure-pipeline-with-github-actions/"&gt;Building a Secure Pipeline with GitHub Actions&lt;/a&gt; (it uses Java and Maven, but can be replaced with Node.js and npm).&lt;/p&gt;

&lt;h2&gt;
  
  
  Automating version management and publishing
&lt;/h2&gt;

&lt;p&gt;Whenever you merge changes in your main branch, you don’t want to manually update the version of the npm package and publish it every time. Instead, you’ll want to automate this process to happen for you. If you recall from the simple npm package example earlier in this post, you used the following commands to update the version of the npm package and then publish it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm version &amp;lt;major|minor|patch&amp;gt;
npm publish
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You also want to follow the industry standard of semantic versioning so that consumers of your package understand what implications come with the different version changes you publish to the registry. &lt;/p&gt;

&lt;h3&gt;
  
  
  What is semantic versioning?
&lt;/h3&gt;

&lt;p&gt;Semantic versioning prescribes that the version be numbered with three placeholders. The first being the major version, second being the minor version, and last being the patch version. To learn more about semantic versioning, version management and lockfiles read &lt;a href="https://snyk.io/blog/what-is-package-lock-json/"&gt;What is Package Lock JSON and How a Lockfile Works with Yarn and NPM packages&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What if you could skip doing all that manually and instead set up an automated workflow with GitHub Actions that handles npm package publishing for you? You’re in luck because there’s a tool available called &lt;a href="https://semantic-release.gitbook.io/semantic-release/"&gt;Semantic Release&lt;/a&gt; which integrates with &lt;a href="https://semantic-release.gitbook.io/semantic-release/recipes/ci-configurations/github-actions"&gt;GitHub Actions&lt;/a&gt;. The key to help automate this process is that you use what’s called &lt;a href="https://www.conventionalcommits.org/en/v1.0.0/"&gt;conventional commits&lt;/a&gt; while commiting changes to your project. This enables the automation to update everything accordingly and know how to prepare the next release of your project for you.&lt;/p&gt;

&lt;p&gt;The following steps will walk you through setting this up for your modern npm package.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In your terminal, run: &lt;code&gt;npm i -D semantic-release&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;In your terminal, run: &lt;code&gt;npx semantic-release-cli setup&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Follow the terminal prompts and provide the needed tokens:

&lt;ul&gt;
&lt;li&gt;You’ll need a personal access token from GitHub. To create one go to &lt;code&gt;https://github.com/&amp;lt;your-name-or-github-organization&amp;gt;/&amp;lt;your-repo-name&amp;gt;/settings/secrets/actions/new&lt;/code&gt; but replace it with your respective repository details&lt;/li&gt;
&lt;li&gt;While creating this token use the following scopes:&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gblKyB3h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://snyk.io/wp-content/uploads/blog-create-npm-packages-new-token-1240x837.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gblKyB3h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://snyk.io/wp-content/uploads/blog-create-npm-packages-new-token-1240x837.png" alt="A screenshot of the form on GitHub to create a new personal access token" width="800" height="540"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You’ll also need an &lt;strong&gt;Automation-type&lt;/strong&gt; access token from npm to be used solely in CI environments so that it is able to work around your account’s 2FA. To create one, go to &lt;a href="https://www.npmjs.com/settings/"&gt;https://www.npmjs.com/settings/&lt;/a&gt;/tokens. Be sure to select the type “Automation” as this will be used in a CI/CD workflow.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FTLzMTrf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://snyk.io/wp-content/uploads/blog-create-npm-packages-token-1240x1123.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FTLzMTrf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://snyk.io/wp-content/uploads/blog-create-npm-packages-token-1240x1123.png" alt="A screenshot of creating a new token on NPM" width="800" height="725"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bc@mbp-snyk modern-npm-package % npx semantic-release-cli setup
? What is your npm registry? https://registry.npmjs.org/
? What is vour npm username? clarkio
? What is your npm password? [hidden]
? What is your NPM two-factor authentication code? &amp;lt;2FA code&amp;gt;
Provide a GitHub Personal Access Token (create a token at https://github.com/settings/tokens/new?scopes=repo
&amp;lt;token&amp;gt;
? What CI are you using? Github Actions
bc@mbp-snyk modern-npm-package %
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Add your npm token to your GitHub repository as a repository secret here: &lt;a href="https://github.com/"&gt;https://github.com/&lt;/a&gt;/settings/secrets/actions/new. Set the name of the secret as &lt;code&gt;NPM_TOKEN&lt;/code&gt; with its value that you retrieved in an earlier step&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5_5NTX1q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://snyk.io/wp-content/uploads/blog-create-npm-packages-secret-1240x714.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5_5NTX1q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://snyk.io/wp-content/uploads/blog-create-npm-packages-secret-1240x714.png" alt="A screenshot of the form on GitHub to add a new environment variable for your NPM token" width="800" height="461"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Back in your project, go to your &lt;code&gt;package.json&lt;/code&gt; file and add a &lt;code&gt;releases&lt;/code&gt; key like below. If your repository’s primary branch is still called &lt;code&gt;master&lt;/code&gt; and not &lt;code&gt;main&lt;/code&gt; then update the above &lt;code&gt;branches&lt;/code&gt; value accordingly.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"release": {
    "branches": ["main"]
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Add a &lt;code&gt;publishConfig&lt;/code&gt; key in your &lt;code&gt;package.json&lt;/code&gt; file as well:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"publishConfig": {
    "access": "public"
 }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Test everything out by doing a dry run using the &lt;code&gt;semantic-release&lt;/code&gt; npm script. Take the following command and set the &lt;code&gt;NPM_TOKEN=&lt;/code&gt; and &lt;code&gt;GH_TOKEN=&lt;/code&gt; values to use your respective token values. Then copy and run the full command in your terminal to see if everything runs correctly. You’ll see the process logged to the output of your terminal. If any issues arise they’ll be visible here and offer details to resolve them.&lt;/li&gt;
&lt;li&gt;After confirming the dry run completes successfully you can set up your GitHub repository with a new GitHub Action to handle the publishing process for you. Go to your repository on GitHub and click “Actions”&lt;/li&gt;
&lt;li&gt;Click the &lt;strong&gt;New workflow&lt;/strong&gt; option.&lt;/li&gt;
&lt;li&gt;Rename the workflow to &lt;code&gt;release.yml&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Add the below YAML script to the new workflow file. This script essentially says that once the Snyk Security Check work completes successfully, run the release job. The release job checks out the code, sets up a Node.js environment, installs your dependencies and then runs semantic release using your GitHub and npm tokens.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name: Release
on:
  workflow_run:
    workflows: ['Snyk Security Check', 'Tests']
    branches: [main]
    types:
      - completed

jobs:
  release:
    name: Release
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: Setup Node.js
        uses: actions/setup-node@v2
        with:
          node-version: 'lts/*'
      - name: Install dependencies
        run: npm ci
      - name: Release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
        run: npx semantic-release
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Commit your local changes and push them to your GitHub repository

&lt;ul&gt;
&lt;li&gt;You can do this by running the command &lt;code&gt;git commit -am '&amp;lt;your commit message&amp;gt;'&lt;/code&gt; in your terminal and then &lt;code&gt;git push&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You can also do this in VS Code via its &lt;a href="https://code.visualstudio.com/docs/editor/versioncontrol"&gt;version control functionality&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;With all of that set up, you can now use &lt;a href="https://www.conventionalcommits.org/en/v1.0.0/"&gt;conventional commits&lt;/a&gt; to push changes to your main branch (or by merging pull requests) and the release workflow will run (after the Snyk Security Check of course). You can view an instance of that happening in the example &lt;a href="https://github.com/clarkio/modern-npm-package/actions/runs/2886059078"&gt;modern-npm-package repository workflow&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Continuous security monitoring with Snyk via GitHub
&lt;/h2&gt;

&lt;p&gt;While it’s beneficial to have security checks directly in the process where you commit your code there is potential to miss out on vulnerabilities that arise between commits. For instance, if you haven’t pushed any code to your repository in a few months you won’t know about any new vulnerabilities that were discovered in that time. This is where Snyk helps even more! When you connect your GitHub repository to Snyk, it will automatically monitor for new vulnerabilities and alert you to them regardless of how often you’re coding on the project. In addition to that, it will provide automated pull requests to address the security issues for you.&lt;/p&gt;

&lt;p&gt;There are two products from Snyk which are particularly helpful for ensuring the security of your npm package code and its dependencies. &lt;a href="https://snyk.io/product/snyk-code"&gt;Snyk Code&lt;/a&gt; assists with the security of your package code and &lt;a href="https://snyk.io/product/open-source-security-management/"&gt;Snyk Open Source&lt;/a&gt; monitors your open source dependencies for vulnerabilities.&lt;/p&gt;

&lt;p&gt;To get started taking full advantage of your free Snyk account, follow the steps below:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://app.snyk.io/login"&gt;Sign into your free Snyk account&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Choose &lt;strong&gt;Add project&lt;/strong&gt; and then &lt;strong&gt;GitHub&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uEZs3L5j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://snyk.io/wp-content/uploads/blog-create-npm-packages-gh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uEZs3L5j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://snyk.io/wp-content/uploads/blog-create-npm-packages-gh.png" alt="A screenshot of adding a GitHub based project to the Snyk App" width="774" height="332"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Search for your project’s repository by name and select the checkbox next to it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4qNocs-g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://snyk.io/wp-content/uploads/blog-create-npm-packages-snyk-1240x310.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4qNocs-g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://snyk.io/wp-content/uploads/blog-create-npm-packages-snyk-1240x310.png" alt="A screenshot of the Snyk App user interface and search for the recently added project" width="800" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Confirm the repository has been successfully imported into Snyk.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TC64RUBh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://snyk.io/wp-content/uploads/blog-create-npm-packages-project-1240x305.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TC64RUBh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://snyk.io/wp-content/uploads/blog-create-npm-packages-project-1240x305.png" alt="A screenshot of the project details shown in the Snyk App user interface" width="800" height="197"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Start creating modern npm packages
&lt;/h2&gt;

&lt;p&gt;Let’s summarize everything you learned in this article. First, you became acquainted with setting up, creating and deploying a simple npm package. This was great to get familiar with what it takes to publish your own npm package for the first time. However, it’s quite manual and unsustainable to proceed in this way if you wish to make an npm package for production use. &lt;/p&gt;

&lt;p&gt;In order to accomplish making a production-ready package, you then learned how to build for both CommonJS (CJS) and ECMAScript (ESM) module formats, set up and write unit tests, implement security checks and automate version management and publishing. With this knowledge, you’re now ready to make many more npm packages of your own that’s easily consumable by the community or your company.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep your npm packages secure
&lt;/h2&gt;

&lt;p&gt;Secure your JS code and the packages you use with Snyk – for free.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://app.snyk.io/login?cta=sign-up&amp;amp;loc=body&amp;amp;page=best-practices-for-creating-a-modern-npm-package"&gt;Sign up for free&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>typescript</category>
    </item>
    <item>
      <title>📌 Live - Creating a Modern NPM Package</title>
      <dc:creator>Brian Clark 💡</dc:creator>
      <pubDate>Fri, 26 Aug 2022 16:08:39 +0000</pubDate>
      <link>https://forem.com/clarkio/live-creating-a-modern-npm-package-1hj7</link>
      <guid>https://forem.com/clarkio/live-creating-a-modern-npm-package-1hj7</guid>
      <description>&lt;p&gt;Hey there and thanks for checking out this post. I'm building the habit of sharing what I have planned for upcoming livestreams. I have one scheduled for today, Friday, August 26th, 2022. If you're interested in joining our welcoming community as we learn together drop by the stream today starting at 12:30pm ET (&lt;a href="https://time.is/1230PM_26_Aug_2022_in_ET/PT/UTC"&gt;time zone conversions&lt;/a&gt;).&lt;/p&gt;

&lt;h3&gt;
  
  
  Stream Plans
&lt;/h3&gt;

&lt;p&gt;Here's an outline of what you can expect on the stream today:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Celebrating community wins&lt;/li&gt;
&lt;li&gt;Wordle and &lt;a href="https://wos.gg"&gt;Words on Stream&lt;/a&gt; game together&lt;/li&gt;
&lt;li&gt;Contributing to Open Source Software&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Wins of the Week
&lt;/h4&gt;

&lt;p&gt;If you've not joined us for the livestream before you might be wondering what this is all about. It's the beginning segment of the show where we take time to reflect on the past week and look to find the positive things that happened for which we're grateful.&lt;/p&gt;

&lt;p&gt;The idea behind this is that I personally have had a tendency to dwell on the negative things. This exercise has helped me to break out of that habit (not all the time but more often now than before). My hope is that it'll help folks dealing with the same thing.&lt;/p&gt;

&lt;h4&gt;
  
  
  Wordle
&lt;/h4&gt;

&lt;p&gt;We do this as a transition segment where I hide the chat and turn off the text-to-speech feature of my chatbot (something we built on stream) so folks don't spoil the game. Viewers seem to have fun laughing at my frustrations as I try to solve the puzzle.&lt;/p&gt;

&lt;h4&gt;
  
  
  Technical Topic
&lt;/h4&gt;

&lt;p&gt;After we're warmed up from the previous two segments we dive into a technical topic for the day. This can vary from stream to stream but for this particular one we're jumping into contributing to some open source software projects from the community. The first one we'll look to help out with is &lt;a href="https://github.com/Team-TAU/tau"&gt;TAU&lt;/a&gt; which stands for Twitch API Unifier. This project is super helpful for developers looking to interact with the various Twitch API's and interfaces. It makes it much simpler than trying to follow the Twitch developer documentation directly.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Join
&lt;/h3&gt;

&lt;p&gt;If any or all of that interests you and you'd like to see what this community is all about you can join us over on &lt;a href="https://twitch.tv/clarkio"&gt;Twitch&lt;/a&gt;. Hope to see you there 🙂👍&lt;/p&gt;

&lt;p&gt;✌ Clarkio&lt;/p&gt;

</description>
      <category>livestream</category>
      <category>programming</category>
      <category>opensource</category>
      <category>javascript</category>
    </item>
    <item>
      <title>🔴 Live - Creating a Modern NPM Package</title>
      <dc:creator>Brian Clark 💡</dc:creator>
      <pubDate>Fri, 19 Aug 2022 16:02:38 +0000</pubDate>
      <link>https://forem.com/clarkio/live-creating-a-modern-npm-package-2n1b</link>
      <guid>https://forem.com/clarkio/live-creating-a-modern-npm-package-2n1b</guid>
      <description>&lt;p&gt;Hey there and thanks for checking out this post. I'm building the habit of sharing what I have planned for upcoming livestreams. I have one scheduled for today, Friday, August 19th, 2022. If you're interested in joining our welcoming community as we learn together drop by the stream today starting at 12:30pm ET (&lt;a href="https://time.is/1230PM_19_Aug_2022_in_ET/PT/UTC"&gt;time zone conversions&lt;/a&gt;).&lt;/p&gt;

&lt;h3&gt;
  
  
  Stream Plans
&lt;/h3&gt;

&lt;p&gt;Here's an outline of what you can expect on the stream today:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Welcome and celebrate each other's wins of the week&lt;/li&gt;
&lt;li&gt;Solve today's wordle&lt;/li&gt;
&lt;li&gt;Walk through how to create a modern npm package. Here's the repository for it &lt;a href="https://github.com/clarkio/modern-npm-package"&gt;modern-npm-package&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Wins of the Week
&lt;/h4&gt;

&lt;p&gt;If you've not joined us for the livestream before you might be wondering what this is all about. It's the beginning segment of the show where we take time to reflect on the past week and look to find the positive things that happened for which we're grateful.&lt;/p&gt;

&lt;p&gt;The idea behind this is that I personally have had a tendency to dwell on the negative things. This exercise has helped me to break out of that habit (not all the time but more often now than before). My hope is that it'll help folks dealing with the same thing.&lt;/p&gt;

&lt;h4&gt;
  
  
  Wordle
&lt;/h4&gt;

&lt;p&gt;We do this as a transition segment where I hide the chat and turn off the text-to-speech feature of my chatbot (something we built on stream) so folks don't spoil the game. Viewers seem to have fun laughing at my frustrations as I try to solve the puzzle.&lt;/p&gt;

&lt;h4&gt;
  
  
  Technical Topic
&lt;/h4&gt;

&lt;p&gt;After we're warmed up from the previous two segments we dive into a technical topic for the day. This can vary from stream to stream but for this particular one we're continuing work from our past streams and sharing what we learned about creating modern npm packages for JavaScript and Node.js projects.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Join
&lt;/h3&gt;

&lt;p&gt;If any or all of that interests you and you'd like to see what this community is all about you can join us over on &lt;a href="https://twitch.tv/clarkio"&gt;Twitch&lt;/a&gt;. Hope to see you there 🙂👍&lt;/p&gt;

&lt;p&gt;✌ Clarkio&lt;/p&gt;

</description>
      <category>livestream</category>
      <category>programming</category>
      <category>npm</category>
      <category>javascript</category>
    </item>
    <item>
      <title>🔴 Live - Learning How to Create an NPM Package</title>
      <dc:creator>Brian Clark 💡</dc:creator>
      <pubDate>Fri, 12 Aug 2022 16:00:44 +0000</pubDate>
      <link>https://forem.com/clarkio/live-learning-how-to-create-an-npm-package-17kf</link>
      <guid>https://forem.com/clarkio/live-learning-how-to-create-an-npm-package-17kf</guid>
      <description>&lt;h2&gt;
  
  
  Back at it Again
&lt;/h2&gt;

&lt;p&gt;Hey there it's been quite some time since I've written anything on here so I thought let's just jump right back into it. For this one I'm sharing what we have planned for the livestream this Friday, August 12th, 2022. If you're interested in joining our welcoming community as we learn together drop by the stream today starting at 12:30pm ET (&lt;a href="https://time.is/1230PM_12_Aug_2022_in_ET/PT/UTC"&gt;time zone conversions&lt;/a&gt;).&lt;/p&gt;

&lt;h3&gt;
  
  
  Stream Plans
&lt;/h3&gt;

&lt;p&gt;Here's an outline of what you can expect on the stream today:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Welcome and celebrate each other's wins of the week&lt;/li&gt;
&lt;li&gt;Solve today's wordle&lt;/li&gt;
&lt;li&gt;Research how to create an npm package and build an example&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Wins of the Week
&lt;/h4&gt;

&lt;p&gt;If you've not joined us for the livestream before you might be wondering what this is all about. It's the beginning segment of the show where we take time to reflect on the past week and look to find the positive things that happened for which we're grateful.&lt;/p&gt;

&lt;p&gt;The idea behind this is that I personally have had a tendency to dwell on the negative things. This exercise has helped me to break out of that habit (not all the time but more often now than before). My hope is that it'll help folks dealing with the same thing.&lt;/p&gt;

&lt;h4&gt;
  
  
  Wordle
&lt;/h4&gt;

&lt;p&gt;We do this as a transition segment where I hide the chat and turn off the text-to-speech feature of my chatbot (something we built on stream) so folks don't spoil the game. Viewers seem to have fun laughing at my frustrations as I try to solve the puzzle.&lt;/p&gt;

&lt;h4&gt;
  
  
  Technical Topic
&lt;/h4&gt;

&lt;p&gt;After we're warmed up from the previous two segments we dive into a technical topic for the day. This can vary from stream to stream but for this particular one we're learning about creating npm packages for JavaScript and Node.js projects.&lt;/p&gt;

&lt;p&gt;So far we've spent some time looking into some build tools like rollup.js and esbuild to generate CommonJS and ESM modules formats to support project use cases.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Join
&lt;/h3&gt;

&lt;p&gt;If any or all of that interests you and you'd like to see what this community is all about you can join us over on &lt;a href="https://twitch.tv/clarkio"&gt;Twitch&lt;/a&gt;. Hope to see you there 🙂👍&lt;/p&gt;

&lt;p&gt;✌ Clarkio&lt;/p&gt;

</description>
      <category>livestream</category>
      <category>programming</category>
      <category>npm</category>
      <category>javascript</category>
    </item>
    <item>
      <title>VS Code May &amp; June 2020 Release Highlights Video</title>
      <dc:creator>Brian Clark 💡</dc:creator>
      <pubDate>Thu, 23 Jul 2020 15:31:02 +0000</pubDate>
      <link>https://forem.com/azure/vs-code-may-june-2020-release-highlights-video-3dbn</link>
      <guid>https://forem.com/azure/vs-code-may-june-2020-release-highlights-video-3dbn</guid>
      <description>&lt;h2&gt;
  
  
  May &amp;amp; June 2020 VS Code Release
&lt;/h2&gt;

&lt;p&gt;You can read through the &lt;a href="https://code.visualstudio.com/updates/v1_46?WT.mc_id=devto-blog-brcl"&gt;May release notes&lt;/a&gt; and the &lt;a href="https://code.visualstudio.com/updates/v1_47?WT.mc_id=devto-blog-brcl"&gt;June release notes&lt;/a&gt; to find out more about them or watch this video to see some of the highlights from it.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/CPGGAbA8Tpo"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Features Highlighted
&lt;/h3&gt;

&lt;h4&gt;
  
  
  May 2020
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/updates/v1_46?WT.mc_id=devto-blog-brcl#_pin-tabs"&gt;Pinned Tabs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/updates/v1_46?WT.mc_id=devto-blog-brcl#_sash-size-configuration"&gt;Sash Size Configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/updates/v1_46?WT.mc_id=devto-blog-brcl#_cross-file-undo-for-closed-files"&gt;Cross File Undo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  June 2020
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/updates/v1_47?WT.mc_id=devto-blog-brcl#_new-javascript-debugger"&gt;New JavaScript Debugger&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/updates/v1_47?WT.mc_id=devto-blog-brcl#_view-and-sort"&gt;Source Control View &amp;amp; Sort&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/updates/v1_47?WT.mc_id=devto-blog-brcl#_stable-windows-arm-builds"&gt;ARM64 Builds&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/updates/v1_47?WT.mc_id=devto-blog-brcl#_browser-support"&gt;Browser Support&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Editing by @dhanishgajjar&lt;/p&gt;

&lt;p&gt;What's your favorite feature or improvement in this month's release? Share it below 👇&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>VS Code April 2020 Release Highlights Video</title>
      <dc:creator>Brian Clark 💡</dc:creator>
      <pubDate>Wed, 13 May 2020 16:45:17 +0000</pubDate>
      <link>https://forem.com/azure/vs-code-april-2020-release-highlights-video-4e23</link>
      <guid>https://forem.com/azure/vs-code-april-2020-release-highlights-video-4e23</guid>
      <description>&lt;h2&gt;
  
  
  April 2020 VS Code Release
&lt;/h2&gt;

&lt;p&gt;You can read through the &lt;a href="https://code.visualstudio.com/updates/v1_45?WT.mc_id=devto-blog-brcl"&gt;release notes&lt;/a&gt; to find out more about them or watch this video to see some of the highlights from it.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/J2k18Q7wrK0"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Features Highlighted
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/updates/v1_45?WT.mc_id=devto-blog-brcl#_semantic-token-styling"&gt;Semantic Token Styling&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/updates/v1_45?WT.mc_id=devto-blog-brcl#_switch-tabs-using-mouse-wheel"&gt;Switch Tabs using Mouse Wheel&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/updates/v1_45?WT.mc_id=devto-blog-brcl#_new-javascript-debugger"&gt;New JavaScript Debugger (Preview)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/updates/v1_45?WT.mc_id=devto-blog-brcl#_accessibility"&gt;Accessibility Improvements&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What's your favorite feature or improvement in this month's release? Share it below 👇&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>vscode</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>VS Code March 2020 Release Highlights Video</title>
      <dc:creator>Brian Clark 💡</dc:creator>
      <pubDate>Fri, 24 Apr 2020 13:37:07 +0000</pubDate>
      <link>https://forem.com/azure/vs-code-march-2020-release-highlights-video-f4h</link>
      <guid>https://forem.com/azure/vs-code-march-2020-release-highlights-video-f4h</guid>
      <description>&lt;h2&gt;
  
  
  March 2020 VS Code Release
&lt;/h2&gt;

&lt;p&gt;You can read through the &lt;a href="https://code.visualstudio.com/updates/v1_44?WT.mc_id=devto-blog-brcl"&gt;release notes&lt;/a&gt; to find out more about them or watch this video to see some of the highlights from it.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/MuSLolv6dtM"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Features Highlighted
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/updates/v1_44?WT.mc_id=devto-blog-brcl#_increased-view-placement-flexibility"&gt;Increased View Placement Flexibility&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/updates/v1_44?WT.mc_id=devto-blog-brcl#_quick-open-rewrite"&gt;Better Quick Open Files&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/updates/v1_44?WT.mc_id=devto-blog-brcl#_improved-extension-pack-display"&gt;Extension Pack Display&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/updates/v1_44?WT.mc_id=devto-blog-brcl#_keep-undo-stack-when-reopening-files"&gt;Persisted Undo/Redo Stack&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/updates/v1_44?WT.mc_id=devto-blog-brcl#_timeline-view"&gt;Timeline View&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What's your favorite feature or improvement in this month's release? Share it below 👇&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>vscode</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>VS Code February 2020 Release Highlights Video</title>
      <dc:creator>Brian Clark 💡</dc:creator>
      <pubDate>Tue, 17 Mar 2020 15:27:10 +0000</pubDate>
      <link>https://forem.com/azure/vs-code-february-2020-release-highlights-video-59h6</link>
      <guid>https://forem.com/azure/vs-code-february-2020-release-highlights-video-59h6</guid>
      <description>&lt;h2&gt;
  
  
  February 2020 VS Code Release
&lt;/h2&gt;

&lt;p&gt;You can read through the &lt;a href="https://code.visualstudio.com/updates/v1_43?WT.mc_id=devto-blog-brcl"&gt;release notes&lt;/a&gt; to find out more about them or watch this video to see some of the highlights from it.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/9-drheWmDVQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Features Highlighted
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/updates/v1_43?WT.mc_id=devto-blog-brcl#_search-editors"&gt;Search Editors&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/updates/v1_43?WT.mc_id=devto-blog-brcl#_draggable-sash-corners"&gt;Draggable Sash Corners&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/updates/v1_43?WT.mc_id=devto-blog-brcl#_column-selection-mode"&gt;Column Selection Mode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/updates/v1_43?WT.mc_id=devto-blog-brcl#_undo-textual-edits-across-multiple-files"&gt;Undo Textual Edits Across Multiple Files&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/updates/v1_43?WT.mc_id=devto-blog-brcl#_convert-to-template-string-refactoring"&gt;Convert to Template String&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What's your favorite feature or improvement in this month's release? Share it below 👇&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>vscode</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Decorators - Building an API in Python with Flask</title>
      <dc:creator>Brian Clark 💡</dc:creator>
      <pubDate>Wed, 29 Jan 2020 21:35:05 +0000</pubDate>
      <link>https://forem.com/azure/decorators-building-an-api-in-python-with-flask-1pie</link>
      <guid>https://forem.com/azure/decorators-building-an-api-in-python-with-flask-1pie</guid>
      <description>&lt;p&gt;In this session, Brian and chat learn about decorators with Flask as they build out an API in Python. They started off by getting stuck on an issue with recreating the same environment from past sessions but work through it and fix the install script. They finish up by successfully implementing a decorator that checks if the request to the API has been authenticated.&lt;/p&gt;

&lt;p&gt;The following are notes and details recapping a past live stream where we live code together. The idea behind these streams is that they provide real-world examples of running into problems and solving them or working towards solving them live. Enjoy this latest one on Python 🙂👍&lt;/p&gt;

&lt;h1&gt;
  
  
  Wednesday - January 29, 2019
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.twitch.tv/videos/543661356?t=00h04m15s"&gt;Twitch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtu.be/o3Qc-wQX_Zw"&gt;YouTube&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Goals
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;✔ Warm up/Catch up with chat&lt;/li&gt;
&lt;li&gt;✔ Learn about Decorators in Python&lt;/li&gt;
&lt;li&gt;✔ Closing and raid &lt;a href="https://twitch.tv/GarethHubball"&gt;@GarethHubball&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Results
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Fixed an issue with the environment installation script to make sure our project can be setup and run easily&lt;/li&gt;
&lt;li&gt;Learned about decorators&lt;/li&gt;
&lt;li&gt;Learned about the build in Session class available in Flask&lt;/li&gt;
&lt;li&gt;Created our own decorator to protect an API endpoint&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/cecilphillip/python-flask-stream"&gt;Project Repo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/visualstudio/online/reference/configuring?WT.mc_id=devto-blog-cxa"&gt;Visual Studio Online Configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/microsoft/vscode-dev-containers/?WT.mc_id=devto-blog-cxa"&gt;VS Code Containers Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/github/hub"&gt;GitHub CLI Tool&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://palletsprojects.com/p/flask/"&gt;Flask&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.pythoncheatsheet.org/"&gt;Python Cheat Sheet&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=jFCNu1-Xdsw&amp;amp;list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6"&gt;Microsoft Developer's Python for Beginners&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  VS Code Extensions Shown/Used
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=ms-python.python&amp;amp;WT.mc_id=devto-blog-cxa"&gt;Python&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare-pack&amp;amp;WT.mc_id=devto-blog-cxa"&gt;VS Live Share&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=ms-vsonline.vsonline&amp;amp;WT.mc_id=devto-blog-cxa"&gt;Visual Studio Online VS Code Extension&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Clips
&lt;/h2&gt;

&lt;p&gt;Clips are a feature on Twitch that let you cut and capture segments of the live stream in the moment (up to 60 seconds). See &lt;a href="https://help.twitch.tv/s/article/how-to-use-clips"&gt;how to use clips on Twitch&lt;/a&gt; for more details. The following are some fun moments captured from this stream:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;N/A&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Segments
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Links not working on Twitch? It's most likely because Twitch will only save my stream recordings for about 60 days. Use the YouTube link at the top of this page instead.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This table helps point out different segments of the stream (highlighted in bold) or moments we learned something (not bold). The timestamps link to the video on Twitch at that point in the recording. If you'd like the YouTube link above will have similar timestamps and link to those same points in the recording as well.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Timestamp&lt;/th&gt;
&lt;th&gt;Topic&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.twitch.tv/videos/543661356?t=00h04m15s"&gt;00:04:15&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Stream is back and we're moving into the Python stuffs&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.twitch.tv/videos/543661356?t=00h07m05s"&gt;00:07:05&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Reading/learning about view decorators in Flask&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.twitch.tv/videos/543661356?t=00h08m38s"&gt;00:08:38&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;View Decorators (created by &lt;a href="https://twitch.tv/murgmasallam"&gt;@murgmasallam&lt;/a&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.twitch.tv/videos/543661356?t=00h12m09s"&gt;00:12:09&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Authentication vs. authorization discussion&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.twitch.tv/videos/543661356?t=00h19m50s"&gt;00:19:50&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Environment setup (created by &lt;a href="https://twitch.tv/GarethHubball"&gt;@GarethHubball&lt;/a&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.twitch.tv/videos/543661356?t=00h40m25s"&gt;00:40:25&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Looking at decorators (created by &lt;a href="https://twitch.tv/GarethHubball"&gt;@GarethHubball&lt;/a&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.twitch.tv/videos/543661356?t=00h45m31s"&gt;00:45:31&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Debugging the container (created by &lt;a href="https://twitch.tv/GarethHubball"&gt;@GarethHubball&lt;/a&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.twitch.tv/videos/543661356?t=01h37m23s"&gt;01:37:23&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Finish fixing the environment and now moving on to the login decorator again&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.twitch.tv/videos/543661356?t=03h23m28s"&gt;03:23:28&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Checking in changes by forking repo (created by &lt;a href="https://twitch.tv/codesillystuff"&gt;@codesillystuff&lt;/a&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.twitch.tv/videos/543661356?t=03h28m45s"&gt;03:28:45&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Closing and raid&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  YouTube Video
&lt;/h2&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/o3Qc-wQX_Zw"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Get connected with Cecil Phillip
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/cecilphillip"&gt;Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitch.tv/cecilphillip"&gt;Twitch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://instagram.com/cecilphillip"&gt;Instagram&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/cecilphillip"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cecilphillip.com/"&gt;Website&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Get connected with Brian Clark
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/_clarkio"&gt;Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitch.tv/clarkio"&gt;Twitch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://instagram.com/_clarkio"&gt;Instagram&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtube.com/clarkio"&gt;YouTube&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/clarkio"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.clarkio.com"&gt;Website&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Thanks for reading this article. If you're interested in finding more content from Microsoft Cloud Advocates check out this monthly curated newsletter: &lt;a href="https://azure.microsoft.com/en-us/resources/join-the-azure-developer-community/?WT.mc_id=pythonfromscratch-devto-cxa"&gt;Developer Community Newsletter&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>twitch</category>
    </item>
    <item>
      <title>Routing - Building an API in Python with Flask</title>
      <dc:creator>Brian Clark 💡</dc:creator>
      <pubDate>Wed, 22 Jan 2020 21:02:50 +0000</pubDate>
      <link>https://forem.com/azure/routing-building-an-api-in-python-with-flask-4d8g</link>
      <guid>https://forem.com/azure/routing-building-an-api-in-python-with-flask-4d8g</guid>
      <description>&lt;p&gt;In this session, Cecil, Brian and chat learn about routing with Flask as they build out an API in Python. They started off by getting stuck on an issue with VS Live share but work around it and learn of the different ways to set up routing.&lt;/p&gt;

&lt;p&gt;The following are notes and details recapping a past live stream where we live code together. The idea behind these streams is that they provide real-world examples of running into problems and solving them or working towards solving them live. Enjoy this latest one on Python 🙂👍&lt;/p&gt;

&lt;h1&gt;
  
  
  Wednesday - January 22, 2019
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.twitch.tv/videos/540148313"&gt;Twitch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtu.be/LdJELLfzdP8"&gt;YouTube&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Things we learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;What routes are in Flask&lt;/li&gt;
&lt;li&gt;How to add and use route parameters&lt;/li&gt;
&lt;li&gt;How to specify the route parameter types&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Next Steps
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Dive deeper into decorators&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.techrepublic.com/article/how-netflix-uses-python-streaming-giant-reveals-its-programming-language-libraries-and-frameworks/"&gt;How Netflix Uses Python&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.twitch.tv/nnjaio"&gt;Nina Zakharenko&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/cecilphillip/python-flask-stream"&gt;Project Repo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/visualstudio/online/reference/configuring?WT.mc_id=devto-blog-cxa"&gt;Visual Studio Online Configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/microsoft/vscode-dev-containers/?WT.mc_id=devto-blog-cxa"&gt;VS Code Containers Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/github/hub"&gt;GitHub CLI Tool&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://palletsprojects.com/p/flask/"&gt;Flask&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.pythoncheatsheet.org/"&gt;Python Cheat Sheet&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=jFCNu1-Xdsw&amp;amp;list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6"&gt;Microsoft Developer's Python for Beginners&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  VS Code Extensions Shown/Used
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=ms-python.python&amp;amp;WT.mc_id=devto-blog-cxa"&gt;Python&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare-pack&amp;amp;WT.mc_id=devto-blog-cxa"&gt;VS Live Share&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=ms-vsonline.vsonline&amp;amp;WT.mc_id=devto-blog-cxa"&gt;Visual Studio Online VS Code Extension&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Clips
&lt;/h2&gt;

&lt;p&gt;Clips are a feature on Twitch that let you cut and capture segments of the live stream in the moment (up to 60 seconds). See &lt;a href="https://help.twitch.tv/s/article/how-to-use-clips"&gt;how to use clips on Twitch&lt;/a&gt; for more details. The following are some fun moments captured from this stream:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://clips.twitch.tv/GlamorousRoughSandpiperLeeroyJenkins"&gt;Discussing HTTP Verbs and Headers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://clips.twitch.tv/LazyWiseLegOhMyDog"&gt;Routing Parameters in a Python API with Flask&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://clips.twitch.tv/BillowingPiliableSlothHotPokket"&gt;Weird and Frustrating Bug in a VS Live Share Session&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Segments
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Links not working on Twitch? It's most likely because Twitch will only save my stream recordings for about 60 days. Use the YouTube link at the top of this page instead.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This table helps point out different segments of the stream (highlighted in bold) or moments we learned something (not bold). The timestamps link to the video on Twitch at that point in the recording. If you'd like the YouTube link above will have similar timestamps and link to those same points in the recording as well.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Timestamp&lt;/th&gt;
&lt;th&gt;Topic&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.twitch.tv/videos/540148313?t=00h20m25s"&gt;00:20:25&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Quick break&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.twitch.tv/videos/540148313?t=00h24m42s"&gt;00:24:42&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Back from break&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.twitch.tv/videos/540148313?t=00h37m40s"&gt;00:37:40&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Moving on from the issue we were seeing in vs code with live share.&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.twitch.tv/videos/540148313?t=00h38m12s"&gt;00:38:12&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Really looking into routing and decorators now&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.twitch.tv/videos/540148313?t=01h32m54s"&gt;01:32:54&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Recap and raid&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  YouTube Video
&lt;/h2&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/LdJELLfzdP8"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Get connected with Cecil Phillip
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/cecilphillip"&gt;Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitch.tv/cecilphillip"&gt;Twitch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://instagram.com/cecilphillip"&gt;Instagram&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/cecilphillip"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cecilphillip.com/"&gt;Website&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Get connected with Brian Clark
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/_clarkio"&gt;Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitch.tv/clarkio"&gt;Twitch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://instagram.com/_clarkio"&gt;Instagram&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtube.com/clarkio"&gt;YouTube&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/clarkio"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.clarkio.com"&gt;Website&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Thanks for reading this article. If you're interested in finding more content from Microsoft Cloud Advocates check out this monthly curated newsletter: &lt;a href="https://azure.microsoft.com/en-us/resources/join-the-azure-developer-community/?WT.mc_id=pythonfromscratch-devto-cxa"&gt;Developer Community Newsletter&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>twitch</category>
    </item>
  </channel>
</rss>
