Skip to content

fix(contentstack): include tslib as runtime dependency - #2721

Open
goodguypeci-design wants to merge 1 commit into
contentstack:mainfrom
goodguypeci-design:fix-tslib-runtime-dependency
Open

fix(contentstack): include tslib as runtime dependency#2721
goodguypeci-design wants to merge 1 commit into
contentstack:mainfrom
goodguypeci-design:fix-tslib-runtime-dependency

Conversation

@goodguypeci-design

@goodguypeci-design goodguypeci-design commented Sep 8, 2026

Copy link
Copy Markdown

Consumers can install @contentstack/cli without its development packages and then hit Cannot find module 'tslib'. The package compiles with importHelpers: true, so some generated JavaScript imports helpers from tslib at runtime even though it was only listed as a development dependency.

This moves tslib into the package's runtime dependencies and updates the matching pnpm lockfile entry. I regenerated the lockfile without running install scripts, built every workspace package, and packed @contentstack/cli to confirm that the published package metadata now includes dependencies.tslib and no longer lists it under devDependencies.

Fixes #2629.

@goodguypeci-design
goodguypeci-design requested review from a team and a lite review from Copilot September 8, 2026 02:17
@snyk-io

snyk-io Bot commented Sep 8, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copilot AI left a comment

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.

🟢 Approval recommended

The change directly addresses the reported runtime MODULE_NOT_FOUND by correctly promoting tslib to a production dependency, with the lockfile updated to match.

Pull request overview

This PR fixes a runtime install failure for the published @contentstack/cli package by ensuring tslib is installed for consumers. Since packages/contentstack/tsconfig.json has importHelpers: true, the compiled output can require tslib at runtime, so it must be a production dependency.

Changes:

  • Moved tslib from devDependencies to dependencies in packages/contentstack/package.json.
  • Updated pnpm-lock.yaml importer entry accordingly so the lockfile reflects the runtime dependency.
File summaries
File Description
packages/contentstack/package.json Adds tslib to runtime dependencies and removes it from devDependencies for @contentstack/cli.
pnpm-lock.yaml Updates the packages/contentstack importer dependency graph to match the package.json change.
Review details

Files not reviewed (1)

  • pnpm-lock.yaml: Generated file
  • Files reviewed: 1/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

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

@goodguypeci-design

Copy link
Copy Markdown
Author

/claim #2629

@goodguypeci-design
goodguypeci-design force-pushed the fix-tslib-runtime-dependency branch from 00e1e48 to db1ef32 Compare September 8, 2026 14:06
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.

tslib is in devDependencies → Cannot find module 'tslib' on global install

2 participants