Releases: feature-sliced/filesystem
Releases · feature-sliced/filesystem
v2.4.0
v2.3.0
v2.2.5
v2.2.4
v2.2.3
v2.2.2
Fixed
resolveImport
previously wouldn't accept a result of parsingtsconfig.json
because some values first need to be converted through their specific enum. Meaning that you can now do this:
const tsCompilerOptions = {
moduleResolution: "Bundler" as const, // previously this had to be ts.ModuleResolutionKind.Bundler
baseUrl: ".",
paths: {
"~/*": ["./src/*"],
},
};
resolveImport(
"~/shared/ui",
"src/pages/home/ui/HomePage.tsx",
tsCompilerOptions,
fs.fileExists,
);
Which is a lot easier! Shame on the API of TypeScript for requiring such hacks, but what can you do /shrug.
v2.2.1
Fixed
- TypeScript was referenced incorrectly, as described in this issue: microsoft/TypeScript#54018
v2.2.0
Added
- Definitions
layerSequence
,unslicedLayers
, andconventionalSegmentNames
to semantically describe FSD rules and keep a single source of truth - The
isSlice
function is now exported, it determines if a folder is a slice based on whether it contains any conventional (or other, configurable) segments
Changed
- The
getAllSlices
function now augments the slice object with thelayerName
property, which is the name of the layer the slice is in.
v2.1.0
v2.0.0
Added
- New type definitions:
File
andFolder
, bare minimum objects to represent a file system. - Functions to traverse a folder like an FSD root (see README for documentation):
getLayers
getSlices
getSegments
getAllSlices
isSliced
getIndex
Changed
- The
FsdRoot
type is now simply an alias forFolder
.
Removed
- The
locateInFsdRoot
function is no longer available, it is replaced with a more ergonomic set of functions to traverse a folder as an FSD root. - A bunch of now redundant type definitions are removed:
SliceName
,SegmentName
,Layer
,SlicedLayer
,UnslicedLayer
,UnslicedLayerName
,Slice
,Segment
,FileLocation
. Instead, layers, slices, and segments are now simply folders (segments can also be files).