File tree Expand file tree Collapse file tree 4 files changed +71
-0
lines changed
synapse-managed-private-endpoints Expand file tree Collapse file tree 4 files changed +71
-0
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,30 @@ import sourcemaps from "rollup-plugin-sourcemaps";
44import cjs from "@rollup/plugin-commonjs" ;
55import { openTelemetryCommonJs } from "@azure/dev-tool/shared-config/rollup" ;
66
7+
8+ const ignoreKnownWarnings = ( warning ) => {
9+ if ( warning . code === "THIS_IS_UNDEFINED" ) {
10+ // This error happens frequently due to TypeScript emitting `this` at the
11+ // top-level of a module. In this case its fine if it gets rewritten to
12+ // undefined, so ignore this error.
13+ return ;
14+ }
15+
16+ if ( warning . code === "CIRCULAR_DEPENDENCY" && warning . importer . indexOf ( "@opentelemetry/api" ) >= 0 ) {
17+ // OpenTelemetry contains circular references as of 1.0.0, but they are not fatal and can be ignored.
18+ return ;
19+ }
20+
21+ console . error ( `(!) ${ warning . message } ` ) ;
22+ }
23+
724/**
825 * @type {rollup.RollupFileOptions }
926 */
1027const config = {
1128 input : "./dist-esm/accessControlClient.js" ,
1229 external : [ "@azure/core-http" , "@azure/core-arm" ] ,
30+ onwarn : ignoreKnownWarnings ,
1331 output : {
1432 file : "./dist/index.js" ,
1533 format : "cjs" ,
Original file line number Diff line number Diff line change @@ -4,12 +4,29 @@ import sourcemaps from "rollup-plugin-sourcemaps";
44import cjs from "@rollup/plugin-commonjs" ;
55import { openTelemetryCommonJs } from "@azure/dev-tool/shared-config/rollup" ;
66
7+ const ignoreKnownWarnings = ( warning ) => {
8+ if ( warning . code === "THIS_IS_UNDEFINED" ) {
9+ // This error happens frequently due to TypeScript emitting `this` at the
10+ // top-level of a module. In this case its fine if it gets rewritten to
11+ // undefined, so ignore this error.
12+ return ;
13+ }
14+
15+ if ( warning . code === "CIRCULAR_DEPENDENCY" && warning . importer . indexOf ( "@opentelemetry/api" ) >= 0 ) {
16+ // OpenTelemetry contains circular references as of 1.0.0, but they are not fatal and can be ignored.
17+ return ;
18+ }
19+
20+ console . error ( `(!) ${ warning . message } ` ) ;
21+ }
22+
723/**
824 * @type {rollup.RollupFileOptions }
925 */
1026const config = {
1127 input : "./dist-esm/managedPrivateEndpointsClient.js" ,
1228 external : [ "@azure/core-http" , "@azure/core-arm" ] ,
29+ onwarn : ignoreKnownWarnings ,
1330 output : {
1431 file : "./dist/index.js" ,
1532 format : "cjs" ,
Original file line number Diff line number Diff line change @@ -4,12 +4,30 @@ import sourcemaps from "rollup-plugin-sourcemaps";
44import cjs from "@rollup/plugin-commonjs" ;
55import { openTelemetryCommonJs } from "@azure/dev-tool/shared-config/rollup" ;
66
7+
8+ const ignoreKnownWarnings = ( warning ) => {
9+ if ( warning . code === "THIS_IS_UNDEFINED" ) {
10+ // This error happens frequently due to TypeScript emitting `this` at the
11+ // top-level of a module. In this case its fine if it gets rewritten to
12+ // undefined, so ignore this error.
13+ return ;
14+ }
15+
16+ if ( warning . code === "CIRCULAR_DEPENDENCY" && warning . importer . indexOf ( "@opentelemetry/api" ) >= 0 ) {
17+ // OpenTelemetry contains circular references as of 1.0.0, but they are not fatal and can be ignored.
18+ return ;
19+ }
20+
21+ console . error ( `(!) ${ warning . message } ` ) ;
22+ }
23+
724/**
825 * @type {rollup.RollupFileOptions }
926 */
1027const config = {
1128 input : "./dist-esm/monitoringClient.js" ,
1229 external : [ "@azure/core-http" , "@azure/core-arm" ] ,
30+ onwarn : ignoreKnownWarnings ,
1331 output : {
1432 file : "./dist/index.js" ,
1533 format : "cjs" ,
Original file line number Diff line number Diff line change @@ -4,12 +4,30 @@ import sourcemaps from "rollup-plugin-sourcemaps";
44import cjs from "@rollup/plugin-commonjs" ;
55import { openTelemetryCommonJs } from "@azure/dev-tool/shared-config/rollup" ;
66
7+
8+ const ignoreKnownWarnings = ( warning ) => {
9+ if ( warning . code === "THIS_IS_UNDEFINED" ) {
10+ // This error happens frequently due to TypeScript emitting `this` at the
11+ // top-level of a module. In this case its fine if it gets rewritten to
12+ // undefined, so ignore this error.
13+ return ;
14+ }
15+
16+ if ( warning . code === "CIRCULAR_DEPENDENCY" && warning . importer . indexOf ( "@opentelemetry/api" ) >= 0 ) {
17+ // OpenTelemetry contains circular references as of 1.0.0, but they are not fatal and can be ignored.
18+ return ;
19+ }
20+
21+ console . error ( `(!) ${ warning . message } ` ) ;
22+ }
23+
724/**
825 * @type {rollup.RollupFileOptions }
926 */
1027const config = {
1128 input : "./dist-esm/sparkClient.js" ,
1229 external : [ "@azure/core-http" , "@azure/core-arm" ] ,
30+ onwarn : ignoreKnownWarnings ,
1331 output : {
1432 file : "./dist/index.js" ,
1533 format : "cjs" ,
You can’t perform that action at this time.
0 commit comments