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

using nx/js plugin to manage tsc tasks and deps #9530

Merged
merged 6 commits into from
Nov 15, 2024
Merged

Conversation

fungairino
Copy link
Collaborator

@fungairino fungairino commented Nov 15, 2024

What does this PR do?

  • Installs and configures the nx/js plugin to manage and update our build and typecheck tsc tasks
  • Locally running npm run build and npm run typecheck works

Future Work

  • We could probably refactor the build and watch commands in the extension to not need concurrently since nx could handle that for us.

Copy link

codecov bot commented Nov 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.81%. Comparing base (8318d74) to head (ecb8c8d).
Report is 517 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9530      +/-   ##
==========================================
+ Coverage   74.24%   75.81%   +1.56%     
==========================================
  Files        1332     1429      +97     
  Lines       40817    43176    +2359     
  Branches     7634     7948     +314     
==========================================
+ Hits        30306    32735    +2429     
+ Misses      10511    10441      -70     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines +2 to +8
"targets": {
"build": {
"outputs": ["{workspaceRoot}/dist"],
"cache": true,
"dependsOn": ["^build"]
}
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is here to tell nx to cache the extension project's build task (since it overrides the workspace one provided by the nx/js plugin)

Comment on lines -10 to -11
"build": "tsc --build",
"build:typecheck": "tsc --build"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

these two are now provided by the "nx/js" plugin

package.json Outdated
Comment on lines 14 to 15
"build:typecheck": "nx typecheck",
"typecheck": "nx typecheck",
Copy link
Collaborator Author

@fungairino fungairino Nov 15, 2024

Choose a reason for hiding this comment

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

"nx/js" calls its task "typecheck".

Temporarily keeping "build:typecheck" so we don't break vercel deployments in this PR (although technically I could rename it to build:typecheck with the targetName option)

Copy link
Contributor

@twschiller twschiller Nov 15, 2024

Choose a reason for hiding this comment

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

Temporarily keeping "build:typecheck" so we don't break vercel deployments in this PR (although technically I could rename it to build:typecheck with the targetName option)

I think it's worth just making the change now vs. requiring a FLUP. There are no urgent PRs in the queue / we can always merge without vercel passing

@fungairino
Copy link
Collaborator Author

Large lock file is ok I think. swc and nx have a lot of dependencies

@fungairino fungairino marked this pull request as ready for review November 15, 2024 21:19
@twschiller twschiller added this to the 2.2.1 milestone Nov 15, 2024
Copy link

github-actions bot commented Nov 15, 2024

Playwright test results

passed  151 passed
flaky  3 flaky
skipped  2 skipped

Details

report  Open report ↗︎
stats  156 tests across 51 suites
duration  11 minutes, 22 seconds
commit  ecb8c8d
info  For more information on how to debug and view this report, see our readme

Flaky tests

chrome › tests/pageEditor/brickActions.spec.ts › brick actions panel behavior
msedge › tests/runtime/sidebar/sidebarController.spec.ts › sidebar controller › shows focus dialog in top-level frame
chrome › tests/smoke/floatingActionButton.spec.ts › sidebar page smoke test › can toggle the sidebar from the floating action button and view the related mod's sidebar panel

Skipped tests

chrome › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options
msedge › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options

Copy link

⚠️ Large diff for package-lock.json

There are 1489 line changes in package-lock.json. This should not happen unless you're updating a lot of dependencies at once. Regenerating the lockfile should not be necessary.

If you're seeing Vercel deployment failures, this is likely the cause.

Run these commands to reset these changes:

git checkout origin/main -- package-lock.json
npm install

You might want to click on "Update branch" first so that the results are accurate.

Copy link

No loom links were found in the first post. Please add one there if you'd like to it to appear on Slack.

Do not edit this comment manually.

@fungairino fungairino enabled auto-merge (squash) November 15, 2024 21:56
@fungairino fungairino merged commit b77b4d9 into main Nov 15, 2024
24 of 25 checks passed
@fungairino fungairino deleted the nx-js-plugin branch November 15, 2024 22:18
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.

3 participants