Skip to content

Address issue with the AppInsightsExtCore using the wrong version number#2718

Merged
MSNev merged 1 commit intomainfrom
MSNev/1DSVer
Mar 31, 2026
Merged

Address issue with the AppInsightsExtCore using the wrong version number#2718
MSNev merged 1 commit intomainfrom
MSNev/1DSVer

Conversation

@MSNev
Copy link
Copy Markdown
Collaborator

@MSNev MSNev commented Mar 30, 2026

No description provided.

@MSNev MSNev added this to the 3.4.0 milestone Mar 30, 2026
@MSNev MSNev requested a review from a team as a code owner March 30, 2026 21:58
Copilot AI review requested due to automatic review settings March 30, 2026 21:58
@@ -1,6 +1,9 @@
const { default: replace } = require("@rollup/plugin-replace");

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused variable replace.

Copilot Autofix

AI 3 days ago

To fix the problem, we should remove the unused variable by deleting the destructuring import of replace from @rollup/plugin-replace. This avoids confusion and a wasted require call at runtime. Since replace is not used anywhere in the provided gruntfile.js code, removing this line does not change existing functionality.

Concretely, in gruntfile.js, delete line 1:

  • Remove: const { default: replace } = require("@rollup/plugin-replace");

No additional methods, imports, or definitions are required, because nothing else depends on this symbol.

Suggested changeset 1
gruntfile.js

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/gruntfile.js b/gruntfile.js
--- a/gruntfile.js
+++ b/gruntfile.js
@@ -1,4 +1,3 @@
-const { default: replace } = require("@rollup/plugin-replace");
 
 module.exports = function (grunt) {
 
EOF
@@ -1,4 +1,3 @@
const { default: replace } = require("@rollup/plugin-replace");

module.exports = function (grunt) {

Copilot is powered by AI and may make mistakes. Always verify output.
Copy link
Copy Markdown
Member

@rads-1996 rads-1996 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the version value reported by AppInsightsExtCore (ext.sdk.ver) by separating the “extended/1DS” version from the core package version, aligning 1DS-Web-JS-* with the expected 1DS major version.

Changes:

  • Introduces ExtVersion / ExtFullVersionString for the extended SDK and updates AppInsightsExtCore to use it for ext.sdk.ver.
  • Updates Grunt version placeholder replacement to support #extVersion# (derived as core major + 1) and adds unit tests validating the intended ownership of ext.sdk.ver.
  • Updates unit tests to validate the new version constants and behavior boundaries between AppInsightsCore vs AppInsightsExtCore.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
shared/AppInsightsCore/src/ext/extUtils.ts Adds ExtVersion / ExtFullVersionString and keeps legacy Version / FullVersionString as deprecated aliases.
shared/AppInsightsCore/src/ext/AppInsightsExtCore.ts Switches ext.sdk.ver to use ExtFullVersionString.
shared/AppInsightsCore/src/index.ts Exports the new extended-version constants from the public entrypoint.
gruntfile.js Adds support for replacing/restoring #extVersion# during builds (core major+1 mapping).
shared/AppInsightsCore/Tests/Unit/src/ext/CoreTest.ts Updates assertions to validate ext.sdk.ver against ExtFullVersionString and the legacy alias.
shared/AppInsightsCore/Tests/Unit/src/ai/ApplicationInsightsCore.Tests.ts Adds tests ensuring AppInsightsCore.track() does not populate/alter ext.sdk.ver.
common/config/rush/npm-shrinkwrap.json Removes the node_modules/fsevents entry (lockfile churn).
Files not reviewed (1)
  • common/config/rush/npm-shrinkwrap.json: Language not supported

@MSNev MSNev enabled auto-merge (squash) March 31, 2026 16:59
@MSNev MSNev merged commit a598f47 into main Mar 31, 2026
13 of 16 checks passed
@MSNev MSNev deleted the MSNev/1DSVer branch March 31, 2026 17:22
@MSNev MSNev restored the MSNev/1DSVer branch March 31, 2026 18:25
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.

5 participants