Skip to content
This repository has been archived by the owner on May 28, 2020. It is now read-only.

rewrite vscode-deno #64

Closed
wants to merge 3 commits into from
Closed

rewrite vscode-deno #64

wants to merge 3 commits into from

Conversation

axetroy
Copy link
Collaborator

@axetroy axetroy commented Jan 18, 2020

Almost complete rewrite including:

  • Restructure the code
  • Remove unnecessary configuration
    • deno.packageManager: The project does not depend on node.js, this configuration item is redundant
  • Remove unnecessary commands
  • Remove unnecessary files
  • Remove deno.fmtOnSave configuration
    • This should be controlled by the built-in configuration editor.formatOnSave
  • Remove output panel
  • Fix bugs.
  • Use Github Action as CI instead of travis
  • No more .denoignore / .denorc
    • They are not officially supported
  • Improve deno formatter
  • Remove default configuration
     "[typescript]": {
        "editor.defaultFormatter": "justjavac.vscode-deno"
      },
      "[markdown]": {
         "editor.defaultFormatter": "justjavac.vscode-deno"
       }
    
  • Automatically update node_modules/typescript-deno-plugin/lib/lib.deno_runtime.d.ts via current deno version
  • Update npm dependencies
  • Automatically publish to vscode Marketplace and Github when release a new version
    • Need to set secret in the project settings
      • GH_TOKEN: Github Personal Access Token
      • ADO_TOKEN: Azure DevOps Personal Access Token

CI Status

CI is not shown here because travis has been removed

see https://github.com/axetroy/vscode-deno/tree/refactor

截屏2020-01-2222 50 10

Known issue

  1. Can not add CI status badge in README

Can not add CI status badge in README. ref: microsoft/vscode-vsce#183

Because the Github Action badge is an svg file. It will cause vsce packaging to fail

  1. Need to update ADO_TOKEN regularly

Azure DevOps Personal Access Token is valid for a maximum of one year, so it will expire after one year.

so, It needs regular updates

Before merge

Make sure you have done the following before merging

  1. make sure CI all green except the job that release of a new version
  2. add GH_TOKEN secret in project settings
  3. add ADO_TOKEN secret in project settings

@axetroy
Copy link
Collaborator Author

axetroy commented Jan 18, 2020

/cc @justjavac It's ready for review

return;
}
export async function isFilepathExist(filepath: string): Promise<boolean> {
return promisify(stat)(filepath)

Choose a reason for hiding this comment

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

No need for promisify. Just use
https://nodejs.org/docs/latest-v12.x/api/fs.html#fs_fspromises_stat_path_options which is available in Electron's Node.

README.md Show resolved Hide resolved
package.json Show resolved Hide resolved
src/extension.ts Show resolved Hide resolved
@axetroy
Copy link
Collaborator Author

axetroy commented Jan 24, 2020

I have built a new version for this, download it here
https://github.com/axetroy/vscode-deno/releases

@David-Else
Copy link

David-Else commented Jan 24, 2020

@axetroy If there are going to be week long delays in getting pull requests merged on this repo why not start a new VS Code Market place extension? As this is a total re-write it seems logical to re-start it at 1.0?

It would make sense for all the deno contributors to get together and decide which is the 'official' version and link that on the main site. Right now the download stats for different extensions are:

https://marketplace.visualstudio.com/search?term=deno&target=VSCode&category=All%20categories&sortBy=Relevance

3.2k for this one vs 916 and 440 for the others.When Deno 1.0 comes out whatever extension is linked on the main page would soon become the predominant one. It makes no sense to have different competing versions.

I think Deno's adoption will be very much linked to the VS Code extension. Nearly everyone uses VS Code these days, once Deno starts becoming successful then any problems with the extension will stop people using Deno. Ideally it would have more than one person with the authority to update it.

Massive thanks to @justjavac for all the work he has done!!

@axetroy
Copy link
Collaborator Author

axetroy commented Jan 24, 2020

@David-Else

ham. I actually have permission to merge this PR. And release a new version

But no permission to publish to vscode market.

I did plan to release another extension before and maintained by denolib

Integrate typescript-vscode-plugin together in the extension for easy maintenance

I am trying to do this.

@brandonkal
Copy link

I'm for that. Currently using a locally built version with this PR plus my PR on the TS extension. It still makes sense to publish the TS package as its own npm package but it would be cool to have them live in the same repo. See my PR on the other repo, it fixes a problem with other extensions.

Haven't found a solution to the other bug:
import a from "http://a.com/?broken.yaml.js" freezes the extension. Deno doesn't like the URL either (bug) so I've changed the server to not use a query param but it would still be nice to see that not freeze the editor.

@axetroy
Copy link
Collaborator Author

axetroy commented Jan 24, 2020

I have publish a new extension to vscode market https://marketplace.visualstudio.com/items?itemName=axetroy.vscode-deno

I will try to solve problems in the new repo.

This PR is no longer updated. thanks you all.

close.

@axetroy axetroy closed this Jan 24, 2020
@axetroy axetroy deleted the refactor branch January 24, 2020 15:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants