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

Merge master to beta @ 6ba2c0dc13a48956161fa750ddb0c666b71b4f80 #1877

Merged
merged 15 commits into from
Aug 9, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AISKU/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Refer to [our GitHub page](https://github.com/microsoft/applicationinsights-js)
| Version | Full Size | Raw Minified | GZip Size
|---------|-----------|--------------|-------------
| <nightly> | [![full size size](https://img.badgesize.io/https://js.monitor.azure.com/nightly/ai.2-nightly.js.svg?label=full%20size&color=blue)](https://img.badgesize.io/https://js.monitor.azure.com/nightly/ai.2-nightly.js.svg?label=full%20size&color=blue)| ![minified size size](https://img.badgesize.io/https://js.monitor.azure.com/nightly/ai.2-nightly.min.js.svg?label=minified%20size&color=darkorchid) | ![gzip size](https://img.badgesize.io/https://js.monitor.azure.com/nightly/ai.2-nightly.min.js.svg?compression=gzip&softmax=30000&max=35000)
| 2.8.6: | [![full size size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.8.6.js.svg?label=full%20size&color=blue)](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.8.6.js.svg?label=full%20size&color=blue)| ![minified size size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.8.6.min.js.svg?label=minified%20size&color=darkorchid) | ![gzip size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.8.6.min.js.svg?compression=gzip&softmax=30000&max=35000)
| 2.8.5: | [![full size size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.8.5.js.svg?label=full%20size&color=blue)](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.8.5.js.svg?label=full%20size&color=blue)| ![minified size size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.8.5.min.js.svg?label=minified%20size&color=darkorchid) | ![gzip size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.8.5.min.js.svg?compression=gzip&softmax=30000&max=35000)
| 2.8.4: | [![full size size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.8.4.js.svg?label=full%20size&color=blue)](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.8.4.js.svg?label=full%20size&color=blue)| ![minified size size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.8.4.min.js.svg?label=minified%20size&color=darkorchid) | ![gzip size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.8.4.min.js.svg?compression=gzip&softmax=30000&max=35000)
| 2.8.3: | [![full size size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.8.3.js.svg?label=full%20size&color=blue)](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.8.3.js.svg?label=full%20size&color=blue)| ![minified size size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.8.3.min.js.svg?label=minified%20size&color=darkorchid) | ![gzip size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.8.3.min.js.svg?compression=gzip&softmax=30000&max=35000)
Expand Down
2 changes: 1 addition & 1 deletion AISKU/Tests/Perf/src/AISKUPerf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class AppInsightsInitPerfTestClass {
* should update version after new release
* version with doperf(): after 2.5.6
* */
var defaultVer = "2.8.5";
var defaultVer = "2.8.6";
this.version = ver? ver:this._getQueryParameterVersion(defaultVer);
this.perfEventsBuffer = [];
this.perfEventWaitBuffer = [];
Expand Down
10 changes: 6 additions & 4 deletions AISKU/Tests/Unit/src/SnippetInitialization.Tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -864,10 +864,12 @@ export class SnippetInitializationTests extends AITestClass {
// Setup Sinon stuff
const appInsights = (snippet as any).appInsights;
this.onDone(() => {
if (snippet["unload"]) {
snippet["unload"](false);
} else if (snippet["appInsightsNew"]) {
snippet["appInsightsNew"].unload(false);
if (snippet) {
if (snippet["unload"]) {
snippet["unload"](false);
} else if (snippet["appInsightsNew"]) {
snippet["appInsightsNew"].unload(false);
}
}
});

Expand Down
14 changes: 7 additions & 7 deletions AISKU/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/applicationinsights-web",
"version": "2.8.5",
"version": "2.8.6",
"description": "Microsoft Application Insights JavaScript SDK - Web",
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
"author": "Microsoft Application Insights Team",
Expand Down Expand Up @@ -69,12 +69,12 @@
"dependencies": {
"@microsoft/dynamicproto-js": "^1.1.6",
"@microsoft/applicationinsights-shims": "2.0.1",
"@microsoft/applicationinsights-analytics-js": "2.8.5",
"@microsoft/applicationinsights-channel-js": "2.8.5",
"@microsoft/applicationinsights-common": "2.8.5",
"@microsoft/applicationinsights-core-js": "2.8.5",
"@microsoft/applicationinsights-dependencies-js": "2.8.5",
"@microsoft/applicationinsights-properties-js": "2.8.5"
"@microsoft/applicationinsights-analytics-js": "2.8.6",
"@microsoft/applicationinsights-channel-js": "2.8.6",
"@microsoft/applicationinsights-common": "2.8.6",
"@microsoft/applicationinsights-core-js": "2.8.6",
"@microsoft/applicationinsights-dependencies-js": "2.8.6",
"@microsoft/applicationinsights-properties-js": "2.8.6"
},
"license": "MIT"
}
8 changes: 4 additions & 4 deletions AISKULight/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/applicationinsights-web-basic",
"version": "2.8.5",
"version": "2.8.6",
"description": "Microsoft Application Insights Javascript SDK core and channel",
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
"author": "Microsoft Application Insights Team",
Expand Down Expand Up @@ -54,9 +54,9 @@
"dependencies": {
"@microsoft/dynamicproto-js": "^1.1.6",
"@microsoft/applicationinsights-shims": "2.0.1",
"@microsoft/applicationinsights-common": "2.8.5",
"@microsoft/applicationinsights-channel-js": "2.8.5",
"@microsoft/applicationinsights-core-js": "2.8.5"
"@microsoft/applicationinsights-common": "2.8.6",
"@microsoft/applicationinsights-channel-js": "2.8.6",
"@microsoft/applicationinsights-core-js": "2.8.6"
},
"license": "MIT"
}
12 changes: 6 additions & 6 deletions AISKULight/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ export class ApplicationInsights {

dynamicProto(ApplicationInsights, this, (_self) => {
_self.config = config;
_self.getSKUDefaults();


_initialize();

_self.initialize = _initialize;

_self.getSKUDefaults = () => {
_self.config.diagnosticLogInterval =
_self.config.diagnosticLogInterval && _self.config.diagnosticLogInterval > 0 ? _self.config.diagnosticLogInterval : 10000;
};
_self.getSKUDefaults();

proxyFunctions(_self, core, [
"track",
Expand All @@ -64,10 +64,10 @@ export class ApplicationInsights {
extensions.push(appInsightsChannel);

// initialize core
core.initialize(this.config, extensions);
core.initialize(_self.config, extensions);

// initialize extensions
appInsightsChannel.initialize(this.config, core, extensions);
appInsightsChannel.initialize(_self.config, core, extensions);

core.pollInternalLogs();
}
Expand Down
13 changes: 13 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

> Note: ES3/IE8 compatibility will be removed in the future v3.x.x releases (scheduled for mid-late 2022), so if you need to retain ES3 compatibility you will need to remain on the 2.x.x versions of the SDK or your runtime will need install polyfill's to your ES3 environment before loading / initializing the SDK.
## 2.8.6 (Aug 2nd, 2022)

- React plugin is now located and released from [it's own repo](https://github.com/microsoft/applicationinsights-react-js)
- React Native plugin is now located and released from [it's own repo](https://github.com/microsoft/applicationinsights-react-native)
- Updates Chrome Debug Extension to 0.3.6

### Changelog

- #1862 [BUG] Remote Dependency requests don't "always" have the correct ai.operation.id tag (page view race condition)
- #1870 [BUG] Performance improvements when calling newGuid multiple times (like 10,000)
- #1865 Update and add legal compliance notices and license terms
- #1866 Remove React-JS and React-Native code from this repo

## 2.8.5 (Jul 6th, 2022)

- Updates React Plugin to v3.3.5 (with v2.8.5 as dependency) -- using React 17
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ export class SenderTests extends AITestClass {
QUnit.assert.ok(baseData.ver);
QUnit.assert.equal(2, baseData.ver);

QUnit.assert.equal("javascript:2.8.5", appInsightsEnvelope.tags["ai.internal.sdkVersion"]);
QUnit.assert.equal("javascript:2.8.6", appInsightsEnvelope.tags["ai.internal.sdkVersion"]);
}
})

Expand Down
6 changes: 3 additions & 3 deletions channels/applicationinsights-channel-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/applicationinsights-channel-js",
"version": "2.8.5",
"version": "2.8.6",
"description": "Microsoft Application Insights JavaScript SDK Channel",
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
"author": "Microsoft Application Insights Team",
Expand Down Expand Up @@ -50,8 +50,8 @@
"dependencies": {
"@microsoft/dynamicproto-js": "^1.1.6",
"@microsoft/applicationinsights-shims": "2.0.1",
"@microsoft/applicationinsights-core-js": "2.8.5",
"@microsoft/applicationinsights-common": "2.8.5"
"@microsoft/applicationinsights-core-js": "2.8.6",
"@microsoft/applicationinsights-common": "2.8.6"
},
"license": "MIT"
}
19 changes: 11 additions & 8 deletions common/Tests/Framework/src/AITestClass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ export class AITestClass {
}

protected onDone(cleanupFn: VoidFunction) {
if (cleanupFn) {
if (cleanupFn && this._onDoneFuncs) {
this._onDoneFuncs.push(cleanupFn);
}
}
Expand Down Expand Up @@ -892,14 +892,17 @@ export class AITestClass {
}

private _testFinishedCleanup() {
this._onDoneFuncs.forEach((fn) => {
try {
fn();
} catch (e) {
// Do nothing during cleanup
}
});
let doneFuncs = this._onDoneFuncs;
this._onDoneFuncs = [];
if (doneFuncs) {
doneFuncs.forEach((fn) => {
try {
fn();
} catch (e) {
// Do nothing during cleanup
}
});
}

this.testFinishedCleanup();
}
Expand Down
Loading