Title: parse npm install results correctly by dnadoba · Pull Request #3213 · NativeScript/nativescript-cli · GitHub
Open Graph Title: parse npm install results correctly by dnadoba · Pull Request #3213 · NativeScript/nativescript-cli
X Title: parse npm install results correctly by dnadoba · Pull Request #3213 · NativeScript/nativescript-cli
Description: Solves Issue #3217
This pull request changes the implementation to search for the correct object by name. It does no longer depend on the position and should be more reliable especially as the --json flag is experimental as described in the npm documentation: https://docs.npmjs.com/misc/config#json
As described in the comment of the current implementation of parseNpmInstallResults we just use the first object of the updated array.
nativescript-cli/lib/node-package-manager.ts
Lines 158 to 160
in
e181f03
// Npm 5 return different object after performing `npm install --dry-run`.
// Considering that the dependency is already installed we should
// find it in the `updated` key as a first element of the array.
But when I execute the following command:
npm install tns-ios --json --dry-run
tns-ios is not the first element in the updated array. The output looks something like this:
{
"added": [],
"removed": [],
"updated": [
{
"action": "update",
"name": "colors",
"version": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz",
"path": "
Open Graph Description: Solves Issue #3217 This pull request changes the implementation to search for the correct object by name. It does no longer depend on the position and should be more reliable especially as the --js...
X Description: Solves Issue #3217 This pull request changes the implementation to search for the correct object by name. It does no longer depend on the position and should be more reliable especially as the --js...
Opengraph URL: https://github.com/NativeScript/nativescript-cli/pull/3213
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:d07c2c08-2ca1-714f-f058-1dcf5a28b16b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B064:26ECEB:2845F8E:33320CD:6B01890B |
| html-safe-nonce | 76ef3b24c5627de15bdbeb2e80bf1111f42a6679e2068f2c09c07d6516f058c5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMDY0OjI2RUNFQjoyODQ1RjhFOjMzMzIwQ0Q6NkIwMTg5MEIiLCJ2aXNpdG9yX2lkIjoiNDA0OTUyMTE0Mjg1MDg2OTg3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a764441b95b207ea44d1294f67e388dff613de94d0ca0dc0b925eacb218757ca |
| hovercard-subject-tag | pull_request:151973174 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/NativeScript/nativescript-cli/pull/3213/files |
| twitter:image | https://avatars.githubusercontent.com/u/5688874?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/5688874?s=400&v=4 |
| og:image:alt | Solves Issue #3217 This pull request changes the implementation to search for the correct object by name. It does no longer depend on the position and should be more reliable especially as the --js... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/NativeScript/nativescript-cli git https://github.com/NativeScript/nativescript-cli.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 21347346 |
| octolytics-dimension-repository_nwo | NativeScript/nativescript-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 21347346 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/nativescript-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width