Skip to content

Align plugin-starter with Tyk v5.14+ (docs + ES2020 build)#2

Merged
sedkis merged 2 commits into
mainfrom
fix/goja-starter-v514-accuracy
Jun 17, 2026
Merged

Align plugin-starter with Tyk v5.14+ (docs + ES2020 build)#2
sedkis merged 2 commits into
mainfrom
fix/goja-starter-v514-accuracy

Conversation

@sedkis

@sedkis sedkis commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Correct AGENTS.md / README.md / e2e/ to match the goja v5.14+ runtime — drop the stale otto-era "ES5.1" constraints, fix the custom_middleware_bundle field-name bug (was plural), document the inline code deploy path, and remove the obsolete e2e otto driver-swap narrative (the e2e gateway is built from the goja branch).
  • Bump the build target ES5 → ES2020 (root + all 6 examples) so the relaxed constraints (?. / ?? / BigInt / synchronously-resolving Promises) hold end-to-end.
  • Add the previously-undocumented TykBatchRequest global to the docs and register it in the test harness.

Why

An audit against the goja gateway source (TT-16948) and the pinned goja library showed AGENTS.md forbade several features goja actually supports (?., ??, BigInt, async), and described the engine as ES5.1 (otto-era). Since goja is v5.14+-only, the build target is bumped to make the corrected guidance true at runtime.

Test plan

  • npm test (root) — 3/3 pass.
  • npm run build (root + an example) — compiles cleanly on the ES2020 target (webpack 5.106).

🤖 Generated with Claude Code

Preview Page:

https://tyk-docs-goja-inline-mintlify.mintlify.app/api-management/plugins/javascript

The starter described the engine as otto-era ES5.1 and forbade features
goja actually supports. Correct the runtime model and bump the build
target now that goja is v5.14+-only:

- AGENTS.md: goja is ES2020-capable; allow ?./??/BigInt/sync Promises;
  keep the real constraints (no module loader, no event loop, no Node
  APIs); add TykBatchRequest; add an otto migration-route note.
- README/e2e: fix the custom_middleware_bundle field name, drop the
  unsubstantiated tyk-sync claim, document the inline code path, and
  remove the stale otto driver-swap narrative (e2e gateway is built
  from the goja branch).
- Bump webpack/tsconfig target ES5 -> ES2020 (root + all examples).
- Harness: register the missing TykBatchRequest global.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sedkis sedkis changed the title Align plugin-starter with goja v5.14+ (docs + ES2020 build) Align plugin-starter with Tyk v5.14+ (docs + ES2020 build) Jun 16, 2026
@sedkis
sedkis merged commit 118829e into main Jun 17, 2026
7 checks passed
@sedkis
sedkis deleted the fix/goja-starter-v514-accuracy branch June 17, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant