Skip to content
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

Management Plane API Switch #1121

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
232 changes: 167 additions & 65 deletions package-lock.json

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

11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -905,22 +905,25 @@
"webpack-cli": "^3.1.2"
},
"dependencies": {
"@azure/arm-cosmosdb": "^3.0.0",
"@azure/ms-rest-azure-js": "^1.3.5",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the node modules that you're not using

"@azure/ms-rest-browserauth": "^0.1.4",
"@azure/ms-rest-js": "^1.8.7",
"@azure/ms-rest-nodeauth": "^2.0.0",
"antlr4ts": "^0.4.1-alpha.0",
"azure-arm-cosmosdb": "^1.1.2",
"azure-arm-resource": "^3.0.0-preview",
"d3": "^3.0.0",
"documentdb": "^1.14.2",
"event-stream": "3.3.4",
"fs-extra": "^4.0.2",
"gremlin": "^2.6.0",
"html-to-text": "^4.0.0",
"mongodb": "^2.2.25",
"mongodb-extended-json": "^1.10.0",
"ms-rest": "^2.2.1",
"node-uuid": "1.4.8",
"socket.io": "^1.7.3",
"socket.io-client": "^1.7.3",
"underscore": "^1.8.3",
"vscode-azureextensionui": "^0.24.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is out of date - merge with master

"vscode-azureextensionui": "^0.26.0",
"vscode-json-languageservice": "^3.0.8",
"vscode-languageclient": "^4.4.0",
"vscode-languageserver": "^4.4.0",
Expand Down
2 changes: 1 addition & 1 deletion src/commands/deleteCosmosDBAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { CosmosDBManagementClient } from 'azure-arm-cosmosdb';
import { CosmosDBManagementClient } from '@azure/arm-cosmosdb';
import * as vscode from 'vscode';
import { AzureTreeItem, createAzureClient, DialogResponses } from 'vscode-azureextensionui';
import { UserCancelledError } from 'vscode-azureextensionui';
Expand Down
2 changes: 1 addition & 1 deletion src/docdb/tree/DocDBAccountTreeItemBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { DatabaseAccount } from 'azure-arm-cosmosdb/lib/models';
import { DatabaseAccount } from '@azure/arm-cosmosdb/esm/models';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please switch these to use the Models object from the base of the npm package, which is more of an npm package's "official" api. Something like this

import { ResourceManagementModels } from '@azure/arm-resources';

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a newer preference? This has been how it's used everywhere.
For eg. appservice

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean it's not super new, but yeah it changed sometime after we originally created the extensions. For example the original app service extension referenced v1.0.0-preview of "azure-arm-website" which didn't even have the models object:
Screen Shot 2019-06-21 at 4 08 42 PM

Now we're on a much later version that does:
Screen Shot 2019-06-21 at 4 09 43 PM

Functions is already moved over: https://github.com/microsoft/vscode-azurefunctions/blob/795ab870b56e133e2c360b3bf08df9419b792d4a/src/tree/FunctionsTreeItem.ts#L6
Docker is moved over: https://github.com/microsoft/vscode-docker/blob/2fae7a525c41f6f8375f51fc6a3598e2d05e5ca4/src/tree/registries/azure/AzureTaskRunTreeItem.ts#L6

There's a tslint rule here that we can eventually turn on: https://palantir.github.io/tslint/rules/no-submodule-imports/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the heads up.

I turned on the rule, it looks like there are other places where the rule is broken. Leaving those at the moment.

import { DatabaseMeta, DocumentClient, FeedOptions, QueryIterator } from 'documentdb';
import * as path from 'path';
import * as vscode from 'vscode';
Expand Down
2 changes: 1 addition & 1 deletion src/experiences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { DatabaseAccount } from 'azure-arm-cosmosdb/lib/models';
import { DatabaseAccount } from '@azure/arm-cosmosdb/esm/models';
import { IAzureQuickPickItem } from 'vscode-azureextensionui';

export enum API {
Expand Down
2 changes: 1 addition & 1 deletion src/graph/gremlinEndpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { CosmosDBManagementClient } from 'azure-arm-cosmosdb';
import { CosmosDBManagementClient } from '@azure/arm-cosmosdb';

export interface IGremlinEndpoint {
host: string;
Expand Down
2 changes: 1 addition & 1 deletion src/graph/tree/GraphAccountTreeItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { DatabaseAccount } from 'azure-arm-cosmosdb/lib/models';
import { DatabaseAccount } from '@azure/arm-cosmosdb/esm/models';
import { DatabaseMeta } from 'documentdb';
import { AzureParentTreeItem } from 'vscode-azureextensionui';
import { DocDBAccountTreeItemBase } from '../../docdb/tree/DocDBAccountTreeItemBase';
Expand Down
Loading