Skip to content

chore: use tsup for build - #72

Merged
bosi95 merged 1 commit into
feat/v2from
v2/packaging
Aug 11, 2026
Merged

chore: use tsup for build#72
bosi95 merged 1 commit into
feat/v2from
v2/packaging

Conversation

@bosi95

@bosi95 bosi95 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

chore: complete node and browser env build separation
chore: update docs and packaging
chore: update tests to write to a temp folder

chore: complete node and browser env build separation
chore: update docs and packaging
chore: update tests to write to a temp folder

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Migrates the library build pipeline to tsup while producing separate Node and browser bundles (with conditional exports) and updates tests/docs to reflect the new platform split and temp-fixture handling.

Changes:

  • Added tsup.config.ts to generate dual ESM+CJS outputs for Node (dist/node) and browser (dist/browser), with esbuild stubs to prevent cross-platform module loading.
  • Updated packaging (package.json exports, engines, sideEffects) and TypeScript config (moduleResolution: Bundler, noEmit, isolatedModules) to align with bundler-based builds.
  • Adjusted Jest projects (unit-node/unit-browser) and integration/unit tests to write fixtures under tests/integration/tmp/, plus added a browser shim setup file.

Reviewed changes

Copilot reviewed 41 out of 46 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tsup.config.ts Defines tsup Node/browser build outputs and esbuild stubs for platform-specific modules.
tsconfig.json Switches TS to bundler-style resolution and typecheck-only (noEmit) to match tsup builds.
tests/utils.ts Aligns imports with inline type-only imports.
tests/unit/version.spec.ts Updates unit test imports for type-only usage.
tests/unit/trash.spec.ts Updates unit test imports for type-only usage.
tests/unit/mock.ts Updates mock types to type-only imports for lint consistency.
tests/unit/folder.spec.ts Refactors imports into typed/value split (inline type imports).
tests/unit/file.spec.ts Refactors imports and updates fs-node module path usage.
tests/unit/drive.spec.ts Updates unit test imports for type-only usage.
tests/unit/abort.spec.ts Updates unit test imports for type-only usage.
tests/TESTS.md Documents new Jest project layout and temp fixture behavior/location.
tests/platform-browser.ts Adds unit-browser setup shim to force isNode=false for browser-path coverage.
tests/integration/version.spec.ts Decouples drive path vs on-disk sourcePath using the temp registry.
tests/integration/trash.spec.ts Uses stable temp source paths for repeated uploads.
tests/integration/setup/utils.ts Moves temp fixtures under tests/integration/tmp/ and returns absolute paths.
tests/integration/init.spec.ts Updates integration test imports for type-only usage.
tests/integration/folder.spec.ts Updates integration test imports for type-only usage.
tests/integration/file.spec.ts Decouples drive paths from disk paths across upload/update/move tests.
tests/integration/e2e.spec.ts Uses absolute disk path for update source while keeping manifest paths stable.
tests/integration/drive.spec.ts Updates integration test imports for type-only usage.
tests/integration/abort.spec.ts Tracks temp source paths explicitly for abort-related upload scenarios.
src/utils/mantaray.ts Converts bee-js and internal imports to type-only where applicable.
src/utils/fs/fs-node.ts Adds Node-only fs helpers (isDir, readFile, content-type detection).
src/utils/common.ts Converts internal type imports to inline type-only.
src/utils/bee.ts Converts bee-js and internal imports to type-only where applicable.
src/utils/asserts.ts Splits value vs type imports while preserving runtime validation constructors.
src/upload/upload-node.ts Updates Node upload implementation to import fs-node helper module.
src/upload/upload-browser.ts Converts imports to type-only where applicable.
src/upload/index.ts Updates dynamic imports to new upload-node / upload-browser module names.
src/types/utils.ts Converts bee-js imports to type-only where applicable.
src/types/upload.ts Converts internal imports to type-only where applicable.
src/types/info.ts Converts imports to type-only where applicable.
src/types/fileManager.ts Converts imports (bee-js + internal) to type-only where applicable.
src/types/download.ts Converts imports to type-only where applicable.
src/mantarayStore.ts Converts bee-js and internal imports to type-only where applicable.
src/fileManager.ts Converts bee-js and internal imports to type-only where applicable.
src/download/index.ts Converts imports to type-only where applicable.
README.md Updates build/package documentation for tsup + dual platform bundles and Node version requirement.
pnpm-workspace.yaml Allows esbuild to build during pnpm install (tsup/ts-jest dependency chain).
pnpm-lock.yaml Locks new toolchain deps (notably tsup/esbuild/rollup) and related transitive updates.
package.json Switches build script to tsup, adds conditional exports, updates engines, removes rimraf, adds repo metadata.
jest.config.ts Fixes browser setup filename and keeps multi-project Jest config.
eslint.config.mjs Ignores tsup config and enforces consistent-type-imports inline style.
.nvmrc Drops Node version to v22 to match engines/docs.
.npmignore Refines ignored paths for published package contents.
.gitignore Ignores integration temp directory under tests.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tsup.config.ts
@bosi95
bosi95 merged commit bc674a9 into feat/v2 Aug 11, 2026
4 checks passed
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.

2 participants