Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to no bundling and let extensions decide how they would like to bundle #119

Merged
merged 7 commits into from Sep 8, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
51 changes: 0 additions & 51 deletions .esbuild.config.js

This file was deleted.

11 changes: 8 additions & 3 deletions .gitignore
Expand Up @@ -9,8 +9,13 @@ npm-debug.log

# sourcemaps
src/**/*.js.map
lib/**/*.js.map
lib/**/*.js

# dist
dist/**/*
!dist/**/*.d.ts

# Packaged node modules
*.tgz
*.tgz

# Extracted npm modules
package
5 changes: 1 addition & 4 deletions .npmignore
@@ -1,10 +1,6 @@
.vscode
build
.github
lib/*.js.map
lib/*.js
lib/test
!lib/*.min.js
node_modules
src
typings_patches
Expand All @@ -16,4 +12,5 @@ tsfmt.json
.esbuild.config.js
.eslintrc.json
.eslintignore
*.tgz
*.test.ts
File renamed without changes.
17 changes: 17 additions & 0 deletions injectVersion.js
@@ -0,0 +1,17 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

const fs = require('fs');

// Reads dist/node/common/baseTelemetryReporter.js and replaces PACKAGE_JSON_VERSION with the number from the package.json
const packageJson = require('./package.json');
const baseTelemetryReporter = fs.readFileSync('./dist/node/common/baseTelemetryReporter.js', 'utf8');
const newBaseTelemetryReporter = baseTelemetryReporter.replace(/PACKAGE_JSON_VERSION/g, packageJson.version);
fs.writeFileSync('./dist/node/common/baseTelemetryReporter.js', newBaseTelemetryReporter);

// Reads dist/browser/common/baseTelemetryReporter.js and replaces PACKAGE_JSON_VERSION with the number from the package.json
const baseTelemetryReporterBrowser = fs.readFileSync('./dist/browser/common/baseTelemetryReporter.js', 'utf8');
const newBaseTelemetryReporterBrowser = baseTelemetryReporterBrowser.replace(/PACKAGE_JSON_VERSION/g, packageJson.version);
fs.writeFileSync('./dist/browser/common/baseTelemetryReporter.js', newBaseTelemetryReporterBrowser);