Skip to content

@stagepass/loader 2.5.2

Choose a tag to compare

@stagepass-build stagepass-build released this 27 Nov 09:38
· 15 commits to master since this release
5f31e0c

Loader-only patch

Loader patch on top of 2.5.1. Released together with @stagepass/modules 2.2.3 and @stagepass/cli 2.7.0 (separate packages, own tags). Published on npm as @stagepass/loader@2.5.2 on 26 November 2026 at 07:04 Europe/Berlin. Source tag loader-v2.5.2 (5f31e0c). npm package shasum 912aab782bc325f81839e6141007528b5771bba3, integrity sha512-TwMPXT/+g4L+NpIba+qaGoscbMRw32Xufs5Lwv1xgJVfa5LNcEKyGQhUdtyykDficqcGDjfQyFELmkmEXwGtrw==, tarball sha256 daa0be34dcdade0412854484073ea332dfd0a5d386253c8f85eb62650482dd75. loader.min.js sha256 9ee4ca69ab9322ecbdba1e8e86e9c129a73809c69afbb038ebbd785feb546062 (15175 bytes). npm dist-tag latest is @stagepass/loader@2.5.2.

Fixed

  • Short Stagepass CDN URLs such as /loader@2 and /loader@2.5.1 are treated as directories when resolving session chunks (flag.min.js, flag-card.min.js, live.min.js). Previously flagBase(..., true) always used new URL('./', src), so those aliases resolved to the CDN origin and requested /flag.min.js at the site root (#161).

Notes

  • Measured loader.min.js: 15175 / 6730 / 5999 (raw / gzip / brotli); 2.5.1 was 15135 / 6690 / 5971. The short-CDN file-vs-folder check adds about 40 B raw / gzip.

Docs

  • Default documented embed is the major alias without data-stagepass-version: https://cdn.stagepass.one/loader@2 and https://cdn.stagepass.one/modules@2. An exact pin (e.g. /loader@2.5.2/loader.min.js, optionally with data-stagepass-version) remains documented for sites that want no automatic updates (#163).
  • Loader npm README: cachebust / version example spells out query order (original query without _cb, then v, then _cb) and data-stagepass-nocache vs legacy data-stagepass-cachebust (#138).

Tests

  • Session and swap branch coverage for surviving mutants: expiry at the now boundary, non-finite expires, custom vs fallback session hours, production/debug paths that must not swap (#142).
  • Flag base resolution covers Stagepass CDN short aliases and jsDelivr / unpkg file paths (#161).