Azure-sdk-for-js: Min/max dependency fixes for core-paging and logger

Created on 22 Apr 2020  路  9Comments  路  Source: Azure/azure-sdk-for-js

Karishma found the following issues while trying minimum and maximum supported versions on the KeyVault packages:

2 Errors with core-http 1.0.0 and not core-http 1.1.0

node_modules/@azure/core-http/es/lib/operationOptions.d.ts:2:10 - error TS2459: Module '"../../../core-tracing/types/core-tracing"' declares 'SpanOptions' locally, but it is not exported.
2 import { SpanOptions } from "@azure/core-tracing";
           ~~~~~~~~~~~
  node_modules/@azure/core-tracing/types/core-tracing.d.ts:9:10
    9 import { SpanOptions } from '@opentelemetry/types';
               ~~~~~~~~~~~
    'SpanOptions' is declared here.


node_modules/@azure/core-http/es/lib/webResource.d.ts:9:10 - error TS2459: Module '"../../../core-tracing/types/core-tracing"' declares 'SpanOptions' locally, but it is not exported.
9 import { SpanOptions } from "@azure/core-tracing";
           ~~~~~~~~~~~
  node_modules/@azure/core-tracing/types/core-tracing.d.ts:9:10
    9 import { SpanOptions } from '@opentelemetry/types';
               ~~~~~~~~~~~
    'SpanOptions' is declared here.



4 errors with core-paging 1.1.0 that we don't get with core-paging 1.1.1

list.test.ts:85:29 - error TS2488: Type 'never' must have a '[Symbol.iterator]()' method that returns an iterator.聽
85 聽 聽 聽 for (const version of page) {
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽~~~~

list.test.ts:116:29 - error TS2488: Type 'never' must have a '[Symbol.iterator]()' method that returns an iterator.聽
116 聽 聽 聽 for (const version of page) {
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 ~~~~

list.test.ts:168:32 - error TS2488: Type 'never' must have a '[Symbol.iterator]()' method that returns an iterator.聽
168 聽 聽 聽 for (const properties of page) {
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽~~~~

list.test.ts:229:32 - error TS2488: Type 'never' must have a '[Symbol.iterator]()' method that returns an iterator.聽
229 聽 聽 聽 for (const deletedKey of page) {


1 error with logger 1.0.0

../src/log.ts:9:14 - error TS2742: The inferred type of 'logger' cannot be named without a reference to '../test/node_modules/@azure/logger/types/logger'. This is likely not portable. A type annotation is necessary.聽
9 export const logger = createClientLogger("keyvault-keys");
聽 聽 聽 聽 聽 聽 聽 聽~~~~~~聽
Found 1 error.
Client KeyVault

All 9 comments

4 errors with core-paging 1.1.0 that we don't get with core-paging 1.1.1

This is related to my change in PR #7569. We could revert the changes to keyvault code then it should work with both core-paging 1.1.0 and 1.1.1

Thank you Jeremy! That sounds good

@ramya-rao-a , @KarishmaGhiya isn't it better to update all of our packages? I'll ping you this Friday.

In #7998, all packages in the master branch have been updated to use "@azure/core-http": "^1.1.1", but otherwise yes. If we are making a fix for an issue found in min/max testing, it should be applied across the board.

I have changed the title of this issue. I will be making a PR setting core-paging to ^1.1.1 and logger to ^1.0.1 everywhere. I'll follow up with @KarishmaGhiya too.

May I know when this will be fully fix? as I can install the latest version last week, but now cannot

@yangguang-hs Can you elaborate on the issue you are seeing? If you are installing fresh, then you should get the latest version of all the dependencies and this shouldnt be a problem

@sadasant yes we have to update min dep for all packages

Are we planning to log a separate issue to investigate the error with the logger?

../src/log.ts:9:14 - error TS2742: The inferred type of 'logger' cannot be named without a reference to '../test/node_modules/@azure/logger/types/logger'. This is likely not portable. A type annotation is necessary. 
9 export const logger = createClientLogger("keyvault-keys");
Was this page helpful?
0 / 5 - 0 ratings