Skip to content

Commit

Permalink
Add upper bound for parse-duration package version (#97)
Browse files Browse the repository at this point in the history
NPM package
[parse-duration](https://www.npmjs.com/package/parse-duration) version
was bumped from `1.1.0` to `2.1.3` In PR #95 for CodePush CLI. This
caused the build to fail with the following error:

```shell
% npm run build

> code-push-cli@0.0.1 build
> tsc

script/command-parser.ts:1321:21 - error TS2349: This expression is not callable.
  Type 'typeof import("/private/tmp/ms-code-push-server/cli/node_modules/parse-duration/index")' has no call signatures.

1321   return Math.floor(parseDuration(durationString));
                         ~~~~~~~~~~~~~


Found 1 error in script/command-parser.ts:1321
```

As current code-base is not compatible with `parse-duration` versions
`2.0.0+`, restrict `parse-duration` to use version `1.x.y`.
  • Loading branch information
priitlatt authored Feb 14, 2025
1 parent b4f6dc1 commit 5b42222
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"jsonwebtoken": "^9.0.2",
"moment": "^2.29.4",
"opener": "^1.5.2",
"parse-duration": "2.1.3",
"parse-duration": "^1.1.0",
"plist": "^3.0.6",
"progress": "^2.0.3",
"prompt": "^1.3.0",
Expand Down

0 comments on commit 5b42222

Please sign in to comment.