n8n/packages/frontend/@n8n/frontend-constants
n8n-assistant[bot] 86c23326c9
🚀 Release 2.42.0 (#39826)
Co-authored-by: n8n-release-helper[bot] <265227495+n8n-release-helper[bot]@users.noreply.github.com>
2026-09-29 07:11:00 +00:00
..
src chore: Migrate phase-one backend packages to Oxlint (no-changelog) (#39360) 2026-09-23 10:00:59 +00:00
biome.jsonc refactor(editor): Extract the notification slice out of ui.store into @n8n/stores (no-changelog) (#34638) 2026-07-24 06:22:04 +00:00
eslint.config.mjs chore: Migrate phase-one backend packages to Oxlint (no-changelog) (#39360) 2026-09-23 10:00:59 +00:00
package.json 🚀 Release 2.42.0 (#39826) 2026-09-29 07:11:00 +00:00
README.md chore: Migrate phase-one backend packages to Oxlint (no-changelog) (#39360) 2026-09-23 10:00:59 +00:00
tsconfig.json refactor(editor): Extract the notification slice out of ui.store into @n8n/stores (no-changelog) (#34638) 2026-07-24 06:22:04 +00:00
tsdown.config.ts refactor(editor): Extract the notification slice out of ui.store into @n8n/stores (no-changelog) (#34638) 2026-07-24 06:22:04 +00:00
vite.config.ts refactor(editor): Extract the notification slice out of ui.store into @n8n/stores (no-changelog) (#34638) 2026-07-24 06:22:04 +00:00

@n8n/frontend-constants

Shared, framework-agnostic constants for n8n's front-end packages. The package-reachable home for values (such as router view identifiers) that multiple front-end packages need without depending on the editor-ui app.

Table of Contents

Features

  • Cross-package constants: A single home for constants shared across the front end (e.g. VIEWS).
  • No runtime coupling: Plain values with no component, store, or framework dependency.
  • dist-safe: Consumable from built dist by downstream packages, including those compiled with isolatedModules.

Design notes

Enum-like constants are declared as a plain enum — never as a const enum. A const enum becomes an ambient const enum in this package's emitted declarations, which downstream packages compiled with isolatedModules: true cannot read (TypeScript error TS2748). A plain enum emits a regular declare enum backed by a real runtime object, so it is safe to consume from dist across the package boundary, and it preserves the nominal enum-member types the rest of the front end relies on (so relocating a value such as VIEWS here is behavior-preserving). The repo lint default prefers const enum, so the no-raw-enum rule is relaxed for these files in eslint.config.mjs.

Contributing

For more details, please read our CONTRIBUTING.md.

License

For more details, please read our LICENSE.md.