In order for Tables to connect to Azurite and Storage emulator, the client needs to accept `allowInsecureConnection`. Also when using the emulator connection string shortcut, setting it by default.
## What
- Update `@azure/core-rest-pipeline` to 1.1.0 from beta
- Update dependencies to the latest version
- Update everyone to the same version of `@azure/core-tracing`
## Why
Now that we used the CAE capabilities added in core-rest-pipeline in both container registry and key vault it's time to GA this version! It also unblocks our efforts to get everyone upgraded to the latest core-tracing (and OTel by extension) versions.
* Migration Guide
* Update sdk/tables/data-tables/MigrationGuide.md
Co-authored-by: Christopher Scott <chriscott@hotmail.com>
* Update sdk/tables/data-tables/MigrationGuide.md
Co-authored-by: Christopher Scott <chriscott@hotmail.com>
* Update sdk/tables/data-tables/MigrationGuide.md
Co-authored-by: Christopher Scott <chriscott@hotmail.com>
* Update sdk/tables/data-tables/MigrationGuide.md
Co-authored-by: Christopher Scott <chriscott@hotmail.com>
* Update sdk/tables/data-tables/MigrationGuide.md
Co-authored-by: Christopher Scott <chriscott@hotmail.com>
* Fix typos
* Apply suggestions from code review
Co-authored-by: Matt Ellis <matt.ellis@microsoft.com>
* Address comments
Co-authored-by: Christopher Scott <chriscott@hotmail.com>
Co-authored-by: Matt Ellis <matt.ellis@microsoft.com>
As we are ending the support for IE 11, this PR remove doc and test logic that
handle IE.
- Remove commented polyfill from karma configs
- Remove IE compatibility section from Stroage README files
- Remove IE specific logic from storage tests.
- Remove Storage TODO comments for IE.
* format
* run format on core-client-rest
* Re-generate and Custom serialization for ACL
* format
* update readme
* format readme
* Update changelog
* set swagger package-version
* Update format script
* Fix test and update changelog
* update recorder and recordings
* fix test and changelog
* use deterministic date for test
* update format
* fix lint
* return await
* Update TSDoc samples
* Add additional samples to TSDoc
* Add createIfNotExists and deleteIfExists. Loosen Entity output type
* Rename property tableName to name
* update samples
* Cleanup models
* more type cleanup
* remove un-used request options
* Remove next prefixed properties from public types
* Add date samples
* Update batch sample
* Publish samples
* Remove ifNotExist and ifExist
* Upgrading to opentelemetry 1.0.0 (rc.0)
Did a few things that made this MUCH easier.
Now that everyone is using the createSpan from @azure/core-tracing we
no longer need _every_ project to reference opentelemetry/api! That has
been removed as part of this PR.
Unfortunately, the leaky nature of JS means that packages still need to
worry about opentelemetry when they build their browser bundle for
testing. To make that simpler I've added a common function to dev-tool
that everyone can call in their rollup that will give them the correct
named exports. This is hooked up for everyone at this point, so the next
time something like this happens I should be able to control it
centrally.
Now for the API breaking changes that I had to fix:
- CanonicalCode is gone and is replaced with SpanStatusCode.
SpanStatusCode has a much smaller set of codes (literally: ERROR, OK
or UNSET) so that simplified most of the way we were handling setting
a span status on error.
- There is a new field (`tracingContext`) that contains `Context`. You
now pass a context, not a span, to indicate what your "parent" is.
You'll see this where I've removed `SpanOptions.parentSpan`. Mostly
it's a simple replacement.
* [dev-tool] Experimental samples publish command
* Updated template samples structure
* First generation of template samples
* Update to ts-node 9 and use transpilation mode for speed.
* Many improvements and fixes.
- Fixed several bugs with generation.
- Added environment variable analysis.
- Refactored modules for code organization.
- Added azsdk- JSDoc tags for weighting and ignoring samples.
- Made almost all illogical situations yield errors instead of warnings.
* Rework text analytics
* Fixed a bug in the README template saying something about the Template package
* Regenerate text analytics samples
* Consistency changes to dev-tool/register
* Updated TA and Template package.json
* Fixed a couple of file name rendering bugs in the template
* Added API ref link override and regenerated Template samples
* Format
* Fix broken link
* Made typescript version reflect dev-tool ts dependency
* Revert weird change to cosmosdb package.json
* Alpha sort template deps
* Added MIN_SUPPORTED_NODE_VERSION
* Tweaked default tsconfig.
* Use version 1.0.0 instead of 0.1.0
* Pull sample generation info types into their own module.
* Added resource creation link generation.
* Regenerate template samples
* Regenerate text analytics samples
* Regenerate text analytics samples
* Regenerate template samples
* Fix bug in TA samples
# Problem
`no-invalid-this` makes sure uses of `this` are valid (see [docs](https://eslint.org/docs/rules/no-invalid-this) and [implementation](8984c91372/lib/rules/utils/ast-utils.js (L900))). However, uses of `this` are rampant in our test suites because this is how mocha unit tests are structured, the Mocha context can be accessed only through `this`.
# Fix
So instead of disabling `no-invalid-this` in our test suites, this PR tags functions that reference `this` with `@this` and that satisfies the rule requirements (see [docs](https://eslint.org/docs/rules/no-invalid-this)).
# Discussion
It could be argued that this work just replaces one comment annotation with another so we did not really solve the underlying problem. However, the inherent problem lies in how mocha itself works and there is nothing we can do other than probably migrating to another framework that is more sane/type-safe. One minor improvement we get is we now have slightly less syntactic overhead because we need to tag just the function instead of individual lines in its body that violate the rule.
# Trade-offs
Pros:
- function tags are less than line tags
Cons:
- whitelisting one more tag with the tsdoc linter that our devs need to learn about
- still having rampant tags everywhere
Fixes https://github.com/Azure/azure-sdk-for-js/issues/11404
I confirmed with the TypeScript team that patch releases should not introduce breaking changes. This PR uses tilde in TypeScript version we use so get the latest patch releases for v4.1.
* [EventGrid] Update to {core-client,core-rest-pipeline}@^1.0.0
* [EventGrid] Prepare for GA Release
- Update version to `4.0.0` from `3.0.0-preview.4`. The move to
`4.0.0` is to align our version with the new SDKs for EventGrid from
the other languages.
- Update CHANGELOG.md
* Revert "[core v2] prepare for GA release (#14170)"
This reverts commit 0e06e728d6.
* [Core v2] Revert GA version bump and release another preview
* Not releasing core-xml
* Update release date
* [core v2] prepare for GA release
- core-rest-pipeline. Update version and release date
* - core-xml. update version and release date
* - core-client. update version and release date
Creating a `tracingOptions` property on PipelineRequest and using createSpan internally rather than starting spans directly.
Also, allows callers to use createSpanFunction() without a package prefix or namespace (needed for core-http and lower level libraries).
* Fix docs and case-insensitive CS
* Hide top query option
* Keep default empty object
* address feedback
* Fix connection string
* test cs with = in value
- Making some changes to simplify the "duplicate" models that we're exporting to mirror the opentelemetry models (addresses feedback from @xirzec and @bterlson)
- Switch core-tracing back to the `-preview` version naming style. Changing it mid-stream like we did breaks internal tooling.
* Update live test templates to use matrix generation
* Update sdk live tests to use matrix generation, cloud config stages
* Fix live test matrix filter parity errors
* Remove matrix filters. Opt-in most tests to samples and min/max testing
* Fix post step template parameter in monitor live tests
* Filter dependency version for live tests that don't support it
* Only publish test results for browser and node tests
As part of prepping for the next release of OpenTelemetry we found some code patterns that were going to become a large maintenance burden for us, primarily around the parenting of spans. To make this easier I've removed as many duplicate implementation of createSpan and tried to centralize everything into core-tracing instead.
This won't completely remove changes needed for a newer version of OpenTelemetry but it'll eliminate one of the bigger bottlenecks.
This PR removes our dependency on the unmaintained package "karma-remap-istanbul" and replaces it with a smaller karma plugin ("karma-sourcemap-loader") that allows karma-coverage to load source maps from the disk correctly.
I tested and confirmed that the generated coverage data has the correct source TS files.
* [Docs] Upgrade typedoc to v0.15.2 to match that used by docs team
* standardize the docs script for cosmos, kv-admin, comm-common, and storage-internal-avro
This newly added command `docs` can help increase the quality of our documentation comments. It enables us to have a tight feedback loop on what is being generated as a documentation of our packages. I am pinning `typedoc` to v0.15.0 for now because this is the version being used for generating docs at `docs.microsoft.com`. This version should be updated when that team updates theirs.
Fixes https://github.com/Azure/azure-sdk-for-js/issues/12928
# Status quo
Some of our documentation comments are [TypeDoc](http://typedoc.org/guides/doccomments/) and some of them are JSDoc with type description in the comments even though it is for typed TS code.
# Standardization
I decided the best way to go about this is to migrate to [TSDoc](https://github.com/Microsoft/tsdoc) and enforcing it using the [tsdoc eslint plugin](https://www.npmjs.com/package/eslint-plugin-tsdoc).
Pros:
- TSDoc is a proposal to standardize the doc comments used in TypeScript code, so that different tools can extract content without getting confused by each other’s markup.
- It is being developed at Microsoft, with the TypeScript team.
- It has an ESLint plugin that enforces it and will error when it sees unsupported tags (e.g. `@memberof`, `@class`, `@constructor`, `@type`, etc).
Cons:
- It is still in early stages (adoption is ongoing though, e.g. it is being used by the API extractor tool).
- TSDoc != TypeDoc (the tool we currently use for generating our documentation). However, TypeDoc plans to officially support TSDoc in v1.1 (see https://github.com/TypeStrong/typedoc/issues/1266).
# Notable tag changes
- `@ignore` is a JSDoc tag and was used in conjunction with `@internal`. These tags were needed because [TypeDoc does not yet support documenting only definitions exported by the entry point](https://github.com/TypeStrong/typedoc/pull/1184#issuecomment-650809143) and still documents everything exported from all files. I removed `@ignore` because [`@internal`](https://tsdoc.org/pages/tags/internal) only should suffice
- `@ignore` when used alone is replaced with TypeDoc's [`hidden`](http://typedoc.org/guides/doccomments/#hidden-and-ignore). EDIT: I replaced `@ignore` with [`@hidden`](https://github.com/TypeStrong/typedoc/releases/tag/v0.12.0) because the TypeDoc version used for `docs.microsoft.com` is v0.15.0 which does not support `--stripInternal`. After, they upgrade, I will remove all `@hidden` tags.
- `@summary` is gone because it is not part of TSDoc or TypeDoc
This PR applies the changes to packages that respect our linting rules. Ones that do not yet will be migrated later when we start fixing their linting issues.
Here are vanilla examples of TypeDoc 0.18.0 (version used by our EngSys) after the changes here as a sanity check:
- random method:
![typedoc](https://user-images.githubusercontent.com/6074665/102302881-f6186380-3f27-11eb-8cc6-93e4c8f7d42d.PNG)
- a class constructor that used to have type information in the documentation comments:
![constructor](https://user-images.githubusercontent.com/6074665/102357078-f8a4a880-3f7b-11eb-92d1-c086ecc39c0b.PNG)
# `@hidden` works the same way as `@ignore`
Here are the list of documented functions generated by `TypeDoc v0.15.0` for the text analytics package and there is no function that was marked `@hidden`, e.g. `combineSuccessfulAndErroneousDocumentsWithStatisticsAndModelVersion`
![image](https://user-images.githubusercontent.com/6074665/102426196-e018aa80-3fdc-11eb-8b69-1ac265391fad.png)
# Things to consider
- Our documentation must be generated using the TypeDoc flag [`--stripInternal`](http://typedoc.org/guides/options/#stripinternal)
- Should we add a `docs` npm script to our `package.json`s (similar to [Cosmos's](2424b74f02/sdk/cosmosdb/cosmos/package.json (L60))) so that we can see how our docs are generated as we write our comments?
Fixes https://github.com/Azure/azure-sdk-for-js/issues/3027.
* upgrade TS version and fix compilation issues
* upgrade the linting parser version and fix new linting issues
* fix cosmos sample
* address feedback
* fix linting issues in formrecognizer tests
* use unknown instead of any across our code
* address more issues
* cleanup package.json in core-http
* revert noisy linting changes caused by vanilla eslint rules not TS aware
* allow the poller to have results of type void
* fixing samples
* fix keyvault-certificates' sample
Fixes#12646
Tables service supports ns precision DateTime however JavaScript doesn't. As part of entity deserialization, whenever we get a property with type Edm.DateTime we parse it into a JavaScript Date object, which can lead to losing precision.
To fix this we need to disable the default deserialization for Edm.DateTime and give the user an "edm" object, similar to what we do for Guid and Int64
```typescript
{
partitionKey: "p1",
rowKey: "r1",
blahblah: {type: "DateTime", value:"the date"}
}
```
Closes https://github.com/Azure/azure-sdk-for-js/issues/11489
- As the issue states, there are some unneeded exports in the Javascript samples for Azure Tables that have been removed.
- As reported by @joheredi , the following replacements in the `README.md` have been done (identified as a bug): `entity.PartitionKey` to `entity.partitionKey` and `entity.RowKey` to `entity.rowKey`.
- Also a little typo in the `README.md` in the same section has been fixed.
* Update changlog date and port TS sample to JS
* Update stale package versions
* Return type
* Update sdk/tables/data-tables/samples/javascript/src/batchOperations.js
Co-authored-by: Matt Ellis <matt.ellis@microsoft.com>
* Update sdk/tables/data-tables/samples/typescript/src/batchOperations.ts
Co-authored-by: Matt Ellis <matt.ellis@microsoft.com>
Co-authored-by: Matt Ellis <matt.ellis@microsoft.com>
* Fill out README
* Note about AAD
* Add table and entity to Key Concepts
* Remove extra sample
* Address feedback
* update logger import
* Fix typo and add browser support info
* Add integration tests for Create Table and Table Entity
* Format
* rename azure-tables to azure-data-tables
* int and float test
* Address PR comments
* Fix folder name
* azure-data-tables
* Remove stale api surface
* rename to data-tables
* update sample ur;
* Rename in ci
* Accept arrays for select in query options
* Add odata helper function for escaping filter expressions
* Add odata tests
Co-authored-by: Jose Manuel Heredia Hidalgo <joheredi@microsoft.com>
* Add an EdmGUID class
* Add an EdmInt64 class
* Add serialization.ts file
* Make client methods public
* Serialize entities in TableServiceClient
* Deserialize entities in TableServiceClient
* Add support for Binary data serialization
* Fix deserialization for getEntity
* Fix deserialize return type
* Fix getEntity return type
* Include other EDM types for serialization
* Remove isUint8Array method
* Rename econde and decode functions to include base64
* use isValidUuid from core-http
* Add isSafeInteger to Int64 class
* Convert scientific notation to standard notation
* Regenerate using the new swagger
* Add generic types to entity operations
* Use types instead of interfaces
* Update serializer
* Add unit tests for serialization/deserialization
* Fix PR comments
* Add unit tests for bufferSerializer utility function
* Fix PR comments
* update the CONTRIBUTING.md guide to point to the automatic debug configuration feature in vscode
* delete all custome vscode configs
* factoring out coverage scripts so that mocha with ts-node can work with vscode debugger
* lower case Azure in package.json across packages
* remove redundancies
* camel case to lower case
* remove more redundancies
* Fix broken link schema registry samples
Co-authored-by: Ramya Achutha Rao <ramyar@microsoft.com>
* Standardize prettier configurations across the repo
* update relative paths
* rushx format text analytics
* ignore api.md files
* adding ignore-path parameter to the check-format and format scripts in keyvault-admin
* Add Autorest generated files
* Implement TableServiceClient methods
* Remove the customizations from the swagger readme file
* Update Autorest generated files to fix function docs and header names
* Add models.ts file for all named exports
* Export the missing models
* Remove the unused test files
* Fix the comments for the constructor
* [keyvault-common,table] bump core-http dep version to 1.1.4
These two libraries were not updated in #9539, possibly due to the exception and
tables change comes after the the exception was made.
* Disable PR validation for Tables for now