Skip to content

Remove deadcode#132

Merged
dajimenezriv-internxt merged 8 commits into
masterfrom
remove-deadcode
May 14, 2026
Merged

Remove deadcode#132
dajimenezriv-internxt merged 8 commits into
masterfrom
remove-deadcode

Conversation

@dajimenezriv-internxt
Copy link
Copy Markdown
Contributor

@dajimenezriv-internxt dajimenezriv-internxt commented May 14, 2026

What

This PR implements knip so we can know which code is used and which not. I've also set the cli as entry so it doesn't consider it as deadcode.

First, we need to find all code that is still used, for that I search org:internxt from '@internxt/inxt-js in github. After that I found the following repos using it:

  • drive-desktop
  • drive-desktop-linux
  • cli
  • drive-server-wip
  • pc-cloud-old
  • drive-desktop-test
  • photos-server
  • pc-cloud
  • drive-server-old

For the relevant ones I search what imports are using from inxt-js:

// repo:internxt/drive-desktop-linux from '@internxt/inxt-js
import { Environment } from '@internxt/inxt-js';
import { GenerateFileKey } from '@internxt/inxt-js/build/lib/utils/crypto';
import { UploadStrategyFunction } from '@internxt/inxt-js/build/lib/core';
import { ActionState } from '@internxt/inxt-js/build/api';
import { DownloadOneShardStrategy } from '@internxt/inxt-js/build/lib/core';
import { DownloadStrategyFunction } from '@internxt/inxt-js/build/lib/core/download/strategy';

// repo:internxt/cli from '@internxt/inxt-js
import { Environment } from '@internxt/inxt-js';
// this is not used in `inxt-js` so it will be removed
// it will throw a type error in the cli but it can be removed there too
import { EncryptProgressCallback } from '@internxt/inxt-js/build/lib/core';

// repo:internxt/drive-desktop from '@internxt/inxt-js
import { Environment } from '@internxt/inxt-js';
import { ActionState } from '@internxt/inxt-js/build/api';

// repo:internxt/drive-server-wip from '@internxt/inxt-js
import { Environment } from '@internxt/inxt-js';

@dajimenezriv-internxt dajimenezriv-internxt self-assigned this May 14, 2026
Copy link
Copy Markdown
Member

@sg-gs sg-gs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bump the version on the package.json

uploadedBytes: number | null,
totalBytes: number | null,
) => void;
export type EncryptProgressCallback = (progress: number) => void;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this type is being used at cli, so bump the version using minor instead of patch. Just in case any of the other removed exports are being used in other projects

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@dajimenezriv-internxt dajimenezriv-internxt merged commit 370b0ae into master May 14, 2026
4 checks passed
@dajimenezriv-internxt dajimenezriv-internxt deleted the remove-deadcode branch May 14, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants