Skip to content

move tslib to dependencies#727

Open
nicklloyd wants to merge 1 commit into
mainfrom
chore/cleanup-deps
Open

move tslib to dependencies#727
nicklloyd wants to merge 1 commit into
mainfrom
chore/cleanup-deps

Conversation

@nicklloyd
Copy link
Copy Markdown
Contributor

@nicklloyd nicklloyd commented Apr 21, 2026

Summary

  • tsconfig.json sets importHelpers: true, so emitted code does require("tslib") at runtime (61 files in dist/ currently).
  • tslib was only listed in devDependencies, so consumers installing @apideck/portman would fail with Cannot find module 'tslib'.
  • Moves tslib into runtime dependencies and updates the lockfile.

Options considered

  1. Keep as-is (now that tslib is a dep) — recommended, smallest change. (chosen)
  2. Drop importHelpers + leave tslib out — simpler deps, larger dist/ (each file inlines its own helpers).
  3. Bump target to es2019 (Node 12+ supports it, matches engines) — eliminates most helpers entirely, but it's a broader change that could surface other issues and is outside the scope of this fix.

Test plan

  • npm run build succeeds
  • Emitted dist/**/*.js files resolve tslib from runtime deps
  • Install from a tarball in a clean consumer project and require the package

tsconfig.json has importHelpers: true, so emitted code requires tslib
at runtime. Previously it was only in devDependencies, meaning consumers
installing the package would hit "Cannot find module 'tslib'".
@ChrisBrenton
Copy link
Copy Markdown

@thim81 Any chance of this being looked at? This is causing failures for many people it seems.

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