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

refactor: Replace require with import statement #2143

Merged
merged 3 commits into from
May 19, 2024

Conversation

dplewis
Copy link
Member

@dplewis dplewis commented May 18, 2024

Pull Request

Issue

The compilers cannot optimize the imports and remove unused code.

See discussion #1399

Approach

The only files using require are as follows:
CryptoController - Babel doesn't strip out unused imports
EventEmitter - Babel doesn't strip out unused imports
ParseFile - Can't use ES6 modules like https and http
RESTController - xmlhttprequest node package can't be imported
CoreManager - Can't get package version from package.json using import

Convert the following files to TS

Analytics
AnonymousUtils
CloudCode
CryptoController
EventEmitter
LocalDatastoreController
OfflineQuery
RESTController
Scoket.weapp.js
Storage
StorageController
StorageController.browser
StorageController.default
StorageController.react-native
StorageController.weapp
WebSocketController
Xhr.weapp

Copy link

parse-github-assistant bot commented May 18, 2024

Thanks for opening this pull request!

  • ❌ Please link an issue that describes the reason for this pull request, otherwise your pull request will be closed. Make sure to write it as Closes: #123 in the PR description, so I can recognize it.

@mtrezza mtrezza mentioned this pull request May 19, 2024
66 tasks
Copy link

codecov bot commented May 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (b50790a) to head (145153c).
Report is 49 commits behind head on alpha.

Additional details and impacted files
@@            Coverage Diff             @@
##             alpha     #2143    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           61        64     +3     
  Lines         6186      6360   +174     
  Branches      1499      1509    +10     
==========================================
+ Hits          6186      6360   +174     

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

@dplewis dplewis requested a review from a team May 19, 2024 00:50
@mtrezza mtrezza merged commit f717a2b into parse-community:alpha May 19, 2024
11 checks passed
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 5.2.0-alpha.2

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Jun 7, 2024
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 5.2.0-beta.1

@parseplatformorg parseplatformorg added the state:released-beta Released as beta version label Jun 24, 2024
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 5.2.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants