eslint-plugin-import-boundaries 0.3.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,83 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.5.0] - 2025-12-12
9
+
10
+ ### Breaking Changes
11
+
12
+ - **Removed `barrelFileName` configuration option**: The `barrelFileName` option has been removed from the configuration schema. Index files must be named `index` (e.g., `index.ts`, `index.js`) to match runtime module resolution behavior, and this is no longer configurable.
13
+
14
+ **Migration**: Remove `barrelFileName` from your configuration if present. The rule now always uses `index` as the index file name.
15
+
16
+ ```javascript
17
+ // Before (0.4.x)
18
+ {
19
+ rootDir: 'src',
20
+ barrelFileName: 'index', // This option is removed
21
+ boundaries: [...],
22
+ }
23
+
24
+ // After (0.5.0)
25
+ {
26
+ rootDir: 'src',
27
+ // barrelFileName removed - always uses 'index'
28
+ boundaries: [...],
29
+ }
30
+ ```
31
+
32
+ ### Improvements
33
+
34
+ - **Terminology update**: Replaced references to "barrel files" with "directory interface" and "index files" throughout documentation and code comments. Index files are now explicitly described as directory interfaces that define the public API of a directory and act as boundaries.
35
+ - **Error message clarity**: Updated error messages to use "ancestor directory" instead of "ancestor barrel" for better clarity.
36
+ - **Documentation**: Enhanced documentation to emphasize that index files are NOT "barrel files" but rather directory interfaces that enforce boundaries and define explicit exports.
37
+ - **Export best practices**: Added documentation recommending explicit named exports (e.g., `export { Entity } from './entity'`) instead of `export *` in index files for better tree shaking and bundle size optimization.
38
+
39
+ ### Planned Changes
40
+
41
+ - **Future enforcement of explicit exports**: A future version will add a rule to enforce explicit named exports in index files, blocking `export *` statements. This will improve tree shaking and make directory interfaces more explicit about their exports.
42
+
43
+ ## [0.4.0] - 2025-12-10
44
+
45
+ ### Breaking Changes
46
+
47
+ - **`identifier` is now required in boundary configuration**: Previously, `identifier` defaulted to `alias ?? dir` when not specified. It is now a required field in the boundary configuration schema.
48
+
49
+ **Migration**: Add `identifier` to all boundary configurations. When using alias style, set `identifier` to match the `alias` value. When using absolute style, set `identifier` to match the `dir` value or use a custom identifier.
50
+
51
+ ```javascript
52
+ // Before (0.3.x)
53
+ {
54
+ dir: 'domain',
55
+ alias: '@domain',
56
+ // identifier was optional
57
+ }
58
+
59
+ // After (0.4.0)
60
+ {
61
+ identifier: '@domain', // Now required
62
+ dir: 'domain',
63
+ alias: '@domain',
64
+ }
65
+ ```
66
+
67
+ ### Improvements
68
+
69
+ - **Path normalization fixes**: Fixed path normalization for files outside boundaries when boundaries aren't enforced
70
+ - **100% test coverage**: Achieved 100% code coverage across all statements, branches, functions, and lines
71
+ - **Code quality**: Removed unreachable defensive code and simplified path formatting logic
72
+ - **Documentation**: Updated README to clarify the distinction between boundary identifiers and import paths
73
+
74
+ ### Bug Fixes
75
+
76
+ - Fixed path normalization issue where files outside boundaries weren't properly normalized to relative paths
77
+ - Fixed barrel file handling to prevent `/index` loops in path resolution
78
+ - Specified missing path string expectation when resolved to a file outside of defined boundaries.
79
+ - Improved support for absolute paths
80
+
81
+ ## [0.3.1] - Previous Release
82
+
83
+ Initial stable release with core boundary enforcement features.