Repository navigation
chore: migrate to knip - #2576
Merged
Merged
Conversation
chris-olszewski
commented
Oct 23, 2026
| - const { main, module, browser, bin, exports, types, typings } = manifest; | ||
| + const { main, module, browser, bin, exports: allExports, types, typings } = manifest; | ||
| + const exports = allExports && typeof allExports === 'object' && !Array.isArray(allExports) | ||
| + ? Object.fromEntries(Object.entries(allExports).filter(([key]) => key !== './lib/*')) |
Member
Author
There was a problem hiding this comment.
Temporary workaround so don't mark every export as used by the fallback entrypoint which will be removed.
| // Note: encodeSearchAttributeIndexedValueType exported for use in tests to register search attributes | ||
| // ts-prune-ignore-next | ||
| export const [encodeSearchAttributeIndexedValueType, _] = makeProtoEnumConverters< | ||
| export const [encodeSearchAttributeIndexedValueType] = makeProtoEnumConverters< |
Member
Author
There was a problem hiding this comment.
I don't think we care/want an exported _
Member
There was a problem hiding this comment.
But we're going to be the future lodash!!!
| } | ||
|
|
||
| export default async function (...args: unknown[]): Promise<NameAndArgs> { | ||
| export async function defaultActivity(...args: unknown[]): Promise<NameAndArgs> { |
Member
Author
There was a problem hiding this comment.
There's no reason to use export default here other than default lines up with our desired activity name.
chris-olszewski
marked this pull request as ready for review
October 23, 2026 20:26
Sushisource
approved these changes
Oct 23, 2026
chris-olszewski
force-pushed
the
olszewski/ts7-knip
branch
from
October 23, 2026 20:46
f22cc0e to
26b2c74
Compare
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.
What was changed
ts-prunetoknipknipto ignore our current backwards compatiblelib/*entrypoints. Otherwise everything becomes public andknipisn't effective. Semi-hacky, but I think this is a reasonable workaround until we remove thelib/*entrypoints.Why?
ts-prunehasn't had a release in 5 yearsts-pruneembeds a typescript version which won't support themodule: node20we'll need to move to with a TS 6/7 upgrade.pnpm run lint:pruneis now ~ 3x fasterChecklist
Closes N/A
How was this tested:
pnpm run lint:prune, quick verification thatknipdoes in fact catch unused exports.Any docs updates needed?
N/A