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

fix(js): Configure typescript plugin to handle non-buildable libs #29393

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

ndcunningham
Copy link
Contributor

Current Behavior

Currently, we are excluding non-buildable libs from the @nx/js/typescript plugin. Although that allows non-buildable projects from have the build target being inferred it also as a side-effect removes the typecheck target which is unintended. Additionally, to breaks the pattern of being self containment that TS project solutions brings as we were modifying the root nx.json

Expected Behavior

  1. Non-buildable libs should not have a build target.
  2. Non-buildable libs should have the typecheck target.
  3. Buildable libs remain unchanged and should have both a build and typecheck target.
  4. Remove the exclude from nx.json for non-buildable libs.

Related Issue(s)

Fixes #

@ndcunningham ndcunningham self-assigned this Dec 17, 2024
@ndcunningham ndcunningham requested review from a team as code owners December 17, 2024 22:45
@ndcunningham ndcunningham requested a review from jaysoo December 17, 2024 22:45
Copy link

vercel bot commented Dec 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Dec 18, 2024 7:14pm

Copy link

nx-cloud bot commented Dec 17, 2024

Your CI Pipeline Execution ↗ for commit dc54037 is in progress ⏳

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 20m 52s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 20s View ↗
nx-cloud record -- nx format:check --base=d05f3... ✅ Succeeded 2s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded <1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗
nx documentation --no-dte ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2024-12-18 19:37:20 UTC

@ndcunningham ndcunningham marked this pull request as draft December 18, 2024 00:31
@ndcunningham ndcunningham force-pushed the fix/ts-js-exclude branch 5 times, most recently from 4aa24c4 to e87bd5c Compare December 18, 2024 16:35
@ndcunningham ndcunningham marked this pull request as ready for review December 18, 2024 16:53
@jaysoo jaysoo merged commit a675bd2 into master Dec 18, 2024
6 checks passed
@jaysoo jaysoo deleted the fix/ts-js-exclude branch December 18, 2024 20:20
ndcunningham added a commit that referenced this pull request Dec 20, 2024
…9393)

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->
Currently, we are excluding non-buildable libs from the
`@nx/js/typescript` plugin. Although that allows non-buildable projects
from have the build target being inferred it also as a side-effect
removes the `typecheck` target which is unintended. Additionally, to
breaks the pattern of being self containment that TS project solutions
brings as we were modifying the root `nx.json`

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
1. Non-buildable libs should not have a build target.
2. Non-buildable libs should have the typecheck target.
3. Buildable libs remain unchanged and should have both a build and
typecheck target.
4. Remove the `exclude` from `nx.json` for non-buildable libs.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
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