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

Winter 2022 build update #20

Merged
merged 31 commits into from Nov 11, 2022
Merged

Winter 2022 build update #20

merged 31 commits into from Nov 11, 2022

Conversation

nyonson
Copy link
Contributor

@nyonson nyonson commented Nov 4, 2022

  1. Define internal package dependencies in package.jsons, use a tool to sync to tsconfig
    • https://github.com/azu/monorepo-utils can sync yarn ⇒ ts (package.json to tsconfig.json), including the root solutions tsconfig.json
      • Q: do we still need solutions config paths? Mike reports it helps IDE’s autocomplete so we might have to update by hand to keep that functionality
  2. Move test script to package level
    • package test script is something like tsc --build && jest
      • leverages tsc’s build performance
    • to test monorepo yarn workspaces foreach --topological --parallel run test
      • leverages yarns build performance with parallel and topology flags
    • add new code coverage reporter like https://github.com/ScaCap/code-coverage-assistant
  3. Move lint script to package level
    • package lint script is something like tsc --build && lint
      • leverages tsc’s build performance
    • to test monorepo yarn workspaces foreach --topological --parallel run lint
      • leverages yarns build performance with parallel and topology flags
  4. Define all dependencies on the leaf package level
    • Only actual root level tasks are defined in root (e.g. yarn release), foreach scripts are defined at the leaf package instead of relying on the yarn script wrapper pattern
  5. Only support ESM packages
    • package type module
    • need to use .js extension in import statements

TODO

  • do not publish test files
  • test importing from mash
  • add back paths if necessary

conf/jest/jest.base.js Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
package.json Outdated
"@changesets/cli": "^2.25.0"
"@changesets/cli": "^2.25.0",
"@monorepo-utils/workspaces-to-typescript-project-references": "^2.8.2",
"@types/jest": "^29.2.2",
Copy link
Contributor

Choose a reason for hiding this comment

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

This should probably be in each package 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.

hm, yea, not sure why it got added here

@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2022

Coverage after merging into main

client-sdk73.06%
Coverage Report
FileBranchesFuncsLinesUncovered Lines
src
   IFrame.ts82.35%93.75%96.24%151, 152, 153, 239, 240, 241, 243, 243, 280, 295, 304
   Mash.ts0%0%0%10, 107, 11, 18, 18, 19, 20, 21, 22, 26, 26, 27, 28, 31, 33, 34, 35, 37, 40, 41, 43, 46, 57, 57, 59, 6, 61, 62, 69, 77, 78, 78, 79, 8, 81, 82, 92, 92, 93, 97, 98
   settings.ts100%100%100%
src/rpc
   RPCApi.ts0%0%0%35, 38, 38, 44, 48, 55, 59, 63, 67, 69, 7, 7, 7, 8
   methods.ts100%100%0%1
   targets.ts100%100%0%1

jsonrpc-engine96.67%
Coverage Report
FileBranchesFuncsLinesUncovered Lines
src
   JsonRPC.ts100%100%100%
   JsonRPCEngine.ts80%100%96%63, 65, 66

post-message100.00%
Coverage Report
FileBranchesFuncsLinesUncovered Lines
src
   PostMessageEngine.ts91.30%100%100%47, 84

@nyonson nyonson marked this pull request as ready for review November 8, 2022 20:27
@nyonson nyonson requested a review from a team as a code owner November 8, 2022 20:27
Copy link
Contributor

@mdedys mdedys left a comment

Choose a reason for hiding this comment

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

Just some high level items:

  • Can we update npmignore files to exclude the tests, eslint, tsconfig, and jest config.
  • Confirm monorepo works correctly
  • Add changeset to up the versions of packages.


- name: Post coverage
uses: vebr/jest-lcov-reporter@v0.2.1
uses: eeshdarthvader/code-coverage-assistant@0.1
Copy link
Contributor

Choose a reason for hiding this comment

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

package.json Show resolved Hide resolved
mdedys
mdedys previously approved these changes Nov 11, 2022
@mdedys mdedys merged commit b904d68 into main Nov 11, 2022
@mdedys mdedys deleted the chore/winter-2022-build-update branch November 11, 2022 22:38
@github-actions github-actions bot mentioned this pull request Nov 11, 2022
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.

None yet

2 participants