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

fix: remove direct references to the node_modules directory #4333

Merged
merged 6 commits into from
May 26, 2024

Commits on Feb 14, 2024

  1. fix: remove direct references to the node_modules directory

    Stop reading `node_modules` directly by the file system.
    The problem with this direct loading is that projects without `node_modules` in the top-level directory will not work at all.
    For example, when I develop with aws cdk,
    I cut off the `cdk` or `infra` directory and create a new `package.json` and put `node_modules` there too,
    but in that case, the code before this modification will not work at all.
    I solved this problem by simply inserting an abstraction layer.
    
    Relation.
    * [lsp-javascript: supply correct path to tsserver for ts-ls by kiennq · Pull Request emacs-lsp#4202 · emacs-lsp/lsp-mode](emacs-lsp#4202)
    * [ts-ls: Wrong lsp-clients-typescript-server-path · Issue emacs-lsp#4254 · emacs-lsp/lsp-mode](emacs-lsp#4254)
    ncaq committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    4b7352e View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2024

  1. fix(lsp-javascript): remove shell redirect when call node

    In the case of Windows, etc., `shell-command-to-string` is to use a non-bash shell.
    To begin with, `shell-command-to-string` seems to ignore standard error output.
    ncaq committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    e28e593 View commit details
    Browse the repository at this point in the history
  2. refactor(lsp-javascript): rename function and add docs

    `lsp-clients-typescript-server-path-by-node-require` is too long.
    ncaq committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    023fb54 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9470afd View commit details
    Browse the repository at this point in the history
  4. fix(lsp-javascript): use Node.js require to explore

    Pros
    ===
    
    Since Node.js require indicates the path where the file actually exists,
    it automatically adapts to various environments unless there are significant system changes or changes in the usage environment.
    
    Cons
    ===
    
    There is a small overhead at first startup due to the command execution.
    ncaq committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    cdbb478 View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2024

  1. refactor: use if-let* and when-let*

    Simplified based on code review.
    ncaq committed Mar 28, 2024
    Configuration menu
    Copy the full SHA
    99b1a47 View commit details
    Browse the repository at this point in the history