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

Shopify Liquid VS Code extension for Web #529

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Commits on Oct 9, 2024

  1. Configuration menu
    Copy the full SHA
    d1ad293 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8ae71e3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    253983d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4d7cefe View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2024

  1. Configuration menu
    Copy the full SHA
    9feef3b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3ee1903 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    54b290e View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2024

  1. Replace fileExists dependency by fs injection

    - Change `Config` interface to refer to `rootUri` instead of `root` as an absolutePath
    - Get rid of `fileExists` DI in theme-check Dependencies
    - Get rid of `fileExists` DI in theme-language-server Dependencies
    - Add `fs` DI in theme-check Dependencies
    - Add `fs` DI in theme-language-server Dependencies
    - Add `MockFileSystem` implementation (for tests)
    - Add `NodeFileSystem` implementation
    - Add optional `fs` argument to `theme-language-server-node#startServer()`
    
    The `fs` DI has the following interface (so far):
    
    ```ts
    interface FileSystem {
      stat(uri: string): Promise<{ fileType, size }>;
      readFile(uri: string): Promise<string>;
      readDirectory(uri: string): Promise<[uri: string, fileType: FileType][]>;
    }
    ```
    
    theme-language-server-node now also accepts an optional `fs` implementation in startServer.
    charlespwd committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    d7088a0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f0e085c View commit details
    Browse the repository at this point in the history
  3. Replace getDefault(Schema)?Locale dependency injection

    Instead of having that logic be injected in, I added an abstract
    implementation in theme-check-common that depends on the virtual file
    system. We will no longer need to inject this behaviour :)
    charlespwd committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    74eddea View commit details
    Browse the repository at this point in the history
  4. Rename FileSystem to AbstractFileSystem

    FileSystem is an ambient import which made the DX suffer when
    refactoring code. It's also more obvious now that the FileSystem
    interface is an interface that you need to implement, not something
    concrete that you can use directly.
    charlespwd committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    35ff79e View commit details
    Browse the repository at this point in the history
  5. Replace AbsolutePath concern in theme-check-common

    Replace it with URIs. That way we won't need to worry about windows paths being weird.
    
    The only place where we still have them is for places where we deal with `glob` and `loadConfig` in `theme-{check,language-server}-node`.
    
    - SourceCode.absolutePath -> SourceCode.uri
    - etc.
    charlespwd committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    837440d View commit details
    Browse the repository at this point in the history
  6. Fixup baseUrl in tcn

    charlespwd committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    2e4bf7d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    35b07d1 View commit details
    Browse the repository at this point in the history
  8. Uri->UriString for clarity

    charlespwd committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    28dfbe8 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2024

  1. Remove getDefault(Schema)?Translations dependencies

    We still have an optiomal dependency that is otherwise implemented by a
    naive implementation (for CLI use cases), but in the language server we
    prefer the buffer over the file in the file system...
    
    Which makes me think we could get rid of that by actually making that
    logic part of the getTranslationsFactory directly. Prefer theme files
    over fs.
    charlespwd committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    dab4b58 View commit details
    Browse the repository at this point in the history
  2. Move buffer translations concern to theme-check-common

    All that logic didn't need to be in the language server.
    
    This makes the dep injection easier too because we no longer have this
    upstream concern.
    charlespwd committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    c0980f9 View commit details
    Browse the repository at this point in the history
  3. Remove filesForURI language server dependency

    Replace with AbstractFileSystem-based implementation
    charlespwd committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    6f6db6b View commit details
    Browse the repository at this point in the history
  4. Remove getThemeSettingsSchemaForURI injection

    Replace with abstract-file-system-based implementation
    
    TODO make that shit faster. Seems highlighy unoptimized.
    charlespwd committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    6ec9236 View commit details
    Browse the repository at this point in the history
  5. Remove findRootURI injection

    Replace with abstract-file-system-based implementation in common code.
    charlespwd committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    a501a10 View commit details
    Browse the repository at this point in the history
  6. Implement and setup basic VsCodeFileSystem

    - Adds support for VS Code for Web
    - Adds support for remote files
    charlespwd committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    71d5086 View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2024

  1. Optimize FS calls in the Language Server

    You don't need to query VS Code _every time_ the user types something
    for the same imformation. That's rather slow!
    
    We'll invalidate the relevant caches when files are
    saved/deleted/created/renamed.
    charlespwd committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    a15e42c View commit details
    Browse the repository at this point in the history
  2. Implement MainThreadFileSystem in CodeMirror Playground

    Made to demo what it's like to use a VirtualFileSystem in a
    non-vscode environment.
    charlespwd committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    01e1f06 View commit details
    Browse the repository at this point in the history
  3. Add a bunch of changesets

    charlespwd committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    f3d1197 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2024

  1. Configuration menu
    Copy the full SHA
    3a7ea94 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d87c592 View commit details
    Browse the repository at this point in the history
  3. Minor cleanups

    charlespwd committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    0a58241 View commit details
    Browse the repository at this point in the history