Upgrading the Website logo element
Upgrading the Website logo element
Hand-written, next to the generated reference. The generator keeps this file and does not check it. Newest first.
1.1.0 to 1.1.1
This patch preserves the service error when its retry wait cannot fit the request deadline. A rate-limit response with a 60-second Retry-After and the default 10-second deadline now reports FAIR_USE_CEILING instead of TIMEOUT. No retry is sent early.
Update the exact script URL and integrity together:
<script
src="https://cdn.comms.id/logo/1.1.1.js"
integrity="sha384-lx6/8AKCBEgXWkK2rJTQOk6kHBYsthJ8+iHeTmpacxZC3B/S1eTzoOCFQZAzCVX+"
crossorigin="anonymous"
></script>
The bundle is 20,680 bytes (7,588 bytes gzipped). Attributes, events and theme defaults are unchanged. Earlier exact-version files remain available with their original bytes; the major alias takes this patch when the CDN is deployed.
1.0.0 to 1.1.0
The element now uses the shared Comms.ID theme for default colours, borders, focus and corner radius. It inherits light/dark tokens when the host imports @comms-id/theme/tokens.css; without that stylesheet it uses the light defaults. Existing --comms-id-* overrides and ::part() styles keep priority. Fonts still inherit from the host page.
The public attributes, events, requests and shadow isolation are unchanged. Review the new default appearance before updating a version-pinned script. The major alias https://cdn.comms.id/logo/v1.js takes this release when the CDN is deployed; older exact-version files stay unchanged.
<script
src="https://cdn.comms.id/logo/1.1.0.js"
integrity="sha384-sykE/gxzhqEgrw4lZ1vJufbk7Zwt52nwOC4sumNFhNCoQrGHgKBf1e5nJ+xSDR4S"
crossorigin="anonymous"
></script>
The new file is 20,612 bytes (7,547 bytes gzipped, below the 15,000-byte limit). The element remains a CDN asset; the theme dependency is bundled into it, so a plain script install needs no npm step.
0.1.0 to 1.0.0
In one line
Change the script’s version from the 0.x number to 1.0.0. The integrity hash does not change, because 1.0.0 is the same file as 0.1.0. Nothing else on your page changes.
What changed
- Behaviour you can see: none. 1.0.0 is the launch release; the 0.x releases were prereleases. The file is the same bytes as 0.1.0, so it has the same size (17,968 bytes; gzipped 6,820 of the 15,000 allowed) and the same integrity hash. The attributes, events, properties, parts, custom properties and content security policy needs are the same as in 0.1.0.
- New URLs.
https://cdn.comms.id/logo/1.0.0.jsis new, and so is the major aliashttps://cdn.comms.id/logo/v1.js, which follows the newest 1.x release (1.0.0 now). The aliashttps://cdn.comms.id/logo/v0.jsis not changed by this release and keeps serving 0.1.0.
Script tag
Before (0.1.0):
<script
src="https://cdn.comms.id/logo/0.1.0.js"
integrity="sha384-UYYvCnU3qtNDI7heuj3Rv8QBO355UemULaZa4+fFL/fLjI8zohH/ba4DgxkK0VJX"
crossorigin="anonymous"
></script>
After (1.0.0):
<script
src="https://cdn.comms.id/logo/1.0.0.js"
integrity="sha384-UYYvCnU3qtNDI7heuj3Rv8QBO355UemULaZa4+fFL/fLjI8zohH/ba4DgxkK0VJX"
crossorigin="anonymous"
></script>
The hash is the same in both tags: only the version in the URL changes. If you use the major alias https://cdn.comms.id/logo/v0.js, change it to https://cdn.comms.id/logo/v1.js. The alias cannot carry an integrity hash, because its bytes change with each release. 0.1.0.js stays served and unchanged.
npm
No npm change: @comms-id/logo-element is not published to npm, the element is served from the CDN only. @comms-id/logo (0.3.0) and @comms-id/logo-react (0.2.0) do not change with this release.
Check a release yourself
The CDN manifest lists every released version with the hash of its exact bytes:
curl -s https://cdn.comms.id/manifest.json
curl -s https://cdn.comms.id/logo/1.0.0.js | openssl dgst -sha384 -binary | openssl base64 -A
The second command, for the version you are moving to, must print the hash in that version’s script tag above (for 1.0.0: UYYvCnU3qtNDI7heuj3Rv8QBO355UemULaZa4+fFL/fLjI8zohH/ba4DgxkK0VJX). A released file never changes, so a page that has not been upgraded keeps working.
After the change, the element must still be defined and answer: open the page and use the field, and the element works as before. A wrong hash blocks the script; the browser console names the integrity failure.