build: update pako library.
MODIFY
package-lock.json
package-lock.json
"dev": true,
"requires": {
"pako": "~1.0.5"
+ },
+ "dependencies": {
+ "pako": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
+ "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==",
+ "dev": true
+ }
}
},
"browserslist": {
"optional": true,
"requires": {
"lie": "~3.3.0",
- "pako": "~1.0.2",
"readable-stream": "~2.3.6",
"set-immediate-shim": "~1.0.1"
}
"dev": true
},
"pako": {
- "version": "1.0.11",
- "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
- "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw=="
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/pako/-/pako-2.0.4.tgz",
+ "integrity": "sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg==",
+ "dev": true
},
"parallel-transform": {
"version": "1.2.0",
"commander": "5.1.0",
"gl-matrix": "3.3.0",
"jszip": "3.4.0",
- "pako": "1.0.11",
"seedrandom": "3.0.5",
"shelljs": "0.8.4",
"webvr-polyfill": "0.10.11",

MODIFY
package.json
package.json
"karma-spec-reporter": "^0.0.32",
"karma-webpack": "^3.0.5",
"nib": "^1.1.2",
- "pako": "^1.0.11",
+ "pako": "^2.0.4",
"phantomjs-prebuilt": "^2.1.5",
"pug": "^3.0.2",
"pug-lint": "^2.6.0",
"test-headed-xvfb": "GEOJS_TEST_CASE=tests/test-headed.js xvfb-run -s '-ac -screen 0 1280x1024x24' karma start karma-cov.conf.js --single-run --browsers ChromeFull",
"test-webglheadless": "GEOJS_TEST_CASE=tests/test-gl.js karma start karma-cov.conf.js --single-run --browsers ChromeHeadlessTouch",
"test-webglheadless-all": "GEOJS_TEST_CASE=tests/test-gl.js karma start karma-cov.conf.js --single-run --browsers ChromeHeadlessTouch,FirefoxHeadlessTouch",
- "test-tutorials": "GEOJS_TEST_CASE=tests/tutorials.js karma start karma-cov.conf.js --single-run --browsers ChromeHeadlessTouch,PhantomJS",
- "test-tutorialsci-all": "GEOJS_TEST_CASE=tests/tutorials.js karma start karma-cov.conf.js --single-run --browsers ChromeHeadlessTouch,FirefoxHeadlessTouch,PhantomJS",
+ "test-tutorials": "GEOJS_TEST_CASE=tests/tutorials.js karma start karma-cov.conf.js --single-run --browsers ChromeHeadlessTouch",
+ "test-tutorialsci-all": "GEOJS_TEST_CASE=tests/tutorials.js karma start karma-cov.conf.js --single-run --browsers ChromeHeadlessTouch,FirefoxHeadlessTouch",
"get-data-files": "node scripts/datastore.js dist/data",
"ci-clean": "git clean -fxd dist -e dist/data jsdoc/tmpl jsdoc/static images lcov",
"ci": "npm run ci-build && npm run ci-test",

MODIFY
tutorials/common/tutorials.js
tutorials/common/tutorials.js
@@ -248,7 +248,7 @@ function fill_codeblocks(query) {
/* Strip out white space and pluses, then convert ., -, and _ to /, +,
* =. By removing whitespace, the url is more robust against email
* handling. The others keep things short. */
- var src = atob(query[key].replace(/(\s|\+)/g, '').replace(/\./g, '/').replace(/-/g, '+').replace(/_/g, '='));
+ let src = query[key].replace(/(\s|\+)/g, '').replace(/\./g, '/').replace(/-/g, '+').replace(/_/g, '=');
src = pako.inflate(src, {to: 'string', raw: true});
if ($('.CodeMirror', block).length) {
$('.CodeMirror', block)[0].CodeMirror.setValue(src);
@@ -287,7 +287,8 @@ function start_keeper(alwaysKeep) {
var src = $('.CodeMirror', block).length ? $('.CodeMirror', block)[0].CodeMirror.getValue() : $('textarea', block).val();
src = src.trim().replace(/ [ ]*\n/g, '\n');
if (src !== defaultSrc) {
- var comp = btoa(pako.deflate(src, {to: 'string', level: 9, raw: true}));
+ let comp = pako.deflate(src, {to: 'string', level: 9, raw: true});
+ comp = btoa(String.fromCharCode.apply(null, comp));
/* instead of using regular base64, convert /, +, and = to ., -, and _
* so that they don't need to be escaped on the url. This reduces the
* average length of the url by 6 percent. */

build: update pako library.