feat!: remove TypeScript experiment, use WASM-only implementation
What does this MR do and why?
Remove the TypeScript GLQL implementation that was added as an experiment in !257 (merged).
The Ruby gem (gitlab_query_language) requires no changes as it compiles Rust directly to native code.
BREAKING CHANGE: Bump minor version. The glqlTypescript feature flag is no longer supported. All queries now use the Rust/WASM version.
Related issue: Rollback Typescript migration experiment (#72) • Jiaan Louw • 18.10
Detailed breakdown
Changes:
- Delete TypeScript implementation (npm/src/analyzer, codegen, parser, transformer, types, utils, lib.ts, errors.ts, field_mapping.ts)
- Delete TypeScript tests (npm/tests/integration/, test_utils.ts)
- Simplify npm/src/index.ts to WASM-only path
- Remove glqlTypescript feature flag references
- Remove parsimmon dependency
- Remove TypeScript CI jobs (test-ts, coverage-ts, graphql-validate-ts)
How to set up and validate locally
Testing GLQL Changes Locally in GDK
NPM Package (@gitlab/query-language-rust)
-
In the GLQL repo, build the package:
wasm-pack build --target web npm install npm run build -
Link the package locally:
npm link -
In your GDK gitlab directory, link to the local package:
npm link @gitlab/query-language-rust --legacy-peer-deps -
Restart GDK frontend to pick up changes:
gdk restart vite(orwebpackif you're not using Vite) -
To unlink when done testing:
# In GDK gitlab directory npm unlink @gitlab/query-language-rust --legacy-peer-deps npm install # Restore original packageNote if you run into any Vite issues you can run this after unlink to be very thorough:
gdk stop vite && rm -rf node_modules/.vite && yarn install --check-files && gdk start vite
Ruby Gem (gitlab_query_language)
-
In the GLQL repo, build the gem:
cd glql_rb bundle install bundle exec rake compile -
In your GDK gitlab directory, update Gemfile to your local
glql/glql_rbdir:gem 'gitlab_query_language', path: '/path/to/glql/glql_rb' -
Install the gem:
bundle install -
Restart GDK Rails to pick up changes:
gdk restart rails -
To revert when done testing and restore original Gemfile line and run:
bundle install
Feature flag
- In GDK ensure the
glql_typescriptis turned off at[GDK_HOST]/rails/features.
Note: This will be monolith feature flag and related code will be removed in a follow-up MR with the version bump.
Verification
Test GLQL functionality in the browser by:
- Navigate to any page with GLQL support (e.g., a wiki page with a GLQL code block)
- Open browser DevTools and verify no TypeScript feature flag errors
- Confirm queries compile and execute correctly