Skip to content

Commit

Permalink
Remove dedupe from rollup config (Azure#4613)
Browse files Browse the repository at this point in the history
- Update transitive dependency resolve to 1.12.0
  - Fixes issue with symlink resolution which required dedupe workaround
  - browserify/resolve#196
- Depends on rollup-plugin-commonjs@10.0.2
  - Supports preserveSymlinks:false
  - rollup/rollup-plugin-commonjs#400
- Move buffer to full dependency of service-bus
  - Packages required for browser bundles should be full dependencies
  - Improves customer experience when generating bundles from our packages
- Add dependencies buffer and process to event-hubs
  - Required to generate browser bundle
- Fixes Azure#3326
  • Loading branch information
mikeharder committed Aug 7, 2019
1 parent dea10ac commit a8faa8b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 23 deletions.
4 changes: 0 additions & 4 deletions common/config/rush/common-versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
*/
// "some-library": "1.2.3"

// resolve@1.12.0 causes a build break in storage-blob and storage-file related
// to the rollup-plugin-commonjs namedExports of "events"
"resolve": "1.11.1",

// This is required to allow for backward compatibility with Service Bus Track 1
// TODO: Remove this once Service Bus is updated to use current depenedencies as part of Track 2
"rhea-promise": "^0.1.15"
Expand Down
22 changes: 11 additions & 11 deletions common/config/rush/pnpm-lock.yaml

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

2 changes: 2 additions & 0 deletions sdk/eventhub/event-hubs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@
"@azure/core-amqp": "1.0.0-preview.3",
"@azure/core-asynciterator-polyfill": "1.0.0-preview.1",
"async-lock": "^1.1.3",
"buffer": "^5.2.1",
"debug": "^3.1.0",
"is-buffer": "^2.0.3",
"jssha": "^2.3.1",
"process": "^0.11.10",
"rhea-promise": "^1.0.0",
"tslib": "^1.9.3",
"uuid": "^3.3.2"
Expand Down
6 changes: 1 addition & 5 deletions sdk/eventhub/event-hubs/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,7 @@ export function browserConfig(test = false) {

nodeResolve({
mainFields: ["module", "browser"],
preferBuiltins: false,
// Following packages are de-duped in order to get module resolution to work with npm + rollup
// This will be in place until we have a solution for issue
// https://github.com/Azure/azure-sdk-for-js/issues/3326
dedupe: ["buffer", "events", "util", "process", "assert"]
preferBuiltins: false
}),

cjs({
Expand Down
2 changes: 1 addition & 1 deletion sdk/servicebus/service-bus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"@azure/ms-rest-nodeauth": "^0.9.2",
"@types/is-buffer": "^2.0.0",
"@types/long": "^4.0.0",
"buffer": "^5.2.1",
"debug": "^3.1.0",
"is-buffer": "^2.0.3",
"long": "^4.0.0",
Expand All @@ -91,7 +92,6 @@
"@typescript-eslint/eslint-plugin": "^1.11.0",
"@typescript-eslint/parser": "^1.11.0",
"assert": "^1.4.1",
"buffer": "^5.2.1",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"cross-env": "^5.2.0",
Expand Down
3 changes: 1 addition & 2 deletions sdk/servicebus/service-bus/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ export function browserConfig({ test = false, production = false } = {}) {

nodeResolve({
mainFields: ["module", "browser"],
preferBuiltins: false,
dedupe: ["buffer"]
preferBuiltins: false
}),
cjs({
namedExports: { events: ["EventEmitter"], long: ["ZERO"] }
Expand Down

0 comments on commit a8faa8b

Please sign in to comment.