🚨 Latest Research:Tanstack npm Packages Compromised in Ongoing Mini Shai-Hulud Supply-Chain Attack.Learn More
Socket
Book a DemoSign in
Socket

@rhinostone/swig-core

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rhinostone/swig-core

Shared IR, backend, and runtime for the @rhinostone/swig family of template engines.

latest
Source
npmnpm
Version
2.3.0
Version published
Maintainers
1
Created
Source

@rhinostone/swig-core

NPM version Socket Badge

Shared runtime for the @rhinostone/swig family of template engines. Not intended for direct consumption unless you are building a custom frontend. Install @rhinostone/swig for the default Swig (Jinja2/Django-inspired) flavor, or @rhinostone/swig-twig for the Twig flavor — both pull this package in pinned to the matching version.

Extracted from @rhinostone/swig@1.6.0 during the 2.0.0-alpha.1 multi-flavor carve. See ROADMAP.md for the release narrative.

What lives here

  • IR types and helpers (lib/ir.js) — the intermediate representation emitted by frontend parsers and consumed by the backend.
  • Backend (lib/backend.js) — lowers IR to compiled JavaScript source via new Function(...).
  • Engine wiring (lib/engine.js) — engine.install(self, frontend) glues a frontend (tags, filters, parser, lexer) onto the shared runtime.
  • Expression-level TokenParser (lib/tokenparser.js) — IR emission for inline expressions, shared across frontends.
  • Runtime primitives (lib/utils.js, lib/security.js, lib/cache.js, lib/loaders/, lib/filters.js, lib/dateformatter.js, lib/tokentypes.js).

Consumers

Versioning

Frontends and the core release in lockstep. Cross-package dependencies pin to the matching exact version (no caret, no tilde). Do not upgrade swig-core independently of the frontend that consumes it.

Repository

Source lives in the @rhinostone/swig monorepo: gina-io/swig/packages/swig-core. File issues and PRs at gina-io/swig.

License

MIT. See LICENSE in the monorepo root.

Keywords

template

FAQs

Package last updated on 14 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts