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)

  1. In the GLQL repo, build the package:

    wasm-pack build --target web
    npm install
    npm run build
  2. Link the package locally: npm link

  3. In your GDK gitlab directory, link to the local package: npm link @gitlab/query-language-rust --legacy-peer-deps

  4. Restart GDK frontend to pick up changes: gdk restart vite (or webpack if you're not using Vite)

  5. To unlink when done testing:

    # In GDK gitlab directory
    npm unlink @gitlab/query-language-rust --legacy-peer-deps
    npm install  # Restore original package

    Note 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)

  1. In the GLQL repo, build the gem:

    cd glql_rb
    bundle install
    bundle exec rake compile
  2. In your GDK gitlab directory, update Gemfile to your local glql/glql_rb dir: gem 'gitlab_query_language', path: '/path/to/glql/glql_rb'

  3. Install the gem: bundle install

  4. Restart GDK Rails to pick up changes: gdk restart rails

  5. To revert when done testing and restore original Gemfile line and run: bundle install

Feature flag

  1. In GDK ensure the glql_typescript is 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:

  1. Navigate to any page with GLQL support (e.g., a wiki page with a GLQL code block)
  2. Open browser DevTools and verify no TypeScript feature flag errors
  3. Confirm queries compile and execute correctly
Edited by Jiaan Louw

Merge request reports

Loading