From 3a07c025723336fc0207bd71f9d4b9a9cd5d6bd8 Mon Sep 17 00:00:00 2001 From: Eli Bogomolny Date: Wed, 29 Sep 2021 16:35:11 -0400 Subject: [PATCH 01/12] pako workers for zip.js --- .gitignore | 3 +++ ThirdParty/npm/zip.js | 8 +++++++- gulpfile.cjs | 17 +++++++++++++++-- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 0fbd7b86a5e0..343e625e4825 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,9 @@ Source/ThirdParty/Tween.js Source/ThirdParty/Uri.js Source/ThirdParty/when.js Source/ThirdParty/zip.js +Source/ThirdParty/Workers/pako_inflate.min.js +Source/ThirdParty/Workers/pako_deflate.min.js +Source/ThirdParty/Workers/z-worker-pako.js /node_modules npm-debug.log diff --git a/ThirdParty/npm/zip.js b/ThirdParty/npm/zip.js index ca5691686300..37a1449df0fe 100644 --- a/ThirdParty/npm/zip.js +++ b/ThirdParty/npm/zip.js @@ -1,2 +1,8 @@ -import * as zip from "@zip.js/zip.js/lib/zip.js"; +import * as zip from "@zip.js/zip.js/lib/zip-no-worker.js"; +zip.configure({ + workerScripts: { + deflate: ["../../Source/ThirdParty/Workers/z-worker-pako.js", "./pako_deflate.min.js"], + inflate: ["../../Source/ThirdParty/Workers/z-worker-pako.js", "./pako_inflate.min.js"] + } +}); export { zip as default }; \ No newline at end of file diff --git a/gulpfile.cjs b/gulpfile.cjs index cab4ea60fcf4..cae3f48c36b9 100644 --- a/gulpfile.cjs +++ b/gulpfile.cjs @@ -390,8 +390,21 @@ async function downloadAndWriteFile(url, path) { }); } -// Downloads Draco3D files from gstatic servers gulp.task("prepare", async function () { + // Copy pako and zip.js worker files to Source/ThirdParty + fs.copyFileSync( + "node_modules/pako/dist/pako_inflate.min.js", + "Source/ThirdParty/Workers/pako_inflate.min.js" + ); + fs.copyFileSync( + "node_modules/pako/dist/pako_deflate.min.js", + "Source/ThirdParty/Workers/pako_deflate.min.js" + ); + fs.copyFileSync( + "node_modules/@zip.js/zip.js/dist/z-worker-pako.js", + "Source/ThirdParty/Workers/z-worker-pako.js" + ); + // Download Draco3D files from gstatic servers await downloadAndWriteFile( "https://www.gstatic.com/draco/versioned/decoders/1.3.5/draco_wasm_wrapper.js", "Source/ThirdParty/Workers/draco_wasm_wrapper.js" @@ -442,7 +455,7 @@ gulp.task( //See https://github.com/CesiumGS/cesium/pull/3106#discussion_r42793558 for discussion. glslToJavaScript(false, "Build/minifyShaders.state"); - // Remove prepare step from package.json to avoid redownloading Draco3d files + // Remove prepare and post install steps from package.json to avoid redownloading Draco3d files delete packageJson.scripts.prepare; fs.writeFileSync( "./Build/package.noprepare.json", From 4472b26d8133aba9209889c734f38812811fed0c Mon Sep 17 00:00:00 2001 From: Eli Bogomolny Date: Thu, 7 Oct 2021 00:55:46 -0400 Subject: [PATCH 02/12] configure without web workers --- ThirdParty/npm/zip.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ThirdParty/npm/zip.js b/ThirdParty/npm/zip.js index 37a1449df0fe..20c82a2f575c 100644 --- a/ThirdParty/npm/zip.js +++ b/ThirdParty/npm/zip.js @@ -1,8 +1,11 @@ import * as zip from "@zip.js/zip.js/lib/zip-no-worker.js"; +// zip.configure({ +// workerScripts: { +// deflate: ["../../Source/ThirdParty/Workers/z-worker-pako.js", "./pako_deflate.min.js"], +// inflate: ["../../Source/ThirdParty/Workers/z-worker-pako.js", "./pako_inflate.min.js"] +// } +// }); zip.configure({ - workerScripts: { - deflate: ["../../Source/ThirdParty/Workers/z-worker-pako.js", "./pako_deflate.min.js"], - inflate: ["../../Source/ThirdParty/Workers/z-worker-pako.js", "./pako_inflate.min.js"] - } + useWebWorkers: false }); export { zip as default }; \ No newline at end of file From cc521eb7fdaa27622448790e1b210698b416f069 Mon Sep 17 00:00:00 2001 From: Eli Bogomolny Date: Thu, 7 Oct 2021 01:50:17 -0400 Subject: [PATCH 03/12] add back draco files in gulp prepare --- gulpfile.cjs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gulpfile.cjs b/gulpfile.cjs index fe63a650dad5..48c9251302b7 100644 --- a/gulpfile.cjs +++ b/gulpfile.cjs @@ -381,8 +381,16 @@ function combineRelease() { gulp.task("combineRelease", gulp.series("build", combineRelease)); -// Copy Draco3D files from node_modules into Source gulp.task("prepare", function (done) { + // Copy Draco3D files from node_modules into Source + fs.copyFileSync( + "node_modules/draco3d/draco_decoder_nodejs.js", + "Source/ThirdParty/Workers/draco_decoder_nodejs.js" + ); + fs.copyFileSync( + "node_modules/draco3d/draco_decoder.wasm", + "Source/ThirdParty/draco_decoder.wasm" + ); // Copy pako and zip.js worker files to Source/ThirdParty fs.copyFileSync( "node_modules/pako/dist/pako_inflate.min.js", From 51950009afdee9efb8ea3e8cad154a0b6b06a708 Mon Sep 17 00:00:00 2001 From: Eli Bogomolny Date: Thu, 7 Oct 2021 14:14:47 -0400 Subject: [PATCH 04/12] use pako with buildModuleUrl paths --- Source/DataSources/KmlDataSource.js | 8 ++++++++ Source/DataSources/exportKml.js | 8 ++++++++ ThirdParty/npm/zip.js | 6 +++--- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Source/DataSources/KmlDataSource.js b/Source/DataSources/KmlDataSource.js index c51998fb67f6..cf2f3138dab8 100644 --- a/Source/DataSources/KmlDataSource.js +++ b/Source/DataSources/KmlDataSource.js @@ -1,5 +1,6 @@ import ArcType from "../Core/ArcType.js"; import AssociativeArray from "../Core/AssociativeArray.js"; +import buildModuleUrl from "../Core/buildModuleUrl.js"; import BoundingRectangle from "../Core/BoundingRectangle.js"; import Cartesian2 from "../Core/Cartesian2.js"; import Cartesian3 from "../Core/Cartesian3.js"; @@ -3165,6 +3166,13 @@ function loadKml( } function loadKmz(dataSource, entityCollection, blob, sourceResource) { + var zWorkerUrl = buildModuleUrl("ThirdParty/Workers/z-worker-pako.js"); + zip.configure({ + workerScripts: { + deflate: [zWorkerUrl, "./pako_deflate.min.js"], + inflate: [zWorkerUrl, "./pako_inflate.min.js"], + }, + }); var reader = new zip.ZipReader(new zip.BlobReader(blob)); return when(reader.getEntries()).then(function (entries) { var promises = []; diff --git a/Source/DataSources/exportKml.js b/Source/DataSources/exportKml.js index 481c1a42834f..4a6bb525b385 100644 --- a/Source/DataSources/exportKml.js +++ b/Source/DataSources/exportKml.js @@ -1,3 +1,4 @@ +import buildModuleUrl from "../Core/buildModuleUrl.js"; import Cartesian2 from "../Core/Cartesian2.js"; import Cartesian3 from "../Core/Cartesian3.js"; import Cartographic from "../Core/Cartographic.js"; @@ -323,6 +324,13 @@ function exportKml(options) { } function createKmz(kmlString, externalFiles) { + var zWorkerUrl = buildModuleUrl("ThirdParty/Workers/z-worker-pako.js"); + zip.configure({ + workerScripts: { + deflate: [zWorkerUrl, "./pako_deflate.min.js"], + inflate: [zWorkerUrl, "./pako_inflate.min.js"], + }, + }); var blobWriter = new zip.BlobWriter(); var writer = new zip.ZipWriter(blobWriter); // We need to only write one file at a time so the zip doesn't get corrupted diff --git a/ThirdParty/npm/zip.js b/ThirdParty/npm/zip.js index 20c82a2f575c..ee7999a0fca6 100644 --- a/ThirdParty/npm/zip.js +++ b/ThirdParty/npm/zip.js @@ -5,7 +5,7 @@ import * as zip from "@zip.js/zip.js/lib/zip-no-worker.js"; // inflate: ["../../Source/ThirdParty/Workers/z-worker-pako.js", "./pako_inflate.min.js"] // } // }); -zip.configure({ - useWebWorkers: false -}); +// zip.configure({ +// useWebWorkers: false +// }); export { zip as default }; \ No newline at end of file From 1ff47b6fbb1d4ba7cf72bb579ad16df9f38a082e Mon Sep 17 00:00:00 2001 From: Eli Bogomolny Date: Fri, 8 Oct 2021 12:37:55 -0400 Subject: [PATCH 05/12] add Source/Core/zipPakoConfig.js --- Source/Core/zipPakoConfig.js | 13 +++++++++++++ Source/DataSources/KmlDataSource.js | 9 +-------- Source/DataSources/exportKml.js | 10 +--------- 3 files changed, 15 insertions(+), 17 deletions(-) create mode 100644 Source/Core/zipPakoConfig.js diff --git a/Source/Core/zipPakoConfig.js b/Source/Core/zipPakoConfig.js new file mode 100644 index 000000000000..66631dae5cec --- /dev/null +++ b/Source/Core/zipPakoConfig.js @@ -0,0 +1,13 @@ +import buildModuleUrl from "./buildModuleUrl.js"; +import zip from "../ThirdParty/zip.js"; + +var zWorkerUrl = buildModuleUrl("ThirdParty/Workers/z-worker-pako.js"); +zip.configure({ + workerScripts: { + deflate: [zWorkerUrl, "./pako_deflate.min.js"], + inflate: [zWorkerUrl, "./pako_inflate.min.js"], + }, +}); + +var zipPakoConfig = zip; +export default zipPakoConfig; diff --git a/Source/DataSources/KmlDataSource.js b/Source/DataSources/KmlDataSource.js index cf2f3138dab8..50401faa000c 100644 --- a/Source/DataSources/KmlDataSource.js +++ b/Source/DataSources/KmlDataSource.js @@ -35,6 +35,7 @@ import Resource from "../Core/Resource.js"; import RuntimeError from "../Core/RuntimeError.js"; import TimeInterval from "../Core/TimeInterval.js"; import TimeIntervalCollection from "../Core/TimeIntervalCollection.js"; +import zip from "../Core/zipPakoConfig.js"; import HeightReference from "../Scene/HeightReference.js"; import HorizontalOrigin from "../Scene/HorizontalOrigin.js"; import LabelStyle from "../Scene/LabelStyle.js"; @@ -42,7 +43,6 @@ import SceneMode from "../Scene/SceneMode.js"; import Autolinker from "../ThirdParty/Autolinker.js"; import Uri from "../ThirdParty/Uri.js"; import when from "../ThirdParty/when.js"; -import zip from "../ThirdParty/zip.js"; import BillboardGraphics from "./BillboardGraphics.js"; import CompositePositionProperty from "./CompositePositionProperty.js"; import DataSource from "./DataSource.js"; @@ -3166,13 +3166,6 @@ function loadKml( } function loadKmz(dataSource, entityCollection, blob, sourceResource) { - var zWorkerUrl = buildModuleUrl("ThirdParty/Workers/z-worker-pako.js"); - zip.configure({ - workerScripts: { - deflate: [zWorkerUrl, "./pako_deflate.min.js"], - inflate: [zWorkerUrl, "./pako_inflate.min.js"], - }, - }); var reader = new zip.ZipReader(new zip.BlobReader(blob)); return when(reader.getEntries()).then(function (entries) { var promises = []; diff --git a/Source/DataSources/exportKml.js b/Source/DataSources/exportKml.js index 4a6bb525b385..b83d4f7dffe4 100644 --- a/Source/DataSources/exportKml.js +++ b/Source/DataSources/exportKml.js @@ -1,4 +1,3 @@ -import buildModuleUrl from "../Core/buildModuleUrl.js"; import Cartesian2 from "../Core/Cartesian2.js"; import Cartesian3 from "../Core/Cartesian3.js"; import Cartographic from "../Core/Cartographic.js"; @@ -17,11 +16,11 @@ import Resource from "../Core/Resource.js"; import RuntimeError from "../Core/RuntimeError.js"; import TimeInterval from "../Core/TimeInterval.js"; import TimeIntervalCollection from "../Core/TimeIntervalCollection.js"; +import zip from "../Core/zipPakoConfig.js"; import HeightReference from "../Scene/HeightReference.js"; import HorizontalOrigin from "../Scene/HorizontalOrigin.js"; import VerticalOrigin from "../Scene/VerticalOrigin.js"; import when from "../ThirdParty/when.js"; -import zip from "../ThirdParty/zip.js"; import BillboardGraphics from "./BillboardGraphics.js"; import CompositePositionProperty from "./CompositePositionProperty.js"; import ModelGraphics from "./ModelGraphics.js"; @@ -324,13 +323,6 @@ function exportKml(options) { } function createKmz(kmlString, externalFiles) { - var zWorkerUrl = buildModuleUrl("ThirdParty/Workers/z-worker-pako.js"); - zip.configure({ - workerScripts: { - deflate: [zWorkerUrl, "./pako_deflate.min.js"], - inflate: [zWorkerUrl, "./pako_inflate.min.js"], - }, - }); var blobWriter = new zip.BlobWriter(); var writer = new zip.ZipWriter(blobWriter); // We need to only write one file at a time so the zip doesn't get corrupted From 40864f033d6698fe1b3303f06e959de720de1aae Mon Sep 17 00:00:00 2001 From: Eli Bogomolny Date: Fri, 8 Oct 2021 12:41:07 -0400 Subject: [PATCH 06/12] remove unused import --- Source/DataSources/KmlDataSource.js | 1 - 1 file changed, 1 deletion(-) diff --git a/Source/DataSources/KmlDataSource.js b/Source/DataSources/KmlDataSource.js index 50401faa000c..41bbcf574df5 100644 --- a/Source/DataSources/KmlDataSource.js +++ b/Source/DataSources/KmlDataSource.js @@ -1,6 +1,5 @@ import ArcType from "../Core/ArcType.js"; import AssociativeArray from "../Core/AssociativeArray.js"; -import buildModuleUrl from "../Core/buildModuleUrl.js"; import BoundingRectangle from "../Core/BoundingRectangle.js"; import Cartesian2 from "../Core/Cartesian2.js"; import Cartesian3 from "../Core/Cartesian3.js"; From 691ae2b94342b1c4249d6bdf75f2da119d840341 Mon Sep 17 00:00:00 2001 From: Eli Bogomolny Date: Fri, 8 Oct 2021 12:44:38 -0400 Subject: [PATCH 07/12] Remove zip.js comments and update gulpfile comment --- ThirdParty/npm/zip.js | 9 --------- gulpfile.cjs | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/ThirdParty/npm/zip.js b/ThirdParty/npm/zip.js index ee7999a0fca6..365a4a70d981 100644 --- a/ThirdParty/npm/zip.js +++ b/ThirdParty/npm/zip.js @@ -1,11 +1,2 @@ import * as zip from "@zip.js/zip.js/lib/zip-no-worker.js"; -// zip.configure({ -// workerScripts: { -// deflate: ["../../Source/ThirdParty/Workers/z-worker-pako.js", "./pako_deflate.min.js"], -// inflate: ["../../Source/ThirdParty/Workers/z-worker-pako.js", "./pako_inflate.min.js"] -// } -// }); -// zip.configure({ -// useWebWorkers: false -// }); export { zip as default }; \ No newline at end of file diff --git a/gulpfile.cjs b/gulpfile.cjs index 48c9251302b7..90fde03e854b 100644 --- a/gulpfile.cjs +++ b/gulpfile.cjs @@ -447,7 +447,7 @@ gulp.task( //See https://github.com/CesiumGS/cesium/pull/3106#discussion_r42793558 for discussion. glslToJavaScript(false, "Build/minifyShaders.state"); - // Remove prepare and post install steps from package.json to avoid redownloading Draco3d files + // Remove prepare step from package.json to avoid copying extra files delete packageJson.scripts.prepare; fs.writeFileSync( "./Build/package.noprepare.json", From 46bfd8ac50e29f00bdadeaaf03b97e326df91db9 Mon Sep 17 00:00:00 2001 From: Eli Bogomolny Date: Fri, 8 Oct 2021 18:12:21 -0400 Subject: [PATCH 08/12] revert DataSources files --- Source/DataSources/KmlDataSource.js | 10 +++++++++- Source/DataSources/exportKml.js | 10 +++++++++- Specs/Core/ResourceSpec.js | 2 +- Specs/DataSources/exportKmlSpec.js | 2 +- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/Source/DataSources/KmlDataSource.js b/Source/DataSources/KmlDataSource.js index 41bbcf574df5..8195631419a6 100644 --- a/Source/DataSources/KmlDataSource.js +++ b/Source/DataSources/KmlDataSource.js @@ -1,6 +1,7 @@ import ArcType from "../Core/ArcType.js"; import AssociativeArray from "../Core/AssociativeArray.js"; import BoundingRectangle from "../Core/BoundingRectangle.js"; +import buildModuleUrl from "../Core/buildModuleUrl.js"; import Cartesian2 from "../Core/Cartesian2.js"; import Cartesian3 from "../Core/Cartesian3.js"; import Cartographic from "../Core/Cartographic.js"; @@ -34,7 +35,6 @@ import Resource from "../Core/Resource.js"; import RuntimeError from "../Core/RuntimeError.js"; import TimeInterval from "../Core/TimeInterval.js"; import TimeIntervalCollection from "../Core/TimeIntervalCollection.js"; -import zip from "../Core/zipPakoConfig.js"; import HeightReference from "../Scene/HeightReference.js"; import HorizontalOrigin from "../Scene/HorizontalOrigin.js"; import LabelStyle from "../Scene/LabelStyle.js"; @@ -42,6 +42,7 @@ import SceneMode from "../Scene/SceneMode.js"; import Autolinker from "../ThirdParty/Autolinker.js"; import Uri from "../ThirdParty/Uri.js"; import when from "../ThirdParty/when.js"; +import zip from "../ThirdParty/zip.js"; import BillboardGraphics from "./BillboardGraphics.js"; import CompositePositionProperty from "./CompositePositionProperty.js"; import DataSource from "./DataSource.js"; @@ -3165,6 +3166,13 @@ function loadKml( } function loadKmz(dataSource, entityCollection, blob, sourceResource) { + var zWorkerUrl = buildModuleUrl("/ThirdParty/Workers/z-worker-pako.js"); + zip.configure({ + workerScripts: { + deflate: [zWorkerUrl, "./pako_deflate.min.js"], + inflate: [zWorkerUrl, "./pako_inflate.min.js"], + }, + }); var reader = new zip.ZipReader(new zip.BlobReader(blob)); return when(reader.getEntries()).then(function (entries) { var promises = []; diff --git a/Source/DataSources/exportKml.js b/Source/DataSources/exportKml.js index b83d4f7dffe4..343512ee1548 100644 --- a/Source/DataSources/exportKml.js +++ b/Source/DataSources/exportKml.js @@ -1,3 +1,4 @@ +import buildModuleUrl from "../Core/buildModuleUrl.js"; import Cartesian2 from "../Core/Cartesian2.js"; import Cartesian3 from "../Core/Cartesian3.js"; import Cartographic from "../Core/Cartographic.js"; @@ -16,11 +17,11 @@ import Resource from "../Core/Resource.js"; import RuntimeError from "../Core/RuntimeError.js"; import TimeInterval from "../Core/TimeInterval.js"; import TimeIntervalCollection from "../Core/TimeIntervalCollection.js"; -import zip from "../Core/zipPakoConfig.js"; import HeightReference from "../Scene/HeightReference.js"; import HorizontalOrigin from "../Scene/HorizontalOrigin.js"; import VerticalOrigin from "../Scene/VerticalOrigin.js"; import when from "../ThirdParty/when.js"; +import zip from "../ThirdParty/zip.js"; import BillboardGraphics from "./BillboardGraphics.js"; import CompositePositionProperty from "./CompositePositionProperty.js"; import ModelGraphics from "./ModelGraphics.js"; @@ -323,6 +324,13 @@ function exportKml(options) { } function createKmz(kmlString, externalFiles) { + var zWorkerUrl = buildModuleUrl("/ThirdParty/Workers/z-worker-pako.js"); + zip.configure({ + workerScripts: { + deflate: [zWorkerUrl, "./pako_deflate.min.js"], + inflate: [zWorkerUrl, "./pako_inflate.min.js"], + }, + }); var blobWriter = new zip.BlobWriter(); var writer = new zip.ZipWriter(blobWriter); // We need to only write one file at a time so the zip doesn't get corrupted diff --git a/Specs/Core/ResourceSpec.js b/Specs/Core/ResourceSpec.js index 1169c9d63a1a..13b75ea692ca 100644 --- a/Specs/Core/ResourceSpec.js +++ b/Specs/Core/ResourceSpec.js @@ -2089,7 +2089,7 @@ describe("Core/Resource", function () { }); }); - xit("can support 2xx HTTP status (other than 200)", function () { + it("can support 2xx HTTP status (other than 200)", function () { return loadWithXhr({ method: "POST", url: "http://jsonplaceholder.typicode.com/posts", diff --git a/Specs/DataSources/exportKmlSpec.js b/Specs/DataSources/exportKmlSpec.js index e62ee7a0c796..936a00d05bd7 100644 --- a/Specs/DataSources/exportKmlSpec.js +++ b/Specs/DataSources/exportKmlSpec.js @@ -487,7 +487,7 @@ describe("DataSources/exportKml", function () { }); }); - it("Billboard with a Canvas image as KMZ", function () { + fit("Billboard with a Canvas image as KMZ", function () { var entity1 = createEntity({ billboard: { image: document.createElement("canvas"), From d2cee4e5d3a3271464e23c75ed7f5d4e845cd51f Mon Sep 17 00:00:00 2001 From: Eli Bogomolny Date: Fri, 8 Oct 2021 18:17:23 -0400 Subject: [PATCH 09/12] cleanup --- Specs/Core/ResourceSpec.js | 2 +- Specs/DataSources/exportKmlSpec.js | 2 +- gulpfile.cjs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Specs/Core/ResourceSpec.js b/Specs/Core/ResourceSpec.js index 13b75ea692ca..1169c9d63a1a 100644 --- a/Specs/Core/ResourceSpec.js +++ b/Specs/Core/ResourceSpec.js @@ -2089,7 +2089,7 @@ describe("Core/Resource", function () { }); }); - it("can support 2xx HTTP status (other than 200)", function () { + xit("can support 2xx HTTP status (other than 200)", function () { return loadWithXhr({ method: "POST", url: "http://jsonplaceholder.typicode.com/posts", diff --git a/Specs/DataSources/exportKmlSpec.js b/Specs/DataSources/exportKmlSpec.js index 936a00d05bd7..e62ee7a0c796 100644 --- a/Specs/DataSources/exportKmlSpec.js +++ b/Specs/DataSources/exportKmlSpec.js @@ -487,7 +487,7 @@ describe("DataSources/exportKml", function () { }); }); - fit("Billboard with a Canvas image as KMZ", function () { + it("Billboard with a Canvas image as KMZ", function () { var entity1 = createEntity({ billboard: { image: document.createElement("canvas"), diff --git a/gulpfile.cjs b/gulpfile.cjs index 90fde03e854b..9a8cab807a7e 100644 --- a/gulpfile.cjs +++ b/gulpfile.cjs @@ -447,7 +447,7 @@ gulp.task( //See https://github.com/CesiumGS/cesium/pull/3106#discussion_r42793558 for discussion. glslToJavaScript(false, "Build/minifyShaders.state"); - // Remove prepare step from package.json to avoid copying extra files + // Remove prepare step from package.json to avoid running "prepare" an extra time. delete packageJson.scripts.prepare; fs.writeFileSync( "./Build/package.noprepare.json", From d22dacc338d7385a3bc87e98834c4d4f9a9a5df8 Mon Sep 17 00:00:00 2001 From: Eli Bogomolny Date: Fri, 8 Oct 2021 18:29:43 -0400 Subject: [PATCH 10/12] remove broken zip module in Source/Core/ --- Source/Core/zipPakoConfig.js | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 Source/Core/zipPakoConfig.js diff --git a/Source/Core/zipPakoConfig.js b/Source/Core/zipPakoConfig.js deleted file mode 100644 index 66631dae5cec..000000000000 --- a/Source/Core/zipPakoConfig.js +++ /dev/null @@ -1,13 +0,0 @@ -import buildModuleUrl from "./buildModuleUrl.js"; -import zip from "../ThirdParty/zip.js"; - -var zWorkerUrl = buildModuleUrl("ThirdParty/Workers/z-worker-pako.js"); -zip.configure({ - workerScripts: { - deflate: [zWorkerUrl, "./pako_deflate.min.js"], - inflate: [zWorkerUrl, "./pako_inflate.min.js"], - }, -}); - -var zipPakoConfig = zip; -export default zipPakoConfig; From 27c36304e46c586a21f50f16e0c9d707631d1cb8 Mon Sep 17 00:00:00 2001 From: Eli Bogomolny Date: Fri, 8 Oct 2021 19:01:13 -0400 Subject: [PATCH 11/12] fix worker paths --- Source/DataSources/KmlDataSource.js | 2 +- Source/DataSources/exportKml.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/DataSources/KmlDataSource.js b/Source/DataSources/KmlDataSource.js index 8195631419a6..d54b17624041 100644 --- a/Source/DataSources/KmlDataSource.js +++ b/Source/DataSources/KmlDataSource.js @@ -3166,7 +3166,7 @@ function loadKml( } function loadKmz(dataSource, entityCollection, blob, sourceResource) { - var zWorkerUrl = buildModuleUrl("/ThirdParty/Workers/z-worker-pako.js"); + var zWorkerUrl = buildModuleUrl("ThirdParty/Workers/z-worker-pako.js"); zip.configure({ workerScripts: { deflate: [zWorkerUrl, "./pako_deflate.min.js"], diff --git a/Source/DataSources/exportKml.js b/Source/DataSources/exportKml.js index 343512ee1548..4a6bb525b385 100644 --- a/Source/DataSources/exportKml.js +++ b/Source/DataSources/exportKml.js @@ -324,7 +324,7 @@ function exportKml(options) { } function createKmz(kmlString, externalFiles) { - var zWorkerUrl = buildModuleUrl("/ThirdParty/Workers/z-worker-pako.js"); + var zWorkerUrl = buildModuleUrl("ThirdParty/Workers/z-worker-pako.js"); zip.configure({ workerScripts: { deflate: [zWorkerUrl, "./pako_deflate.min.js"], From 15f39ae6b78911af95b99f951d1862e0c918c6a4 Mon Sep 17 00:00:00 2001 From: Eli Bogomolny Date: Mon, 11 Oct 2021 16:33:54 -0400 Subject: [PATCH 12/12] CHANGES.md entry --- CHANGES.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 1405aab4e7af..0cb368456eaf 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,11 @@ # Change Log +### 1.86.1 - 2021-10-15 + +##### Fixes :wrench: + +- Fixed zip.js configurations causing CesiumJS to not work with Node 16. [#9861](https://github.com/CesiumGS/cesium/pull/9861) + ### 1.86 - 2021-10-01 ##### Breaking Changes :mega: