Skip to content

@knitkode/node@3.0.1

Choose a tag to compare

@github-actions github-actions released this 10 Oct 11:52
· 1 commit to main since this release
28a0bb8

Patch Changes

  • 1ad3640 Thanks @kuus! - getDependencyVersion accepts a { from } option with the directory to resolve the dependency from, e.g. getDependencyVersion("next", { from: "./apps/web" }) or getDependencyVersion("next", "major", { from }). By default it now resolves from the current working directory instead of from where @knitkode/node is installed, so it finds the project's own dependencies with strict node_modules layouts such as pnpm's.

  • 113cd75 Thanks @kuus! - Fix several helpers:

    • fsMoveAndRestoreTemporaryPaths and fsMoveAndRestoreTemporaryPathsSync move the paths out of the destination while the callback runs (they used to copy them), always restore them, even when the callback throws or a path is missing, and run the callback once when there are no paths (it used to run twice).
    • fsFindUpSync also searches the stopAt directory and the file system root.
    • fsWrite and fsWriteSync only drop the leading blank lines, keeping the indentation of the first line.
    • swcCreateTransform maps root imports of nested libraries without a double slash (@org/ui/Button, it used to give @org/ui//Button), and swcTransformsKit only rewrites root imports, the sub paths of the @knitkode/* packages being entry points already.
  • Updated dependencies [113cd75, 89e3ba6, b131ad6]:

    • @knitkode/utils@3.0.1