Skip to content

Commit

Permalink
[BUG] Investigate changing the sideEffects: false to list only the fi…
Browse files Browse the repository at this point in the history
…les that include the shims module from the all AI modules so that webpack can evaluate correctly #1509

Investigate removing the globals __extends() and __assign() populated by applicationinsights-shims #1280
  • Loading branch information
MSNev committed Apr 3, 2021
1 parent 22d3787 commit f18eb30
Show file tree
Hide file tree
Showing 52 changed files with 852 additions and 3,830 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ temp
# Rush files
common/temp/**
package-deps.json
package-lock.json

# test output
aicore.tests.js*
Expand Down
3 changes: 2 additions & 1 deletion AISKU/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"grunt-ts": "^6.0.0-beta.22",
"grunt-tslint": "^5.0.2",
"globby": "^11.0.0",
"magic-string": "^0.25.7",
"@rollup/plugin-commonjs": "^15.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-replace": "^2.3.3",
Expand All @@ -60,7 +61,7 @@
},
"dependencies": {
"@microsoft/dynamicproto-js": "^1.1.1",
"@microsoft/applicationinsights-shims" : "1.0.3",
"@microsoft/applicationinsights-shims" : "2.0.0",
"@microsoft/applicationinsights-analytics-js": "2.6.1",
"@microsoft/applicationinsights-channel-js": "2.6.1",
"@microsoft/applicationinsights-common": "2.6.1",
Expand Down
2 changes: 0 additions & 2 deletions AISKU/src/applicationinsights-web.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import '@microsoft/applicationinsights-shims';

export {
IApplicationInsights,
Snippet,
Expand Down
3 changes: 2 additions & 1 deletion AISKU/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
"alwaysStrict": true,
"suppressImplicitAnyIndexErrors": true,
"allowSyntheticDefaultImports": true,
"importHelpers": false,
"importHelpers": true,
"noEmitHelpers": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"declaration": true,
"declarationDir": "AISKU/types",
Expand Down
1 change: 0 additions & 1 deletion AISKULight/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

import '@microsoft/applicationinsights-shims';
import {
IConfiguration,
AppInsightsCore,
Expand Down
3 changes: 2 additions & 1 deletion AISKULight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"grunt-run": "^0.8.1",
"grunt-ts": "^6.0.0-beta.22",
"globby": "^11.0.0",
"magic-string": "^0.25.7",
"@rollup/plugin-commonjs": "^15.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-replace": "^2.3.3",
Expand All @@ -37,7 +38,7 @@
},
"dependencies": {
"@microsoft/dynamicproto-js": "^1.1.1",
"@microsoft/applicationinsights-shims" : "1.0.3",
"@microsoft/applicationinsights-shims" : "2.0.0",
"@microsoft/applicationinsights-common": "2.6.1",
"@microsoft/applicationinsights-channel-js": "2.6.1",
"@microsoft/applicationinsights-core-js": "2.6.1"
Expand Down
3 changes: 2 additions & 1 deletion AISKULight/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
"alwaysStrict": true,
"suppressImplicitAnyIndexErrors": true,
"allowSyntheticDefaultImports": true,
"importHelpers": false,
"importHelpers": true,
"noEmitHelpers": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"declaration": true,
"declarationDir": "AISKULight/types",
Expand Down
3 changes: 2 additions & 1 deletion channels/applicationinsights-channel-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"grunt-run": "^0.8.1",
"grunt-ts": "^6.0.0-beta.22",
"globby": "^11.0.0",
"magic-string": "^0.25.7",
"@rollup/plugin-commonjs": "^15.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-replace": "^2.3.3",
Expand All @@ -42,7 +43,7 @@
},
"dependencies": {
"@microsoft/dynamicproto-js": "^1.1.1",
"@microsoft/applicationinsights-shims" : "1.0.3",
"@microsoft/applicationinsights-shims" : "2.0.0",
"@microsoft/applicationinsights-core-js": "2.6.1",
"@microsoft/applicationinsights-common": "2.6.1"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import '@microsoft/applicationinsights-shims';

export { Sender } from "./Sender";
3 changes: 2 additions & 1 deletion channels/applicationinsights-channel-js/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
"suppressImplicitAnyIndexErrors": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"importHelpers": false,
"importHelpers": true,
"noEmitHelpers": true,
"skipLibCheck": true,
"declaration": true,
"declarationDir": "channels/applicationinsights-channel-js/types",
"outDir": "dist-esm",
Expand Down
5 changes: 4 additions & 1 deletion common/Tests/Framework/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,12 @@
"rollup": "^2.32.0",
"typescript": "2.5.3",
"qunit": "^2.9.1",
"sinon": "^7.3.1"
"sinon": "^7.3.1",
"globby": "^11.0.0",
"magic-string": "^0.25.7"
},
"dependencies": {
"@microsoft/applicationinsights-shims" : "2.0.0",
"@microsoft/dynamicproto-js": "^1.1.1"
}
}
3 changes: 3 additions & 0 deletions common/Tests/Framework/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import nodeResolve from "@rollup/plugin-node-resolve";
import { updateDistEsmFiles } from "../../../tools/updateDistEsm/updateDistEsm";

const version = require("./package.json").version;
const outputName = "ai-test-framework";
Expand Down Expand Up @@ -29,6 +30,8 @@ const nodeUmdRollupConfigFactory = () => {
return nodeRollupConfig;
}

updateDistEsmFiles({}, banner);

export default [
nodeUmdRollupConfigFactory(),
];
3 changes: 2 additions & 1 deletion common/Tests/Framework/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
"moduleResolution": "node",
"target": "es5",
"forceConsistentCasingInFileNames": true,
"importHelpers": false,
"importHelpers": true,
"noEmitHelpers": true,
"skipLibCheck": true,
"alwaysStrict": true,
"declaration": true,
"outDir": "dist-esm/",
Expand Down
Loading

0 comments on commit f18eb30

Please sign in to comment.