Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

Move app to packages/studio-base/src #1017

Merged
merged 2 commits into from Jun 2, 2021
Merged

Move app to packages/studio-base/src #1017

merged 2 commits into from Jun 2, 2021

Conversation

amacneil
Copy link
Contributor

@amacneil amacneil commented May 18, 2021

There are two commits in this PR. The first one is mechanical (rename files) and can be easily recreated. The second commit contains actual code modifications.

Please keep this PR easy to rebase in the future, by amending any code changes to the second commit. Don't add additional commits.

How to rebase this PR (trash and recreate the first commit, then cherry pick the second commit):

# start from a fresh master
git status  # start with a clean local tree
git fetch
git reset --hard origin/main

# create the rename commit
mkdir -p packages/studio-base && \
git mv app packages/studio-base/src && \
git mv packages/studio-base/src/.eslintrc.yaml packages/studio-base/ && \
git mv packages/studio-base/src/*.json packages/studio-base/ && \
git mv packages/studio-base/src/webpack* packages/studio-base/ && \
git mv packages/studio-base/src/Webpack* packages/studio-base/ && \
git commit -m 'Rename files'

# cherry pick the actual code changes
git cherry-pick <sha>  # use the commit sha from the second commit in this PR
# fix any merge conflicts

@amacneil amacneil changed the title Move app to packages/@foxglove/studio-base (with src) Move app to packages/studio-base (with src) May 18, 2021
@defunctzombie defunctzombie marked this pull request as ready for review May 20, 2021 00:17
@amacneil amacneil changed the title Move app to packages/studio-base (with src) Move app to packages/studio-base/src May 20, 2021
@defunctzombie
Copy link
Contributor

@amacneil still planning to land this?


function rewriteSource(source) {
return source.replace(importRegEx, importReplacer);
function rewriteSource(source, sourcePath) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I made a separate PR for these changes so we can minimize the second commit diff.
#1136

@amacneil amacneil force-pushed the roman/the-big-move-src branch 10 times, most recently from 44fbcd0 to bec72b4 Compare June 2, 2021 22:21
@amacneil amacneil force-pushed the roman/the-big-move-src branch 2 times, most recently from 55e14bd to 07be24f Compare June 2, 2021 22:36
@amacneil amacneil merged commit 667ca6a into main Jun 2, 2021
@amacneil amacneil deleted the roman/the-big-move-src branch June 2, 2021 22:50
@@ -43,6 +43,7 @@ export function makeConfig(
resolve: {
extensions: [".js", ".ts", ".jsx", ".tsx"],
alias: {
"@foxglove/studio-base": path.resolve(__dirname, "src"),
Copy link
Member

Choose a reason for hiding this comment

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

Why are these changes needed now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

because we want to avoid the extra src directory in imports. previously this was not needed because the paths exactly matched the folder structure

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants