Skip to content

Releases

v0.12.3

Choose a tag to compare

@github-actions github-actions released this 05 Nov 01:12
a4a7249

Patch Changes

  • #272 bc1b213 - With the registry, the move suggestions now read the names in the auto-import and component dirs that each layer adds with imports.dirs or components, and check a move whose destination is in such a dir. Before, a move could give a file the same name as a file in such a dir of another layer.

v0.12.1

Choose a tag to compare

@github-actions github-actions released this 19 Oct 07:29
863b8f0

Patch Changes

  • #263 7ea63ae - Move suggestions now treat types/ in srcDir (app/types by default) as an auto-import dir on Nuxt 4.6 and later. A suggested move no longer makes a name conflict with a file there.

v0.12.0

Choose a tag to compare

@github-actions github-actions released this 19 Oct 06:35
9ab0bb3

Minor Changes

  • #256 51a7c93 - Report overridden auto-imports with the new shadowed-auto-import rule (warn by default). Run "nuxi prepare" after the update to write the registry again.

  • #246 6d8f722 - Report overridden pages with the new shadowed-page rule (warn by default). Run "nuxi prepare" after the update to write the registry again.

Patch Changes

  • #253 ec77545 - The GitHub Action now shows an error when the nuxt-layerscope CLI is too old for an option that the action gives to it. The error says to update nuxt-layerscope in the project, or to change the version input. The CI guide now advises strict-baseline.

  • #251 866c769 - check --update-baseline, init --baseline and the DevTools tab now make the folder of the baseline file when it does not exist. When layerscope cannot make the folder or write the file, the error names the file and the reason, for example Cannot write /app/ci/layerscope-baseline.json (EACCES).

  • #258 5286c08 - The DevTools tab now shows the result of the new config when the config changes while a check runs. An ignore, a remove or an undo after a file or config change now shows a full new run. An ignore or a remove no longer writes to the baseline file of the old config when the config changed during a run: the tab asks you to try again. The tab also shows a change in the list of fixed baseline entries when nothing else changes.

  • #252 f041ee5 - drift now follows a moved file that has a relative import through a symbolic link, when the link and its target did not move. Before, drift made the path to the real file, so the accepted finding counted as added and fixed. Now drift keeps the path through the link, for example ../a/x.v2 for a link to a/foo.ts, or ../a/lib.v2/useCart for a link to a directory.

  • #254 4ae60fe - init now makes the folder of the config file when it does not exist. When init cannot write the config file, the error names the file and the reason. When init --baseline cannot write the baseline, the config is already written. The error says so and tells you to run the same command again with --force.

  • #245 6a2ff02 - init --force now keeps the expose, path and source keys of each old layer, and uses them in its analysis. So the baseline also has the findings that expose causes. When a layer in the old config has one of these keys and init cannot find that layer, init stops and writes nothing. Remove or fix that entry, and run init again. An old layer entry that has only allow is not kept.

  • #244 8a50fc4 - layerscope no longer suggests a move of a script file (.ts, .tsx, .js, .jsx, .mjs, .mts, .cjs or .cts) into a layer that sets imports.dirs to a list that is not empty, or turns imports.scan off. Such a layer can scan the dir that the file goes to, also when only explicit imports use the file, and Nuxt then uses only one of two auto-imports with the same name. Before, only a file that was used as an auto-import got this check.

  • #257 e82dbbf - layerscope no longer suggests a move of a file when a layer other than the owner and the target has an auto-import or a component with the same name, in the dirs that Nuxt scans by default. Nuxt then uses only one of the files, for most dirs the one of the layer that comes first. So after the move, the file of that other layer could take the name, and the code that uses the name would get another file. layerscope does not compare the layer order, so such a layer stops the move also when the target comes first. One export * from a package in an auto-import dir of any layer now stops every move of a file with auto-import names.

v0.11.1

Choose a tag to compare

@github-actions github-actions released this 19 Oct 03:18
fc3b045

Patch Changes

  • #239 98eb05a - check with file arguments, --staged, --changed or --since and no source file to check now reads the config and the baseline, and exits 2 when it cannot read them. Before, it exited 0 without reading them in the text and github formats, and the json, sarif and gitlab formats gave an empty report for any error, for example a syntax error in the config or a damaged baseline. A missing or old .nuxt still gives exit 0; in the json, sarif and gitlab formats the report is empty and has a note.

  • #238 04eb8ea - fix rewrites an import() in a template at the position that the template compiler gives, not at the first match of its text. Before, a string such as "import('./a')" before the real import('./a') got the rewrite, and the real import kept the old path. When the quotes of the path are an HTML character reference, such as ", fix now stops and tells you to use ' or " as the quote. An import() that layerscope cannot place exactly in a template expression, for example when the same expression has an HTML character reference such as &&, is not rewritten now (before, it often was): fix stops and says how to change the template.

v0.11.0

Choose a tag to compare

@github-actions github-actions released this 19 Oct 02:55
cc97299

Minor Changes

  • #236 6f447e7 - Report overridden layouts and route middleware with the new shadowed-layout and shadowed-middleware rules (warn by default). Run "nuxi prepare" after the update to write the registry again.

Patch Changes

  • #222 944e7f5 - The action reads the inputs prepare, strict-baseline and comment without case, as it reads fail-on-growth. Before, a value such as True was read as false, with no error.

  • #234 71654e3 - The action reads drift growth only from the growth line of the report, as a whole line. Before, the text (--fail-on-growth). anywhere in the report, for example in a file path, counted as growth. The docs now say which commit fail-on-growth compares with: the latest commit of the base branch on a pull request, the commit before the push on a push, and the base of the merge group in a merge queue.

  • #226 2c10e5a - Move suggestions and fix read the auto-import dirs composables/, utils/, shared/utils/ and shared/types/ as Nuxt reads them: only the files at the top level. Before, layerscope also read the index file of each sub dir, such as composables/cart/index.ts. Nuxt does not read that file, so a move there broke the auto-import. Such a file now gets no move. A name in such a file of a target layer is no longer a name conflict. server/utils does not change, because Nitro reads it at any depth.

  • #229 8db7465 - --config with an empty value, a number or a second --config now stops with a clear message and exit code 2. Before, it gave an error such as "input.replace is not a function". When layerscope cannot read a folder on the path of the config file, it now says so and stops. Before, it said "Config file not found", or it ran with no config. In the JS API, analyze({ baseline: false }) now applies no baseline.

  • #231 105a645 - drift gives git only the files of the project when it looks for renamed files, so it is faster in a large repository. When git skips its rename check because more files changed than its rename limit, drift now prints a note. Before, the files that fix moved then counted as added and fixed, with no message.

  • #223 6b6a00d - init --force keeps the config keys that it does not write, such as baseline, rules and ignore, and its analysis uses them. Before, it wrote only layers and buildDir, so check read the default baseline file again and reported the accepted findings. init --force --baseline writes the file that the kept baseline key names. A note tells you when the new config drops the expose, path or source keys of a layer. A value that is not plain data stops init --force with an error.

  • #224 9f29a96 - fix makes a correct path for an import through a link whose name has a dot, such as ./x.v2 for a link to foo.ts. Before, the new path had the name of the target with the dot part of the link name, such as ../b/foo.v2, and that path did not resolve. A link name with the same name as its target, such as ./foo.v2 for a link to foo.ts, still keeps the dot part.

  • #235 3d3af90 - A registry whose recorded nuxt.config options are not an object, for example config: null in a damaged file, now stops with a clear message, instead of a crash or a run that silently ignored the options. Only the project options (preset, layers, rules, ignore, globals and typeImports) are read from the registry, as the module writes them. Other keys in a hand-edited registry, such as baseline, are not read.

  • #232 e1be090 - SARIF and GitLab reports now keep the fingerprint of each finding the same on every run, also for two findings of one use that differ only in their target file or message. Before, the two could swap fingerprints when the order of the targets changed. After the update, such an alert can show the other target one time.

  • #228 3fb7c01 - resolveComponent() directly in a top-level const of <script setup>, as in const C = resolveComponent('MyButton') with <component :is="C">, no longer gives a dynamic component warning. unused no longer marks every unused component as possibly used for such a file.

  • #225 15f5d05 - An import of a layer by its package name now finds the file when exports or main names it without an extension, or with .js for a .ts file, as Vite does. An import of a path that exports sets to null no longer resolves to a file. A layer package.json with an invalid exports, a leading BOM or comment lines now stops the run with an error that names the file, when the layer is imported by its package name. Before, layerscope did not see the problem, and such an import did not resolve.

  • #233 db4efcb - Move suggestions and fix find the file of a relative export * from in an auto-import dir as unimport finds it: x.mts, x/index.mts, x.cts, and so on, in the order of unimport. Before, they used the import resolver, so they could read the names of another file than Nuxt reads, or of a file that Nuxt does not read, such as ./y.js for y.ts.

  • #230 e95bf79 - With --strict-baseline and only fixed baseline entries, the text report no longer shows the green "No problems" line above the line that fails the check. The hint for fixed entries, in the text report and in the GitHub annotations, now gives the full --update-baseline command with the same root, --config, --source, --baseline and --prepare as the run. A value that starts with - is written as --config=-c.ts in that command, so the command runs as shown.

  • #227 730e14b - Without the registry (--source types, or when auto falls back to the generated .d.ts files), the stale check skips a component file that Nuxt ignores (ignore, ignorePrefix or .nuxtignore) in the default components/ dirs. It reads the ignore rules with the @nuxt/kit of the project. Before, such a file, for example components/-Draft.vue, gave "missing from components.d.ts" and exit code 2 on each run.

v0.10.0

Choose a tag to compare

@github-actions github-actions released this 15 Oct 09:03
f0f3448

Minor Changes

  • #200 6b193f4 - The action accepts growth on a pull request with the label layerscope: accept growth: the fail-on-growth step then passes with a notice. A push and a merge queue run do not read the label.

  • #199 32b00e1 - Add drift --fail-on-growth and the action input fail-on-growth. They fail when the code has errors that the baseline on the base branch does not have, also when the pull request adds them to the baseline. Before, the drift report showed the growth but could not fail the job.

  • #185 94a14f1 - Add check --strict-baseline and the action input strict-baseline. They fail the check when the baseline has fixed entries, so a fixed violation cannot come back while its entry is still in the file. The message tells you to run layerscope check --update-baseline. Without the option, fixed entries are listed as before and do not fail the check.

Patch Changes

  • #184 dc0f0f9 - Arguments after -- are used as positional arguments, for example a root that starts with -. Before, layerscope ignored them. A command line that has words after -- can now stop with an error, or check can read them as the root and the files. Remove the words that are not a root or a file.

  • #195 14fb71c - drift follows the tracked files that git renames between the base ref and the working tree. A renamed file with accepted violations no longer counts as added and fixed. A new violation in it still counts as added. drift follows a rename only when git finds at least 50% of the file the same, or 30% when the file moves to the same place in another layer, as fix moves it. So an unrelated file at the same place in another layer can take the accepted entries of a deleted file that name no target layer, such as unresolved-reference entries. drift also finds a renamed baseline file in the root at its old path on the base ref. A copy, a move to another layer for a finding that names a target layer, a rename that git does not find, an alias import of a renamed file, and a relative import that is not in the form that fix writes still count as added and fixed. If git fails while it lists the renames, drift stops with exit code 2.

  • #189 7b48459 - The fix line about other findings no longer says that they have suggestions. Some findings have none, for example unresolved-reference, shadowed-component and layer-cycle. The line now ends with "Run layerscope check to see them."

  • #194 2e3737c - init counts code that it cannot read apart from unresolved references. JSON findings for such code have unread: true.

  • #198 749a76d - layerscope init says "No references found." when the project has no references. Before, it said "All 0 references resolved."

  • #197 41e4448 - When layerscope drops a planned move, the "leave" suggestion of its findings no longer says that no layer can hold the file. It says that the plan drops the move.

  • #201 059b3a0 - fix and the move suggestions of check read the names of a file with mlly, the parser that Nuxt uses. Type exports (export type, export interface) and export * as name are names, and so are the other forms that Nuxt reads, for example export const a = 1, b = 2. A relative export * from is read. An export * from a package or an alias, or one whose path does not resolve, can export any name, so it conflicts with any auto-import on the other side of a move. A default export keeps the case of its file name, unless the name has -, _ or .. The .tsx, .jsx, .cts and .cjs files in the target are read too, and so are the server utils in sub dirs of the target, as Nitro reads them.

  • #193 16e427e - The fix note about the files that check and fix skip now says that they do not check the imports in these files. Before, it said that they do not read them, but layerscope loads nuxt.config.* to find the layers.

  • #196 06e47cc - fix keeps a name with a dot when it rewrites an import to a file that it found through a symbolic link, or with a name in another letter case. Before, the end of the name was added again: ./x.module for x.module.ts got x.module.module, and ./lib.v2 for lib.v2/index.ts got lib.v2/index.v2.

  • #190 9d5536b - check reads import() in a template. An import() with a fixed path is now an import, so it can give layer-boundary findings and it counts as a use in unused and why. An import() with a path that is not a fixed string is reported by unresolved-reference, and unused lists the file as unread.

  • #188 dc0de58 - The DevTools Unused view shows the "possibly used" banner only when it lists a component.

  • #180 eb4b360 - unused marks global components "possibly used at runtime". When the project uses Nuxt Content, which can render any component by its name from a content file, unused marks every component. Each unused entry has a new global field, and blindSpots has a new nuxt-content kind. With --source types, unused finds only the components/global/ dir and the .global suffix, and finds Nuxt Content only when modules names it as a string. The registry has new fields, so run nuxi prepare once after the update.

  • #186 f49b9b3 - unused shows the shared context for an auto-import in shared/. Before, it showed app. The DevTools Unused view shows each row as layerscope unused shows it, with exposed and "possibly used at runtime".

v0.9.0

Choose a tag to compare

@github-actions github-actions released this 14 Oct 23:22
fdd97ae

Minor Changes

  • #175 1a996f4 - A new baseline key in layerscope.config.ts names the baseline file once. check (also with --update-baseline, --summary and --watch), drift, fix, mcp and the GitHub Action use it. init --baseline does not use it. The --baseline option and the baseline input of the action override it. The baseline input of the action now has no default value, so the key applies. analyze() accepts baseline: true for the file of the config.

  • #172 f3e73b4 - --config is now relative to the project root, as --baseline is. Before, it was relative to the current directory. This changes a run with a root argument, for example layerscope check apps/shop --config layerscope.config.ts, and the config input of the GitHub Action with a root input. It applies to every command that takes --config, and init writes the file there. The configFile option of analyze() is now relative to rootDir too. An absolute path does not change.

Patch Changes

  • #174 052099f - Check a use of a component against each of its files when Nuxt keeps more than one file with the same name, for example Pair.client.vue in one layer and Pair.server.vue in another layer. Nuxt uses one file in the browser and one file on the server. Before, layerscope checked only one of the files, so a use of a layer that is not allowed could get no finding. why, unused and the DevTools trace now list each file. The can_use MCP tool answers with the first file that is not allowed. So check can report new findings after the update, also for a file that Nuxt does not use for a given use.

  • #177 315779a - Resolve more component uses as Nuxt does. These are now uses of the component: resolveComponent() with a template literal that has no ${}, resolveComponent() with a kebab-case name such as 'cart-summary', and h(CartSummary) in a .vue, .jsx or .tsx file outside the server/ dir, also when an import or a local binding has that name. Before, unresolved-reference reported the first two and an h() name with no binding as warnings, so a use of a layer that is not allowed got no layer-boundary finding.

  • #175 1a996f4 - The DevTools tab reads and writes the baseline file that the baseline key of layerscope.config.ts names. Before, the tab always wrote layerscope-baseline.json, so with another baseline file CI did not read what the tab wrote. The static snapshot of the tab uses the same file. Undo restores the file that the change wrote, also when the config names another file after the change.

  • #170 a100d07 - The stale check skips the new files that Nuxt ignores (ignore, ignorePrefix and .nuxtignore) in component dirs and in the auto-import dirs of the app. Before, a new test file such as composables/useCart.spec.ts stopped check --watch and the MCP server until nuxi prepare. Nitro auto-imports such files from its dirs, such as server/utils and shared/utils, so the check still reports them there. The registry has new fields, so run nuxi prepare once after the update.

  • #179 6ebfb50 - Fix two unresolved-reference messages. A component that Nuxt does not have is now Nuxt has no component <X>; before, the message named components.d.ts also when the source was the registry. A name that is an auto-import only in another context, or that is a component, now says so and no longer tells you to add it to globals, which would hide a real dependency.

  • #176 ef84e57 - unused counts <NuxtIsland name="X"> as a use of the island component X. Before, an island component that only <NuxtIsland> rendered was listed as unused. <NuxtIsland :name> and resolveDynamicComponent(x) with a value that is not a fixed string mark unused components as "possibly used at runtime". check also reads <NuxtIsland name="X">, so an island of another layer can give a layer-boundary finding. check sees this only with the registry, because the generated .d.ts files do not list island components.

  • #181 38951c3 - unused and check read component tags in JSX (.tsx and .jsx files, and <script lang="tsx"> and <script lang="jsx"> blocks) outside the server/ dir, such as <CartBadge /> and <cart-badge />. Before, a component that only JSX used was listed as unused. A JSX tag that Nuxt has no component for now gives an unresolved-reference finding, as a template tag does.

v0.8.1

Choose a tag to compare

@github-actions github-actions released this 14 Oct 17:57
dc2b4b1

Patch Changes

  • #156 fa655fc - The stale check now stops with exit code 2 when it cannot open a component dir or an auto-import dir, for example because it has no read access, or cannot reach a file that the generated types refer to. Before, layerscope treated such a dir as empty, so it did not find a new component there and could use an old registry with no error. It also reported such a file as deleted. The message shows the path and the error code. A dir or file that does not exist is handled as before.

  • #161 c4b1441 - drift now finds the --baseline file in the same way as check, so an absolute path and a path with backslashes now work. drift stops with exit code 2 and a message when the baseline is outside the git repository, or when the baseline is a symbolic link on the base ref. Before, drift counted the base as empty with no message, or said that the link is not valid JSON. On a file system that ignores case, drift now also finds a baseline file name in the wrong case.

  • #164 31c3ecf - drift now counts only the findings of rules that the current config sets to error. Before, drift counted a warning on the base as added on each pull request when the base baseline did not have it.

  • #165 f437aac - Check an explicit import of an npm or workspace layer by its package name, for example @acme/ui-layer/app/composables/useAcme, and a require() of it. Before, such an import was always allowed. The import resolves to the file in the layer, with the exports of the layer's package.json when it has them. A path that the layer does not have or does not export is reported by unresolved-reference. An import of a layer by its package name that Node cannot find from the importing file is now reported by unresolved-reference. A layer with a package.json that exists but cannot be read, or that is not valid JSON, now stops the run with an error.

  • #166 5b094c5 - Under nuxi dev, the module now writes the registry again after you add or delete a file, also when Nuxt does not generate its templates again, for example after you add a server util. Before, check --watch and the MCP server stopped with the stale error until nuxi prepare ran, and the DevTools tab kept the old symbols. After you delete a server util or remove its exports, the registry no longer lists its auto-imports.

  • #161 c4b1441 - check reports (SARIF and GitLab), drift and fix now find the git repository when the name of its dir ends with a space.

  • #160 a34fcfb - check --watch and the MCP server now run the stale check on each run, not only when the generated files change. A new component or auto-import file, or a deleted one, now gives the stale error until nuxi prepare writes the generated files again. Under nuxi dev, the layerscope module writes the registry again after such a change. Before this change, check --watch and the MCP server kept the old symbol table with no error.

  • #163 728c67d - check --watch now checks again after it starts to watch a layer dir outside the project root. A file saved in such a dir during the first check is now in the report. An error from the file watcher no longer stops the watch, also an error at the start for a dir that it cannot read. layerscope prints a warning, and the watch goes on.

v0.8.0

Choose a tag to compare

@github-actions github-actions released this 12 Oct 23:09
1966d53

Minor Changes

  • #150 6b98d05 - The GitHub Action writes the findings of the check to the job summary, up to 200 findings, because GitHub shows at most 10 error and 10 warning annotations for each step. The new option --summary <file> of check writes that list. It works only with --format github.

  • #138 6eb05c0 - layerscope unused now lists what it does not count. It lists each file that layerscope could not read in full: a parse error, an unread template, an import() or require() with a path that is not a fixed string, or an import.meta.glob(). When such a file exists, the report does not say that every symbol is referenced.

    The last line of the text report names the other uses that are not counted: test files, files that match ignore, and files in layers installed as packages. The JSON report has a new blindSpots field, and the DevTools Unused view shows the same data. findBlindSpots is a new export of nuxt-layerscope/api.

  • #142 4a7fdc5 - layerscope unused counts more uses. It now counts the uses in nuxt.config.*, in the Nuxt modules/ dir, in files of extra auto-import and component dirs, and in the project files that counted files import.
    A symbol that only one of these files uses is no longer listed as unused. check, fix and why do not change: they do not read these files.

    analyze has a new extraFiles option (default false) that turns this on for unused and the DevTools Unused view.

  • #146 7ffda4e - layerscope unused does not list the symbols of a layer outside the project root that is not installed as a package, such as a workspace package, because another app can use them. The text report names these layers in a second line. When a layer is not listed, an empty list says "No unused symbol found in the listed layers." and not that every symbol is referenced.

    The JSON report has a new outside-root entry in blindSpots, and findBlindSpots returns the same new kind. The DevTools Unused view shows the same lines. In the view data, blindSpotLine is now blindSpotLines, a list.

  • #144 3a97f57 - layerscope unused counts a typeof x in a type, such as ReturnType<typeof useCart>, and an import type when typeImports is 'ignore'. check does not change.

Patch Changes

  • #140 4d69b7b - The drift step of the GitHub Action no longer makes a shallow or full clone shallower. It now finds the base commit for pull requests, pushes and merge queues, and fetches it when the clone does not have it. If the event has no base commit, or the fetch fails, the step skips the report and prints a notice.

  • #143 c56ab6b - The drift comment of the GitHub Action now posts one comment for each root. Later runs update the comment that the same account wrote, so steps with different roots no longer overwrite each other, and the action no longer edits a comment that another account wrote. If drift fails, the comment says so. On a pull_request event from a fork, or when the action cannot post the comment, it prints a notice or a warning. A failed comment does not fail the step. A new comment output says what the action did.

  • #145 29e516a - The GitHub Action runs the nuxt-layerscope version of its own release when the project does not install it, so a tag pins the CLI too. The step that posts the comment is separate from the steps that run the CLI, so the action does not give its token to the CLI.

  • #151 d08d5dc - The stale check now finds a new auto-import file, such as a composable that overrides one of a lower layer. layerscope stops with exit code 2 and asks you to run "nuxi prepare" again. This check uses the registry of the module. The types source does not check auto-import files.

    The registry has a new importDirs field. A registry that an earlier release wrote does not have it. With --source auto, layerscope then falls back to the .d.ts files and prints a note. With --source registry, it stops with exit code 2. Run "nuxi prepare" again.

    When the module cannot read the auto-import dirs of Nuxt, it prints a warning with the reason and writes importDirs: null. Then layerscope prints a note and does not check auto-import files.

  • #139 b218ee0 - Fix path checks on case-insensitive file systems and on Windows. Layerscope now uses the real case of a path and forward slashes. --prepare now starts npx on Windows and shows the error when it cannot start.

  • #152 00c2411 - check --watch uses the shared test for layers outside the project root, so a project root of / works.

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 12 Oct 16:06
865ad81

Minor Changes

  • #137 91a4ae1 - fix --apply makes the planned moves. It uses git mv for a file that git tracks, and it rewrites the relative imports in the importers and in the moved file.

    Before the first change, it checks the plan again. It stops, and changes nothing, when:

    • the git working tree has changes or untracked files, or the root is not in a git repository;
    • git does not track a file to move or edit, or a file is in a submodule;
    • a file is marked assume-unchanged or skip-worktree, a target is outside the git repository or in another repository, or two moves have the same target;
    • a file or a target dir has a symbolic link in its path, or a file has more than one hard link;
    • a file to edit is not UTF-8 text, or is not what the plan says;
    • a target path exists, or two target paths differ only in letter case;
    • git would refuse a move, for example a target outside a sparse checkout.

    See the CLI reference for all checks.

    --allow-dirty skips the git checks (repository, clean tree, tracked files, submodules). If a step fails, fix stops and lists what is done and what is not. It then tells you to use git status and git diff to see the changes and git to undo them. fix needs one of --dry-run and --apply, not both. --allow-dirty works only with --apply. fix also counts the baseline entries that name a moved file, because they do not match after the move.

  • #125 78508c0 - fix plans moves that you can trust more. The root layer can be a move target. A target must permit every user and each dependency of the file, with allow and expose. The new path is checked: no file is there, no other move uses it, and Nuxt finds the file there. A move that breaks check together with another move is dropped. fix lists only the imports that change, and keeps the extension, the query and the index style of each specifier. It uses the baseline, and it has the new --baseline option. The footer says to run layerscope check --prepare, and one line counts the findings that have no move. The SARIF and GitLab reports now have the suggestion of each finding. The leave suggestion for a use of a feature layer by root says to change the code.

  • #122 ca4f916 - check now reads TypeScript syntax in a template when the component has a TypeScript script. It reports code that it cannot read as unresolved-reference findings: a template that it cannot parse, a template with a lang other than HTML or with src, a dynamic import() or require(), and import.meta.glob(). It no longer drops this code silently. An import() or require() with a template literal that has no ${} is now read as a fixed path, so it can give new layer-boundary findings.

  • #128 3fc449a - layerscope now checks files in dirs named modules that are not the Nuxt modules dir, for example app/modules/ in Nuxt 4 and server/modules/. Before, it skipped a modules/ or public/ dir at the top of each scanned dir. Now it skips only the modules and public dirs that Nuxt uses for each layer (dir.modules and dir.public). A layerscope.config.* file is now skipped only in the layer root, so such a file in app/ or server/ is checked. layerscope can report new findings in these dirs, for example layer-boundary and unused findings. Review them, or update your baseline.

    registry.json now stores the modules and public dirs of each layer. Run nuxi prepare once after you update. Until then, check and unused read the generated .d.ts files, --source registry stops with an error, and the ESLint and oxlint plugins do not load the project.

  • #134 c727c6d - layerscope now checks the files in a serverDir, srcDir or shared dir outside the layer root, for example serverDir: '../api'. Before, check, unused and the ESLint and oxlint plugins skipped them with no note. An import of such a file counted as an import from outside every layer. layerscope can report new findings in these files, for example layer-boundary and unused findings. Review them, or update your baseline. check --watch now also watches such a dir.

    A file outside the project root has a path that starts with ../ in reports and in the baseline. For a file outside its layer root, the path that the only and expose globs match starts with ../ too, for example ../api/utils/**. A source dir that is outside its layer root but inside the project root now belongs to its layer, not to the root layer. In ESLint and oxlint, set the root option for files outside the project root.

  • #124 92ff133 - A baselined layer cycle now stays accepted when the file of its first use changes. This is the case when you delete that file, or add a use in a file that sorts earlier. A layer-cycle entry in the baseline now matches by its chain of layers, not by its file. Old baselines still match, with one exception. layerscope now picks the cycle in a fixed way. When two cycles of the same length go through one layer, it always shows the same one. In that case layerscope can report a baselined cycle as new once after the upgrade. Run layerscope check --update-baseline to accept it. Entries for the same cycle in an old baseline are merged into one entry with a count. The text output no longer adds the target layer to a cycle entry. The SARIF and GitLab fingerprints of layer-cycle findings change once.

Patch Changes

  • #132 6d4db9f - layerscope now names the file in every error about an invalid baseline file: an empty file, a file that is not JSON, or a directory. A file from a newer layerscope now tells you to update layerscope, not to create the file again. drift now stops with an error when the baseline at the base ref is an empty file, is not JSON, or is a directory. Before, it read such a file as an empty baseline, and every finding showed as added. --baseline "" is refused with a clear message. A baseline file that cannot be read, for example because of its permissions, now stops the run with an error. Before, it was read as no baseline.

  • #131 59c4a75 - fix lists each import of a moved file, also when a file imports the same file more than once. Before, it listed only the first import. The suggestion of check (also suggestion.impact.imports in JSON output and the MCP suggest tool) now counts each import to update, so the number can be higher than before. fix --dry-run now shows the column of each import.

  • a7328a2 - init --dry-run, check --update-baseline and fix --dry-run now work when you write the flag before the root. Before, the flag took the root as its value, so the command did not use the root. init --dry-run app worked on the current dir, and it could write layerscope.config.ts there. check --update-baseline app checked the current dir and wrote no baseline. fix --dry-run app stopped with an error.