Skip to main content
Version: 7.0.0

Legacy Element Fields

Legacy Element Descriptor Fields

The following element descriptor fields are kept for backward compatibility but are deprecated and will be removed in a future major version.

category (optional)

Deprecated

category in element descriptors is kept for backward compatibility but is deprecated and will be removed in a future major version. Use file descriptor categories instead.

Type: <string>

It keeps working without changes. File descriptors are a better fit because they categorize files independently of elements — one element can contain files in several categories, and a file can have several categories at once.

To migrate, move the category from the element descriptor to a file descriptor:

Legacy (element descriptor)Recommended (file descriptor)
{ type: "helper", category: "helper", pattern: "helpers/*" }{ type: "helper", pattern: "helpers/*" } plus boundaries/files: { pattern: "helpers/**", category: "helper" }

A descriptor that matched with only a deprecated category (no type) leaves types as null and does not accumulate later types.

See the v6 to v7 migration guide for full details.

mode (optional)

Deprecated

mode is kept for backward compatibility but is deprecated and will be removed in a future major version. Element descriptors now always use folder-like matching, and file classification use cases are covered by file descriptors.

Type: <string> — one of "folder" | "file" | "full". Default: "folder".

It keeps working without changes. mode controlled how a pattern was interpreted:

  • folder (default): the element is a folder. The pattern is expanded internally (effectively adding /**/*), so any file under the matched folder belongs to the element. This is the standard behavior — you no longer need to set it.
  • file: the element is the file itself, matched right-to-left without the folder expansion. Use cases that classified individual files this way are now better expressed with file descriptors and their categories.
  • full: the pattern must match the entire file path (relative to rootPath). It still works. The recommended replacement is partialMatch: false, which provides the same full-path matching but preserves folder semantics for the element path.

If you have configs that relied on mode: "file" to classify files, migrate them to file descriptors. If you used mode: "full", migrate to partialMatch: false. See the v6 to v7 migration guide.

Legacy Element Description Properties

The following properties of the runtime element description remain available for backward compatibility but are deprecated:

  • type <string | null> - Alias for types[0]. Use types.
  • category <string | null> - Deprecated element category. Use file.categories.
  • elementPath <string | null> - Legacy alias for path.
  • filePath <string | null> - Legacy alias kept for the deprecated mode: "file".
  • internalPath - Legacy alias; in V7 it maps to fileInternalPath for local elements and to module.internalPath for external modules.

Parent elements expose the matching legacy aliases (type, category, elementPath).

warning

Avoid using these deprecated properties in Element Selectors and message templates. Use the modern properties instead. Read the Migration Guide for full details on how to update your configs and templates.

See Also

  • Elements — element descriptors and the modern element layer.
  • Files — file descriptors, the replacement for element-level category.
  • v6 to v7 Migration Guide — full migration instructions.