@aws/lsp-partiql

中文文档
0.0.24发布于 2026/08/19Apache-2.0TypeScriptCommonJS构建来源已验证近 30 天下载 4753

PartiQL language server

原始使用文档
文档目录4 节
  1. Updating the binary
  2. Updating the ANTLR lexer and parser
  3. Tests
  4. Potential improvements

PartiQL LSP server

LSP server for the PartiQL language. This server offers diagnostics for PartiQL files by parsing the file using the Rust parser maintained by the PartiQL team.

This parser is compiled to a WebAssembly binary using the bindings maintained by the PartiQL team in the PartiQL playground package. This binary is further encoded as a base64 string in a Javascript file to make it easy to be bundled together with the other assets of the server.

Updating the binary

Updating the binary requires the Docker CLI to be in your PATH

To update the binary used by the server, run npm run update-parser-binary. This will, inside a Docker container, pull the PartiQL playground repository from GitHub and run the build command to create a new binary. It is then encoded into base64 in a Typescript file and copied to the src folder. Running npm run build will then transpile the binary file to Javascript and place it in the lib folder.

To update the binary used in package web-tree-sitter, run npm run update-treesitter-wasm. This update is forced to make everytime upgrading the version of web-tree-sitter. This will compile the tree-sitter.wasm file inside the package into a base64 string in a TypeScript file to the src/tree-sitter-parser folder as tree-sitter-inline.ts.

Updating the ANTLR lexer and parser

The ANTLR lexer and parser grammars are defined in src/antlr-grammar, the files in src/antlr-generated are automatically generated from the grammar files. To update these files, run npm run update-antlr. The current grammar files can be found at https://github.com/partiql/partiql-lang-kotlin/tree/main/partiql-parser/src/main/antlr.

Tests

Tests for this package are run using Jest, to run the tests in this package run -npm run test.

Potential improvements

This package currently has a couple of potential points-of-improvement:

  • In the bindings for the parser WASM binary, there is a code path which imports the partiql_playground_bg.wasm file. We don't use this file and code path at runtime due to the inlining of the WASM binary. When doing import checks however, Webpack fails building because it cannot find this binary. To work around this, we include a no-op file with the expected name.
  • In the tests for the language service, there are a couple of untested happy paths. Input couldn't be found to trigger these happy paths.

版本与发布记录

@aws/lsp-partiql 共发布 24 个版本,首次发布于 2024/05/31;过去 12 个月发布了 6 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.0.24latest2026/08/192 个月前
0.0.232026/02/188 个月前
0.0.222025/12/2010 个月前
0.0.212025/12/1810 个月前
0.0.202025/11/2711 个月前
0.0.192025/11/2111 个月前

关于 @aws/lsp-partiql 的常见问题

@aws/lsp-partiql 是什么?

PartiQL language server

如何安装 @aws/lsp-partiql?

在项目目录运行 npm install @aws/lsp-partiql,或使用 pnpm add / yarn add / bun add。

@aws/lsp-partiql 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@aws/lsp-partiql 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@aws/lsp-partiql 可以商用吗?

@aws/lsp-partiql 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@aws/lsp-partiql 的下载量有多少?

根据 npm 官方下载统计,@aws/lsp-partiql 在 2026/10/08 – 2026/11/06 这 30 天内被下载 4,753 次,日均约 158 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@aws/lsp-partiql 还在维护吗?

最新版本 0.0.24 发布于 2026/08/19(2 个月前);至今共发布 24 个版本,其中过去 12 个月发布了 6 个;首次发布于 2024/05/31。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。