Skip to content

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

Merged
ndelangen merged 6 commits into
release/7.2from
norbert/improve-check-script
Jul 19, 2023
Merged

Scripts: Improve check task to allow for running with linking#23498
ndelangen merged 6 commits into
release/7.2from
norbert/improve-check-script

Conversation

@ndelangen
Copy link
Copy Markdown
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
Copy Markdown
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