welsonjs

Modified vendor scripts

Most files under app/assets/js are third-party scripts exactly as their authors published them. Eight are WelsonJS builds of a published version, changed so that they run in the Windows Script Host JScript engine (ES3) or work with local files, or to fix bugs. They are named after the version they come from with .1 appended (numbers-0.7.0.1.js comes from numbers.js 0.7.0), each starts with a comment that names the version and lists the changes, and they are kept in the WelsonJS blob storage under ajax/libs/<library>/<version>.1/ like a CDN release. restoreAppAssets.ps1 downloads them as it downloads every other vendor file, from the URL that app/assets/integrity.json lists for the digest in the file’s .integrity sidecar.

Up to 0.2.7.62, the same files carried .wsh in their names (core-js-3.49.0.wsh.js) and were stored as snapshots of the repository. The .1 files are those files with the header comment added; the code is unchanged.

File Comes from Loaded by
core-js-3.49.0.1.js core-js 3.49.0, index.js of the npm package core-js-bundle app.js
is-0.9.0.2.js is.js 0.9.0, is.js of the release (npm package is_js, tag v0.9.0) app.js (is)
js-yaml-4.1.0.1.js js-yaml 4.1.0, dist/js-yaml.js of the npm package app.js (yaml)
linq-4.0.2.1.js linq.js 4.0.2, linq.js of the npm package linq app.js (Enumerable)
numbers-0.7.0.1.js numbers.js 0.7.0, the browserified src/numbers.js app.js (numbers)
respond-1.4.2.1.js Respond.js 1.4.2, dest/respond.src.js at the tag 1.4.2 lib/browser.js (IE 8 and earlier)
selectivizr-1.0.2.1.js selectivizr 1.0.2 (v1.0.2b), selectivizr.js at the tag 1.0.2 lib/browser.js (IE 8 and earlier)
squel-basic-5.13.0.1.js Squel.js 5.13.0 as of commit afa1cb5 (“fix build”, 2020-07-28, after the 5.13.0 release), dist/squel-basic.js app.js (squel)

Upstream files

The changes below were found by comparing each file with these upstream files, ignoring line endings and the UTF-8 byte order mark:

Upstream file Bytes SHA-384
https://registry.npmjs.org/core-js-bundle/-/core-js-bundle-3.49.0.tgz → package/index.js 887,730 sha384-ja+wc46KctKrEra0BQe9bGANaK9o5D9mxX+jqWi2r06sX0iJkHqrpZ06zkIOzvLo
https://registry.npmjs.org/is_js/-/is_js-0.9.0.tgz → package/is.js (the same file as is.js at the tag v0.9.0) 32,813 sha384-r1rqAfJdNwo/sq+UOvPjgD9EOEuy1IpGN/LEUr4cF6gJeB6S/zqXyYXt1UF0CzKl
https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz → package/dist/js-yaml.js 114,359 sha384-wnpIlY73zQKRQF/TqAFQ+A41ZkUYqXitl4hV5aLCxwVJAL+gC8wxg3p6+hRkYxkq
https://registry.npmjs.org/linq/-/linq-4.0.2.tgz → package/linq.js 99,889 sha384-V7R4ik0ja96Aele/LkyQ6/3NgUgp6+iLDBlDljdWyY+mxw1WPghhppszor+x63iL
https://catswords.blob.core.windows.net/welsonjs/ajax/libs/numbers/0.7.0/numbers.js 78,930 sha384-SkZBybQ2Co+dcQQotKqcRyETNrPQiyioytIgfvmTRCay2prTjmbpTzVtTIsYY1R3
https://raw.githubusercontent.com/scottjehl/Respond/1.4.2/dest/respond.src.js 8,536 sha384-HwX0n9BiVutdIP0m3jKYarATBrBQMARe4JqN2bNN+eqbEirLWcklhaZgkovSBfc+
https://raw.githubusercontent.com/keithclark/selectivizr/1.0.2/selectivizr.js 19,041 sha384-KkFKLb40ypWxr/mNh/wx1XJCBdkGxksV9eVUtjiCCBZH4uGEBfPUftKF04ZornYz
https://raw.githubusercontent.com/hiddentao/squel/afa1cb5/dist/squel-basic.js 96,201 sha384-TGO48mVugymTS1uW/t9JIZym//JA2wjNJh/YzL/dFKYSiNjmdeYyZgnPccam1RmH

The digests are of the files as downloaded. Squel.js at afa1cb5 is not the dist/squel-basic.js of the npm release 5.13.0, which differs from line 2979 on. The file is named after the version (5.13.0.1) and the commit is recorded here and in its header; up to 0.2.7.62 it was squel-basic-5.13.0-afa1cb5.wsh.js.

Changes

core-js 3.49.0.1

NullProtoObjectViaActiveX builds an object without a prototype from the Object constructor of an htmlfile ActiveX document. Windows Script Host has no such document, so the call is in a try block, and on failure the constructor comes from another script engine instance:

  1. MSScriptControl.ScriptControl, the 32-bit Script Control that Microsoft ships;
  2. ScriptControl, a 64-bit Script Control that third parties provide;
  3. a function that returns {}, when neither exists, so that the deletion of the enumBugKeys that follows does not fail.

Nothing else is changed.

is.js 0.9.0.2

The three patterns accept and reject exactly the values the 0.9.0 patterns do in V8; they were compared on about 17 million strings. WelsonJS used to load the release’s is.min.js, the minified form of the same source; 0.9.0.2 is built from the readable is.js. The is.js on the default branch of the repository is newer than the release (2020, with is.thenable and is.operaMini) and is not used.

js-yaml 4.1.0.1

linq.js 4.0.2.1

numbers.js 0.7.0.1

Bug fixes, listed in the file header:

Respond.js 1.4.2.1

The local branch assigns the text to responseText without declaring it, so it creates a global variable of that name.

selectivizr 1.0.2.1

Squel.js 5.13.0.1

Reserved words are not used as property names, which JScript rejects:

Updating one of these files

  1. Take the new upstream file and compare it with the upstream file of the current build (the table above); apply the changes of this page to it again.
  2. Name it <library>-<new version>.1.js, update the header comment, and upload it to a new folder ajax/libs/<library>/<new version>.1/ (the current files are listed in app/assets/integrity.json).
  3. Replace the .integrity sidecar and the entry in app/assets/integrity.json (the digest is over the text with LF line endings, as restoreAppAssets.ps1 computes it), update the require() or addScript() call, and update this page.

A further WelsonJS change to the same upstream version is .2, and so on.