Skip to content
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
2 changes: 1 addition & 1 deletion AISKU/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"typedoc": "^0.26.6",
"typescript": "^4.9.3",
"tslib": "^2.0.0",
"puppeteer": "19.2.0"
"puppeteer": "22.12.1"
},
"peerDependencies": {
"tslib": ">= 1.0.0"
Expand Down
1,375 changes: 717 additions & 658 deletions common/config/rush/npm-shrinkwrap.json

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions common/scripts/install-run-rush.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

89 changes: 46 additions & 43 deletions common/scripts/install-run.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
},
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
"devDependencies": {
"@microsoft/rush": "5.148.0",
"@microsoft/rush": "5.153.1",
"@nevware21/grunt-eslint-ts": "^0.2.2",
"@nevware21/grunt-ts-plugin": "^0.4.3",
"@typescript-eslint/eslint-plugin": "^5.46.1",
Expand All @@ -59,7 +59,6 @@
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-sourcemaps": "^0.6.3",
"archiver": "^5.3.0",
"chromium": "^3.0.2",
"connect": "^3.7.0",
"eslint": "^7.29.0",
"eslint-config-standard": "^16.0.3",
Expand All @@ -73,7 +72,7 @@
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-qunit": "^6.2.1",
"grunt-contrib-uglify": "^5.2.1",
"puppeteer": "19.2.0",
"puppeteer": "22.12.1",
"typedoc": "^0.26.6",
"typescript": "^4.9.3",
"whatwg-fetch": "^3.6.2",
Expand Down
34 changes: 28 additions & 6 deletions rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,15 @@ const NODE_MODULES_SRC = {
"tools/shims": "https://raw.githubusercontent.com/microsoft/ApplicationInsights-JS/refs/tags/{rootVersion}/tools/shims{path}"
};

function getSourceMapPathTransformer(distPath, theNameSpace) {
/**
* Creates a source map path transformer function.
*
* @param distPath - The distribution path to be used in the transformation.
* @param theNameSpace - The namespace for the source map paths.
* @param isDebug - If true, enables debug logging for the transformation process.
* @returns A function that transforms source map paths.
*/
function getSourceMapPathTransformer(distPath, theNameSpace, isDebug) {
let rDistPath = /(.*[\\\/](dist|browser)(.es\d)?)([\\\/].*)$/;

let lastIdx = (theNameSpace.replace(/\\/g, "/")).lastIndexOf("/");
Expand All @@ -198,7 +206,9 @@ function getSourceMapPathTransformer(distPath, theNameSpace) {

return (sourcePath) => {
let normalizedPath = sourcePath.replace(/\\/g, "/");
console.log(`NormalizedPath: ${normalizedPath}, distPath: ${distPath}, ns: ${theNameSpace}, dirname: ${__dirname}`);
if (isDebug) {
console.log(`NormalizedPath: ${normalizedPath}, distPath: ${distPath}, ns: ${theNameSpace}, dirname: ${__dirname}`);
}

// The resolved path that we will return as the "node" path
let resolvedPath = null;
Expand All @@ -212,13 +222,22 @@ function getSourceMapPathTransformer(distPath, theNameSpace) {
// const absoluteSourcePath = resolve(distPath, sourcePath).replace(/\\/g, "/");
const absPath = resolve(distPath, normalizedPath).replace(/\\/g, "/");
if (!resolvedPath) {
console.log(` -- Absolute: ${absPath}`);
if (isDebug) {
console.log(` -- Absolute: ${absPath}`);
}

let idx = absPath.indexOf("node_modules");
if (idx != -1) {
console.log(` -- NodeModule: ${absPath}`);
if (isDebug) {
console.log(` -- NodeModule: ${absPath}`);
}

let ver = getPackageVer(absPath);
if (ver) {
console.log(` -- PackageVer: ${ver.name}@${ver.ver}`);
if (isDebug) {
console.log(` -- PackageVer: ${ver.name}@${ver.ver}`);
}

let src = NODE_MODULES_SRC[ver.name];
if (src) {
resolvedPath = src.replace("{rootVersion}", rootVersion).replace("{version}", ver.ver).replace("{path}", ver.path);
Expand Down Expand Up @@ -266,7 +285,10 @@ function getSourceMapPathTransformer(distPath, theNameSpace) {
resolvedPath = sourcePath;
}

console.log(` -- resolvedPath: ${resolvedPath}`);
if (isDebug) {
console.log(` -- resolvedPath: ${resolvedPath}`);
}

return resolvedPath;
};
}
Expand Down
2 changes: 1 addition & 1 deletion rush.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json",
"npmVersion": "9.9.3",
"rushVersion": "5.148.0",
"rushVersion": "5.153.1",
"projectFolderMaxDepth": 4,
"projects": [
{
Expand Down
3 changes: 1 addition & 2 deletions tools/rollup-es5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "^4.9.3",
"tslib": "^2.0.0",
"magic-string": "^0.25.7",
"chromium": "^3.0.2"
"magic-string": "^0.25.7"
},
"peerDependencies": {
"tslib": ">= 1.0.0"
Expand Down
Loading