eslint-plugin-boundaries v6.0.0-beta.1
Added
- feat(#383, #388): Add object-based element selector syntax as the recommended way to define element selectors, providing better readability and access to advanced matching features.
- feat(#395): Support
fromandtodependency selector objects in theboundaries/dependenciesrule, enabling matching based on dependency relationship, origin, source, internal path, and more. - feat(#387): Add optional
categoryfield to element descriptors to enable multi-dimensional architectural classification. - feat(#386): Support a
nameproperty in theadditional-dependency-nodessetting on each node definition, allowing to identify custom dependency nodes by name in rules and messages. - feat: Add
checkAllOrigins,checkUnknownLocalsandcheckInternalsoptions todependencies(oldelement-types) rule to allow checking or ignoring dependencies based on their properties. By default, only local dependencies with known elements are checked, and internal dependencies are ignored, as in previous versions. - feat: Improve debug output, and add
boundaries/debugsetting to allow enabling/disabling it and filtering the traces that are printed. - feat: Support all element description properties in custom messages templates by using handlebars syntax. Old message templates will continue working as they are, without any change.
Changed
- feat(#403): Rename
boundaries/element-typesrule toboundaries/dependencies. The legacy name is still supported with a deprecation warning. - feat(#393): Deprecate rule-level
importKindoption in favor of selector-leveldependency.kind, allowing more granular per-selector control over dependency kind matching. - feat(#392): Add deprecation warning when using legacy template format (
${ }), and introduce new Handlebars-style template syntax ({{ }}). The legacy format is still supported but will be removed in a future major version. - feat(#384): Add deprecation warning when using legacy element selector syntax (string or tuple formats).
- feat: Validate and transform different settings and rules only once per different configuration object, and not per rule execution, to improve performance.
- refactor: Refactor the core of the plugin to support the new features and improvements, and to improve code organization, readability and maintainability. It is now fully typed with TypeScript.
Breaking Changes
- feat(#429): Change default value of
boundaries/dependency-nodessetting to["import", "export", "require", "dynamic-import"]. Previously onlyimportstatements were analyzed by default. To preserve previous behavior, set"boundaries/dependency-nodes": ["import"]explicitly in your configuration. - Remove
isExternalLibrarySelectorandisExternalLibrariesSelectortype guards. They are not needed anymore, as external rule is deprecated and external library selectors can be defined using the sameElementSelectorformat.
Docs
- docs(#396): Improve TypeScript typings documentation, enabling better IDE support and autocompletion.
elements 2.0.0-beta.1
Added
- feat: Add support for
capturedas an array in element selectors, where each element in the array represents an alternative (OR logic). The selector matches if any of the array elements matches. - feat: Support matching
nullvalues in selectors. - feat: Add support for
parentselector property to match against first parent (parents[0]) properties (type,category,elementPath, andcaptured).
Breaking Changes
- feat: Remove
sourceandbaseSourceproperties from thetoandfromobjects in element descriptions and selectors. Move them to thedependencyobject instead, as they are properties of the dependency rather than the target element. This change may require updates to any custom rules or configurations that reference these properties in thetoobject. Refactor all types, tests, and documentation to reflect this change. - feat: Rename "baseSource" property to "module" to better reflect its purpose and avoid confusion with the "source" property. Update all types, tests, and documentation to reflect this change.
- feat: Support array of dependency metadata selectors in the
dependencyproperty of dependency selectors, allowing for more flexible matching of dependencies based on their metadata. Each selector in the array represents an alternative (OR logic), and the dependency matches if any of the selectors in the array matches its metadata. - feat: Remove external library selectors types and helpers.
- feat: Remove deprecated
dependencySelectorGlobalsoption from matching methods and types. - feat: Remove
getSelectorMatchingDescriptionmethod, as it was too generic and caused confusion. Instead, provide specific methods for matching element and dependency descriptions against their respective selectors (getElementSelectorMatchingDescriptionandgetDependencySelectorMatchingDescription) to improve clarity and usability.
website (next version)
Added
- feat(#401): Publish v6.0.0 documentation website with migration guides, updated rules reference, and new selector syntax documentation.
- feat: Add keywords to all pages to improve searchability and SEO.
Changed
- feat: Adapt docs to the new
object-basedselectors syntax. - feat: Add "Deprecated Rules" subsection to the sidebar, and move there the deprecated rules documentation.