Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds workspaces #10824

Merged
merged 1 commit into from
Nov 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 15 additions & 6 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,24 @@ Apps/HelloWorld.html
Apps/Sandcastle/ThirdParty/**
Build/**
Documentation/**
Source/Scene/GltfPipeline/**
Source/Shaders/**
Source/ThirdParty/**
Source/Workers/**
!Source/Workers/transferTypedArrayTest.js
Source/**
Specs/jasmine/**
ThirdParty/**
Tools/**
Apps/Sandcastle/jsHintOptions.js
Apps/Sandcastle/gallery/gallery-index.js
index.html
index.release.html
index.release.html


# packages/engine
packages/engine/Build/**
packages/engine/Source/Scene/GltfPipeline/**
packages/engine/Source/Shaders/**
packages/engine/Source/ThirdParty/**
packages/engine/Source/Workers/**
!packages/engine/Source/Workers/transferTypedArrayTest.js

# packages/widgets
packages/widgets/Build/**
packages/widgets/Source/ThirdParty/**
18 changes: 4 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,14 @@ Thumbs.db
/Apps/Sandcastle/gallery/gallery-index.js
/Apps/Sandcastle/templates/bucket.css

/Source/Cesium.js
/Source/Assets/
/Source/ThirdParty/
/Source/Widgets/
/Source/Cesium.d.ts
/Source/Cesium.js

/Specs/SpecList.js
/Specs/jasmine/**
/Source/Shaders/**/*.js
/Source/ThirdParty/Shaders/**/*.js
/Source/Workers/**
!/Source/Workers/cesiumWorkerBootstrapper.js
!/Source/Workers/transferTypedArrayTest.js
!/Source/Workers/package.json

Source/ThirdParty/_commonjsHelpers*
Source/ThirdParty/draco_decoder.wasm
Source/ThirdParty/Workers/draco_decoder_nodejs.js
Source/ThirdParty/Workers/pako_inflate.min.js
Source/ThirdParty/Workers/pako_deflate.min.js
Source/ThirdParty/Workers/z-worker-pako.js

/Tools/jsdoc/cesium_template/static/javascript/prism.js
/Tools/jsdoc/cesium_template/static/styles/prism.css
Expand Down
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@
/Build/Sandcastle
/Build/Specs
/Cesium-*.zip
/cesium-engine-*.tgz
/cesium-widgets-*.tgz
/Documentation
/build.js
/favicon.ico
/gulpfile.js
/index.html
/index.release.html
/launches
/packages/
/server.js
/Source/copyrightHeader.js
/Specs
Expand Down
25 changes: 17 additions & 8 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
!.vscode/**/
!Apps/**/
!Documentation/**/
!Source/**/
!packages/**/
!Specs/**/
!Tools/**/

Expand All @@ -20,16 +20,25 @@
!**/*.ts

# Re-ignore a few things caught above

**/*.min.js
Source/Cesium.js
Source/Scene/GltfPipeline/**
Source/Shaders/**/*.js
Source/ThirdParty/**
Source/Workers/**/*

packages/engine/Build/**
packages/engine/index.js
packages/engine/Source/Scene/GltfPipeline/**
packages/engine/Source/Shaders/**/*.js
packages/engine/Source/ThirdParty/**
packages/engine/Source/Workers/**/*
!packages/engine/Source/Workers/cesiumWorkerBootstrapper.js
!packages/engine/Source/Workers/transferTypedArrayTest.js

