Skip to content

Commit

Permalink
use storage-internal-avro as shared source in storage-blob
Browse files Browse the repository at this point in the history
  • Loading branch information
Lin Jian committed May 12, 2020
1 parent 05b293f commit 0ce33f7
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 20 deletions.
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 @@
}
}
}
}
}
20 changes: 10 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,7 @@
"files": [
"BreakingChanges.md",
"dist/",
"dist-esm/src/",
"dist-esm/storage-blob/src/",
"typings/latest/storage-blob.d.ts",
"typings/3.1/storage-blob.d.ts",
"README.md",
Expand Down Expand Up @@ -161,4 +161,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 { IReadable } from '../../storage-internal-avro/src'
export { IReadable }
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"]
}

0 comments on commit 0ce33f7

Please sign in to comment.