mirror of
https://github.com/fleetdm/fleet
synced 2026-05-20 15:38:39 +00:00
<!-- Add the related story/sub-task/bug number, like Resolves #123, or remove if NA --> **Related issue:** Resolves #34628 # Details This fixes an issue where valid bitwise operators are reject as invalid syntax in our SQL editor. This fix uses a forked version of the node-sql-parser library. I've [put a PR up to the upstream library](https://github.com/taozhi8833998/node-sql-parser/pull/2611), but there's also another PR that's waiting to be merged (and [another ticket we need to fix](https://github.com/fleetdm/fleet/issues/34635)) before we can revert to the upstream. # Checklist for submitter If some of the following don't apply, delete the relevant line. - [X] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files) for more information. ## Testing - [X] Added/updated automated tests - [X] QA'd all new/changed functionality manually Tested w/ query from original ticket: <img width="540" height="448" alt="image" src="https://github.com/user-attachments/assets/0285cdd7-60af-4adb-b562-f33b98937cae" /> |
||
|---|---|---|
| .. | ||
| README.md | ||
| sqlite.d.ts | ||
| sqlite.js | ||
| sqlite.js.map | ||
About
This is compiled from a fork of the 5.3.13 release of node-sql-parser library. It includes fixes for:
- https://github.com/fleetdm/fleet/issues/30109 (Query editor rejects valid SQL with ESCAPE '')
- https://github.com/fleetdm/fleet/issues/34628 (Query validator rejects valid bitwise & operator)
Once a new release of node-sql-parser comes out with this code in it, we can revert back to using node-sql-parser as a dependency in Fleet.
To compile
- Check out https://github.com/sgress454/node-sql-parser/tree/5.3.13-plus
npm installnpm run buildcp output/prod/build/sqlite.* /path/to/fleet/frontend/utilities/node-sql-parser