This repository has been archived by the owner on Sep 25, 2021. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request migrates the Turbolinks source code from CoffeeScript to TypeScript and ES modules. We plan to release this as version 5.3.0.
Why?
Basecamp's sister framework, Stimulus, is written in TypeScript, and we recently ported the Turbolinks test suite to TypeScript. This branch unifies our front-end framework development stack ahead of work on Turbolinks 6.
Do I need to change anything in my application?
Most applications won't require any changes. If you have monkey-patched Turbolinks classes or methods, those patches may no longer work. However, the public API is unchanged.
How can I test the port?
We have published a pre-release development version to npm as 5.3.0-beta.0, which you may reference in your
package.json
file. If you are using Sprockets, you can download the dist file from unpkg and place it in your load path.What about existing pull requests?
Existing pull requests will need to be rewritten, but this is largely a syntactic exercise. Most classes and methods are the same.
Whither CoffeeScript?
CoffeeScript has served us well since 2012 and will always hold a special place in this author's heart. TypeScript brings an improved editing experience (to easily jump to call sites or definitions, or rename classes and methods) and explicit interfaces (to specify the API between Turbolinks and its native adapters, for example).