Skip to content

Commit

Permalink
Merge pull request #117 from microsoft/lramos15/empirical-squid
Browse files Browse the repository at this point in the history
Remove first party support of AI
  • Loading branch information
lramos15 committed Jul 11, 2022
2 parents c3dbb76 + 55e0182 commit 5d77857
Show file tree
Hide file tree
Showing 5 changed files with 366 additions and 535 deletions.
19 changes: 4 additions & 15 deletions .esbuild.config.js
@@ -1,22 +1,11 @@
const esbuild = require('esbuild');
const fs = require('fs');
const path = require('path');

// Removes the warning from the app insights module since we don't want it to spam the console
function patchAppInsightsModules() {
const nodeAppInsightsModule = fs.readFileSync(path.join(__dirname, 'node_modules/applicationinsights/out/Library/Config.js'), 'utf8');
const fileWithRemovedWarning = nodeAppInsightsModule.replace(/Logging.warn\([^)]*invalid instrumentation key[^)]*\)/, '// Warning removed');
fs.writeFileSync(path.join(__dirname, 'node_modules/applicationinsights/out/Library/Config.js'), fileWithRemovedWarning, 'utf8');
}

patchAppInsightsModules();

// Build node packages and their minifed versions
esbuild.build({
entryPoints: ['src/node/telemetryReporter.ts'],
tsconfig: "./src/node/tsconfig.json",
bundle: true,
external: ['vscode', '@microsoft/1ds-core-js', '@microsoft/1ds-post-js'],
external: ['vscode', './node_modules/*'],
sourcemap: true,
platform: 'node',
target: ['node14'],
Expand All @@ -28,7 +17,7 @@ esbuild.build({
tsconfig: "./src/node/tsconfig.json",
bundle: true,
sourcemap: false,
external: ['vscode', '@microsoft/1ds-core-js', '@microsoft/1ds-post-js'],
external: ['vscode', './node_modules/*'],
minify: true,
platform: 'node',
target: ['node14'],
Expand All @@ -42,7 +31,7 @@ esbuild.build({
tsconfig: "./src/browser/tsconfig.json",
bundle: true,
sourcemap: true,
external: ['vscode', '@microsoft/1ds-core-js', '@microsoft/1ds-post-js'],
external: ['vscode', './node_modules/*'],
platform: 'browser',
target: ['es6'],
outfile: 'lib/telemetryReporter.web.js',
Expand All @@ -54,7 +43,7 @@ esbuild.build({
format: "esm",
bundle: true,
sourcemap: false,
external: ['vscode', '@microsoft/1ds-core-js', '@microsoft/1ds-post-js'],
external: ['vscode', './node_modules/*'],
minify: true,
platform: 'browser',
target: ['es6'],
Expand Down

0 comments on commit 5d77857

Please sign in to comment.