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

decaffeinate #2

Merged
merged 49 commits into from
Aug 29, 2020
Merged

decaffeinate #2

merged 49 commits into from
Aug 29, 2020

Conversation

aminya
Copy link
Owner

@aminya aminya commented Aug 29, 2020

Ready

Description of the Change

Decaffeination: rewrites the codebase in JavaScript

  • tile
  • cursor-position-view
  • file-info-view
  • launch-mode-view
  • selection-count-view
  • status-bar-view
  • git-view
  • main

Rollup: bundle the package using rollup Moved to separate PR

How to review?

Tests are untouched to show full functionality and backward compatibility. ✔️

If you wanna check commit history:

  • Remove guard: using if checks instead of optional chaining in CoffeeScript =-> now we use optional chaining using babel
  • Remove implicit returns: remove unnecessary return in functions because of CoffeeScript
  • Remove inline assignment: move assignment out of if the head
  • Shorter null check: using if (variable) instead of if (variable != null) whenever it is safe
  • Remove IIFE: unnecessary returns because of CoffeeScript

Alternate Designs

Benefits

- Faster loading time because of using JavaScript and Rollup.

  • More flexibility
  • CoffeeScript isn't attractive to developers. The base isn't updated for 3 years now other than the minor edits in v1.8.17 and v1.18.16

Possible Drawbacks

  • Open PRs (if relevant) should be converted too
  • Optional chaining isn't as compact as CoffeeScript in JavaScript. I rewrote them using if checks. By switching to TypeScript/or a new Babel version we can write them more compact. => Now use optional chaining using babel

Applicable Issues

Updates the package to make it ready for atom/atom#18282
Closes the old PR: atom#215

@aminya
Copy link
Owner Author

aminya commented Aug 29, 2020

Already upstreamed
atom#236

@aminya aminya merged commit 1bf4e13 into master Aug 29, 2020
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.

1 participant