Skip to content
Open
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
10088e6
build(deps): Upgrade CLP to de9fc08; Adapt to upstream API changes in…
junhaoliao Jan 31, 2026
fe1d168
build: Remove unused FetchContent and fmt include path from CMakeList…
junhaoliao Jan 31, 2026
fc61a0f
test: Add Vitest test suite.
junhaoliao Feb 1, 2026
841a644
chore: Fix newline at end of .gitignore file
junhaoliao Feb 1, 2026
6d6cedb
style: Add missing blank line before export in eslint.config.mjs.
junhaoliao Feb 1, 2026
a37dec1
ci: Add GitHub Actions test workflow for Vitest suite.
junhaoliao Feb 1, 2026
e76ba2e
build: Add default task and build dependency to test taskfile.
junhaoliao Feb 1, 2026
a4fc2ce
ci: Add path filters; Pin checkout action; Remove redundant build step.
junhaoliao Feb 1, 2026
2db06cc
test: Add IR stream type constants; Import constants directly; Test a…
junhaoliao Feb 1, 2026
b84a27e
build: Update tsconfig.json to follow @tsconfig/node22 base.
junhaoliao Feb 1, 2026
45a9961
test: Refactor log event timestamp extraction and reorder imports in …
junhaoliao Feb 1, 2026
d221203
build, test: Update lint script to include TypeScript check; refactor…
junhaoliao Feb 1, 2026
a222f2e
build, test: Split test utilities into browser and Node.js versions; …
junhaoliao Feb 1, 2026
c981e16
ci: Widen vitest config glob in CI monitored paths.
junhaoliao Feb 1, 2026
5638636
test: Add null checks for filtered log event maps in stream reader tests
junhaoliao Feb 1, 2026
5cda09f
test: Replace null checks with `assertNonNull` in stream reader tests
junhaoliao Feb 1, 2026
47ee14d
build: Remove unused TypeScript config overrides in ESLint configuration
junhaoliao Feb 2, 2026
ef627f5
build: Replace `postinstall` with `prepare` for Playwright installation
junhaoliao Feb 2, 2026
954349f
test: Set `testTimeout` for browser and Node.js projects otherwise th…
junhaoliao Feb 2, 2026
8f2d14c
test: Update KQL filtering tests to assert specific event counts
junhaoliao Feb 2, 2026
aa2598b
test: Update IR stream reader tests to use specific event counts and …
junhaoliao Feb 2, 2026
9668eb8
test: Remove redundant null check tests in IR stream reader test files
junhaoliao Feb 2, 2026
51b562a
test: Remove `OUT_OF_BOUNDS_OFFSET` constant and update related strea…
junhaoliao Feb 2, 2026
a85f259
test: Fix `decodeRange` argument order and update constants in stream…
junhaoliao Feb 2, 2026
a6b9920
test: Replace `npm install` with `npm clean-install` in test taskfile
junhaoliao Feb 2, 2026
cb4aecf
test: Consolidate test utilities and remove redundant configurations
junhaoliao Feb 2, 2026
6d5cb29
test: Refactor IR stream reader tests to use shared `describeCommonTe…
junhaoliao Feb 2, 2026
5f663b6
test: Reformat test setup comment for improved readability
junhaoliao Feb 2, 2026
35ae92a
chore: Remove extra blank lines from deps.yaml file.
junhaoliao Feb 2, 2026
dd34d40
chore: Refactor node-modules task and update dependencies in taskfiles.
junhaoliao Feb 2, 2026
a578259
ci(tests): Install Playwright browsers and dependencies before runnin…
junhaoliao Feb 2, 2026
c36a2ec
fix(test): Depend on package task to ensure dist/ directory exists
junhaoliao Feb 2, 2026
cd5b061
ci(tests): Remove Playwright installation step from workflow
junhaoliao Feb 2, 2026
209547f
chore: Update lint script to use lint:check:js
junhaoliao Feb 2, 2026
d6411ce
chore: Update `moduleResolution` to `nodenext` in tsconfig.json
junhaoliao Feb 2, 2026
625435f
chore: Add `:package` dependency to JS lint tasks
junhaoliao Feb 2, 2026
3ddef9d
chore: Update tsconfig includes to fix test configuration paths
junhaoliao Feb 2, 2026
70f27a0
move `node-modules` task to Taskfile.yml
junhaoliao Feb 7, 2026
9535dea
chore: Add support for passing CLI arguments to JS test command
junhaoliao Feb 7, 2026
54ceb4a
chore: Revise tsconfig compiler options for stricter type checking an…
junhaoliao Feb 7, 2026
0290593
chore: Add newline to tsconfig.json to follow EOF standards
junhaoliao Feb 7, 2026
3bcfb9f
chore: Bump @types/node to ^22.19.9
junhaoliao Feb 7, 2026
cad015f
update lock file
junhaoliao Feb 7, 2026
fb81f1a
chore: Replace `:clp-ffi-js` dependency with `:package` in JS test co…
junhaoliao Feb 7, 2026
f46eb34
Merge branch 'main' into vitest
Bill-hbrhbr Feb 23, 2026
bff0ff2
Merge fixes
Bill-hbrhbr Feb 23, 2026
ff3033e
Merge branch 'main' into vitest
Bill-hbrhbr Feb 25, 2026
0fbf92c
feat: Add a reader for single file archives.
hoophalab Mar 4, 2026
9789b28
new clp commit
hoophalab Mar 5, 2026
fcaf511
remove comment
hoophalab Mar 5, 2026
9b83fe7
add test files
hoophalab Mar 8, 2026
5e4f579
Update to use result based API
Bill-hbrhbr Mar 9, 2026
7f5bd78
upstream
hoophalab Mar 12, 2026
2d52229
deps
hoophalab Mar 12, 2026
8abbf1b
revert deps
hoophalab Mar 12, 2026
54f4925
use short commit id; remove duplicated cmake flags
hoophalab Mar 12, 2026
46b6bcb
comments
hoophalab Mar 13, 2026
1db28ca
second pass
hoophalab Mar 14, 2026
6ca13b4
Move binding type registration into central module as well
Bill-hbrhbr Mar 15, 2026
df798da
lint fixes clang-tidy
Bill-hbrhbr Mar 15, 2026
ba8947f
minor touch up
Bill-hbrhbr Mar 15, 2026
5ea0295
Merge branch 'initial-sfa-pr' into vitest
Bill-hbrhbr Mar 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "tests"

on:
pull_request:
paths: &monitored_paths
- ".github/workflows/tests.yaml"
- "CMakeLists.txt"
- "package.json"
- "package-lock.json"
- "src/**"
- "taskfiles/**"
- "Taskfile.yml"
- "test/**"
- "tsconfig.json"
- "vitest.config.ts"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Consider widening the vitest config path pattern for consistency.

The tsconfig.json uses vitest.*config.ts to match multiple potential vitest config files. If additional vitest configs (e.g., vitest.browser.config.ts) are expected, consider updating the path filter to vitest*config.ts or vitest*.config.ts to catch all variants.

💡 Suggested change (if broader matching is intended)
       - "test/**"
-      - "vitest.config.ts"
+      - "vitest*config.ts"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- "vitest.config.ts"
- "test/**"
- "vitest*config.ts"
🤖 Prompt for AI Agents
In @.github/workflows/tests.yaml at line 15, The current workflow path filter
hard-codes "vitest.config.ts"; update that filter to a broader glob (for example
"vitest*config.ts" or "vitest*.config.ts") so the workflow matches additional
variants like vitest.browser.config.ts; locate and replace the exact string
"vitest.config.ts" in the tests workflow job step that defines the path filter.

push:
paths: *monitored_paths
schedule:
# Run daily at 00:15 UTC (the 15 is to avoid periods of high load)
- cron: "15 0 * * *"
workflow_dispatch:

permissions: {}

concurrency:
group: "${{github.workflow}}-${{github.ref}}"

# Cancel in-progress jobs for efficiency
cancel-in-progress: true

jobs:
tests:
runs-on: "ubuntu-24.04"
steps:
- uses: "actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8" # v6.0.1
with:
submodules: "recursive"

- name: "Install task"
run: "npm install -g @go-task/cli@3.44.0"

- name: "Log tool versions"
run: |-
cmake --version
md5sum --version
node --version
npm --version
task --version

- run: "task test:js"
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Dependencies
node_modules

# Build
.task
build
Expand All @@ -11,3 +14,6 @@ dist
# IDEs
.idea
.vscode

# Test data
/test/data
42 changes: 27 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
cmake_minimum_required(VERSION 3.16)

include(FetchContent)
set(FETCHCONTENT_QUIET OFF)

if(NOT CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE
"${CMAKE_CURRENT_SOURCE_DIR}/build/emsdk/upstream/emscripten/cmake/Modules/Platform/\
Expand Down Expand Up @@ -111,6 +108,7 @@ set(CLP_FFI_JS_SRC_MAIN
)

set(CLP_FFI_JS_SRC_CLP_CORE
${CLP_FFI_JS_CLP_SOURCE_DIRECTORY}/components/core/src/clp/ffi/EncodedTextAstError.cpp
${CLP_FFI_JS_CLP_SOURCE_DIRECTORY}/components/core/src/clp/ffi/ir_stream/decoding_methods.cpp
${CLP_FFI_JS_CLP_SOURCE_DIRECTORY}/components/core/src/clp/ffi/ir_stream/ir_unit_deserialization_methods.cpp
${CLP_FFI_JS_CLP_SOURCE_DIRECTORY}/components/core/src/clp/ffi/ir_stream/search/ErrorCode.cpp
Expand All @@ -126,8 +124,6 @@ set(CLP_FFI_JS_SRC_CLP_CORE
${CLP_FFI_JS_CLP_SOURCE_DIRECTORY}/components/core/src/clp/streaming_compression/zstd/Decompressor.cpp
)

set(CLP_FFI_JS_SRC_FMT ${CLP_FFI_JS_FMT_SOURCE_DIRECTORY}/src/format.cc)

set(CLP_FFI_JS_SRC_ZSTD
${CLP_FFI_JS_ZSTD_SOURCE_DIRECTORY}/lib/common/entropy_common.c
${CLP_FFI_JS_ZSTD_SOURCE_DIRECTORY}/lib/common/error_private.c
Expand All @@ -150,6 +146,30 @@ set(CLP_FFI_JS_SUPPORTED_ENVIRONMENTS
set(CLP_BUILD_CLP_STRING_UTILS ON)
add_subdirectory(${CLP_FFI_JS_CLP_SOURCE_DIRECTORY}/components/core/src/clp/string_utils)

# Set up `Boost::headers` as a header-only interface target so that downstream dependencies
# (e.g., ystdlib) can link against it without requiring a full Boost installation.
if(NOT TARGET Boost::headers)
add_library(Boost_headers INTERFACE)
target_include_directories(Boost_headers INTERFACE ${CLP_FFI_JS_BOOST_SOURCE_DIRECTORY})
add_library(Boost::headers ALIAS Boost_headers)
endif()

# Set up ystdlib as a subproject to provide the `ystdlib::error_handling` target required by the CLP
# core's `EncodedTextAstError` and `clp_s`'s `timestamp_parser`.
set(Boost_INCLUDE_DIR "${CLP_FFI_JS_BOOST_SOURCE_DIRECTORY}")
set(YSTDLIB_CPP_BUILD_TESTING OFF)
add_subdirectory(${CLP_FFI_JS_YSTDLIB_SOURCE_DIRECTORY} ystdlib)

set(ANTLR_BUILD_SHARED OFF)
set(ANTLR_BUILD_STATIC ON)
add_subdirectory(${CLP_FFI_JS_ANTLR_RUNTIME_SOURCE_DIRECTORY})

add_subdirectory(${CLP_FFI_JS_DATE_SOURCE_DIRECTORY})
set(FMT_INSTALL OFF)
add_subdirectory(${CLP_FFI_JS_FMT_SOURCE_DIRECTORY} fmt)
add_subdirectory(${CLP_FFI_JS_SIMDJSON_SOURCE_DIRECTORY})
add_subdirectory(${CLP_FFI_JS_SPDLOG_SOURCE_DIRECTORY})

# The `clp_s` component is linked because the IR search feature uses the same KQL syntax as `clp_s`,
# by reusing `clp_s`'s AST and KQL libraries.
#
Expand All @@ -166,17 +186,10 @@ set(CLP_BUILD_CLP_S_REDUCER_DEPENDENCIES OFF)
set(CLP_BUILD_CLP_S_SEARCH OFF)
set(CLP_BUILD_CLP_S_SEARCH_AST ON)
set(CLP_BUILD_CLP_S_SEARCH_KQL ON)
set(CLP_BUILD_CLP_S_TIMESTAMP_PARSER ON)
set(CLP_BUILD_CLP_S_TIMESTAMPPATTERN ON)
add_subdirectory(${CLP_FFI_JS_CLP_SOURCE_DIRECTORY}/components/core/src/clp_s)

set(ANTLR_BUILD_SHARED OFF)
set(ANTLR_BUILD_STATIC ON)
add_subdirectory(${CLP_FFI_JS_ANTLR_RUNTIME_SOURCE_DIRECTORY})

add_subdirectory(${CLP_FFI_JS_DATE_SOURCE_DIRECTORY})
add_subdirectory(${CLP_FFI_JS_SIMDJSON_SOURCE_DIRECTORY})
add_subdirectory(${CLP_FFI_JS_SPDLOG_SOURCE_DIRECTORY})

foreach(env ${CLP_FFI_JS_SUPPORTED_ENVIRONMENTS})
set(CLP_FFI_JS_BIN_NAME "ClpFfiJs-${env}")
add_executable(${CLP_FFI_JS_BIN_NAME})
Expand All @@ -192,6 +205,7 @@ foreach(env ${CLP_FFI_JS_SUPPORTED_ENVIRONMENTS})
clp_s::search::ast
clp_s::search::kql
embind
fmt::fmt
spdlog::spdlog
)
set(CLP_FFI_JS_LINK_OPTIONS
Expand Down Expand Up @@ -221,7 +235,6 @@ Link options: ${CLP_FFI_JS_LINK_OPTIONS}."
${CLP_FFI_JS_BOOST_SOURCE_DIRECTORY}
${CLP_FFI_JS_CLP_SOURCE_DIRECTORY}/components/core/src
${CLP_FFI_JS_CLP_SOURCE_DIRECTORY}/components/core/src/clp
${CLP_FFI_JS_FMT_SOURCE_DIRECTORY}/include
${CLP_FFI_JS_NLOHMANN_JSON_SOURCE_DIRECTORY}/include
${CLP_FFI_JS_YSTDLIB_SOURCE_DIRECTORY}/src
${CLP_FFI_JS_ZSTD_SOURCE_DIRECTORY}/lib
Expand All @@ -234,7 +247,6 @@ Link options: ${CLP_FFI_JS_LINK_OPTIONS}."
PRIVATE
${CLP_FFI_JS_SRC_MAIN}
${CLP_FFI_JS_SRC_CLP_CORE}
${CLP_FFI_JS_SRC_FMT}
${CLP_FFI_JS_SRC_ZSTD}
)
endforeach()
1 change: 1 addition & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ version: "3"
includes:
deps: "taskfiles/deps.yaml"
lint: "lint-tasks.yml"
test: "taskfiles/test.yaml"
utils: "tools/yscope-dev-utils/exports/taskfiles/utils/utils.yaml"

vars:
Expand Down
20 changes: 20 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import CommonConfig from "eslint-config-yscope/CommonConfig.mjs";
import StylisticConfigArray from "eslint-config-yscope/StylisticConfigArray.mjs";
import TsConfigArray from "eslint-config-yscope/TsConfigArray.mjs";


const EslintConfig = [
{
ignores: [
"build/",
"dist/",
"node_modules/",
],
},
CommonConfig,
...TsConfigArray,
...StylisticConfigArray,
];


export default EslintConfig;
15 changes: 15 additions & 0 deletions lint-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ tasks:
check:
cmds:
- task: "check-cpp-full"
- task: "check-js"
- task: "check-yaml"

check-cpp-diff:
Expand All @@ -22,13 +23,20 @@ tasks:
- task: "check-cpp-format"
- task: "check-cpp-static-full"

check-js:
deps: [":deps:node-modules", ":package"]
cmds:
- "npm run lint:check:js"

check-no-cpp:
cmds:
- task: "check-js"
- task: "check-yaml"

fix:
cmds:
- task: "fix-cpp-full"
- task: "fix-js"
- task: "fix-yaml"

fix-cpp-diff:
Expand All @@ -41,8 +49,14 @@ tasks:
- task: "fix-cpp-format"
- task: "fix-cpp-static-full"

fix-js:
deps: [":deps:node-modules", ":package"]
cmds:
- "npm run lint:fix:js"

fix-no-cpp:
cmds:
- task: "fix-js"
- task: "fix-yaml"

check-cpp-format:
Expand Down Expand Up @@ -120,6 +134,7 @@ tasks:
--strict \
.github \
lint-tasks.yml \
taskfiles \
Taskfile.yml

cpp-lint-configs:
Expand Down
Loading
Loading