packages/widgets/Build/**
packages/widgets/index.js
packages/widgets/Source/ThirdParty/**

Specs/jasmine/**

Apps/Sandcastle/ThirdParty
Tools/jsdoc/cesium_template/static/javascript/prism.js
Tools/jsdoc/cesium_template/static/styles/prism.css

!Source/Workers/cesiumWorkerBootstrapper.js
!Source/Workers/transferTypedArrayTest.js
24 changes: 14 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ notifications:
secure: JKzk2sJSbZ9h2PUVWj6KtOAdFbEEnOtv/VZy05pJ2H41xRgUHiGdtMW/vMSeq6XX3IJN8eW2zd0cJTgkFn0ioAlYvID8zRhcvkFHg60QXquoqtp5y65dxjtVz79hefxSo7FO1NhMZBQWE9Tg6R7XkoyTMth62+T9vqOgu2Hms6M=
if: (branch = main) AND (type = push)
on_success: change # default: always
script:
- ./travis/prepare.sh
- npm --silent run deploy-status -- --status pending --message 'Waiting for build'
jobs:
include:
- stage:
name: "Linting, Coverage, Deployment"
script:
- ./travis/prepare.sh
- npm --silent run deploy-status -- --status pending --message 'Waiting for build'
- npm --silent run eslint
- npm --silent run markdownlint
- npm --silent run prettier-check
- ./travis/release.sh
- ./travis/deploy.sh
- name: "Release Tests"
script: ./travis/test-release.sh

- npm --silent run eslint
- npm --silent run markdownlint
- npm --silent run prettier-check

- ./travis/release.sh
- ./travis/deploy.sh
- ./travis/verify.sh
121 changes: 121 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,116 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "start via NPM",
"request": "launch",
"runtimeArgs": [
"run-script",
"test"
],
"runtimeExecutable": "npm",
"skipFiles": [
"<node_internals>/**"
],
"type": "node"
},
{
"name": "Launch build widgets via NPM",
"request": "launch",
"runtimeArgs": [
"run-script",
"build",
"-w",
"@cesium/widgets"
],
"runtimeExecutable": "npm",
"skipFiles": [
"<node_internals>/**"
],
"type": "node"
},
{
"name": "Launch via NPM",
"request": "launch",
"runtimeArgs": [
"run-script",
"test",
"-w",
"@cesium/engine"
],
"runtimeExecutable": "npm",
"skipFiles": [
"<node_internals>/**"
],
"type": "node"
},
{
"name": "Launch build engine via NPM",
"request": "launch",
"runtimeArgs": [
"run-script",
"build",
"-w",
"@cesium/engine"
],
"runtimeExecutable": "npm",
"skipFiles": [
"<node_internals>/**"
],
"type": "node"
},
{
"args": [
"buildEngine"
],
"name": "Gulp task - buildEngine",
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
"request": "launch",
"cwd": "${workspaceFolder}/packages/engine",
"skipFiles": [
"<node_internals>/**"
],
"type": "node"
},
{
"args": [
"build",
"--workspaces"
],
"name": "Gulp task - build - workspaces",
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
"request": "launch",
"skipFiles": [
"<node_internals>/**"
],
"type": "node"
},
{
"args": [
"build"
],
"name": "Gulp task - build",
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
"request": "launch",
"skipFiles": [
"<node_internals>/**"
],
"type": "node"
},
{
"args": [
"build-ts",
"-w",
"@cesium/widgets"
],
"name": "Gulp task - build-ts",
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
"request": "launch",
"skipFiles": [
"<node_internals>/**"
],
"type": "node"
},
{
"type": "node",
"request": "launch",
Expand All @@ -21,6 +131,17 @@
"type": "pwa-chrome",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
},
{
"type": "chrome",
"request": "attach",
"name": "Attach Karma Chrome",
"address": "localhost",
"port": 9333,
"pathMapping": {
"/": "${workspaceRoot}/",
"/base/": "${workspaceRoot}/"
}
}
]
}
2 changes: 1 addition & 1 deletion Apps/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "../Source/.eslintrc.json"
"extends": "../packages/.eslintrc.json"
}
2 changes: 1 addition & 1 deletion Apps/HelloWorld.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
/>
<title>Hello World!</title>
<script src="../Build/CesiumUnminified/Cesium.js"></script>
<script src="../Build/Cesium.js"></script>
<style>
@import url(../Build/CesiumUnminified/Widgets/widgets.css);
html,
Expand Down
52 changes: 29 additions & 23 deletions Documentation/Contributors/ReleaseGuide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,37 +21,43 @@ There is no release manager; instead, our community shares the responsibility. A
3. Make sure you are using the latest drivers for your video card.
4. Pull down the latest `main` branch.
5. Update the Cesium ion demo token in `Ion.js` with a new token from the CesiumJS ion team account with read and geocode permissions. These tokens are named like this: `1.85 Release - Delete on November 1st, 2021`. Delete the token from 2 releases ago.
6. Proofread [CHANGES.md](../../../CHANGES.md) with the date of the release. Adjust the order of changes so that prominent/popular changes come first.
7. Update the version in `package.json` to match, e.g. `1.14.0` -> `1.15.0`.
8. Commit these changes.
9. Make sure the repository is clean `git clean -d -x -f`. **This will delete all files not already in the repository.**
10. Run `npm install`.
11. Make sure `ThirdParty.json` is up to date by running `npm run build-third-party`. If there are any changes, verify and commit them.
12. Create the release zip `npm run make-zip`.
13. Run tests against the release `npm run test -- --failTaskOnError --release`. Test **in all browsers** with the `--browsers` flag (i.e. `--browsers Firefox,Chrome`). Alternatively, test with the browser Spec Runner by starting a local server (`npm start`) and browsing to http://localhost:8080/Specs/SpecRunner.html?built=true&release=true.
14. Unpack the release zip to the directory of your choice and start the server by running `npm install` and then `npm start`
15. Browse to http://localhost:8080 and confirm that the home page loads as expected and all links work.
16. Verify that the [documentation](http://localhost:8080/Build/Documentation/index.html) built correctly
17. Make sure [Hello World](http://localhost:8080/Apps/HelloWorld.html) loads.
18. Make sure [Cesium Viewer](http://localhost:8080/Apps/CesiumViewer/index.html) loads.
19. Run [Sandcastle](http://localhost:8080/Apps/Sandcastle/index.html) on the browser of your choice (or multiple browsers if you are up for it). Switch to the `All` tab and run through every demo to make sure they all work. Actually play with each of the buttons and sliders on each demo to ensure everything works as expected.
20. If any of the above steps fail, post a message to the `#cesiumjs` channel in Slack to figure out what needs to be fixed before we can release. **Do NOT proceed to the next step until issues are resolved.**
21. Push your commits to main
6. Proofread [`CHANGES.md`](../../../CHANGES.md) with the date of the release. Adjust the order of changes so that prominent/popular changes come first. Ensure each change is in the section for the relevant workspace.
7. Based on `CHANGES.md`, update each workspace version following the rules of [semantic versioning](https://semver.org/), e.g.,
- `npm version minor -w @cesium/engine --no-git-tag-version`
- If there are no changes, skip updating the workspace version.
8. Update the version in `package.json` to match, e.g. `1.14.0` -> `1.15.0`.
9. Commit these changes.
10. Make sure the repository is clean `git clean -d -x -f`. **This will delete all files not already in the repository.**
11. Run `npm install`.
12. Make sure `ThirdParty.json` is up to date by running `npm run build-third-party`. If there are any changes, verify and commit them.
13. Create the release zip `npm run make-zip`.
14. Run tests against the release `npm run test -- --failTaskOnError --release`. Test **in all browsers** with the `--browsers` flag (i.e. `--browsers Firefox,Chrome`). Alternatively, test with the browser Spec Runner by starting a local server (`npm start`) and browsing to http://localhost:8080/Specs/SpecRunner.html?built=true&release=true.
15. Unpack the release zip to the directory of your choice and start the server by running `npm install` and then `npm start`
16. Browse to http://localhost:8080 and confirm that the home page loads as expected and all links work.
17. Verify that the [documentation](http://localhost:8080/Build/Documentation/index.html) built correctly
18. Make sure [Hello World](http://localhost:8080/Apps/HelloWorld.html) loads.
19. Make sure [Cesium Viewer](http://localhost:8080/Apps/CesiumViewer/index.html) loads.
20. Run [Sandcastle](http://localhost:8080/Apps/Sandcastle/index.html) on the browser of your choice (or multiple browsers if you are up for it). Switch to the `All` tab and run through every demo to make sure they all work. Actually play with each of the buttons and sliders on each demo to ensure everything works as expected.
21. If any of the above steps fail, post a message to the `#cesiumjs` channel in Slack to figure out what needs to be fixed before we can release. **Do NOT proceed to the next step until issues are resolved.**
22. Push your commits to main
- `git push`
22. Create and push a [tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging), e.g.,
23. Create and push a [tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging), e.g.,
- `git tag -a 1.1 -m "1.1 release"`
- `git push origin 1.1` (this assumes origin is the primary cesium repository, do not use `git push --tags` as it pushes all tags from all remotes you have on your system.)
23. Publish the release zip file to GitHub
24. Publish the release zip file to GitHub
- https://github.com/CesiumGS/cesium/releases/new
- Select the tag you use pushed
- Enter 'CesiumJS 1.xx' for the title
- Include date, list of highlights and link to CHANGES.md (https://github.com/CesiumGS/cesium/blob/1.xx/CHANGES.md) as the description
- Look at a [previous release](https://github.com/CesiumGS/cesium/releases/tag/1.79) for an example. Don't use emoji, headings, or other formatting
- Attach the `Cesium-1.xx` release zip file
- Publish the release
24. Publish to npm by running `npm publish` in the repository root (not the unzipped file directory) (the first time you do this, you will need to authorize the machine using `npm adduser`)
25. Check out the `cesium.com` branch. Merge the new release tag into the `cesium.com` branch `git merge origin <tag-name>`. CI will deploy the hosted release, Sandcastle, and the updated doc when you push the branch up.
26. After the `cesium.com` branch is live on cesium.com, comment in the `#comms-chat` slack channel to notify comms that the release is done so they can add these highlights and publish the monthly blog post
25. Publish to npm by running `npm publish` in the repository root (not the unzipped file directory) (the first time you do this, you will need to authorize the machine using `npm adduser`)
26. Use `npm publish -w <WORKSPACE>` in the repository root (not the unzipped file directory) to publish the workspace. Repeat this step for each **updated** workspace, in the following order:
- `npm publish -w @cesium/engine`
- `npm publish -w @cesium/widgets`
27. Check out the `cesium.com` branch. Merge the new release tag into the `cesium.com` branch `git merge origin <tag-name>`. CI will deploy the hosted release, Sandcastle, and the updated doc when you push the branch up.
28. After the `cesium.com` branch is live on cesium.com, comment in the `#comms-chat` slack channel to notify comms that the release is done so they can add these highlights and publish the monthly blog post
- Note, it may take a little while for the new version of CesiumJS to be live on cesium.com (~30 minutes after the branch builds). You can check the version of Cesium in [sandcastle](https://sandcastle.cesium.com/) by looking at the tab above the cesium pane.
27. Update the version of CesiumJS used in the Cesium Workshop: https://github.com/CesiumGS/cesium-workshop/blob/main/index.html#L13-L14
28. Continue to the [Cesium Analytics release](https://github.com/CesiumGS/cesium-analytics/blob/main/Documentation/Contributors/AnalyticsReleaseGuide/README.md)
29. Update the version of CesiumJS used in the Cesium Workshop: https://github.com/CesiumGS/cesium-workshop/blob/main/index.html#L13-L14
30. Continue to the [Cesium Analytics release](https://github.com/CesiumGS/cesium-analytics/blob/main/Documentation/Contributors/AnalyticsReleaseGuide/README.md)
2 changes: 1 addition & 1 deletion Specs/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../Source/.eslintrc.json",
"extends": "../packages/.eslintrc.json",
"env": {
"jasmine": true
},
Expand Down
2 changes: 1 addition & 1 deletion Specs/BadGeometry.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { queryToObject, RuntimeError } from "../../Source/Cesium.js";
import { queryToObject, RuntimeError } from "@cesium/engine";

function BadGeometry() {
this._workerName = "../../Specs/TestWorkers/createBadGeometry";
Expand Down
2 changes: 1 addition & 1 deletion Specs/Cesium3DTilesTester.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
PointCloudShading,
TileBoundingSphere,
RuntimeError,
} from "../../Source/Cesium.js";
} from "@cesium/engine";

import pollToPromise from "./pollToPromise.js";

Expand Down
2 changes: 1 addition & 1 deletion Specs/DomEventSimulator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defaultValue, FeatureDetection } from "../../Source/Cesium.js";
import { defaultValue, FeatureDetection } from "@cesium/engine";

function createMouseEvent(type, options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
Expand Down
2 changes: 1 addition & 1 deletion Specs/ImplicitTilingTester.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defined, defaultValue } from "../Source/Cesium.js";
import { defined, defaultValue } from "@cesium/engine";
import concatTypedArrays from "./concatTypedArrays.js";
import MetadataTester from "./MetadataTester.js";

Expand Down
Loading