-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix arm-containerservice deprecated pacakages warning. #23
Conversation
💡 📓 The build error you see here is directly associated with : Azure/ms-rest-js#367 I tried with version below
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine to me though I would like to understand the DOM thing better. Would you be able to spare a few minutes (no longer) to look into that/explain it to me please? Thanks!
@@ -4,7 +4,8 @@ | |||
"target": "es6", | |||
"outDir": "out", | |||
"lib": [ | |||
"es6" | |||
"es6", | |||
"DOM" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems strange and I don't get why we would need DOM
here (I mean I get that we need it here to make things work but I don't know why don't they work without it and is this the right fix). Is there documentation that prescribes this? If not, can we check in with the team that this is what they expect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh never mind I realised you had already posted the link and oh dear yeah that's not good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😊 Yes, that is almost year and above when folks found the issue in “ms-rest-js” , so essentially deprecation help page should link the existing bug for folks who are fixing this deprecation to know what trick will actually fix their typing issues. 😎🙏
For those who might just read this comment here is an open bug: Azure/ms-rest-js#367
@philliphoff Would you mind taking a very quick look at this PR please? I think you understand the credentials and Azure Account stuff better than the rest of us do! Thanks! |
📓 I will add few chain of thought as continuity from what I understand by reading the ms-rest-js issue.
For backend development, it is optional to include this. However, there is some package that is used for both frontend and backend. And you will meet type missing error when compiling without including it. Hence this issue for us of missing types through ms-rest-js , and like one of the discussion here point: Azure/ms-rest-js#367
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good - thanks for dealing with it. Let's see if Phillip has time to take a look in the next couple of days, otherwise I'd be okay with just merging it now.
Assuming that the credentials returned by You're not the only extension dealing with this issue (see vscode-azure-account#140). If and when that library is finally updated, it could break this workaround. |
Following PR fixes the deprecated warning, screenshot below. in an attempt to fix this: #14
The
DOM
inclusion intsconfig
as build solution is detailed here: 2.0.3 version of ms-rest-js causes issues when we try to prepack sdks that take a dependency on that version ms-rest-js#367I updated the
azure/arm-containerservice
to@azure/arm-containerservice
https://www.npmjs.com/package/@azure/arm-containerservice more details here: https://github.com/Azure/azure-sdk-for-js/blob/master/documentation/Migration.mdBut the key challenge I had to fix is this: (Which will explain my
<unknown>
type conversion.so after change, I got the following error on
azcs.ContainerServiceClient(credentials, target.root.subscriptionId);
Which probably has to do with the type which get passed as
target
so if I do anyunknown
withmsRestJs.ServiceClientCredentials
type conversion of target.root.credentials that fixes the whole the issue.With this fix, new
nom install
gives this