Thanks to visit codestin.com
Credit goes to github.com

Skip to content

refactor: Move package.json and other front-end collateral into 'site' #128

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

Merged
merged 5 commits into from
Feb 1, 2022

Conversation

bryphe-coder
Copy link
Contributor

This refactors the front-end collateral to all live within site - so no package.json at the root.

The reason we had this initially is that the jest test run and NextJS actually require having two different tsconfigs - Next needs jsx:"preserve", while jest needs jsx:"react" - we were using tsconfigs at different levels at the hierarchy to manage this.

I changed this behavior to still use two different tsconfig.jsons, which is mandatory - but just side-by-side in site.

Once that's fixed, it was easy to move everything into site

Follow up from: #118 (comment)

@bryphe-coder bryphe-coder changed the title refactor: Move package.json and other front-end collateral into site/ refactor: Move package.json and other front-end collateral into 'site' Feb 1, 2022
@bryphe-coder bryphe-coder self-assigned this Feb 1, 2022
@@ -78,8 +78,8 @@ const ProjectPage: React.FC = () => {
<div className={styles.root}>
<Navbar user={me} onSignOut={signOut} />
<Header
title={firstOrItem(project)}
description={firstOrItem(organization)}
title={firstOrItem(project, "")}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There were a couple places where the type-checks became stricter! I figured it was easier to leave them on in the stricter mode, and fix them, then to figure out how to turn them off

Copy link
Member

Choose a reason for hiding this comment

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

Yup, agreed!

@codecov
Copy link

codecov bot commented Feb 1, 2022

Codecov Report

Merging #128 (e62914c) into main (3ba8242) will decrease coverage by 1.11%.
The diff coverage is 28.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #128      +/-   ##
==========================================
- Coverage   71.66%   70.54%   -1.12%     
==========================================
  Files          92       96       +4     
  Lines        4168     4254      +86     
  Branches       59       68       +9     
==========================================
+ Hits         2987     3001      +14     
- Misses        935     1010      +75     
+ Partials      246      243       -3     
Flag Coverage Δ
unittest-go-macos-latest 68.22% <ø> (+0.60%) ⬆️
unittest-go-ubuntu-latest 70.01% <ø> (-0.25%) ⬇️
unittest-go-windows-latest 68.22% <ø> (+0.72%) ⬆️
unittest-js 64.62% <28.57%> (-10.11%) ⬇️
Impacted Files Coverage Δ
site/components/ErrorSummary/index.tsx 60.00% <0.00%> (-40.00%) ⬇️
site/jest-runner.eslint.config.js 0.00% <ø> (ø)
site/jest.config.js 0.00% <0.00%> (ø)
.../pages/projects/[organization]/[project]/index.tsx 0.00% <ø> (ø)
site/util/array.ts 66.66% <50.00%> (-33.34%) ⬇️
provisionerd/provisionerd.go 75.67% <0.00%> (-1.09%) ⬇️
site/pages/projects/index.tsx 0.00% <0.00%> (ø)
peerbroker/listen.go 84.80% <0.00%> (+2.39%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3ba8242...e62914c. Read the comment docs.

@bryphe-coder bryphe-coder merged commit 78e652a into main Feb 1, 2022
@bryphe-coder bryphe-coder deleted the bryphe/refactor/package-to-site branch February 1, 2022 21:34
bryphe-coder added a commit that referenced this pull request Feb 1, 2022
…json (#133)

Missed in #128 - need to update the `dependabot.yml` to point to the correct package.json, which was moved from `/package.json` -> `/site/package.json`
bryphe-coder added a commit that referenced this pull request Feb 1, 2022
…139)

Unfortunately along with #133 I missed one other item in moving files to `/site` in #128 - ignoring new configuration files (and other folders) in our `jest.config.js`.

This caused our coverage numbers in front-end code to dip, because files that shouldn't be included (and previously weren't included) were now being tracked for coverage.
bryphe-coder added a commit that referenced this pull request Feb 2, 2022
Hopefully the last thing I missed in #128 ... this fixes the `./develop.sh` script and `site/dev.ts` to account for the new pathing of `package.json`.
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.

2 participants