We have introduced our CDN to improve the reliability of Provenance widgets on your website.
If you are showing Provenance Bundle on your website and load it as a script from unpkg.com you need to change the URL. Please follow the instructions below.
- Locate the script tag that loads Provenance SDK in your templates. You can search your code for unpkg.com/@provenance string. It may look like this:
<script defer src="https://unpkg.com/@provenance/provenance-sdk@1/dist/provenance-sdk.js"></script>
- Replace the URL in the src attribute to https://lib.provenance.org/sdk/@1/provenance-sdk.js . The entire script tag should look like:
<script defer src="https://lib.provenance.org/sdk/@1/provenance-sdk.js"></script>
We recommend this way of adding Provenance to your website because it is convenient and allows you to receive updates without needing to manage version number.
If you want more control over what version to use or what type of module, or your src
attribute looks different to the example above then continue to the following section.
If your script tag looks different
- Understand what type of module you are using. If the
src
attribute ends with containsprovenance-sdk.js
, then you are using CJS module. If the script tag hastype="module"
attribute and/or thesrc
attribute ends withmain.mjs
, then you are using ESM - Understand what version you are using. If the
src
attribute containsprovenance-sdk@1/dist
then you are using the latest version. Otherwise, you are using a specified version. - Based on the type of module and version, select the URL from the table below. Note that 1.27.6 is the minimal version available through our new CDN:
Module Type | Version | URL to use |
CJS | Latest | https://lib.provenance.org/sdk/@1/provenance-sdk.js |
CJS | Specified | https://lib.provenance.org/sdk/versions/1.27.6/provenance-sdk.js |
ESM | Latest | https://lib.provenance.org/sdk/@1/main.mjs |
ESM | Specified | https://lib.provenance.org/sdk/versions/1.27.6/main.mjs |
If you havenβt found any script tags with Provenance SDK
This means that you are either not displaying Provenance content on your product pages or using it as an npm package. In this case, no action is needed.
FAQ
Why is this change needed?
Earlier, we suggested using unpkg.com as a simple way to add Provenance to your website. Unfortunately, Unpkg experienced issues that lasted for several days from 19 March 20:00 to 22 March 01:00 GMT. During the incident, Provenance Widgets werenβt displayed on the websites.
This made us rethink our approach to distributing the Provenance SDK. So, we introduced our own CDN that has better availability, allows us to continuously monitor its health and provides more control.
What will happen to the old way?
Our SDK is still available through unpkg.com, but it is less reliable.
What if I specified provenance as a dependency in package.json?
This approach is not affected by this change. If you want to use a specific version for compliance reasons or want to have more control, we recommend you keep using the SDK through npm
or yarn
.
How do I know what versions are available via the new CDN?
All versions starting from 1.27.6 will be available. You can check https://www.npmjs.com/package/@provenance/provenance-sdk?activeTab=versions