Skip to content

Conversation

aminya
Copy link

@aminya aminya commented Mar 15, 2020

Converting codebase to TypeScript

  • adding configurations

  • decaffeinate

  • js-to-ts

  • linting for JS, TS, Coffee

  • Use Github actions instead of Travis and Appveyor. See the running actions here: https://github.com/aminya/atom-julia-client/actions?query=branch%3ATypeScript

  • Compiling each ts file one by one to replace the corresponding lib file
    - Using import/exports instead of requiring if possible
    - Adding type definitions
    - other ts fixes
    - tslint
    - Using atom-select-list-ts instead of space-pen-views using the similar that was made for atom-indent-detective
    - Using etch-ts instead of etch
    - Optimizing code wherever possible
    - Using TypeAssembly if worth it

    • connection\process\basic.ts
    • connection\process\boot.ts
    • connection\process\cycler.ts
    • connection\process\remote.ts
    • connection\process\server.ts
    • connection\process\tcp.ts
    • connection\client.ts
    • connection\ipc.ts
    • connection\local.ts
    • connection\messages.ts
    • connection\terminal.ts
    • misc\blocks.ts
    • misc\cells.ts
    • misc\colors.ts
    • misc\paths.ts
    • misc\scopes.ts
    • misc\weave.ts
    • misc\words.ts
    • package\commands.ts
    • package\config.ts
    • package\menu.ts
    • package\settings.ts
    • package\toolbar.ts
    • runtime\completions.ts
    • runtime\console.ts
    • runtime\datatip.ts
    • runtime\debugger.ts
    • runtime\debuginfo.ts
    • runtime\evaluation.ts
    • runtime\formatter.ts
    • runtime\frontend.ts
    • runtime\goto.ts
    • runtime\linter.ts
    • runtime\modules.ts
    • runtime\outline.ts
    • runtime\packages.ts
    • runtime\plots.ts
    • runtime\profiler.ts
    • runtime\urihandler.ts
    • runtime\workspace.ts
    • ui\cellhighlighter.ts
    • ui\docs.ts
    • ui\focusutils.ts
    • ui\highlighter.ts
    • ui\layout.ts
    • ui\notifications.ts
    • ui\progress.ts
    • ui\selector.ts
    • ui\views.ts
    • connection.ts
    • julia-client.ts
    • misc.ts
    • runtime.ts
    • ui.ts
  • Merging ink and repeating the process for the ink

  • Online run spec CI

How to review?

  • Use commits history instead of going through the files. I keep compilation separate from editing (helps in case we wanted to edit the history).
    https://github.com/JunoLab/atom-julia-client/pull/704/commits

  • Skip reviewing map files (js.map) and declaration files (d.ts) at first. Ask me to remove them if they are distracting.

    • Note: Source code is in lib_src and the compiled JS is kept in lib
    • Note: d.ts/map files are auto-generated (they are necessary for the final release).
  • I test each commit offline on my system before pushing.

@aminya aminya force-pushed the TypeScript branch 5 times, most recently from 85840aa to 08501f8 Compare March 15, 2020 11:19
aminya added 5 commits March 15, 2020 21:01
tslint - Turn of variable-name

Update tslint.json

Update tslint.json
Update package.json
Powershell:
decaffeinate .\lib_src --use-js-modules --loose
decaffeinate .\lib_src --modernize-js
cd .\lib_src
Get-ChildItem *.coffee -Recurse | foreach { Remove-Item -Path $_.FullName }
 js-to-ts-converter .\lib_src
@aminya aminya force-pushed the TypeScript branch 3 times, most recently from 04d48c7 to a828d2f Compare March 16, 2020 02:51
aminya added 4 commits March 15, 2020 21:52
Starting with misc/scopes.ts

tsconfig

Separate source-map

Update tsconfig.json

Update scopes.ts
misc/blocks type definitions

Update blocks.ts
@aminya aminya force-pushed the TypeScript branch 10 times, most recently from a44f3ce to 065985f Compare March 16, 2020 09:49
@aminya aminya force-pushed the TypeScript branch 3 times, most recently from d1fab47 to 04c1c23 Compare March 16, 2020 10:21
@aminya

This comment has been minimized.

@aminya aminya force-pushed the TypeScript branch 2 times, most recently from 15bb18e to ddc81fe Compare March 16, 2020 19:46
@aminya aminya force-pushed the TypeScript branch 3 times, most recently from 07cbac6 to 52b7237 Compare March 16, 2020 21:00
aminya added 4 commits March 16, 2020 18:11
Fix arch

Install latest eslint

Adding postinstall.js

Add npm/apm install

Add typescript to deps

Using latest node + using ci only

Fix space before OS

Fix syntax
Add options to waitsForPromise

Simplify waitsForPromise again
Add apm install ink and language-julia

Simplify versions

Remove apm install from Lint

latest atom-setup

UziTech/action-setup-atom@1

UziTech/action-setup-atom@v1

julia_version
@aminya
Copy link
Author

aminya commented Mar 16, 2020

I use Github actions instead of Travis and Appveyor.

For some reason you can only see the running actions here:
https://github.com/aminya/atom-julia-client/actions

I think you need to enable Github Actions for the master branch (or something similar). Spec doesn't run online though. Only building the package/linting is enabled in the CI.

Edit: The spec fails to load ink and language-julia. So I thought maybe it is because of the old jasmine syntax. I tried to update the tests in aminya#3, but it is harder than it seems.
So I will test each commit offline on my system before pushing.

aminya added 2 commits March 16, 2020 18:25
-  type definition
- take hex function out
- optimizations + other edits
- add TODOs
- prettier
aminya added 2 commits March 17, 2020 03:34
- Add type definitions
- Optimize for loop
- Add sanity check for getActiveTextEditor
- Prettier
@aminya aminya mentioned this pull request Mar 19, 2020
2 tasks
@aminya
Copy link
Author

aminya commented Mar 19, 2020

This is closed in favor of #705.

It distills this PR into smaller ones.

@aminya aminya closed this Mar 19, 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