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

Convert JS package to yarn workspace #5160

Merged
merged 11 commits into from
Feb 14, 2024
Merged

Conversation

jprochazk
Copy link
Member

@jprochazk jprochazk commented Feb 9, 2024

What

  • Move web-viewer-react package into its own folder at the same level as web-viewer
  • Add a root package.json in rerun_js with workspaces property pointing at the two packages
  • Update CI to use workspaces

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!

@jprochazk jprochazk added 🕸️ web regarding running the viewer in a browser 🧑‍💻 dev experience developer experience (excluding CI) exclude from changelog PRs with this won't show up in CHANGELOG.md labels Feb 9, 2024
@jprochazk jprochazk marked this pull request as draft February 9, 2024 11:28
@jprochazk jprochazk marked this pull request as ready for review February 13, 2024 20:28
@teh-cmc teh-cmc self-requested a review February 14, 2024 07:47
@@ -165,6 +167,17 @@ pub fn build(profile: Profile, target: Target, build_dir: &Utf8Path) -> anyhow::
if profile == Profile::Release {
eprintln!("Optimizing wasm with wasm-opt…");

if !std::process::Command::new("wasm-opt")
Copy link
Member

@teh-cmc teh-cmc Feb 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command and the one below should really just be using Command::output and dump the child's stderr if !success().

That will also make the code much simpler.

@jprochazk jprochazk merged commit c7f415e into main Feb 14, 2024
40 checks passed
@jprochazk jprochazk deleted the jan/js-pkg-in-npm-workspace branch February 14, 2024 10:56
jprochazk added a commit that referenced this pull request Feb 21, 2024
### What

- [x] Move `web-viewer-react` package into its own folder at the same
level as `web-viewer`
- [x] Add a root `package.json` in `rerun_js` with `workspaces` property
pointing at the two packages
- [x] Update CI to use workspaces

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using newly built examples:
[app.rerun.io](https://app.rerun.io/pr/5160/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/5160/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[app.rerun.io](https://app.rerun.io/pr/5160/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!

- [PR Build Summary](https://build.rerun.io/pr/5160)
- [Docs
preview](https://rerun.io/preview/af65e980271dd584decd5ac1934443dd6a9fb86d/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/af65e980271dd584decd5ac1934443dd6a9fb86d/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧑‍💻 dev experience developer experience (excluding CI) exclude from changelog PRs with this won't show up in CHANGELOG.md 🕸️ web regarding running the viewer in a browser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants