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

build: upgrade to lerna v6 #1011

Merged
merged 7 commits into from Feb 2, 2023
Merged

build: upgrade to lerna v6 #1011

merged 7 commits into from Feb 2, 2023

Conversation

mattrunyon
Copy link
Collaborator

Fixes #864

Lerna v6 comes w/ nx by default. I've setup the caching for build tasks so builds should be faster/cached locally when possible. test could be cached (see here), but we run it in watch mode usually so doesn't make as much sense.

Running npm run build twice in a row should result in the 2nd time taking 1 second or so to cache-hit everything. You can run npm run clean:build and then npm run build again and it will only take a few seconds to restore the output from the cache. npm run clean also cleans the nx cache.

@mattrunyon mattrunyon self-assigned this Jan 12, 2023
@codecov
Copy link

codecov bot commented Jan 12, 2023

Codecov Report

Merging #1011 (7b06137) into main (aeaf940) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1011   +/-   ##
=======================================
  Coverage   41.94%   41.94%           
=======================================
  Files         430      430           
  Lines       32475    32475           
  Branches     8177     8177           
=======================================
  Hits        13622    13622           
  Misses      18800    18800           
  Partials       53       53           
Flag Coverage Δ
unit 41.94% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@mofojed mofojed left a comment

Choose a reason for hiding this comment

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

It looks like npm start doesn't work anymore - something happen with the vite proxy?

package.json Outdated Show resolved Hide resolved
nx.json Show resolved Hide resolved
@mattrunyon
Copy link
Collaborator Author

mattrunyon commented Jan 25, 2023

For now, I've disabled nx until nrwl/nx#14010 is fixed

An alternative would be to change our .env files a bit and use Nx's convention, but name the task development so we can at least get .env, .env.local, and .env.development. Then we have just 1 .env.local file, but it would apply to any task run since Nx doesn't load .env.development.local and Vite won't override the env variable if it's already set when Vite starts

The proxy is broken though if you have BASE_URL set. It needs to rewrite and strip the BASE_URL. I'll make a separate PR to fix this. It never popped up b/c in dev we default to BASE_URL=/ so everything worked out

mofojed
mofojed previously approved these changes Jan 27, 2023
Copy link
Member

@mofojed mofojed left a comment

Choose a reason for hiding this comment

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

I guess we're still checking in the nx.json file even if we're not using it yet so we don't have to rebuild later?

@mattrunyon
Copy link
Collaborator Author

Ya that's what I was thinking since it took some work to properly put together.

There's 1 option that allows us to use nx in its current state which is to change start to development in code-studio package.json scripts. Then we only use .env.local and not .env.development.local until nx can disable loading env files

@mofojed mofojed added this to the February 2023 milestone Jan 31, 2023
@mattrunyon mattrunyon changed the title Upgrade to lerna v6 chore: Upgrade to lerna v6 Feb 1, 2023
@mofojed mofojed changed the title chore: Upgrade to lerna v6 build: Upgrade to lerna v6 Feb 2, 2023
@mofojed
Copy link
Member

mofojed commented Feb 2, 2023

Changed type to build:

build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)

It could be chore but I feel like build is more specific:

chore: Other changes that don't modify src or test files

@mattrunyon mattrunyon changed the title build: Upgrade to lerna v6 build: upgrade to lerna v6 Feb 2, 2023
@mattrunyon mattrunyon merged commit 69266f2 into deephaven:main Feb 2, 2023
@mattrunyon mattrunyon deleted the lerna-v6 branch February 2, 2023 16:41
@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update to Lerna v6
2 participants