Azure / azure-storage-azcopy

The new Azure Storage data transfer utility - AzCopy v10
MIT License
613 stars 222 forks source link

Can you update @azure-tools/azcopy-node with latest dependencies #1322

Closed khanaffan closed 3 years ago

khanaffan commented 3 years ago

Can you update the package to latest version of dependent packages and publish a new npm package. Its very old and refer to packages that are outdated.

Thanks

MRayermannMSFT commented 3 years ago

@khanaffan which dependent packages are you referring to?

khanaffan commented 3 years ago

It is keytar that has been lock down in package.json to specific version. Newer version of electron use latest version of keytar. The one in there only work with electron 5,6,7,8,9(beta) and not 10 or 11. We have electron 11.

This causes

Module did not self-register: '\\?\D:\bsw\imodeljs\common\temp\node_modules\.pnpm\registry.npmjs.org\keytar\5.6.0\node_modules\keytar\build\Release\keytar.node'.

Here is package json from azcopy-node. Also note that azcopy are also old at least 6 months old.

    "@azure-tools/azcopy-darwin": "10.5.0",
    "@azure-tools/azcopy-linux": "10.5.0",
    "@azure-tools/azcopy-win32": "10.5.0",
    "@azure-tools/azcopy-win64": "10.5.0",
    "@storage-explorer/macos-keychain": "1.0.0",
    "json-stream": "^1.0.0",
    "jsonwebtoken": "^8.4.0",
    "keytar": "5.6.0", 
    "tslib": "^1.9.0",
    "uuid": "^3.3.2"

Thanks

MRayermannMSFT commented 3 years ago

@khanaffan Ah ok, yep. With regards to keytar and any other modules used to do the JWToken sharing between azcopy-node and the actual AzCopy executable, we think we're going to remove those dependencies and leave it up to the consumer to implement the toking sharing instead. So instead of upgrading the dependences we'll remove them.

Any not related to that, including the AzCopy exe, we will get those updated to newer versions.

khanaffan commented 3 years ago

That make sense. Is there any ETA on this change?

Thanks.

MRayermannMSFT commented 3 years ago

@khanaffan I'll be making this my priority tomorrow, but just incase something comes up, let's say ETA of by end of next week. I'll definitely keep you up to date on progress.

MRayermannMSFT commented 3 years ago

@khanaffan, this is what we'll be shooting for with in the next version with regards to dependencies. Let me known if anything looks off to you.

  "dependencies": {
    "json-stream": "^1.0.0",
    "jsonwebtoken": "^8.5.1",
    "tslib": "^2.1.0",
    "uuid": "^8.3.2"
  },
  "optionalDependencies": {
    "@azure-tools/azcopy-win32": "10.8.0",
    "@azure-tools/azcopy-win64": "10.8.0",
    "@azure-tools/azcopy-linux": "10.8.0",
    "@azure-tools/azcopy-darwin": "10.8.0"
  }
khanaffan commented 3 years ago

@MRayermannMSFT Yes that look good.

Currently all azcopy binaries are installed on all platforms. I assume when you made them optional you also added os spec so only one of them get installed, right?

MRayermannMSFT commented 3 years ago

@khanaffan they are all already optional in that way? And they all already have an os spec?

Here's some of my npm install output for installing @azure-tools/azcopy-node v1.0.0

image

khanaffan commented 3 years ago

You are right. I just check i was seeing win32 and win64 being installed. I thought i saw something else. My bad.

Thanks

moro85 commented 3 years ago

@MRayermannMSFT currently this package is referencing a non-existent optional dependency "@storage-explorer/macos-keychain" this is causing failure to install using yarn for instance can you please remove it?

khanaffan commented 3 years ago

@moro85 This is what @MRayermannMSFT doing if you read on the top. He is getting rid of those. The new package.json look like this. It has no keytar or keychain dependencies.

"dependencies": {
    "json-stream": "^1.0.0",
    "jsonwebtoken": "^8.5.1",
    "tslib": "^2.1.0",
    "uuid": "^8.3.2"
  },
  "optionalDependencies": {
    "@azure-tools/azcopy-win32": "10.8.0",
    "@azure-tools/azcopy-win64": "10.8.0",
    "@azure-tools/azcopy-linux": "10.8.0",
    "@azure-tools/azcopy-darwin": "10.8.0"
  }
MRayermannMSFT commented 3 years ago

@khanaffan we've been having signing issues today so I haven't been able to upload to NPM today. >.< Sorry for the delay. As soon as signing is back I'll produce a signed package and get that uploaded.

MRayermannMSFT commented 3 years ago

@khanaffan and @moro85 azure-tools/azcopy-node version 2.0.0 has been published! Unfortunately the npmjs.com page hasn't updated yet but I can see it with npm view and I was able to install it:

$ npm view @azure-tools/azcopy-node

@azure-tools/azcopy-node@2.0.0 | MIT | deps: 8 | versions: 2
This package allows you to invoke [AzCopy v10](https://github.com/Azure/azure-storage-azcopy) from NodeJS.
https://github.com/Azure/azure-storage-azcopy#readme

dist
.tarball: https://registry.npmjs.org/@azure-tools/azcopy-node/-/azcopy-node-2.0.0.tgz
.shasum: ccadfa65bac0243d00bccd5df9bbb1549de28798
.integrity: sha512-HerDOjI+mYftnytOkanamDHZ/ZUCxbDrnfg7AoubKiiTtxEkShQYvzQ7CSNImpw6dKHJ/rlZsCPmfC4zdoLoNA==
.unpackedSize: 645.3 kB

dependencies:
@azure-tools/azcopy-darwin: 10.8.0 @azure-tools/azcopy-win32: 10.8.0  json-stream: ^1.0.0                tslib: ^2.1.0                      
@azure-tools/azcopy-linux: 10.8.0  @azure-tools/azcopy-win64: 10.8.0  jsonwebtoken: ^8.5.1               uuid: ^8.3.2                       

maintainers:
- azure-sdk <azure-sdk-npmjs@microsoft.com>

dist-tags:
latest: 2.0.0  

published 9 minutes ago by azure-sdk <azure-sdk-npmjs@microsoft.com>

You can see the lower number of runtime dependencies and the usage of AzCopy 10.8.0. Thank you both for your patience!

MRayermannMSFT commented 3 years ago

The NPM page is now up-to-date as well. image