Giter VIP home page Giter VIP logo

deno-import-intellisense's People

Contributors

maximousblk avatar steelalloy avatar

Watchers

 avatar  avatar  avatar

deno-import-intellisense's Issues

The deno-import-intellisense.json is problematic

The current deno-import-intellisense.json is problematic:

{
  "version": 1,
  "registries": [
    {
      "schema": "/:module([a-zA-Z0-9_]*)@:version/:path*",
      "variables": [
        {
          "key": "module",
          "url": "https://intellisense.nest.land/api/x"
        },
        {
          "key": "version",
          "url": "https://intellisense.nest.land/api/x/${module}"
        },
        {
          "key": "path",
          "url": "https://intellisense.nest.land/api/x/${module}/${version}"
        }
      ]
    }
  ]
}

Which causes code completions in the editor to not work properly. There are a few issues:

  • The custom regex for the module ([a-zA-Z0-9_]*) does not require any length. This means that https://x.next.land/@ becomes a valid match and effectively makes the module variable optional. Consider using [a-zA-Z0-9_]+ so the module is at least 1 char long.
  • The custom regex for the module ([a-zA-Z0-9_]*) does match real world results returned from the API endpoint (https://intellisense.nest.land/api/x) which means that when someone tries to select a module like node-crawler in the editor, the completion is not calculated properly, because node-crawler or jpeg.ts is allegedly an invalid package name. Consider validating module names against a regex and updating the regex to include valid values. (e.g. [a-zA-z0-9_.\-]+)
  • The version variable matches anything between @ and /. This isn't specifically problematic, but it does mean if there are issues elsewhere, the pattern matching can get a bit mixed up. If there is any validation on a version string, consider reflecting it in the pattern.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.