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

[FEAT] typescript support #1614

Merged
merged 152 commits into from
May 6, 2024
Merged

[FEAT] typescript support #1614

merged 152 commits into from
May 6, 2024

Conversation

kikoruiz
Copy link
Member

@kikoruiz kikoruiz commented Jun 21, 2023

TypeScript Support for the whole SUI ecosystem (no breaking changes)

This PR is introducing the following changes:

  • ♻️ Several packages have been upgraded in order to provide TypeScript support, always giving backwards compatibility:

    • @s-ui/bundler
    • @s-ui/js-compiler
    • @s-ui/lint
    • @s-ui/mock
    • @s-ui/react-context
    • @s-ui/studio
    • @s-ui/test-contract
    • @s-ui/test
  • ✨ A new package has been created:

    • @s-ui/compiler-config
  • 🛠️ And another ones have been updated to be compliant with the new linting rules or just because they needed to be fixed:

    • @s-ui/consents
    • @s-ui/helpers
    • @s-ui/hoc
    • @s-ui/react-head
    • @s-ui/react-initial-props
    • @s-ui/theme
  • 🧪 Added new server tests for @s-ui/js-compiler since this tool now is responsible of traspiling JS and TS files.

  • ✅ Added type checking in CI and in the pre-push script.

  • 🔒 Upgraded and synced all the TypeScript versions among all the tools and the monorepo.

@@ -45,7 +46,8 @@ const config = {
alias: {
'react/jsx-dev-runtime': path.resolve(pwd, prefix, 'node_modules/react/jsx-dev-runtime.js'),
'react/jsx-runtime': path.resolve(pwd, prefix, 'node_modules/react/jsx-runtime.js'),
'@s-ui/react-context': path.resolve(path.join(pwd, prefix, 'node_modules/@s-ui/react-context'))
'@s-ui/react-context': path.resolve(path.join(pwd, prefix, 'node_modules/@s-ui/react-context')),
'studio-utils': path.resolve(path.join(pwd, prefix, 'packages/ui/studio-utils'))
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a backward-compatibility feature (for all the sites setting custom utils instead of using the @s-ui/studio-utils package).

packages/sui-bundler/shared/resolve-alias.js Show resolved Hide resolved
packages/sui-test-contract/package.json Outdated Show resolved Hide resolved
packages/sui-jest/package.json Outdated Show resolved Hide resolved
@kikoruiz kikoruiz merged commit dca4f0e into master May 6, 2024
3 checks passed
@kikoruiz kikoruiz deleted the typescript-support branch May 6, 2024 08:24
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.

6 participants