Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
18 changes: 18 additions & 0 deletions sdk/synapse/synapse-access-control/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,30 @@ import sourcemaps from "rollup-plugin-sourcemaps";
import cjs from "@rollup/plugin-commonjs";
import { openTelemetryCommonJs } from "@azure/dev-tool/shared-config/rollup";


const ignoreKnownWarnings = (warning) => {
if (warning.code === "THIS_IS_UNDEFINED") {
// This error happens frequently due to TypeScript emitting `this` at the
// top-level of a module. In this case its fine if it gets rewritten to
// undefined, so ignore this error.
return;
}

if (warning.code === "CIRCULAR_DEPENDENCY" && warning.importer.indexOf("@opentelemetry/api") >= 0) {
// OpenTelemetry contains circular references as of 1.0.0, but they are not fatal and can be ignored.
return;
}

console.error(`(!) ${warning.message}`);
}

/**
* @type {rollup.RollupFileOptions}
*/
const config = {
input: "./dist-esm/accessControlClient.js",
external: ["@azure/core-http", "@azure/core-arm"],
onwarn: ignoreKnownWarnings,
output: {
file: "./dist/index.js",
format: "cjs",
Expand Down
17 changes: 17 additions & 0 deletions sdk/synapse/synapse-managed-private-endpoints/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,29 @@ import sourcemaps from "rollup-plugin-sourcemaps";
import cjs from "@rollup/plugin-commonjs";
import { openTelemetryCommonJs } from "@azure/dev-tool/shared-config/rollup";

const ignoreKnownWarnings = (warning) => {
if (warning.code === "THIS_IS_UNDEFINED") {
// This error happens frequently due to TypeScript emitting `this` at the
// top-level of a module. In this case its fine if it gets rewritten to
// undefined, so ignore this error.
return;
}

if (warning.code === "CIRCULAR_DEPENDENCY" && warning.importer.indexOf("@opentelemetry/api") >= 0) {
// OpenTelemetry contains circular references as of 1.0.0, but they are not fatal and can be ignored.
return;
}

console.error(`(!) ${warning.message}`);
}

/**
* @type {rollup.RollupFileOptions}
*/
const config = {
input: "./dist-esm/managedPrivateEndpointsClient.js",
external: ["@azure/core-http", "@azure/core-arm"],
onwarn: ignoreKnownWarnings,
output: {
file: "./dist/index.js",
format: "cjs",
Expand Down
18 changes: 18 additions & 0 deletions sdk/synapse/synapse-monitoring/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,30 @@ import sourcemaps from "rollup-plugin-sourcemaps";
import cjs from "@rollup/plugin-commonjs";
import { openTelemetryCommonJs } from "@azure/dev-tool/shared-config/rollup";


const ignoreKnownWarnings = (warning) => {
if (warning.code === "THIS_IS_UNDEFINED") {
// This error happens frequently due to TypeScript emitting `this` at the
// top-level of a module. In this case its fine if it gets rewritten to
// undefined, so ignore this error.
return;
}

if (warning.code === "CIRCULAR_DEPENDENCY" && warning.importer.indexOf("@opentelemetry/api") >= 0) {
// OpenTelemetry contains circular references as of 1.0.0, but they are not fatal and can be ignored.
return;
}

console.error(`(!) ${warning.message}`);
}

/**
* @type {rollup.RollupFileOptions}
*/
const config = {
input: "./dist-esm/monitoringClient.js",
external: ["@azure/core-http", "@azure/core-arm"],
onwarn: ignoreKnownWarnings,
output: {
file: "./dist/index.js",
format: "cjs",
Expand Down
18 changes: 18 additions & 0 deletions sdk/synapse/synapse-spark/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,30 @@ import sourcemaps from "rollup-plugin-sourcemaps";
import cjs from "@rollup/plugin-commonjs";
import { openTelemetryCommonJs } from "@azure/dev-tool/shared-config/rollup";


const ignoreKnownWarnings = (warning) => {
if (warning.code === "THIS_IS_UNDEFINED") {
// This error happens frequently due to TypeScript emitting `this` at the
// top-level of a module. In this case its fine if it gets rewritten to
// undefined, so ignore this error.
return;
}

if (warning.code === "CIRCULAR_DEPENDENCY" && warning.importer.indexOf("@opentelemetry/api") >= 0) {
// OpenTelemetry contains circular references as of 1.0.0, but they are not fatal and can be ignored.
return;
}

console.error(`(!) ${warning.message}`);
}

/**
* @type {rollup.RollupFileOptions}
*/
const config = {
input: "./dist-esm/sparkClient.js",
external: ["@azure/core-http", "@azure/core-arm"],
onwarn: ignoreKnownWarnings,
output: {
file: "./dist/index.js",
format: "cjs",
Expand Down