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: exclude *.test.*-files in build outputs #4417

Merged
merged 7 commits into from
May 25, 2023
Merged

Conversation

KATT
Copy link
Member

@KATT KATT commented May 25, 2023

Excludes test files in build outputs

To test this I did

p codegen:entrypoints -- no-cache
# in `packages/next`:
npm pack && tar -xvzf *.tgz && rm -rf package *.tgz

@KATT KATT requested a review from a team as a code owner May 25, 2023 11:27
@vercel
Copy link

vercel bot commented May 25, 2023

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

Name Status Preview Comments Updated (UTC)
next-prisma-starter ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 25, 2023 0:22am
og-image ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 25, 2023 0:22am
www ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 25, 2023 0:22am

package.json Outdated
@@ -22,6 +22,7 @@
"lint-prune": "! ts-prune | grep -v \"used in module\"",
"clean": "find . -name node_modules -o -name .turbo -o -name .next -o -name dist -type d -prune | xargs rm -rf",
"codegen:override-prisma": "tsx scripts/addPrismaOverrides.ts",
"codegen:entrypoints": "turbo --filter=\"@trpc/*\" codegen:entrypoints",
Copy link
Member Author

Choose a reason for hiding this comment

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

I am stupid and don't understand turbo completely, but in order to trigger this I had to do p codegen:entrypoints -- no-cache.

Not sure if this should even be here or if it should just be magically triggered 😅

Copy link
Member

Choose a reason for hiding this comment

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

it should be triggered automatically on build

Copy link
Member

Choose a reason for hiding this comment

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

That is what this says - each build script depends on the codegen:entrypoint task in that package

CleanShot 2023-05-25 at 13 34 58@2x

for reference if you would do ^codegen:entrypoints the build would depend on the task in all of it's dependencies, so client:build would depend on server:codegen:entrypoints

Copy link
Member

@juliusmarminge juliusmarminge May 25, 2023

Choose a reason for hiding this comment

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

maybe package.json should be in the outputs too actually - that's probably why it didn't trigger for you since the outputs were intact

package.json Outdated
@@ -22,6 +22,7 @@
"lint-prune": "! ts-prune | grep -v \"used in module\"",
"clean": "find . -name node_modules -o -name .turbo -o -name .next -o -name dist -type d -prune | xargs rm -rf",
"codegen:override-prisma": "tsx scripts/addPrismaOverrides.ts",
"codegen:entrypoints": "turbo --filter=\"@trpc/*\" codegen:entrypoints",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"codegen:entrypoints": "turbo --filter=\"@trpc/*\" codegen:entrypoints",

turbo.json Outdated
@@ -1,5 +1,6 @@
{
"$schema": "https://turborepo.org/schema.json",
"globalDependencies": ["tsconfig.json", "scripts/entrypoints.ts"],
Copy link
Member Author

Choose a reason for hiding this comment

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

cc @juliusmarminge this seems to do it - looks good to you?

Copy link
Member

Choose a reason for hiding this comment

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

sure!

Copy link
Member

Choose a reason for hiding this comment

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

im still getting the dev errors though
CleanShot 2023-05-25 at 14 10 55@2x

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, I tried to fix that but got deralied and fixed this instead :D

@KATT KATT merged commit 4a002a0 into main May 25, 2023
33 checks passed
@KATT KATT deleted the exclude-test-files-in-build branch May 25, 2023 12:30
mastondzn added a commit to mastondzn/synopsisbot that referenced this pull request May 28, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@trpc/client](https://trpc.io)
([source](https://togithub.com/trpc/trpc)) | [`10.27.1` ->
`10.28.0`](https://renovatebot.com/diffs/npm/@trpc%2fclient/10.27.1/10.28.0)
|
[![age](https://badges.renovateapi.com/packages/npm/@trpc%2fclient/10.28.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@trpc%2fclient/10.28.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@trpc%2fclient/10.28.0/compatibility-slim/10.27.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@trpc%2fclient/10.28.0/confidence-slim/10.27.1)](https://docs.renovatebot.com/merge-confidence/)
|
| [@trpc/react-query](https://trpc.io)
([source](https://togithub.com/trpc/trpc)) | [`10.27.1` ->
`10.28.0`](https://renovatebot.com/diffs/npm/@trpc%2freact-query/10.27.1/10.28.0)
|
[![age](https://badges.renovateapi.com/packages/npm/@trpc%2freact-query/10.28.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@trpc%2freact-query/10.28.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@trpc%2freact-query/10.28.0/compatibility-slim/10.27.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@trpc%2freact-query/10.28.0/confidence-slim/10.27.1)](https://docs.renovatebot.com/merge-confidence/)
|
| [@trpc/server](https://trpc.io)
([source](https://togithub.com/trpc/trpc)) | [`10.27.1` ->
`10.28.0`](https://renovatebot.com/diffs/npm/@trpc%2fserver/10.27.1/10.28.0)
|
[![age](https://badges.renovateapi.com/packages/npm/@trpc%2fserver/10.28.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@trpc%2fserver/10.28.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@trpc%2fserver/10.28.0/compatibility-slim/10.27.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@trpc%2fserver/10.28.0/confidence-slim/10.27.1)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>trpc/trpc</summary>

### [`v10.28.0`](https://togithub.com/trpc/trpc/releases/tag/v10.28.0)

[Compare
Source](https://togithub.com/trpc/trpc/compare/v10.27.3...v10.28.0)

#### What's Changed

- feat(`client`): allow closing active subscriptions by
[@&#8203;Dealerpriest](https://togithub.com/Dealerpriest) in
[trpc/trpc#4136
- feat(`client`): add ability to call `TRPCProxyClient`-methods with
`.apply()` by [@&#8203;atoy40](https://togithub.com/atoy40) in
[trpc/trpc#3973
- feat(`react-query`): allow optional cursor in `useInfiniteQuery` by
[@&#8203;lithdew](https://togithub.com/lithdew) in
[trpc/trpc#4374
- fix(`*`): exclude `*.test.*`-files in build outputs by
[@&#8203;KATT](https://togithub.com/KATT) in
[trpc/trpc#4417

#### New Contributors

- [@&#8203;atoy40](https://togithub.com/atoy40) made their first
contribution in
[trpc/trpc#3973
- [@&#8203;miguelvelasquezdev](https://togithub.com/miguelvelasquezdev)
made their first contribution in
[trpc/trpc#4341
- [@&#8203;lithdew](https://togithub.com/lithdew) made their first
contribution in
[trpc/trpc#4374

**Full Changelog**:
trpc/trpc@v10.27.3...v10.28.0

### [`v10.27.3`](https://togithub.com/trpc/trpc/releases/tag/v10.27.3)

[Compare
Source](https://togithub.com/trpc/trpc/compare/v10.27.2...v10.27.3)

#### What's Changed

- fix(`react-query`): fix `useInfiniteQuery` `placeholderData` types by
[@&#8203;SSHari](https://togithub.com/SSHari) in
[trpc/trpc#4402

#### New Contributors

- [@&#8203;SSHari](https://togithub.com/SSHari) made their first
contribution in
[trpc/trpc#4402

**Full Changelog**:
trpc/trpc@v10.27.2...v10.27.3

### [`v10.27.2`](https://togithub.com/trpc/trpc/releases/tag/v10.27.2)

[Compare
Source](https://togithub.com/trpc/trpc/compare/v10.27.1...v10.27.2)

#### What's Changed

- fix(`next)`: remove conditional hook in `withTRPC()` by
[@&#8203;KATT](https://togithub.com/KATT) in
[trpc/trpc#4410

**Full Changelog**:
trpc/trpc@v10.27.1...v10.27.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/synopsisgg/bot).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMDIuNCIsInVwZGF0ZWRJblZlciI6IjM1LjEwMi40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants