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: Add TypeScript support #9550

Open
wants to merge 6 commits into
base: alpha
Choose a base branch
from

Conversation

dblythy
Copy link
Member

@dblythy dblythy commented Jan 16, 2025

Pull Request

Issue

Closes: #7334

Approach

  • Typescript support for the Parse Server definitions.

Note: The "options" and docs files that are generated are not currently compatible, as the babel plugin will need to be updated to support the new TS format.

Tasks

  • Add tests
  • Add changes to documentation (guides, repository pages, code comments)
  • Add security check
  • Add new Parse Error codes to Parse JS SDK

Copy link

Thanks for opening this pull request!

Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.50%. Comparing base (0a23023) to head (05a1ffd).

Additional details and impacted files
@@            Coverage Diff             @@
##            alpha    #9550      +/-   ##
==========================================
- Coverage   93.51%   93.50%   -0.02%     
==========================================
  Files         186      186              
  Lines       14807    14802       -5     
==========================================
- Hits        13847    13840       -7     
- Misses        960      962       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dblythy dblythy requested a review from a team January 21, 2025 11:46
Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

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

Great! Could you please also convert a file (or parts of it?) to TS, as an example, to see whether the gradual conversion works?

["@babel/preset-env", {
"targets": {
"node": "14"
"node": "18"
Copy link
Member

Choose a reason for hiding this comment

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

Is this a breaking change?

"lint-fix": "eslint --fix --cache ./",
"build": "babel src/ -d lib/ --copy-files",
"build": "babel src/ -d lib/ --copy-files --extensions '.ts,.js'",
"build:types": "tsc && prettier --write 'types/{**/*,*}.ts' && npm run lint-fix",
Copy link
Member

Choose a reason for hiding this comment

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

Why does building types require prettier and lint-fix?

"lint-fix": "eslint --fix --cache ./",
"build": "babel src/ -d lib/ --copy-files",
"build": "babel src/ -d lib/ --copy-files --extensions '.ts,.js'",
"build:types": "tsc && prettier --write 'types/{**/*,*}.ts' && npm run lint-fix",
Copy link
Member

Choose a reason for hiding this comment

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

Could you please add a test:types script and a CI job for it, like we have in the JS SDK? I think you can just copy both from https://github.com/parse-community/Parse-SDK-JS/pull/1985/files

@mtrezza mtrezza changed the title feat: begin typescript support feat: Add typescript support Jan 21, 2025
@mtrezza mtrezza changed the title feat: Add typescript support feat: Add TypeScript support Jan 21, 2025
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.

Improve Typescript support
2 participants