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

Scripts: Improve check task to allow for running with linking #23498

Merged
merged 6 commits into from
Jul 19, 2023

Conversation

ndelangen
Copy link
Member

@ndelangen ndelangen commented Jul 18, 2023

What I did

I was annoyed by the fact I could only run nr task check with --no-link.

So by calling tsc's node apis and manually filtering diagnostic messages to only those coming from the cwd, I was able to get exactly this!

This also opens up the option of adding different "check" actions, such as #knip maybe.

I was also considering some check actions like https://www.npmjs.com/package/check-peer-dependencies or https://github.com/rwjblue/validate-peer-dependencies

The CI still runs the check task with --no-link.

How to test

  • checkout this branch
  • run yarn task check -s compile
  • expect some packages to get skipped, this is expected: vue & svelte use some custom tsc clone, and I didn't want to invest time there.

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli/src/sandbox-templates.ts
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "build", "documentation", "maintenance", "dependencies", "other"]

@ndelangen ndelangen self-assigned this Jul 18, 2023
@ndelangen ndelangen requested review from tmeasday and yannbf July 18, 2023 19:30
@ndelangen ndelangen added build Internal-facing build tooling & test updates ci:normal patch:no labels Jul 18, 2023
@ndelangen ndelangen requested a review from kasperpeulen July 18, 2023 19:37
Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

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

Nice!

@ndelangen ndelangen merged commit 8356877 into release/7.2 Jul 19, 2023
@ndelangen ndelangen deleted the norbert/improve-check-script branch July 19, 2023 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Internal-facing build tooling & test updates ci:normal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants