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: typescript build cleaning and type generation #18775

Merged
merged 16 commits into from
Nov 15, 2023

Conversation

innerdvations
Copy link
Contributor

@innerdvations innerdvations commented Nov 13, 2023

What does it do?

  • cleans the dist directory before each build
  • develop command builds ignoring errors to allow types to generate
  • adds Math.ceil() on all displayed timings instead of showing float decimals

Note: This PR does not change types generation on startup, meaning that manual schema changes still require a yarn strapi ts:generate-types before starting the server

Why is it needed?

Currently using the CTB with a typescript project, creating a new content type causes the server to become unable to start up again without manually running ts:generate-types

Additionally, the dist dir was not being cleaned, meaning that old content types would appear in the CTB until the dist folder was cleaned manually.

How to test it?

Create and delete new content types with the CTB. Now it should work and the server should restart, new content types should appear, and old deleted content types should no longer appear.

Related issue(s)/PR(s)

Fixes #18738

@innerdvations innerdvations added pr: fix This PR is fixing a bug source: typescript Source is related to TypeScript (typings, tooling, ...) labels Nov 13, 2023
@innerdvations innerdvations added this to the 4.15.5 milestone Nov 13, 2023
@innerdvations innerdvations self-assigned this Nov 13, 2023
Copy link
Contributor

Size Change: 0 B

Total Size: 645 kB

ℹ️ View Unchanged
Filename Size
examples/getstarted/build/bb4d0d527bdfb161bc5a.svg 2.33 kB
examples/getstarted/build/index.html 609 B
examples/getstarted/build/main.********.js 638 kB
examples/getstarted/build/runtime~main.********.js 4.27 kB

compressed-size-action

packages/core/admin/_internal/node/utils.ts Outdated Show resolved Hide resolved
packages/utils/pack-up/packup.config.ts Outdated Show resolved Hide resolved
packages/utils/pack-up/package.json Outdated Show resolved Hide resolved
packages/core/admin/_internal/node/develop.ts Outdated Show resolved Hide resolved
Copy link
Member

@joshuaellis joshuaellis left a comment

Choose a reason for hiding this comment

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

Thanks Ben ⭐

Copy link
Member

@Convly Convly left a comment

Choose a reason for hiding this comment

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

🚀

@alexandrebodin alexandrebodin merged commit 50a9907 into releases/4.15.5 Nov 15, 2023
18 of 19 checks passed
@alexandrebodin alexandrebodin deleted the fix/ts-generation branch November 15, 2023 15:35
@edgardoll4
Copy link

Hello, when does version 4.15.5 come out with the fixes?

@Convly
Copy link
Member

Convly commented Dec 1, 2023

@edgardoll4 it has been released last Wednesday

https://github.com/strapi/strapi/releases/tag/v4.15.5

@ITSurgeon
Copy link

ITSurgeon commented Dec 14, 2023

should I add RUN yarn strapi ts:generate-types to Dockerfile and - ./types:/opt/app/types to volumes: in docker-compose.yml ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: fix This PR is fixing a bug source: typescript Source is related to TypeScript (typings, tooling, ...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants