fix: Improve type-leaks test#4406
Merged
GordonSmith merged 1 commit intoJul 2, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request augments the type-leaks test suite, ensures the tests/** folder is included in Vitest’s workspace, and refactors several build and dependency configurations across packages.
- Include the
tests/**directory in Vitest’s workspace settings - Enhance the type-leaks test to detect exports, dynamic imports, and resolve package paths via
import.meta.url - Refactor build scripts: adopt
node:-prefixed core imports, unify esbuild plugin exports, and update dependency declarations
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| vitest.workspace.ts | Added "tests/**" to workspace include patterns |
| tests/type-leaks/type-dependencies.spec.ts | Enhanced logic to capture export declarations and compute PACKAGES_DIR |
| tests/package.json | Introduced a test orchestrator package.json for running all test suites |
| packages/util/esbuild.js | Removed obsolete build script |
| packages/markdown-it-plugins/package.json | Moved apache-arrow and shiki from devDependencies to peerDependencies |
| packages/markdown-it-plugins/esbuild.js | Bundling config now externalizes both dependencies and peerDependencies |
| packages/esbuild-plugins/src/build.ts | Refactored buildWatch API, added autoExternal, exported copyStaticFiles |
| packages/comms/src/index.node.ts | Switched import from "https" to "node:https" |
| packages/comms/src/ecl/scope.ts | Removed commented-out D3 time-format imports and unused variables |
| packages/comms/src/clienttools/eclcc.ts | Switched core imports to node:child_process, node:fs, etc. |
| packages/comms/src/clienttools/eclMeta.ts | Switched core imports to node:fs and node:path |
| packages/comms/esbuild.js | Added packages: "bundle" option to nodeBoth bundling for comms |
| package.json (root) | Added @types/esbuild-copy-static-files to devDependencies |
Comments suppressed due to low confidence (3)
packages/esbuild-plugins/src/build.ts:7
- The default export from
esbuild-copy-static-filesmay not be correctly imported as a namespace; switch toimport copyStaticFiles from "esbuild-copy-static-files"or verify the module’s export shape to ensure the plugin loads properly.
import * as copyStaticFiles from "esbuild-copy-static-files";
packages/esbuild-plugins/src/build.ts:62
- [nitpick] This debug statement prints the entire build configuration; consider removing it or using a debug-level logger to keep build output concise.
console.log("config", config);
Was missing some node deps still in devDeps Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
1dec7d2 to
0dbd604
Compare
jeclrsg
approved these changes
Jul 1, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Was missing some node deps still in devDeps
Checklist:
Testing: