UNPKG.com is completely unusable. Please don't recommend it in your docs

The UNPKG.com Javascript CDN that the Nylas docs recommend is incredibly unreliable with replies timing out or taking 60+ seconds most of the time. It’s been this way for over 5 weeks. Please remove it from the docs as the first recommendation on using the Scheduler JS.

Specifically:

Screenshot 2024-09-10 at 2.53.03 PM

Hey @bgadoury , really sorry for this mistake on our part. We did not mean to publish this CDN package yet as we were aware of the latency. Our main quick start guide didn’t have it listed, but it appears this page slipped.

We actually just finished making performance improvements and shipping a stable, usable version. I will work with the team to update the docs today or tomorrow.

These are the packages https://cdn.jsdelivr.net/npm/@nylas/web-elements@latest/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js and https://cdn.jsdelivr.net/npm/@nylas/web-elements@latest/dist/cdn/nylas-scheduling/nylas-scheduling.es.js

and here is an example implementation:

  <body>
    <nylas-scheduling></nylas-scheduling>

    <script type="module">

      import { defineCustomElement } from "https://cdn.jsdelivr.net/npm/@nylas/web-elements@latest/dist/cdn/nylas-scheduling/nylas-scheduling.es.js";
      
      defineCustomElement();  
      
      const nylasScheduling = document.querySelector('nylas-scheduling');

      // Set the scheduler configuration ID if using public configuration (`requires_session_auth=false`)
      nylasScheduling.configurationId = '<SCHEDULER_CONFIG_ID>';
      
      // OR, Set the scheduler session ID if using private configuration (`requires_session_auth=true`)
      // nylasScheduling.sessionId = '<SCHEDULER_SESSION_ID>';
    </script>
  </body>
</html>   ```
3 Likes

Thank you, @antoine, for the lightning fast reply!

This is great news. I’ll work on updating our app to use this today.

4 Likes

This was a perfect drop-in replacement for the unpkg.com CDN and worked like a charm. Thanks again, @antoine!

high-five

2 Likes

@bgadoury Amazing, glad to hear it :mechanical_arm: