nuxt-layerscope 0.1.0 → 0.1.1
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 +8 -0
- package/dist/{analyze-DS51xy6X.mjs → analyze-C78UDFtY.mjs} +1 -1
- package/dist/analyze-Du9Dkd8L.mjs +2 -0
- package/dist/api.mjs +2 -2
- package/dist/bin.mjs +2 -2
- package/dist/eslint.mjs +1 -1
- package/dist/{file-analysis-Bkq_69x4.mjs → file-analysis-D9TGP_Nb.mjs} +10 -0
- package/dist/index.mjs +1 -1
- package/dist/{unused-Dxep1p6u.mjs → unused-Cgg4-LKM.mjs} +1 -1
- package/package.json +1 -1
- package/dist/analyze-YePAJEVS.mjs +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
- Names inside type syntax are no longer reported as unresolved references: labeled tuple members
|
|
6
|
+
(`defineEmits<{ close: [value: boolean] }>()`) and parameters of function types
|
|
7
|
+
(`(...next: T[]) => void`) and `typeof` queries in types.
|
|
8
|
+
- `$fetch` is a known global, so it is no longer reported in server code.
|
|
9
|
+
- The docs show `defineConfig` imported from `nuxt-layerscope` in every `layerscope.config.ts` sample.
|
|
10
|
+
|
|
3
11
|
## 0.1.0
|
|
4
12
|
|
|
5
13
|
Initial release.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as realPath, d as effectiveConfig, g as LayerscopeError, h as ruleSeverity, m as isRuleName, s as readJson } from "./layer-factory-xZmIAPrA.mjs";
|
|
2
2
|
import { r as pascalCase, t as compareStrings } from "./strings-CrOjNZmB.mjs";
|
|
3
3
|
import { t as globComponents } from "./component-files-DgOXNE6l.mjs";
|
|
4
|
-
import { c as createOwnerLookup, d as createAnalysisEnv, f as readRegistry, h as boundaryFindings, m as loadSymbolTable, n as analyzeFile, p as tableFromRegistry, r as collectFiles, u as resolveLayers, v as loadConfig } from "./file-analysis-
|
|
4
|
+
import { c as createOwnerLookup, d as createAnalysisEnv, f as readRegistry, h as boundaryFindings, m as loadSymbolTable, n as analyzeFile, p as tableFromRegistry, r as collectFiles, u as resolveLayers, v as loadConfig } from "./file-analysis-D9TGP_Nb.mjs";
|
|
5
5
|
import { basename, extname, join, relative, resolve } from "pathe";
|
|
6
6
|
import { existsSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { escapePath, glob } from "tinyglobby";
|
package/dist/api.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { g as LayerscopeError, l as REGISTRY_FILE, u as REGISTRY_VERSION } from "./layer-factory-xZmIAPrA.mjs";
|
|
2
2
|
import { t as defineConfig } from "./define-l62B9fVk.mjs";
|
|
3
|
-
import { i as createBaseline, n as BASELINE_FILE, r as BASELINE_VERSION, t as analyze } from "./analyze-
|
|
3
|
+
import { i as createBaseline, n as BASELINE_FILE, r as BASELINE_VERSION, t as analyze } from "./analyze-C78UDFtY.mjs";
|
|
4
4
|
import { i as JSON_REPORT_VERSION, n as formatResult, t as OUTPUT_FORMATS } from "./report-BNW0GCl9.mjs";
|
|
5
|
-
import { r as buildGraph, t as findUnused } from "./unused-
|
|
5
|
+
import { r as buildGraph, t as findUnused } from "./unused-Cgg4-LKM.mjs";
|
|
6
6
|
export { BASELINE_FILE, BASELINE_VERSION, JSON_REPORT_VERSION, LayerscopeError, OUTPUT_FORMATS, REGISTRY_FILE, REGISTRY_VERSION, analyze, buildGraph, createBaseline, defineConfig, findUnused, formatResult };
|
package/dist/bin.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { g as LayerscopeError } from "./layer-factory-xZmIAPrA.mjs";
|
|
3
3
|
import { i as plural, r as pascalCase } from "./strings-CrOjNZmB.mjs";
|
|
4
|
-
import { a as writeBaseline, i as createBaseline, n as BASELINE_FILE, t as analyze } from "./analyze-
|
|
4
|
+
import { a as writeBaseline, i as createBaseline, n as BASELINE_FILE, t as analyze } from "./analyze-C78UDFtY.mjs";
|
|
5
5
|
import { n as formatResult, r as isOutputFormat, t as OUTPUT_FORMATS } from "./report-BNW0GCl9.mjs";
|
|
6
|
-
import { i as edgeStatus, n as GRAPH_LEVELS, r as buildGraph, t as findUnused } from "./unused-
|
|
6
|
+
import { i as edgeStatus, n as GRAPH_LEVELS, r as buildGraph, t as findUnused } from "./unused-Cgg4-LKM.mjs";
|
|
7
7
|
import { relative, resolve } from "pathe";
|
|
8
8
|
import { cac } from "cac";
|
|
9
9
|
//#region src/commands/shared.ts
|
package/dist/eslint.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as effectiveConfig, l as REGISTRY_FILE } from "./layer-factory-xZmIAPrA.mjs";
|
|
2
2
|
import { t as packageVersion } from "./version-D6whhsHH.mjs";
|
|
3
|
-
import { _ as findConfigFile, a as lineColumn, c as createOwnerLookup, d as createAnalysisEnv, f as readRegistry, h as boundaryFindings, i as isCheckedFile, l as nameLayers, o as offsetAt, p as tableFromRegistry, s as scanFile, t as FileAnalysis, y as loadConfigSync } from "./file-analysis-
|
|
3
|
+
import { _ as findConfigFile, a as lineColumn, c as createOwnerLookup, d as createAnalysisEnv, f as readRegistry, h as boundaryFindings, i as isCheckedFile, l as nameLayers, o as offsetAt, p as tableFromRegistry, s as scanFile, t as FileAnalysis, y as loadConfigSync } from "./file-analysis-D9TGP_Nb.mjs";
|
|
4
4
|
import { dirname, join, relative, resolve } from "pathe";
|
|
5
5
|
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
6
6
|
//#region src/eslint/lint-file.ts
|
|
@@ -328,6 +328,8 @@ const SFC_MACROS = [
|
|
|
328
328
|
"defineModel",
|
|
329
329
|
"withDefaults"
|
|
330
330
|
];
|
|
331
|
+
/** Defined on `globalThis` by Nuxt (app) and Nitro (server), so absent from the registry there. */
|
|
332
|
+
const RUNTIME_GLOBALS = ["$fetch"];
|
|
331
333
|
/** Registered globally by Vue and vue-router, so never listed in components.d.ts. */
|
|
332
334
|
const GLOBAL_COMPONENTS = ["RouterLink", "RouterView"];
|
|
333
335
|
function knownIdentifiers(extra) {
|
|
@@ -336,6 +338,7 @@ function knownIdentifiers(extra) {
|
|
|
336
338
|
...Object.keys(globals.browser),
|
|
337
339
|
...Object.keys(globals.node),
|
|
338
340
|
...SFC_MACROS,
|
|
341
|
+
...RUNTIME_GLOBALS,
|
|
339
342
|
"undefined",
|
|
340
343
|
"arguments",
|
|
341
344
|
...extra
|
|
@@ -540,6 +543,13 @@ const scriptVisitors = {
|
|
|
540
543
|
},
|
|
541
544
|
TSModuleDeclaration: skip,
|
|
542
545
|
TSImportType: skip,
|
|
546
|
+
TSTypeQuery: skip,
|
|
547
|
+
TSNamedTupleMember: skip,
|
|
548
|
+
TSFunctionType: skip,
|
|
549
|
+
TSConstructorType: skip,
|
|
550
|
+
TSMethodSignature: skip,
|
|
551
|
+
TSCallSignatureDeclaration: skip,
|
|
552
|
+
TSConstructSignatureDeclaration: skip,
|
|
543
553
|
CallExpression(node, _parent, { scan, mapOffset }) {
|
|
544
554
|
if (node.type !== "CallExpression" || node.callee.type !== "Identifier") return;
|
|
545
555
|
const [arg] = node.arguments;
|
package/dist/index.mjs
CHANGED
|
@@ -106,7 +106,7 @@ function renderError(message) {
|
|
|
106
106
|
//#region src/devtools/index.ts
|
|
107
107
|
const DEVTOOLS_ROUTE = "/__layerscope";
|
|
108
108
|
async function renderReport(nuxt, format) {
|
|
109
|
-
const [{ analyze }, { formatResult }] = await Promise.all([import("./analyze-
|
|
109
|
+
const [{ analyze }, { formatResult }] = await Promise.all([import("./analyze-Du9Dkd8L.mjs"), import("./report-DtAi0vPb.mjs")]);
|
|
110
110
|
const { rootDir, app } = nuxt.options;
|
|
111
111
|
const result = await analyze({ rootDir });
|
|
112
112
|
if (format === "json") return formatResult(result, "json", rootDir);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as compareStrings } from "./strings-CrOjNZmB.mjs";
|
|
2
|
-
import { c as createOwnerLookup, g as isAllowed } from "./file-analysis-
|
|
2
|
+
import { c as createOwnerLookup, g as isAllowed } from "./file-analysis-D9TGP_Nb.mjs";
|
|
3
3
|
import { relative } from "pathe";
|
|
4
4
|
//#region src/rules/edge-status.ts
|
|
5
5
|
/** How the layer rules see one edge. */
|
package/package.json
CHANGED