Skip to content

Merge studio web into the monorepo itself#72

Merged
joanise merged 221 commits intomainfrom
dev.merge-studio-web
Feb 6, 2023
Merged

Merge studio web into the monorepo itself#72
joanise merged 221 commits intomainfrom
dev.merge-studio-web

Conversation

@joanise
Copy link
Copy Markdown
Member

@joanise joanise commented Feb 6, 2023

I think this is ready to become our new main branch, as is.

Please review but do not merge: I want to do a fast-forward merge from the CLI, any other way to merge this particular PR risks creating an absolute mess of the repo.

Done:

  • replaced the Studio-Web submodule by the packages/studio-web subdirectory
  • merged the histories so we have a trace of both original repos - this repo now has two unrelated initial commits, I hope that doesn't get to confusing
  • CI works from the monorepo
  • commitlint activated globally
  • Aidan already had the studio-web published from the monorepo with the submodule, so that should keep working with the subdirectory
  • running tests is now uniform and well documented

Still TODO (and I think it's OK to do these after merging the PR):

  • fix the publication of studio-web to npm from here instead of from the Studio-Web repo (n/a, Studio-Web is deployed, not published)
  • activate pretty-quick auto formatting -- eventually -- I still think it's too early to do it because we have branches to rebase and merge and applying pretty-quick everywhere now will make that impossible
  • the top level needs a LICENSE file and we need to figure out the correct Copyright statement to put there.

@roedoejet and @dhdaines if you can review this, that would be great, and then I'd like to forward-forward merge this into main soon so future development will continue from here.

@joanise joanise requested review from dhdaines and roedoejet February 6, 2023 17:08
@dhdaines
Copy link
Copy Markdown
Collaborator

dhdaines commented Feb 6, 2023

Basic build and run works well for me - we may wish to include a note to remove packages/Studio-Web when updating for people with case-sensitive filesystems, since testing will break otherwise.

Comment thread README.md Outdated
Comment thread packages/studio-web/.github/workflows/codeql.yml Outdated
@dhdaines
Copy link
Copy Markdown
Collaborator

dhdaines commented Feb 6, 2023

getting a lot of these when running nx test:once web-component:

     AssertionError: Timed out retrying after 4000ms: Expected the subject to host a shadow root, but never found it.
https://on.cypress.io/shadow

@joanise
Copy link
Copy Markdown
Member Author

joanise commented Feb 6, 2023

getting a lot of these when running nx test:once web-component:

     AssertionError: Timed out retrying after 4000ms: Expected the subject to host a shadow root, but never found it.
https://on.cypress.io/shadow

I get those errors if I don't first launch nx serve web-component in a separate window.

Unfortunately, no, I still don't have a single-call command to test web-component... (Well, we do, there's a "test" script in packages/web-component/package.json, but it's broken at the moment.)

@dhdaines
Copy link
Copy Markdown
Collaborator

dhdaines commented Feb 6, 2023

I get those errors if I don't first launch nx serve web-component in a separate window.

Ah, okay, yes, I have to serve the test data and the web-component (and remember to killall node before so it gets the right port number). Now it works.

Copy link
Copy Markdown
Collaborator

@dhdaines dhdaines left a comment

Choose a reason for hiding this comment

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

This works at least as well as it did before, I approve

Copy link
Copy Markdown
Collaborator

@roedoejet roedoejet left a comment

Choose a reason for hiding this comment

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

Awesome @joanise !

@joanise
Copy link
Copy Markdown
Member Author

joanise commented Feb 6, 2023

To document the general approach used in merging:

In a fresh Studio-Web clone:

git checkout -b dev.move-to-monorepo
mkdir packages/Studio-Web
git mv -k * packages/Studio-Web
git mv -k .github .gitignore .husky .prettierignore packages/Studio-Web

make sure the only changes are a long list of renamed: files. And make sure there are no files left.

git commit -a -m'refactor: move all Studio-Web files to their future monorepo location'

Go to Web-Component on branch

git checkout -b dev.merge-studio-web
git remote add sw git@github.com:ReadAlongs/Studio-Web.git
get fetch sw
git merge --allow-unrelated-histories sw/dev.dev.move-to-monorepo

A bunch more adjustments were required, but those are all in separate commits, so see the commit logs for more details.

@joanise joanise merged commit de3c7f3 into main Feb 6, 2023
@joanise joanise deleted the dev.merge-studio-web branch February 6, 2023 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants