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

storage-internal-avro parser #8893

Merged
merged 14 commits into from
May 21, 2020
Merged
Show file tree
Hide file tree
Changes from 9 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
91 changes: 77 additions & 14 deletions common/config/rush/pnpm-lock.yaml

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

5 changes: 5 additions & 0 deletions rush.json
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,11 @@
"projectFolder": "sdk/servicebus/service-bus",
"versionPolicyName": "client"
},
{
"packageName": "@azure/storage-internal-avro",
"projectFolder": "sdk/storage/storage-internal-avro",
"versionPolicyName": "utility"
},
{
"packageName": "@azure/storage-blob",
"projectFolder": "sdk/storage/storage-blob",
Expand Down
4 changes: 2 additions & 2 deletions sdk/storage/storage-blob/api-extractor.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "typings/latest/src/index.d.ts",
"mainEntryPointFilePath": "typings/latest/storage-blob/src/index.d.ts",
"docModel": {
"enabled": false
},
Expand Down Expand Up @@ -28,4 +28,4 @@
}
}
}
}
}
21 changes: 11 additions & 10 deletions sdk/storage/storage-blob/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"version": "12.2.0",
"description": "Microsoft Azure Storage SDK for JavaScript - Blob",
"main": "./dist/index.js",
"module": "./dist-esm/src/index.js",
"module": "./dist-esm/storage-blob/src/index.js",
"browser": {
"./dist-esm/src/index.js": "./dist-esm/src/index.browser.js",
"./dist-esm/src/credentials/StorageSharedKeyCredential.js": "./dist-esm/src/credentials/StorageSharedKeyCredential.browser.js",
"./dist-esm/src/utils/utils.node.js": "./dist-esm/src/utils/utils.browser.js",
"./dist-esm/test/utils/index.js": "./dist-esm/test/utils/index.browser.js",
"./dist-esm/src/BatchUtils.js": "./dist-esm/src/BatchUtils.browser.js",
"./dist-esm/src/BlobDownloadResponse.js": "./dist-esm/src/BlobDownloadResponse.browser.js",
"./dist-esm/storage-blob/src/index.js": "./dist-esm/storage-blob/src/index.browser.js",
"./dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js": "./dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.browser.js",
"./dist-esm/storage-blob/src/utils/utils.node.js": "./dist-esm/storage-blob/src/utils/utils.browser.js",
"./dist-esm/storage-blob/test/utils/index.js": "./dist-esm/storage-blob/test/utils/index.browser.js",
"./dist-esm/storage-blob/src/BatchUtils.js": "./dist-esm/storage-blob/src/BatchUtils.browser.js",
"./dist-esm/storage-blob/src/BlobDownloadResponse.js": "./dist-esm/storage-blob/src/BlobDownloadResponse.browser.js",
"fs": false,
"os": false,
"process": false
Expand Down Expand Up @@ -46,7 +46,7 @@
"execute:samples": "npm run build:samples && npm run execute:js-samples && npm run execute:ts-samples",
"format": "prettier --write --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
"integration-test:browser": "karma start --single-run",
"integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace -t 300000 dist-esm/test/*.spec.js dist-esm/test/node/*.spec.js",
"integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace -t 300000 dist-esm/storage-blob/test/*.spec.js dist-esm/storage-blob/test/node/*.spec.js",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"lint:fix": "eslint -c ../../.eslintrc.old.json src test samples --ext .ts --fix",
"lint": "eslint -c ../../.eslintrc.old.json src test samples --ext .ts -f html -o storage-blob-lintReport.html || exit 0",
Expand All @@ -63,7 +63,8 @@
"files": [
"BreakingChanges.md",
"dist/",
"dist-esm/src/",
"dist-esm/storage-blob/src/",
"dist-esm/storage-internal-avro/src/",
"typings/latest/storage-blob.d.ts",
"typings/3.1/storage-blob.d.ts",
"README.md",
Expand Down Expand Up @@ -161,4 +162,4 @@
"typescript": "~3.8.3",
"util": "^0.12.1"
}
}
}
12 changes: 6 additions & 6 deletions sdk/storage/storage-blob/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function nodeConfig(test = false) {
"util"
];
const baseConfig = {
input: "dist-esm/src/index.js",
input: "dist-esm/storage-blob/src/index.js",
external: depNames.concat(externalNodeBuiltins),
output: {
file: "dist/index.js",
Expand Down Expand Up @@ -65,9 +65,9 @@ export function nodeConfig(test = false) {
if (test) {
// entry point is every test file
baseConfig.input = [
"dist-esm/test/*.spec.js",
"dist-esm/test/node/*.spec.js",
"dist-esm/src/index.js"
"dist-esm/storage-blob/test/*.spec.js",
"dist-esm/storage-blob/test/node/*.spec.js",
"dist-esm/storage-blob/src/index.js"
];
baseConfig.plugins.unshift(multiEntry());

Expand All @@ -92,7 +92,7 @@ export function nodeConfig(test = false) {

export function browserConfig(test = false) {
const baseConfig = {
input: "dist-esm/src/index.browser.js",
input: "dist-esm/storage-blob/src/index.browser.js",
output: {
file: "dist-browser/azure-storage-blob.js",
banner: banner,
Expand Down Expand Up @@ -159,7 +159,7 @@ export function browserConfig(test = false) {
};

if (test) {
baseConfig.input = ["dist-esm/test/*.spec.js", "dist-esm/test/browser/*.spec.js"];
baseConfig.input = ["dist-esm/storage-blob/test/*.spec.js", "dist-esm/storage-blob/test/browser/*.spec.js"];
baseConfig.plugins.unshift(multiEntry({ exports: false }));
baseConfig.output.file = "dist-test/index.browser.js";
// mark fs-extra as external
Expand Down
3 changes: 3 additions & 0 deletions sdk/storage/storage-blob/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@ export {
BlobBeginCopyFromUrlPollState,
CopyPollerBlobClient
} from "./pollers/BlobStartCopyFromUrlPoller";

import { AvroReadable } from '../../storage-internal-avro/src'
Copy link
Member

Choose a reason for hiding this comment

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

You can use single statement export { AvroReadable } from ""

Copy link
Member Author

@ljian3377 ljian3377 May 20, 2020

Choose a reason for hiding this comment

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

Thanks for the tip.
And these two lines are only for test/demonstration purpose. We probably won't export AvroReadable in the end.

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed.

export { AvroReadable }
4 changes: 2 additions & 2 deletions sdk/storage/storage-blob/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
"esModuleInterop": true
},
"compileOnSave": true,
"exclude": ["node_modules", "./samples/**"],
"include": ["./src/**/*.ts", "./test/**/*.ts"]
"exclude": ["node_modules", "../storage-internal-avro/node_modules", "./samples/**"],
"include": ["./src/**/*.ts", "./test/**/*.ts", "../storage-internal-avro/**/*.ts"]
}
3 changes: 3 additions & 0 deletions sdk/storage/storage-internal-avro/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["esbenp.prettier-vscode"]
}
Loading