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

[MISC] Twenty-shared build declaration and declarationMap tsconfig #9838

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

prastoin
Copy link
Contributor

@prastoin prastoin commented Jan 24, 2025

Motivations

By adding the declaration and declaration mapping this allows a better go to source in our IDE
Should also be done for twentyhq/core-team-issues#281

FROM

from.mov

TO

to.mov

Notes

Might be interesting to add global commands for:

  • watch mode for twenty-ui and twenty-shared
  • clean, output folders such as dist and node_modules and so on

@prastoin prastoin marked this pull request as ready for review January 24, 2025 16:13
@prastoin prastoin self-assigned this Jan 24, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR enhances IDE support in the twenty-shared package by enabling TypeScript declaration and source map generation for better "go to source" functionality.

  • Added "declaration": true and "declarationMap": true in /packages/twenty-shared/tsconfig.lib.json to generate TypeScript declaration files and source maps
  • Set "outDir": "../../.cache/tsc" to specify output directory for generated files
  • Included "vite/client" types to ensure proper Vite integration

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Member

@charlesBochet charlesBochet left a comment

Choose a reason for hiding this comment

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

TY!

@charlesBochet charlesBochet merged commit c89cc38 into main Jan 24, 2025
52 checks passed
@charlesBochet charlesBochet deleted the twenty-shared-declaration-map branch January 24, 2025 16:56
Copy link

Fails
🚫

node failed.

Log

�[31mError: �[39m SyntaxError: Unexpected token C in JSON at position 0
    at JSON.parse (<anonymous>)
�[90m    at parseJSONFromBytes (node:internal/deps/undici/undici:5584:19)�[39m
�[90m    at successSteps (node:internal/deps/undici/undici:5555:27)�[39m
�[90m    at fullyReadBody (node:internal/deps/undici/undici:1665:9)�[39m
�[90m    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)�[39m
�[90m    at async specConsumeBody (node:internal/deps/undici/undici:5564:7)�[39m
danger-results://tmp/danger-results-66a0c8ed.json

Generated by 🚫 dangerJS against 845674f

DeepaPrasanna pushed a commit to DeepaPrasanna/twenty that referenced this pull request Jan 27, 2025
twentyhq#9838)

# Motivations
By adding the declaration and declaration mapping this allows a better
`go to source` in our IDE
Should also be done for
twentyhq/core-team-issues#281

## FROM


https://github.com/user-attachments/assets/5cc307d0-b2dc-46bf-b61f-0731015c4a30


## TO


https://github.com/user-attachments/assets/5ed1d7af-2716-435d-a1b8-6738b5a77956

## Notes
Might be interesting to add global commands for:
- watch mode for `twenty-ui` and `twenty-shared`
- clean, output folders such as `dist` and `node_modules` and so on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants