Skip to content

Commit 1dab7ef

Browse files
committed
Merge branch 'main' of https://github.com/CesiumGS/cesium into workspaces
2 parents cea70c4 + e7987bb commit 1dab7ef

File tree

5 files changed

+42
-21
lines changed

5 files changed

+42
-21
lines changed

CHANGES.md

+9-4
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,17 @@
44

55
#### Major Announcements :loudspeaker:
66

7-
- CesiumJS is now published alongside two smaller packages `@cesium/engine` and `@cesium/widgets` [#10824](https://github.com/CesiumGS/cesium/pull/10824):
8-
- The source code has been paritioned into two npm workspaces: `packages/engine` and `packages/widgets`.
7+
- Starting with version 1.100, CesiumJS will be published alongside two smaller packages `@cesium/engine` and `@cesium/widgets` [#10824](https://github.com/CesiumGS/cesium/pull/10824):
8+
- The source code will been paritioned into two folders: `packages/engine` and `packages/widgets`.
99
- These workspaces packages will follow semantic versioning.
1010
- These workspaces packages will be published as ES modules with TypeScript definitions.
11-
- The combined CesiumJS release will continue to be published, however, only the `Assets`, `ThirdParty` and `Widgets` (with CSS files only) are available in the root level `Source` folder.
12-
- The ability to import modules and TypeScript definitinons from individual modules has been removed.
11+
- The combined CesiumJS release will continue to be published, however, the `Source` folder will only contain the following:
12+
- `Cesium.js`
13+
- `Cesium.d.ts`
14+
- `Assets`
15+
- `ThirdParty`
16+
- `Widgets`(CSS files only)
17+
- The ability to import modules and TypeScript definitions from individual files will been removed. Any imports should originate from the `cesium` module (`import { Cartesian3 } from "cesium";`) or the combined `Cesium.js` file (`import { Cartesian3 } from "Source/Cesium.js";`);
1318

1419
##### Additions :tada:
1520

ThirdParty.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"license": [
4646
"Apache-2.0"
4747
],
48-
"version": "1.5.3",
48+
"version": "1.5.5",
4949
"url": "https://www.npmjs.com/package/draco3d"
5050
},
5151
{

build.js

+30-14
Original file line numberDiff line numberDiff line change
@@ -346,22 +346,26 @@ function rollupWarning(message) {
346346
*/
347347
export async function bundleCombinedWorkers(options) {
348348
// Bundle non ES6 workers.
349-
350-
const workers = await globby([
351-
`packages/engine/Source/Workers/**`,
352-
`packages/engine/Source/ThirdParty/Workers/**`,
353-
]);
354-
355-
const esBuildConfig = defaultESBuildOptions();
356-
esBuildConfig.bundle = false;
357-
esBuildConfig.entryPoints = workers;
358-
esBuildConfig.outdir = options.path;
359-
esBuildConfig.minify = options.minify;
360-
esBuildConfig.banner = {
361-
js: combinedCopyrightHeader,
349+
const workers = await globby(["Source/Workers/**"]);
350+
const workerConfig = defaultESBuildOptions();
351+
workerConfig.bundle = false;
352+
workerConfig.banner = {
353+
js: options.copyrightHeader,
362354
};
355+
workerConfig.entryPoints = workers;
356+
workerConfig.outdir = options.path;
357+
workerConfig.minify = options.minify;
358+
await esbuild.build(workerConfig);
359+
360+
// Copy ThirdParty workers
361+
const thirdPartyWorkers = await globby(["Source/ThirdParty/Workers/**"]);
363362

364-
await esbuild.build(esBuildConfig);
363+
const thirdPartyWorkerConfig = defaultESBuildOptions();
364+
thirdPartyWorkerConfig.bundle = false;
365+
thirdPartyWorkerConfig.entryPoints = thirdPartyWorkers;
366+
thirdPartyWorkerConfig.outdir = options.path;
367+
thirdPartyWorkerConfig.minify = options.minify;
368+
await esbuild.build(thirdPartyWorkerConfig);
365369

366370
// Bundle ES6 workers.
367371

@@ -422,6 +426,18 @@ export async function bundleWorkers(options) {
422426
workerConfig.minify = options.minify;
423427
await esbuild.build(workerConfig);
424428

429+
// Copy ThirdParty workers
430+
const thirdPartyWorkers = await globby(["Source/ThirdParty/Workers/**"]);
431+
432+
const thirdPartyWorkerConfig = defaultESBuildOptions();
433+
thirdPartyWorkerConfig.entryPoints = thirdPartyWorkers;
434+
thirdPartyWorkerConfig.outdir = options.path;
435+
thirdPartyWorkerConfig.outbase = `packages/engine/Source`; // Maintain existing file paths
436+
thirdPartyWorkerConfig.minify = options.minify;
437+
// We don't want the CesiumJS copyright banner added to the ThirdParty worker files.
438+
thirdPartyWorkerConfig.banner = undefined;
439+
await esbuild.build(thirdPartyWorkerConfig);
440+
425441
// Use rollup to build the workers:
426442
// 1) They can be built as AMD style modules
427443
// 2) They can be built using code-splitting, resulting in smaller modules

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cesium",
3-
"version": "1.98.1",
3+
"version": "1.99.0",
44
"description": "CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin.",
55
"homepage": "http://cesium.com/cesiumjs/",
66
"license": "Apache-2.0",

packages/engine/Source/Core/Ion.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Resource from "./Resource.js";
44

55
let defaultTokenCredit;
66
const defaultAccessToken =
7-
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI0NTkyNGVkMi04YTg1LTQ4YzktYTI3MS05NTNiZWM3MTg2ZGEiLCJpZCI6MjU5LCJpYXQiOjE2NjQ4MTQyODl9.mGZTN2DeKa-mQnQr6BInj8GzOK6wq3dZMwcyU0iwInA";
7+
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI4NTFhZTUzYy1iMDY1LTQ3OGMtYmUzMS0zZjkzYzA1OTcwMzgiLCJpZCI6MjU5LCJpYXQiOjE2NjczMDg2OTN9.19evjYn4YZyB1OoUV_77qL2JOJr-Zc1Mqjp3wYisCzM";
88

99
/**
1010
* Default settings for accessing the Cesium ion API.

0 commit comments

Comments
 (0)