@shivaedev/quality 0.70.1 → 0.70.3
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 +16 -0
- package/README.md +14 -14
- package/dist/adapters/bundlerEntries.d.ts.map +1 -1
- package/dist/adapters/bundlerEntries.js +16 -2
- package/dist/adapters/bundlerEntries.js.map +1 -1
- package/dist/adapters/bundlerSources.js +2 -2
- package/dist/adapters/bundlerSources.js.map +1 -1
- package/dist/adapters/foreignCallback.d.ts +5 -0
- package/dist/adapters/foreignCallback.d.ts.map +1 -0
- package/dist/adapters/foreignCallback.js +29 -0
- package/dist/adapters/foreignCallback.js.map +1 -0
- package/dist/adapters/foreignResources.d.ts.map +1 -1
- package/dist/adapters/foreignResources.js +9 -34
- package/dist/adapters/foreignResources.js.map +1 -1
- package/dist/adapters/frameworkCallback.d.ts.map +1 -1
- package/dist/adapters/frameworkCallback.js +9 -2
- package/dist/adapters/frameworkCallback.js.map +1 -1
- package/dist/adapters/mappedBuildBindings.d.ts +4 -0
- package/dist/adapters/mappedBuildBindings.d.ts.map +1 -0
- package/dist/adapters/mappedBuildBindings.js +18 -0
- package/dist/adapters/mappedBuildBindings.js.map +1 -0
- package/dist/adapters/nonEmptyContext.d.ts +3 -0
- package/dist/adapters/nonEmptyContext.d.ts.map +1 -0
- package/dist/adapters/nonEmptyContext.js +11 -0
- package/dist/adapters/nonEmptyContext.js.map +1 -0
- package/dist/adapters/outsideImportFindings.d.ts.map +1 -1
- package/dist/adapters/outsideImportFindings.js +1 -0
- package/dist/adapters/outsideImportFindings.js.map +1 -1
- package/dist/adapters/ownedServiceParameters.d.ts +3 -0
- package/dist/adapters/ownedServiceParameters.d.ts.map +1 -0
- package/dist/adapters/ownedServiceParameters.js +24 -0
- package/dist/adapters/ownedServiceParameters.js.map +1 -0
- package/dist/adapters/parameterOrigins.d.ts +3 -0
- package/dist/adapters/parameterOrigins.d.ts.map +1 -0
- package/dist/adapters/parameterOrigins.js +53 -0
- package/dist/adapters/parameterOrigins.js.map +1 -0
- package/dist/baseline/update.d.ts +1 -1
- package/dist/baseline/update.d.ts.map +1 -1
- package/dist/baseline/update.js +4 -7
- package/dist/baseline/update.js.map +1 -1
- package/dist/cli/args.d.ts +0 -2
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +0 -2
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/baseline.d.ts +1 -1
- package/dist/cli/baseline.d.ts.map +1 -1
- package/dist/cli/baseline.js +12 -26
- package/dist/cli/baseline.js.map +1 -1
- package/dist/cli/misplaced.d.ts +0 -7
- package/dist/cli/misplaced.d.ts.map +1 -1
- package/dist/cli/misplaced.js +2 -4
- package/dist/cli/misplaced.js.map +1 -1
- package/dist/cli/program.js +1 -1
- package/dist/cli/program.js.map +1 -1
- package/dist/cli/reportBaselineWrite.d.ts +4 -0
- package/dist/cli/reportBaselineWrite.d.ts.map +1 -0
- package/dist/cli/reportBaselineWrite.js +19 -0
- package/dist/cli/reportBaselineWrite.js.map +1 -0
- package/dist/cli/usage.d.ts +1 -1
- package/dist/cli/usage.d.ts.map +1 -1
- package/dist/cli/usage.js +3 -3
- package/dist/rules/effect/adapterImports.js +1 -1
- package/dist/rules/effect/adapterImports.js.map +1 -1
- package/dist/rules/effect/serviceFindings.d.ts.map +1 -1
- package/dist/rules/effect/serviceFindings.js +3 -0
- package/dist/rules/effect/serviceFindings.js.map +1 -1
- package/dist/rules/effect/serviceParameters.js +1 -1
- package/dist/rules/effect/serviceParameters.js.map +1 -1
- package/dist/rules/effect/serviceTypes.d.ts.map +1 -1
- package/dist/rules/effect/serviceTypes.js +12 -8
- package/dist/rules/effect/serviceTypes.js.map +1 -1
- package/docs/debt-and-hooks.md +5 -7
- package/package.json +1 -1
- package/src/adapters/bundlerEntries.ts +17 -2
- package/src/adapters/bundlerSources.ts +2 -2
- package/src/adapters/foreignCallback.ts +35 -0
- package/src/adapters/foreignResources.ts +11 -35
- package/src/adapters/frameworkCallback.ts +10 -2
- package/src/adapters/mappedBuildBindings.ts +18 -0
- package/src/adapters/nonEmptyContext.ts +11 -0
- package/src/adapters/outsideImportFindings.ts +1 -0
- package/src/adapters/ownedServiceParameters.ts +25 -0
- package/src/adapters/parameterOrigins.ts +60 -0
- package/src/baseline/update.ts +3 -9
- package/src/cli/args.ts +0 -4
- package/src/cli/baseline.ts +10 -28
- package/src/cli/misplaced.ts +2 -4
- package/src/cli/program.ts +1 -1
- package/src/cli/reportBaselineWrite.ts +26 -0
- package/src/cli/usage.ts +3 -3
- package/src/rules/effect/adapterImports.ts +1 -1
- package/src/rules/effect/serviceFindings.ts +3 -0
- package/src/rules/effect/serviceParameters.ts +1 -1
- package/src/rules/effect/serviceTypes.ts +14 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.70.3 - 2026-11-07
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Accept recharts imports in `client/` folders for shadcn charts while continuing to report them in server modules. Prefer shadcn's Chart component (`ChartContainer` and friends) over raw recharts primitives where it covers the case.
|
|
8
|
+
|
|
9
|
+
## 0.70.2 - 2026-11-07
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Accept operation parameters supplied exclusively by their service's owned initializer state, including the Layer's Scope.
|
|
14
|
+
- Accept object method callbacks typed by foreign host signatures.
|
|
15
|
+
- Accept foreign resources received through host callbacks and passed between adapter helpers, while retaining findings for environment services.
|
|
16
|
+
- Report function parameters whose return type carries a Context.Service.
|
|
17
|
+
- Recognize Rolldown build and watch inputs and entries passed through mapped config arrays, preserving reachability and unused-export findings.
|
|
18
|
+
|
|
3
19
|
## 0.70.1 - 2026-11-07
|
|
4
20
|
|
|
5
21
|
### Changed
|
package/README.md
CHANGED
|
@@ -122,11 +122,11 @@ Within Effect code, folders named `adapters/` or `test-support/`, at any depth,
|
|
|
122
122
|
|
|
123
123
|
The `ambient-runtime` Biome plugin also reports `Effect.run*` calls whose computation contains `Clock`, `Config` or `Random`, `currentTimeMillisUnsafe`, crypto UUIDs and bytes, `performance.now`, process arguments, working directory and exit state, `globalThis.process.env`, timeouts and microtasks. Yield service computations in the caller's Effect so its environment controls them. These additional checks apply to core TypeScript code. They accept `cli.ts`, `main.ts(x)`, `entry.ts(x)`, `*-cli.ts`, modules that call `runMain`, use `NodeRuntime.runMain` or guard execution with `fileURLToPath(import.meta.url) === process.argv[1]`, tool configs, tests, `adapters/` and `test-support/`. The existing `Date.now()`, `new Date()`, `Math.random()`, console and direct `process.env` bans still apply there.
|
|
124
124
|
|
|
125
|
-
`effect/service-parameters` reports parameters carrying a service in exported and local functions and public methods, including returned factories. It follows service classes and tags, non-empty Contexts and service implementation shapes through aliases, interfaces, generic constraints, inferred parameters and destructuring. Read services from Effect's environment instead. An Effect or Stream requiring a service is a computation and is accepted. Methods implementing a service and functions constructing Layers may take services as parameters. Within Effect code, `test-support/` folders are exempt from this rule; `adapters/` folders are checked. Module-level PascalCase functions returning React nodes or elements are components: their props and callback prop signatures may carry services, including a connection’s AtomRegistry. An ordinary function taking the same service still fails. Callbacks whose arguments are supplied by their owner keep those arguments; wrapping and returning a callback as a runtime operation still checks it. Test-kit registrations do not turn plain kit state into runtime service plumbing. Type predicates inspect service values without declaring a runtime dependency. Owned fibers, closeable scopes and native atom evaluation contexts follow Effect’s lifecycle conventions; wrapping a function with `Effect.fn` still checks its parameters. An adapter may pass a foreign resource between its functions when the calls supply values constructed through an outside library, including local construction helpers and an Effect acquisition wrapper; reading that resource from the environment still counts as service plumbing. Installed implementation shapes are discovered in the consuming repository's package scopes, alongside the framework service package's scope.
|
|
125
|
+
`effect/service-parameters` reports parameters carrying a service in exported and local functions and public methods, including returned factories and function-typed parameters returning services. It follows service classes and tags, non-empty Contexts and service implementation shapes through aliases, interfaces, generic constraints, inferred parameters and destructuring. Read services from Effect's environment instead. An Effect or Stream requiring a service is a computation and is accepted. Methods implementing a service and functions constructing Layers may take services as parameters. Within Effect code, `test-support/` folders are exempt from this rule; `adapters/` folders are checked. Module-level PascalCase functions returning React nodes or elements are components: their props and callback prop signatures may carry services, including a connection’s AtomRegistry. An ordinary function taking the same service still fails. Callbacks whose arguments are supplied by their owner keep those arguments, including object methods contextually typed by a foreign signature; wrapping and returning a callback as a runtime operation still checks it. Test-kit registrations do not turn plain kit state into runtime service plumbing. Type predicates inspect service values without declaring a runtime dependency. Operation parameters supplied exclusively by the service’s `methods: (state)` argument, directly or through other such parameters, carry owned initializer state, including the Layer’s own Scope. A hand-built state object or an independent Scope parameter still counts as service plumbing. Owned fibers, closeable scopes and native atom evaluation contexts follow Effect’s lifecycle conventions; wrapping a function with `Effect.fn` still checks its parameters. An adapter may pass a foreign resource between its functions when the calls supply values constructed through an outside library or received by its host callbacks, including local construction helpers and an Effect acquisition wrapper; reading that resource from the environment still counts as service plumbing. Installed implementation shapes are discovered in the consuming repository's package scopes, alongside the framework service package's scope.
|
|
126
126
|
|
|
127
|
-
Both rules refuse config exceptions and inline suppressions. Record existing debt with `quality baseline write --rule effect/boundary
|
|
127
|
+
Both rules refuse config exceptions and inline suppressions. Record existing debt with `quality baseline write --rule effect/boundary` and `quality baseline write --rule effect/service-parameters`; the normal report and baseline burn-down apply.
|
|
128
128
|
|
|
129
|
-
When an upgrade expands these checks, inspect the new findings,
|
|
129
|
+
When an upgrade expands these checks, inspect the new findings, fix every finding you can and record retained debt with `quality baseline write --rule effect/boundary` (or `--rule effect/service-parameters`). Writing the baseline accepts every rule, including rules that permit config exceptions, and records unchanged files. Omit `--rule` to record every current finding. The output names recorded rules and counts; for rules new since the previous baseline, review each case and report any misread to Platform with the file, lines and what Quality would need instead of leaving it as debt. Run `quality baseline tighten` after repairs to lower the touched files' counts.
|
|
130
130
|
|
|
131
131
|
### Package service ids
|
|
132
132
|
|
|
@@ -140,7 +140,7 @@ Import and local aliases, string literals and templates without substitutions ar
|
|
|
140
140
|
|
|
141
141
|
`effect/service-folders` applies wherever a file declares `defineService`, as well as to conventional `services/<name>` folders. Each service has its own folder. Its declaration belongs in `service.ts` with one named service export, beside its operation files. A second declaration beside an existing `service.ts` belongs in a separate service folder.
|
|
142
142
|
|
|
143
|
-
`effect/context-capture` rejects `Effect.provideContext`, `runPromiseWith` and `runForkWith` calls in core code, including imported aliases and destructured runners. It also checks the native Context overload of `Effect.provide`; Layer provision stays available. Composition roots and full-application test harnesses may merge inherited services with contexts built from Layers and acquire those Layers under an explicit restart scope with Scope.provide, or capture an environment inside an application whose requirements are fully provided by Layers. This follows the construction rather than the filename or folder; an ambient context in an ordinary service remains a finding. Yield the environment instead of capturing and re-providing it; runtime bridges belong in `adapters/` or `test-support/`. These service rules permit no config exceptions or inline suppressions. To adopt the policy in an existing repository, review retained findings and record them with `quality baseline write --
|
|
143
|
+
`effect/context-capture` rejects `Effect.provideContext`, `runPromiseWith` and `runForkWith` calls in core code, including imported aliases and destructured runners. It also checks the native Context overload of `Effect.provide`; Layer provision stays available. Composition roots and full-application test harnesses may merge inherited services with contexts built from Layers and acquire those Layers under an explicit restart scope with Scope.provide, or capture an environment inside an application whose requirements are fully provided by Layers. This follows the construction rather than the filename or folder; an ambient context in an ordinary service remains a finding. Yield the environment instead of capturing and re-providing it; runtime bridges belong in `adapters/` or `test-support/`. These service rules permit no config exceptions or inline suppressions. To adopt the policy in an existing repository, review retained findings and record them with `quality baseline write --rule effect/service-model --rule effect/service-folders --rule effect/context-capture`.
|
|
144
144
|
|
|
145
145
|
The rule reports hidden configurations and method records, configuration and operation spreads, computed members, local implementations and inline bodies, including in adapters and tests. It takes no config exceptions or inline suppressions. See the [service guide](https://github.com/ShivaeDev/platform/tree/main/packages/service#1-assemble-the-service-from-focused-files) for the shape.
|
|
146
146
|
|
|
@@ -148,9 +148,9 @@ The rule reports hidden configurations and method records, configuration and ope
|
|
|
148
148
|
|
|
149
149
|
`effect/adapter-imports` reports value imports of non-Effect dependencies, peers and optional dependencies, and Node builtins, at the import site. It includes side-effect imports, value re-exports, literal dynamic imports and `require` calls. Each package is checked against its own manifest; dev-only tools and workspace modules are accepted. Type-only imports and re-exports are accepted, including inline `type` specifiers when every binding is a type.
|
|
150
150
|
|
|
151
|
-
Move the integration into an `adapters/` folder and expose Effect values to the rest of the application. Use `import type` when only a type is needed. Folders named `adapters/` and `test-support/`, Effect packages (`effect` and `@effect/*`, including `@effect/platform-node`), native `@shivaedev/*` framework packages, plain Vitest imports in `.unit` tests, and rendering libraries in `client/` folders are accepted. The client rendering libraries are `react`, `react-dom`, `lucide-react`, `@base-ui/react`, `@tanstack/react-router`, `@tanstack/react-table`, `class-variance-authority`, `cn`, `clsx` and `tailwind-merge`, including their subpath imports. Import UI components, routing and styling helpers directly in client code. Libraries that perform I/O or manage external state, such as `axios`, `better-auth/react`, `@tanstack/react-query` and `zustand`, still need adapters there. Other outside libraries and non-client rendering imports still need adapters; entry points do not exempt imports.
|
|
151
|
+
Move the integration into an `adapters/` folder and expose Effect values to the rest of the application. Use `import type` when only a type is needed. Folders named `adapters/` and `test-support/`, Effect packages (`effect` and `@effect/*`, including `@effect/platform-node`), native `@shivaedev/*` framework packages, plain Vitest imports in `.unit` tests, and rendering libraries in `client/` folders are accepted. The client rendering libraries are `react`, `react-dom`, `recharts`, `lucide-react`, `@base-ui/react`, `@tanstack/react-router`, `@tanstack/react-table`, `class-variance-authority`, `cn`, `clsx` and `tailwind-merge`, including their subpath imports. Import UI components, routing and styling helpers directly in client code. Recharts is the stack's charting library; build charts with shadcn's Chart component (`ChartContainer` and friends) rather than raw recharts primitives where shadcn covers the case. Libraries that perform I/O or manage external state, such as `axios`, `better-auth/react`, `@tanstack/react-query` and `zustand`, still need adapters there. Other outside libraries and non-client rendering imports still need adapters; entry points do not exempt imports.
|
|
152
152
|
|
|
153
|
-
The rule refuses config exceptions and inline suppressions. For existing debt, run `quality baseline write --
|
|
153
|
+
The rule refuses config exceptions and inline suppressions. For existing debt, run `quality baseline write --rule effect/adapter-imports`; baseline shards keep one entry per file with its finding count. Run `quality baseline tighten` after moving integrations.
|
|
154
154
|
|
|
155
155
|
### Shared error classes
|
|
156
156
|
|
|
@@ -170,7 +170,7 @@ The rule refuses config exceptions and inline suppressions. For existing debt, r
|
|
|
170
170
|
|
|
171
171
|
The check follows Effect import aliases, local operation and handler aliases, nested calls and `.pipe(...)` stages. It recognizes FileSystem instances yielded from the native service and their local aliases. Retry options are checked as object literals; a spread may supply a bound. It does not infer whether a supplied schedule terminates or analyze arbitrary recovery helpers. Static findings identify these shapes, not every possible swallowed failure.
|
|
172
172
|
|
|
173
|
-
This rule refuses config exceptions and inline suppressions, with no exempt folders.
|
|
173
|
+
This rule refuses config exceptions and inline suppressions, with no exempt folders. Review each finding, fix what you can and record retained debt with `quality baseline write --rule effect/failure-honesty`. Run `quality baseline tighten` after repairs.
|
|
174
174
|
|
|
175
175
|
### 1. Once per repository: connect the shared policy
|
|
176
176
|
|
|
@@ -213,9 +213,9 @@ quality hooks install
|
|
|
213
213
|
|
|
214
214
|
For an application setup script, use `quality setup`. It installs the same hook when the current folder has its own `.git` entry, including a linked worktree. An unversioned app or an app inside another repository leaves hooks alone.
|
|
215
215
|
|
|
216
|
-
Installing the package does not install a hook. `hooks install` writes the repository's pre-commit hook. A hook Quality did not write is kept unless `--force` replaces it. For an existing repository, `quality baseline write` records
|
|
216
|
+
Installing the package does not install a hook. `hooks install` writes the repository's pre-commit hook. A hook Quality did not write is kept unless `--force` replaces it. For an existing repository or a policy upgrade, `quality baseline write` records every current finding, including unchanged files. Add `--rule <id>` to record only selected rules. The output asks you to fix what you can first, then review each recorded case of rules new since the previous baseline and report misreads to Platform with the file, lines and what Quality would need instead of leaving them as debt.
|
|
217
217
|
|
|
218
|
-
Apps generated by create-app provide `pnpm baseline write
|
|
218
|
+
Apps generated by create-app provide `pnpm baseline write` for adopting Quality upgrades in existing application code. Review the recorded findings and burn them down with `pnpm baseline tighten`; checks remain strict above the recorded counts. The starter stays free of Quality debt, so newly generated apps start with an empty baseline.
|
|
219
219
|
|
|
220
220
|
Use `pnpm format --rule react/jsx-conditionals` (or `quality fix --rule react/jsx-conditionals`) for mechanical repairs. It extracts a conditional child into a variable before its return when the enclosing intrinsic elements or fragments have no attributes or other children. It preserves the conditional expression, including falsy values such as `0`, and leaves mapped children, component elements and evaluation-sensitive cases for manual repair. Remaining findings are printed and exit 1 even when the baseline covers them. The rule-specific command does not run Biome’s unsafe fixes.
|
|
221
221
|
|
|
@@ -404,10 +404,10 @@ quality baseline tighten
|
|
|
404
404
|
When a Quality upgrade adds a check, or a reviewed change needs to record one rule's findings again:
|
|
405
405
|
|
|
406
406
|
```sh
|
|
407
|
-
quality baseline write --rule tests/story-setup
|
|
407
|
+
quality baseline write --rule tests/story-setup
|
|
408
408
|
```
|
|
409
409
|
|
|
410
|
-
Keep the default error level. The command replaces that rule's entries
|
|
410
|
+
Keep the default error level. The command replaces that rule's entries across all files; every other rule's entries stay unchanged. Omit `--rule` to record every finding. Review the recorded cases using the guidance printed after each write. The [debt and hook guide](https://github.com/ShivaeDev/platform/blob/main/packages/quality/docs/debt-and-hooks.md) covers the baseline format, exception subjects, limit changes, renames and commit checks.
|
|
411
411
|
|
|
412
412
|
### Baseline merges
|
|
413
413
|
|
|
@@ -424,13 +424,13 @@ Git calls `quality baseline merge <ancestor> <current> <other>`. Entries are key
|
|
|
424
424
|
|
|
425
425
|
### Unused code
|
|
426
426
|
|
|
427
|
-
`code/unused` uses knip to report unused files, value and type exports, unused dependencies (including development and optional peer dependencies), and imports missing from the package manifest in every workspace. It runs through `quality lint` and the normal report and baseline. The rule accepts no options or permanent exceptions; Quality supplies knip’s entry points without a repository knip config. It follows package scripts through their imports to esbuild `build`, `buildSync` and `context` calls and `Bun.build`, reading literal entry lists or maps, local constants, array spreads, arguments passed through local or imported build helpers, builds inside Effect acquisition callbacks, and Node path `join` / `resolve` calls. Conventional tool configs, including dependency-cruiser configs and nested Vitest configs, are entries too. Relative paths use the script package’s working directory (or esbuild’s `absWorkingDir`); `import.meta.dirname` and `__dirname` refer to the build helper’s folder. Node path calls use the script package’s process directory even when the bundler sets a different working directory. Entry files and their imports count as used without fake imports. Node module resolution through `createRequire(...).resolve(...)` also counts as dependency use; an ordinary object’s `resolve` method does not. Unrelated strings and entries in abandoned build helpers do not establish reachability. Runtime modules supplied by a host can be declared in an ambient script included by the importing file’s TypeScript project. These declarations satisfy the missing-dependency check only in that project; undeclared imports still fail.
|
|
427
|
+
`code/unused` uses knip to report unused files, value and type exports, unused dependencies (including development and optional peer dependencies), and imports missing from the package manifest in every workspace. It runs through `quality lint` and the normal report and baseline. The rule accepts no options or permanent exceptions; Quality supplies knip’s entry points without a repository knip config. It follows package scripts through their imports to esbuild `build`, `buildSync` and `context` calls, Rolldown `build` and `watch` calls (including config arrays), and `Bun.build`, reading literal entry lists or maps, local constants, array spreads, arguments passed through local or imported build helpers, mapped config array elements, builds inside Effect acquisition callbacks, and Node path `join` / `resolve` calls. Conventional tool configs, including dependency-cruiser configs and nested Vitest configs, are entries too. Relative paths use the script package’s working directory (or esbuild’s `absWorkingDir`); `import.meta.dirname` and `__dirname` refer to the build helper’s folder. Node path calls use the script package’s process directory even when the bundler sets a different working directory. Entry files and their imports count as used without fake imports. Node module resolution through `createRequire(...).resolve(...)` also counts as dependency use; an ordinary object’s `resolve` method does not. Unrelated strings and entries in abandoned build helpers do not establish reachability. Runtime modules supplied by a host can be declared in an ambient script included by the importing file’s TypeScript project. These declarations satisfy the missing-dependency check only in that project; undeclared imports still fail.
|
|
428
428
|
|
|
429
429
|
Package `exports` are public API, including wildcard targets and source conditions. Package `bin` and scripts, test and story globs, tool configs and `src/test-support` provide the other entry points. Imports reachable from those entries count as used. Source-conditioned package import aliases resolve to their sources before a build. Compiler mappings from `tsconfig.json` and `tsconfig.build.json` keep imports on their source files when build output exists. An internal module can be used while one of its exports remains unused. An application’s declared dependency entry points satisfy provided imports under the same policy as `imports/manifest`.
|
|
430
430
|
|
|
431
431
|
When Knip cannot produce a valid report, including when a tool config such as `prisma.config.ts` throws because `DATABASE_URL` is missing, `code/unused` reports one finding on the root `package.json` with the tool’s output and repair guidance. The other rules still run. This finding means unused-code analysis did not complete; repair the failure and rerun the gate.
|
|
432
432
|
|
|
433
|
-
For adoption, run `quality baseline write --rule code/unused
|
|
433
|
+
For adoption, run `quality baseline write --rule code/unused` and review the recorded debt. Burn it down by deleting unused code, removing unused dependency declarations, declaring missing dependencies, or connecting code to a real entry point. Run `quality baseline tighten` after repairs, or `quality baseline prune` across the repository. Do not add an entry point just to hide dead code.
|
|
434
434
|
|
|
435
435
|
### What the rules check
|
|
436
436
|
|
|
@@ -593,7 +593,7 @@ quality fix [--config <file>]
|
|
|
593
593
|
quality exceptions migrate [--config <file>] [--from <registry>]
|
|
594
594
|
quality baseline merge <ancestor> <current> <other>
|
|
595
595
|
quality baseline install-driver
|
|
596
|
-
quality baseline write [--config <file>] [--rule <id>]...
|
|
596
|
+
quality baseline write [--config <file>] [--rule <id>]...
|
|
597
597
|
quality baseline prune [--config <file>] [--against <ref>]
|
|
598
598
|
quality baseline tighten [--config <file>] [--staged]
|
|
599
599
|
quality baseline migrate [--config <file>] [--from <file>]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundlerEntries.d.ts","sourceRoot":"","sources":["../../src/adapters/bundlerEntries.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"bundlerEntries.d.ts","sourceRoot":"","sources":["../../src/adapters/bundlerEntries.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,YAAY,CAAC;AAM5B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAgD3C,wBAAgB,cAAc,CAC7B,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,CAAa,GACrD,SAAS,MAAM,EAAE,CA+BnB"}
|
|
@@ -4,6 +4,7 @@ import { buildEntryPaths } from "#adapters/buildEntryPaths.ts";
|
|
|
4
4
|
import { buildEntryValue, buildOption } from "#adapters/buildEntryValue.ts";
|
|
5
5
|
import { buildArguments, buildHelper } from "#adapters/buildHelper.ts";
|
|
6
6
|
import { importedCall } from "#adapters/importedCall.ts";
|
|
7
|
+
import { mappedBuildBindings } from "#adapters/mappedBuildBindings.ts";
|
|
7
8
|
import { parse } from "#rules/parse.ts";
|
|
8
9
|
const ESBUILD = new Set(["build", "buildSync", "context"]);
|
|
9
10
|
function callbackBody(node) {
|
|
@@ -17,13 +18,24 @@ function entryOption(call) {
|
|
|
17
18
|
return "entrypoints";
|
|
18
19
|
}
|
|
19
20
|
const imported = importedCall(call);
|
|
21
|
+
if (imported?.module === "rolldown" && ["build", "watch"].includes(imported.name)) {
|
|
22
|
+
return "input";
|
|
23
|
+
}
|
|
20
24
|
return imported?.module === "esbuild" && ESBUILD.has(imported.name) ? "entryPoints" : undefined;
|
|
21
25
|
}
|
|
22
26
|
function entriesOf(call, file, cwd, bindings) {
|
|
23
27
|
const option = entryOption(call);
|
|
24
28
|
const [argument] = call.arguments;
|
|
25
29
|
const options = argument === undefined ? undefined : buildEntryValue(argument, new Set(), bindings);
|
|
26
|
-
if (option === undefined || options === undefined
|
|
30
|
+
if (option === undefined || options === undefined) {
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
33
|
+
const configs = option === "input" && ts.isArrayLiteralExpression(options) ? options.elements : [options];
|
|
34
|
+
return configs.flatMap((config) => configuredEntries(config, option, file, cwd, bindings));
|
|
35
|
+
}
|
|
36
|
+
function configuredEntries(value, option, file, cwd, bindings) {
|
|
37
|
+
const options = buildEntryValue(value, new Set(), bindings);
|
|
38
|
+
if (!ts.isObjectLiteralExpression(options)) {
|
|
27
39
|
return [];
|
|
28
40
|
}
|
|
29
41
|
const directory = buildOption(options, "absWorkingDir");
|
|
@@ -44,7 +56,9 @@ export function bundlerEntries(file, root, directory, sources = new Map()) {
|
|
|
44
56
|
if (ts.isFunctionLike(node)) {
|
|
45
57
|
const body = callbackBody(node);
|
|
46
58
|
if (body !== undefined) {
|
|
47
|
-
|
|
59
|
+
for (const mapped of mappedBuildBindings(node, bindings)) {
|
|
60
|
+
visit(body, mapped, active);
|
|
61
|
+
}
|
|
48
62
|
}
|
|
49
63
|
return;
|
|
50
64
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundlerEntries.js","sourceRoot":"","sources":["../../src/adapters/bundlerEntries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAsB,eAAe,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChG,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"bundlerEntries.js","sourceRoot":"","sources":["../../src/adapters/bundlerEntries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAsB,eAAe,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChG,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAEvE,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,C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AAI,CAAC,aAAa,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACvH,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAC1B,CACD,CAAC;YACF,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;YACpD,IAAI,MAAM,EAAE,IAAI,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;gBACvD,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,GAAG,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;YAC1F,CAAC;QACF,CAAC;QACD,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;IAClE,CAAC;IACD,KAAK,CAAC,MAAM,EAAE,IAAI,GAAG,EAAE,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;IACpC,OAAO,OAAO,CAAC;AAChB,CAAC"}
|
|
@@ -2,7 +2,7 @@ import ts from "typescript";
|
|
|
2
2
|
import { parse } from "#rules/parse.ts";
|
|
3
3
|
function usesBundler(source) {
|
|
4
4
|
function visit(node) {
|
|
5
|
-
if (ts.isImportDeclaration(node) && ts.isStringLiteral(node.moduleSpecifier) && node.moduleSpecifier.text
|
|
5
|
+
if (ts.isImportDeclaration(node) && ts.isStringLiteral(node.moduleSpecifier) && ["esbuild", "rolldown"].includes(node.moduleSpecifier.text)) {
|
|
6
6
|
return true;
|
|
7
7
|
}
|
|
8
8
|
if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.expression) && node.expression.text === "Bun" && node.name.text === "build") {
|
|
@@ -15,7 +15,7 @@ function usesBundler(source) {
|
|
|
15
15
|
function directSources(files) {
|
|
16
16
|
const sources = new Map();
|
|
17
17
|
for (const file of files) {
|
|
18
|
-
if (!(file.text.includes("esbuild") || file.text.includes("Bun"))) {
|
|
18
|
+
if (!(file.text.includes("esbuild") || file.text.includes("rolldown") || file.text.includes("Bun"))) {
|
|
19
19
|
continue;
|
|
20
20
|
}
|
|
21
21
|
const source = parse(file);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundlerSources.js","sourceRoot":"","sources":["../../src/adapters/bundlerSources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAG5B,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,SAAS,WAAW,CAAC,MAAqB;IACzC,SAAS,KAAK,CAAC,IAAa;QAC3B,IAAI,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC,eAAe,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"bundlerSources.js","sourceRoot":"","sources":["../../src/adapters/bundlerSources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAG5B,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,SAAS,WAAW,CAAC,MAAqB;IACzC,SAAS,KAAK,CAAC,IAAa;QAC3B,IAAI,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;YAC7I,OAAO,IAAI,CAAC;QACb,CAAC;QACD,IAAI,EAAE,CAA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;YACxB,CAAC;QACF,CAAC;IACF,CAAC;IACD,OAAO,OAAO,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import ts from "typescript";
|
|
2
|
+
export declare function foreignDeclaration(node: ts.Declaration): boolean;
|
|
3
|
+
export declare function contextualCallbackType(checker: ts.TypeChecker, node: ts.Node): ts.Type | undefined;
|
|
4
|
+
export declare function foreignCallbackParameter(checker: ts.TypeChecker, parameter: ts.ParameterDeclaration): boolean;
|
|
5
|
+
//# sourceMappingURL=foreignCallback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"foreignCallback.d.ts","sourceRoot":"","sources":["../../src/adapters/foreignCallback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,GAAG,OAAO,CAGhE;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,EAAE,CAAC,WAAW,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,IAAI,GAAG,SAAS,CAUlG;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,EAAE,CAAC,WAAW,EAAE,SAAS,EAAE,EAAE,CAAC,oBAAoB,GAAG,OAAO,CAe7G"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import ts from "typescript";
|
|
2
|
+
export function foreignDeclaration(node) {
|
|
3
|
+
const file = node.getSourceFile().fileName.replaceAll("\\", "/");
|
|
4
|
+
return file.includes("/node_modules/") && !/\/(?:effect|@effect|@shivaedev)\//u.test(file);
|
|
5
|
+
}
|
|
6
|
+
export function contextualCallbackType(checker, node) {
|
|
7
|
+
if (ts.isArrowFunction(node) || ts.isFunctionExpression(node)) {
|
|
8
|
+
return checker.getContextualType(node);
|
|
9
|
+
}
|
|
10
|
+
if (ts.isMethodDeclaration(node) && ts.isObjectLiteralExpression(node.parent)) {
|
|
11
|
+
const object = checker.getContextualType(node.parent);
|
|
12
|
+
const property = object?.getProperty(node.name.getText().replace(/^["']|["']$/gu, ""));
|
|
13
|
+
return property === undefined ? undefined : checker.getTypeOfSymbol(property);
|
|
14
|
+
}
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
export function foreignCallbackParameter(checker, parameter) {
|
|
18
|
+
const fn = parameter.parent;
|
|
19
|
+
const context = contextualCallbackType(checker, fn);
|
|
20
|
+
if ((context === undefined ? [] : checker.getNonNullableType(context).getCallSignatures()).some((signature) => signature.declaration !== undefined && foreignDeclaration(signature.declaration))) {
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
if (!((ts.isArrowFunction(fn) || ts.isFunctionExpression(fn)) && ts.isCallExpression(fn.parent) && fn.parent.arguments.includes(fn))) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
const owner = checker.getResolvedSignature(fn.parent);
|
|
27
|
+
return owner?.declaration !== undefined && foreignDeclaration(owner.declaration);
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=foreignCallback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"foreignCallback.js","sourceRoot":"","sources":["../../src/adapters/foreignCallback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,MAAM,UAAU,kBAAkB,CAAC,IAAoB;IACtD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACjE,OAAO,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,oCAAoC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC5F,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,OAAuB,EAAE,IAAa;IAC5E,IAAI,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,oBAAoB,CA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AAC,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;QACtI,OAAO,KAAK,CAAC;IACd,CAAC;IACD,MAAM,KAAK,GAAG,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;IACtD,OAAO,KAAK,EAAE,WAAW,KAAK,SAAS,IAAI,kBAAkB,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;AAClF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"foreignResources.d.ts","sourceRoot":"","sources":["../../src/adapters/foreignResources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"foreignResources.d.ts","sourceRoot":"","sources":["../../src/adapters/foreignResources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AA8C5B,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,EAAE,CAAC,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,UAAU,EAAE,eAEvE,EAAE,CAAC,oBAAoB,KAAG,OAAO,CAgBpD"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import ts from "typescript";
|
|
2
|
+
import { foreignCallbackParameter, foreignDeclaration } from "#adapters/foreignCallback.ts";
|
|
3
|
+
import { parameterOrigins } from "#adapters/parameterOrigins.ts";
|
|
2
4
|
import { serviceProperty } from "#adapters/serviceAssemblySyntax.ts";
|
|
3
5
|
import { effectApi, resolvedValue } from "#adapters/serviceModelSyntax.ts";
|
|
4
6
|
import { returnValues } from "#rules/stories/returnValues.ts";
|
|
5
|
-
function foreign(node) {
|
|
6
|
-
const file = node.getSourceFile().fileName.replaceAll("\\", "/");
|
|
7
|
-
return file.includes("/node_modules/") && !/\/(?:effect|@effect|@shivaedev)\//u.test(file);
|
|
8
|
-
}
|
|
9
7
|
function constructed(checker, node, seen = new Set()) {
|
|
10
8
|
if (seen.has(node)) {
|
|
11
9
|
return false;
|
|
@@ -27,7 +25,7 @@ function constructed(checker, node, seen = new Set()) {
|
|
|
27
25
|
}
|
|
28
26
|
function acquisition(checker, node, seen) {
|
|
29
27
|
const signature = checker.getResolvedSignature(node);
|
|
30
|
-
if (signature?.declaration !== undefined &&
|
|
28
|
+
if (signature?.declaration !== undefined && foreignDeclaration(signature.declaration)) {
|
|
31
29
|
return true;
|
|
32
30
|
}
|
|
33
31
|
if (ts.isCallExpression(node)) {
|
|
@@ -44,43 +42,20 @@ function acquisition(checker, node, seen) {
|
|
|
44
42
|
return callback !== undefined && constructed(checker, callback, seen);
|
|
45
43
|
}
|
|
46
44
|
export function foreignResources(checker, sources) {
|
|
47
|
-
|
|
48
|
-
function argumentsIn() {
|
|
49
|
-
if (calls !== undefined) {
|
|
50
|
-
return calls;
|
|
51
|
-
}
|
|
52
|
-
const arguments_ = new Map();
|
|
53
|
-
function visit(node) {
|
|
54
|
-
if (ts.isCallExpression(node)) {
|
|
55
|
-
const declaration = checker.getResolvedSignature(node)?.declaration;
|
|
56
|
-
for (const [index, parameter] of (declaration?.parameters ?? []).entries()) {
|
|
57
|
-
const argument = node.arguments[index];
|
|
58
|
-
if (argument !== undefined && ts.isParameter(parameter)) {
|
|
59
|
-
const values = arguments_.get(parameter) ?? [];
|
|
60
|
-
values.push(argument);
|
|
61
|
-
arguments_.set(parameter, values);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
ts.forEachChild(node, visit);
|
|
66
|
-
}
|
|
67
|
-
for (const source of sources) {
|
|
68
|
-
visit(source);
|
|
69
|
-
}
|
|
70
|
-
calls = arguments_;
|
|
71
|
-
return arguments_;
|
|
72
|
-
}
|
|
45
|
+
const originates = parameterOrigins(checker, sources);
|
|
73
46
|
return (parameter) => {
|
|
74
47
|
const source = parameter.getSourceFile();
|
|
75
48
|
if (!/(?:^|\/)adapters\//u.test(source.fileName)) {
|
|
76
49
|
return false;
|
|
77
50
|
}
|
|
78
51
|
const type = checker.getTypeAtLocation(parameter);
|
|
79
|
-
if (!(type.getSymbol()?.declarations ?? []).some(
|
|
52
|
+
if (!(type.getSymbol()?.declarations ?? []).some(foreignDeclaration) || type.getProperty("~effect/Context/Service") !== undefined) {
|
|
80
53
|
return false;
|
|
81
54
|
}
|
|
82
|
-
|
|
83
|
-
|
|
55
|
+
return originates(parameter, (value) => {
|
|
56
|
+
const declaration = ts.isIdentifier(value) ? checker.getSymbolAtLocation(value)?.valueDeclaration : value;
|
|
57
|
+
return ((declaration !== undefined && ts.isParameter(declaration) && foreignCallbackParameter(checker, declaration)) || constructed(checker, value));
|
|
58
|
+
});
|
|
84
59
|
};
|
|
85
60
|
}
|
|
86
61
|
//# sourceMappingURL=foreignResources.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"foreignResources.js","sourceRoot":"","sources":["../../src/adapters/foreignResources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"foreignResources.js","sourceRoot":"","sources":["../../src/adapters/foreignResources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,SAAS,WAAW,CAAC,OAAuB,EAAE,IAAa,EAAE,IAAI,GAAG,IAAI,GAAG,EAAW;IACrF,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QACp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AAO,KAAK,CAAC;QACd,CAAC;QACD,MAAM,IAAI,GAAG,OAAO,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;QAClD,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,YAAY,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,yBAAyB,CAAC,KAAK,SAAS,EAAE,CAAC;YACnI,OAAO,KAAK,CAAC;QACd,CAAC;QACD,OAAO,UAAU,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE;YACtC,MAAM,WAAW,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,KAAK,CAAC;YAC1G,OAAO,CACN,CAAC,WAAW,KAAK,SAAS,IAAI,EAAE,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,wBAAwB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC,IAAI,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAC3I,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frameworkCallback.d.ts","sourceRoot":"","sources":["../../src/adapters/frameworkCallback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"frameworkCallback.d.ts","sourceRoot":"","sources":["../../src/adapters/frameworkCallback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AA4B5B,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,EAAE,CAAC,WAAW,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,WAAW,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,IAAI,eAAqB,GAAG,OAAO,CA0C/I;AAgBD,wBAAgB,aAAa,CAC5B,OAAO,EAAE,EAAE,CAAC,WAAW,EACvB,SAAS,EAAE,EAAE,CAAC,oBAAoB,EAClC,KAAK,EAAE,WAAW,CAAC,EAAE,CAAC,UAAU,CAAC,GAC/B,EAAE,CAAC,oBAAoB,CAuBzB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import ts from "typescript";
|
|
2
2
|
import { callbackEscapes } from "#adapters/callbackEscapes.ts";
|
|
3
|
+
import { contextualCallbackType } from "#adapters/foreignCallback.ts";
|
|
3
4
|
import { frameworkOwner } from "#adapters/frameworkOwner.ts";
|
|
4
5
|
import { effectApi, resolvedValue } from "#adapters/serviceModelSyntax.ts";
|
|
5
6
|
function supplied(signature, local) {
|
|
@@ -17,11 +18,18 @@ function wrapsEffectFunction(checker, expression) {
|
|
|
17
18
|
}
|
|
18
19
|
return effectApi(checker, callee, "fn") || effectApi(checker, callee, "fnUntraced");
|
|
19
20
|
}
|
|
21
|
+
function suppliedCallback(checker, node, local) {
|
|
22
|
+
const contextual = contextualCallbackType(checker, node);
|
|
23
|
+
return (contextual === undefined ? [] : checker.getNonNullableType(contextual).getCallSignatures()).some((signature) => supplied(signature, local));
|
|
24
|
+
}
|
|
20
25
|
export function frameworkCallback(checker, node, local, seen = new Set()) {
|
|
21
26
|
if (seen.has(node)) {
|
|
22
27
|
return false;
|
|
23
28
|
}
|
|
24
29
|
seen.add(node);
|
|
30
|
+
if (ts.isMethodDeclaration(node) && suppliedCallback(checker, node, local)) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
25
33
|
if (!(ts.isArrowFunction(node) || ts.isFunctionExpression(node))) {
|
|
26
34
|
return false;
|
|
27
35
|
}
|
|
@@ -39,8 +47,7 @@ export function frameworkCallback(checker, node, local, seen = new Set()) {
|
|
|
39
47
|
}
|
|
40
48
|
return !callbackEscapes(checker, node.parent, node);
|
|
41
49
|
}
|
|
42
|
-
|
|
43
|
-
if ((contextual === undefined ? [] : checker.getNonNullableType(contextual).getCallSignatures()).some((signature) => supplied(signature, local))) {
|
|
50
|
+
if (suppliedCallback(checker, node, local)) {
|
|
44
51
|
return true;
|
|
45
52
|
}
|
|
46
53
|
const property = node.parent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frameworkCallback.js","sourceRoot":"","sources":["../../src/adapters/frameworkCallback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAE3E,SAAS,QAAQ,CAAC,SAAuB,EAAE,KAAiC;IAC3E,OAAO,SAAS,CAAC,WAAW,KAAK,SAAS,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC,CAAC;AACjG,CAAC;AAED,SAAS,mBAAmB,CAAC,OAAuB,EAAE,UAAyB;IAC9E,IAAI,MAAM,GAAG,UAAU,CAAC;IACxB,IAAI,KAAK,GAAY,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACvF,OAAO,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;QACnC,IAAI,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,iBAAiB,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC;YAC5G,OAAO,KAAK,CAAC;QACd,CAAC;QACD,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC;QAC1B,KAAK,GAAG,EAAE,CAAC,YAAY,C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qBAAqB,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS,IAAI,EAAE,CAAC,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QAClH,OAAO,SAAS,CAAC;IAClB,CAAC;IACD,OAAO,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,IAAI,SAAS,CAAC;AAChF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mappedBuildBindings.d.ts","sourceRoot":"","sources":["../../src/adapters/mappedBuildBindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,KAAK,aAAa,EAAmB,MAAM,8BAA8B,CAAC;AAEnF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,aAAa,GAAG,SAAS,aAAa,EAAE,CAcpG"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import ts from "typescript";
|
|
2
|
+
import { buildEntryValue } from "#adapters/buildEntryValue.ts";
|
|
3
|
+
export function mappedBuildBindings(node, bindings) {
|
|
4
|
+
if (!((ts.isArrowFunction(node) || ts.isFunctionExpression(node)) && ts.isCallExpression(node.parent))) {
|
|
5
|
+
return [bindings];
|
|
6
|
+
}
|
|
7
|
+
const callee = node.parent.expression;
|
|
8
|
+
const parameter = node.parameters[0];
|
|
9
|
+
if (!ts.isPropertyAccessExpression(callee) || callee.name.text !== "map" || parameter === undefined) {
|
|
10
|
+
return [bindings];
|
|
11
|
+
}
|
|
12
|
+
const array = buildEntryValue(callee.expression, new Set(), bindings);
|
|
13
|
+
if (!ts.isArrayLiteralExpression(array)) {
|
|
14
|
+
return [bindings];
|
|
15
|
+
}
|
|
16
|
+
return array.elements.map((element) => new Map([...bindings, [parameter, buildEntryValue(element, new Set(), bindings)]]));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=mappedBuildBindings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mappedBuildBindings.js","sourceRoot":"","sources":["../../src/adapters/mappedBuildBindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAsB,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEnF,MAAM,UAAU,mBAAmB,CAAC,IAAa,EAAE,QAAuB;IACzE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;QACxG,OAAO,CAAC,QAAQ,CAAC,CAAC;IACnB,CAAC;IACD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC;IACtC,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACrC,IAAI,CAAC,EAAE,CAAC,0BAA0B,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,KAAK,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QACrG,OAAO,CAAC,QAAQ,CAAC,CAAC;IACnB,CAAC;IACD,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,GAAG,EAAE,EAAE,QAAQ,CAAC,CAAC;IACtE,IAAI,CAAC,EAAE,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,CAAC;QACzC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACnB,CAAC;IACD,OAAO,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,QAAQ,EAAE,CAAC,SAAS,EAAE,eAAe,CAAC,OAAO,EAAE,IAAI,GAAG,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5H,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nonEmptyContext.d.ts","sourceRoot":"","sources":["../../src/adapters/nonEmptyContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,wBAAgB,eAAe,CAAC,OAAO,EAAE,EAAE,CAAC,WAAW,EAAE,OAAO,EAAE,EAAE,CAAC,IAAI,GAAG,OAAO,CAQlF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import ts from "typescript";
|
|
2
|
+
export function nonEmptyContext(checker, context) {
|
|
3
|
+
const variance = context.getProperty("_Services");
|
|
4
|
+
const parameter = variance === undefined ? undefined : checker.getTypeOfSymbol(variance).getCallSignatures()[0]?.parameters[0];
|
|
5
|
+
if (parameter === undefined) {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
const required = checker.getTypeOfSymbol(parameter);
|
|
9
|
+
return !((checker.getBaseConstraintOfType(required) ?? required).flags & ts.TypeFlags.Never);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=nonEmptyContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nonEmptyContext.js","sourceRoot":"","sources":["../../src/adapters/nonEmptyContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,MAAM,UAAU,eAAe,CAAC,OAAuB,EAAE,OAAgB;IACxE,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAClD,MAAM,SAAS,GAAG,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAC/H,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC7B,OAAO,KAAK,CAAC;IACd,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;IACpD,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,uBAAuB,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AAC9F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outsideImportFindings.d.ts","sourceRoot":"","sources":["../../src/adapters/outsideImportFindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAMhF,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"outsideImportFindings.d.ts","sourceRoot":"","sources":["../../src/adapters/outsideImportFindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAMhF,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AA2BpD,eAAO,MAAM,qBAAqB,yFA6ChC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outsideImportFindings.js","sourceRoot":"","sources":["../../src/adapters/outsideImportFindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,a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