Skip to content

Commit

Permalink
Merge master to beta @ 200e0f1 (#1867)
Browse files Browse the repository at this point in the history
* [BUG] Snippet initialization with IE8/9 fails with minified code (works with un-minified code) #1852 (#1854)

* [BUG] CDN Packaging is not exposing the internal tools (CoreUtils / Telemetry / etc) #1857 (#1858)

* fix stopTrackEvents (#1859)

Co-authored-by: Nev <54870357+MSNev@users.noreply.github.com>

* Refactor code to provide better tree shaking and minification of generated code #1076 (#1811)

- Add Automatic Name replacing / Crunching

* Address Component Governance issues (#1860)

- Update npm to 8.13.2
- Update rush to 5.75.0

* [Release] Increase version to 2.8.5 (#1861)

- Updates React Plugin to v3.3.5 (with v2.8.5 as dependency) -- using React 17
- Updates React Native Plugin to 2.5.5 (with v2.8.5 as dependency)
- Updates Chrome Debug Extension to 0.3.5

* Update and add legal compliance notices and license terms (#1865)

* Remove React-JS and React-Native code from this repo (#1866)

* Merge master to beta @ 200e0f1
- Update shrinkwrap and npm version for rush.json

Co-authored-by: Karlie-777 <79606506+Karlie-777@users.noreply.github.com>
  • Loading branch information
MSNev and Karlie-777 authored Jul 28, 2022
1 parent 5c910d7 commit d855703
Show file tree
Hide file tree
Showing 275 changed files with 33,037 additions and 30,890 deletions.
64 changes: 64 additions & 0 deletions .aiAutoMinify.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"pkgs": {
"@microsoft/applicationinsights-core-js": {
"constEnums": [
"CallbackType",
"eEventsDiscardedReason",
"eLoggingSeverity",
"_eInternalMessageId",
"SendRequestReason",
"TelemetryUnloadReason",
"TelemetryUpdateReason",
"GetExtCfgMergeType"
]
},
"@microsoft/applicationinsights-perfmarkmeasure-js": {
"constEnums": []
},
"@microsoft/applicationinsights-common": {
"constEnums": [
"eStorageType",
"FieldType",
"eDistributedTracingModes",
"eRequestHeaders",
"DataPointType",
"DependencyKind",
"DependencySourceType",
"eSeverityLevel",
"DataSanitizerValues"
]
},
"@microsoft/applicationinsights-properties-js": {
"constEnums": []
},
"@microsoft/applicationinsights-dependencies-js": {
"constEnums": []
},
"@microsoft/applicationinsights-debugplugin-js": {
"constEnums": []
},
"@microsoft/applicationinsights-channel-js": {
"constEnums": []
},
"@microsoft/applicationinsights-react-native": {
"constEnums": []
},
"@microsoft/applicationinsights-clickanalytics-js": {
"constEnums": [
"_eExtendedInternalMessageId"
]
},
"@microsoft/applicationinsights-web-basic": {
"constEnums": []
},
"@microsoft/applicationinsights-analytics-js": {
"constEnums": []
},
"@microsoft/applicationinsights-web": {
"constEnums": []
},
"@microsoft/applicationinsights-react-js": {
"constEnums": []
}
}
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,6 @@ aicore.tests.d.ts
ai.tests.d.ts
/.vs
/index.html

# Generated Constant File
**/__DynamicConstants.ts
8 changes: 8 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@

# ... but these files
!/package.json
!/CODE_OF_CONDUCT.md
!/CONTRIBUTING.md
!/README.md
!/SECURITY.md
!/SUPPORT.md
!/NOTICE
!/PRIVACY
!/LICENSE
!/LICENSE.TXT
!/API-reference.md
!/bundle/ai.module.*
!/dist/ai.js
Expand Down
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

7 changes: 7 additions & 0 deletions AISKU/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@
# ... but these files
!package.json
!tsconfig.json
!/CODE_OF_CONDUCT.md
!/CONTRIBUTING.md
!/README.md
!/SECURITY.md
!/SUPPORT.md
!/NOTICE
!/PRIVACY
!/LICENSE
!/LICENSE.TXT
!dist-esm/**
!dist/**
!browser/**
Expand Down
34 changes: 17 additions & 17 deletions AISKU/LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
MIT License
The MIT License (MIT)

Copyright (c) Microsoft Corporation. All rights reserved.
Copyright (c) Microsoft Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
17 changes: 17 additions & 0 deletions AISKU/NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
NOTICES AND INFORMATION
Do Not Translate or Localize

This software incorporates material from third parties. Microsoft makes certain
open source code available at https://3rdpartysource.microsoft.com, or you may
send a check or money order for US $5.00, including the product name, the open
source component name, and version number, to:

Source Code Compliance Team
Microsoft Corporation
One Microsoft Way
Redmond, WA 98052
USA

Notwithstanding any other terms, you may reverse engineer this software to the
extent required to debug changes to any libraries licensed under the GNU Lesser
General Public License.
3 changes: 3 additions & 0 deletions AISKU/PRIVACY
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Data Collection

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
34 changes: 32 additions & 2 deletions AISKU/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ Refer to [our GitHub page](https://github.com/microsoft/applicationinsights-js)

## CDN Version Release Summary (with Size tracking)

| Version | Full Size | Raw Minified | GZip Size
| Version | Full Size | Raw Minified | GZip Size
|---------|-----------|--------------|-------------
| &lt;nightly&gt; | [![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.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)
| 2.8.2: | [![full size size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.8.2.js.svg?label=full%20size&color=blue)](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.8.2.js.svg?label=full%20size&color=blue)| ![minified size size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.8.2.min.js.svg?label=minified%20size&color=darkorchid) | ![gzip size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.8.2.min.js.svg?compression=gzip&softmax=30000&max=35000)
Expand Down Expand Up @@ -66,4 +67,33 @@ Refer to [our GitHub page](https://github.com/microsoft/applicationinsights-js)
| 2.2.0: | ![full size size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.2.0.js.svg?label=full%20size&color=blue)| ![minified size size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.2.0.min.js.svg?label=minified%20size&color=darkorchid) | ![gzip size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.2.0.min.js.svg?compression=gzip&softmax=30000&max=35000)
| 2.1.0: | ![full size size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.1.0.js.svg?label=full%20size&color=blue)| ![minified size size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.1.0.min.js.svg?label=minified%20size&color=darkorchid) | ![gzip size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.1.0.min.js.svg?compression=gzip&softmax=30000&max=35000)
| 2.0.1: | ![full size size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.0.1.js.svg?label=full%20size&color=blue)| ![minified size size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.0.1.min.js.svg?label=minified%20size&color=darkorchid) | ![gzip size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.0.1.min.js.svg?compression=gzip&softmax=30000&max=35000)
| 2.0.0: | ![full size size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.0.0.js.svg?label=full%20size&color=blue)| ![minified size size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.0.0.min.js.svg?label=minified%20size&color=darkorchid) | ![gzip size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.0.0.min.js.svg?compression=gzip&softmax=30000&max=35000)
| 2.0.0: | ![full size size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.0.0.js.svg?label=full%20size&color=blue)| ![minified size size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.0.0.min.js.svg?label=minified%20size&color=darkorchid) | ![gzip size](https://img.badgesize.io/https://js.monitor.azure.com/scripts/b/ai.2.0.0.min.js.svg?compression=gzip&softmax=30000&max=35000)

## Contributing

This project welcomes contributions and suggestions. Most contributions require you to
agree to a Contributor License Agreement (CLA) declaring that you have the right to,
and actually do, grant us the rights to use your contribution. For details, visit
https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need
to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the
instructions provided by the bot. You will only need to do this once across all repositories using our CLA.

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

## Data Collection

As this SDK is designed to enable applications to perform data collection which is sent to the Microsoft collection endpoints the following is required to identify our privacy statement.

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.

## Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow [Microsoft’s Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.

## License

[MIT](LICENSE)
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.4";
var defaultVer = "2.8.5";
this.version = ver? ver:this._getQueryParameterVersion(defaultVer);
this.perfEventsBuffer = [];
this.perfEventWaitBuffer = [];
Expand Down
13 changes: 10 additions & 3 deletions AISKU/Tests/Unit/src/AISKUSize.Tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import * as pako from "pako";
import { Snippet } from "../../../src/Initialization";

export class AISKUSizeCheck extends AITestClass {
private readonly MAX_DEFLATE_SIZE = 44;
private readonly MAX_RAW_SIZE = 118;
private readonly MAX_BUNDLE_SIZE = 118;
private readonly MAX_RAW_DEFLATE_SIZE = 46;
private readonly MAX_BUNDLE_DEFLATE_SIZE = 47;
private readonly rawFilePath = "../dist/applicationinsights-web.min.js";
private readonly prodFilePath = "../browser/ai.2.min.js";

Expand Down Expand Up @@ -50,6 +53,8 @@ export class AISKUSizeCheck extends AITestClass {

private _checkFileSize(isProd: boolean): void {
let _filePath = isProd? this.prodFilePath : this.rawFilePath;
let _maxFullSize = isProd ? this.MAX_BUNDLE_SIZE : this.MAX_RAW_SIZE;
let _maxDeflateSize = isProd ? this.MAX_BUNDLE_DEFLATE_SIZE : this.MAX_RAW_DEFLATE_SIZE;
let postfix = isProd? "" : "-raw";
let fileName = _filePath.split("..")[2];
this.testCase({
Expand All @@ -63,8 +68,10 @@ export class AISKUSizeCheck extends AITestClass {
return;
} else {
return response.text().then(text => {
let size = Math.ceil((pako.deflate(text).length/1024) * 100) / 100.0;
Assert.ok(size <= this.MAX_DEFLATE_SIZE ,`max ${this.MAX_DEFLATE_SIZE} KB, current deflate size is: ${size} KB`);
let size = Math.ceil((text.length/1024) * 100) / 100.0;
Assert.ok(size <= _maxFullSize, `max ${_maxFullSize} KB, current deflate size is: ${size} KB`);
let deflateSize = Math.ceil((pako.deflate(text).length/1024) * 100) / 100.0;
Assert.ok(deflateSize <= _maxDeflateSize ,`max ${_maxDeflateSize} KB, current deflate size is: ${deflateSize} KB`);
}).catch((error: Error) => {
Assert.ok(false, `AISKU${postfix} response error: ${error}`);
});
Expand Down
Loading

0 comments on commit d855703

Please sign in to comment.