Commit ed5cef6
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
- contentstack-command
- contentstack-config
- contentstack-utilities
- contentstack
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | | - | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments