Skip to content

Commit ed5cef6

Browse files
cs-rajclaude
andcommitted
fix(deps): declare tslib as a runtime dependency
Every TypeScript package here compiles with importHelpers: true, so tsc emits require("tslib") into lib/. None of the five packages declared tslib in dependencies: cli-utilities declared it nowhere at all, and the root cli package had it only in devDependencies, which does not ship to consumers. The defect is invisible in development because .npmrc sets shamefully-hoist=true, so tslib always resolves from the hoisted root. npm users mostly dodge it too, via a flat node_modules. On a strict install with no hoisting the requires fail and csdx exits 1 before it can print help, because the configured help class is one of the files that needs a helper. cli-auth, cli-command and cli-config emit no helpers today and so are unaffected as shipped, but they set importHelpers: true as well and are one interop import away from the same break. Declaring tslib in all five makes the rule uniform and checkable: a package that sets importHelpers declares tslib. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent ed57468 commit ed5cef6

6 files changed

Lines changed: 23 additions & 7 deletions

File tree

‎packages/contentstack-auth/package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"@contentstack/cli-command": "~2.0.1",
1919
"@contentstack/cli-utilities": "~2.0.1",
2020
"@oclif/core": "^4.11.14",
21-
"otplib": "^12.0.1"
21+
"otplib": "^12.0.1",
22+
"tslib": "^2.8.1"
2223
},
2324
"overrides": {
2425
"@oclif/core": {

‎packages/contentstack-command/package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"dependencies": {
1717
"@contentstack/cli-utilities": "~2.0.1",
1818
"contentstack": "^3.27.0",
19-
"@oclif/core": "^4.11.14"
19+
"@oclif/core": "^4.11.14",
20+
"tslib": "^2.8.1"
2021
},
2122
"overrides": {
2223
"@oclif/core": {

‎packages/contentstack-config/package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"@contentstack/cli-command": "~2.0.1",
1818
"@contentstack/cli-utilities": "~2.0.1",
1919
"@contentstack/utils": "~1.9.1",
20-
"@oclif/core": "^4.11.14"
20+
"@oclif/core": "^4.11.14",
21+
"tslib": "^2.8.1"
2122
},
2223
"overrides": {
2324
"@oclif/core": {

‎packages/contentstack-utilities/package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"recheck": "~4.5.0",
5454
"rxjs": "^6.6.7",
5555
"traverse": "^0.6.11",
56+
"tslib": "^2.8.1",
5657
"tty-table": "^4.2.3",
5758
"unique-string": "^2.0.0",
5859
"short-uuid": "^6.0.3",

‎packages/contentstack/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"ora": "^8.2.0",
5252
"semver": "^7.8.5",
5353
"short-uuid": "^6.0.3",
54+
"tslib": "^2.8.1",
5455
"winston": "^3.19.0"
5556
},
5657
"overrides": {
@@ -78,7 +79,6 @@
7879
"sinon": "^21.1.2",
7980
"tmp": "^0.2.7",
8081
"ts-node": "^10.9.2",
81-
"tslib": "^2.8.1",
8282
"typescript": "^5.9.3"
8383
},
8484
"engines": {

‎pnpm-lock.yaml‎

Lines changed: 15 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)