Skip to content

Releases: feature-sliced/filesystem

v3.1.0

17 Apr 06:56
dbe1a6a

Choose a tag to compare

Changed

  • getLayers now supports prefixed layers like _pages or 3_features and prioritizes them. This is to better support frameworks that insist on having the pages folder be theirs (looking at you, Astro)

v3.0.1

18 Apr 21:51
7573911

Choose a tag to compare

Changed

  • The isCrossImportPublicApi now also recognizes ./sliceA/@x/sliceB/index.js as a valid public API for cross-imports

Thanks to @gwbaik9717 for this contribution!

v3.0.0

18 Mar 23:11
2e00dbd

Choose a tag to compare

This release adds support for having several index files, useful in full-stack frameworks that shouldn't mix client and server imports.

Changed

  • The isIndex function now recognizes dot-separated strings like index.client.js as valid index files, as long as the part until the first dot is index.

Added

  • The getIndexes function, similar to the previously existing getIndex, but now returning Array<File> instead of File | undefined

Removed

  • The getIndex function, that would either return a single index file or undefined has been removed in favor of getIndexes

v2.4.0

01 Oct 18:43
ec63053

Choose a tag to compare

Added

  • New constant in the definitions:
    export const crossReferenceToken = "@x"

v2.3.0

28 Sep 10:47
4679935

Choose a tag to compare

Added

  • Two new functions: isIndex and isCrossImportPublicApi. Check out the README for the docs
  • A bunch of tests for existing functions to make sure nothing breaks later when no one's watching

v2.2.5

30 Jun 21:19
0d7e6c1

Choose a tag to compare

Fixed

  • Fixed resolveImport returning Unix path separators / on Windows. Now, OS path separators are respected

v2.2.4

08 Jun 18:45
d6d1d35

Choose a tag to compare

Fixed

  • Added support for projects using TypeScript 4 with moduleResolution: "node". TypeScript 5 requires that this should be "node10", but we're not picky.

v2.2.3

04 Jun 17:35
540cfc8

Choose a tag to compare

Fixed

  • Removed a console.log that managed to sneak into the last release

v2.2.2

04 Jun 17:30
44a11fb

Choose a tag to compare

Fixed

  • resolveImport previously wouldn't accept a result of parsing tsconfig.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

30 May 15:55
009b685

Choose a tag to compare

Fixed