Skip to content

chore: remove @microsoft/applicationinsights-common dependency#255

Merged
rzhao271 merged 5 commits into
mainfrom
copilot/remove-applicationinsights-common-dependency
Jul 1, 2026
Merged

chore: remove @microsoft/applicationinsights-common dependency#255
rzhao271 merged 5 commits into
mainfrom
copilot/remove-applicationinsights-common-dependency

Conversation

Copilot AI commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Drops @microsoft/applicationinsights-common — the sole usage was importing BreezeChannelIdentifier, a string constant whose value is "AppInsightsChannelPlugin".

Changes

  • src/common/appInsightsClientFactory.ts: Replace BreezeChannelIdentifier import with the inlined literal "AppInsightsChannelPlugin"
  • package.json / package-lock.json: Remove @microsoft/applicationinsights-common from dependencies

@rzhao271

rzhao271 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@copilot Check whether BreezeChannelIdentifier can be imported from one of the remaining applicationinsights packages.

@rzhao271 rzhao271 added this to the 1.128.0 milestone Jul 1, 2026

Copilot AI commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Check whether BreezeChannelIdentifier can be imported from one of the remaining applicationinsights packages.

Yes — BreezeChannelIdentifier is exported from @microsoft/applicationinsights-core-js, which is already a direct dependency. Updated the import to use that package in commit fix: import BreezeChannelIdentifier from applicationinsights-core-js.

@rzhao271
rzhao271 marked this pull request as ready for review July 1, 2026 17:27
…ore-js

Both @microsoft/1ds-post-js@4.4.1 and @microsoft/1ds-core-js@4.4.1 pin
@microsoft/applicationinsights-core-js to exactly 3.4.1, while the
top-level dependency resolves to 3.4.2. npm installs nested duplicate
copies, causing TypeScript to see structurally distinct but incompatible
IXHROverride types from different module resolution paths.

Adding the npm override forces all packages to use the same version,
eliminating duplicate nested copies and fixing the TS2345 compile error.
Copilot AI requested a review from rzhao271 July 1, 2026 17:37

@rzhao271 rzhao271 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Try bumping the 1ds packages instead.

…plicate

@microsoft/1ds-core-js@4.4.2 and @microsoft/1ds-post-js@4.4.2 updated
their pinned dependency on @microsoft/applicationinsights-core-js from
3.4.1 to 3.4.2, matching the top-level version. npm can now naturally
deduplicate to a single copy, eliminating the TypeScript type mismatch
without needing the override workaround.

Copilot AI commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Try bumping the 1ds packages instead.

Done in commit fix: bump 1ds packages to 4.4.2. @microsoft/1ds-core-js@4.4.2 and @microsoft/1ds-post-js@4.4.2 updated their pinned dependency on @microsoft/applicationinsights-core-js from 3.4.1 to 3.4.2, so npm naturally deduplicates to a single copy. The override workaround has been removed.

Copilot AI requested a review from rzhao271 July 1, 2026 17:43
@rzhao271

rzhao271 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@copilot Also follow this This package (@microsoft/1ds-core-js) is deprecated. All functionality has been merged into [@microsoft/applicationinsights-core-js](https://www.npmjs.com/package/@microsoft/applicationinsights-core-js) and should be consumed directly from that package. by removing the package

@microsoft/1ds-core-js is deprecated; its functionality has been merged
into @microsoft/applicationinsights-core-js. Update 1dsClientFactory.ts
to import AppInsightsCore and IExtendedConfiguration directly from
@microsoft/applicationinsights-core-js and remove the 1ds-core-js
dependency from package.json.

Copilot AI commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Also follow this `This package (@microsoft/1ds-core-js) is deprecated. All functionality has been merged into [@microsoft/applicationinsights-core-js](https://www.npmjs.com/package/@microsoft...

Done in commit chore: remove deprecated @microsoft/1ds-core-js package. The type import and dynamic import() in 1dsClientFactory.ts now use @microsoft/applicationinsights-core-js directly, and @microsoft/1ds-core-js has been removed from package.json.

@rzhao271
rzhao271 merged commit 22104e4 into main Jul 1, 2026
8 checks passed
@rzhao271
rzhao271 deleted the copilot/remove-applicationinsights-common-dependency branch July 1, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants