Skip to content

Commit 07168a2

Browse files
pontemontiJohan Broberg
andauthored
Centralize external package versions and correct pack script (#109)
* Centralize external package versions and correct pack script * Add minssing dependencies * Address PR comments --------- Co-authored-by: Johan Broberg <[email protected]>
1 parent 0bb6a32 commit 07168a2

File tree

14 files changed

+869
-666
lines changed

14 files changed

+869
-666
lines changed

copyFiles.js

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
4+
import fs from 'fs';
5+
import path from 'path';
6+
import { fileURLToPath } from 'url';
7+
import { dirname } from 'path';
8+
9+
const __filename = fileURLToPath(import.meta.url);
10+
const __dirname = dirname(__filename);
11+
12+
/**
13+
* Copies LICENSE.md and CHANGELOG.md to the specified target directory
14+
* @param {string} targetDir - The directory to copy files to
15+
*/
16+
function copyFiles(targetDir) {
17+
if (!targetDir) {
18+
console.error('Error: Target directory not provided');
19+
console.log('Usage: node copyFiles.js <target-directory>');
20+
process.exit(1);
21+
}
22+
23+
const rootDir = __dirname;
24+
const filesToCopy = ['LICENSE.md', 'CHANGELOG.md'];
25+
26+
// Ensure target directory exists
27+
if (!fs.existsSync(targetDir)) {
28+
fs.mkdirSync(targetDir, { recursive: true });
29+
console.log(`Created directory: ${targetDir}`);
30+
}
31+
32+
// Copy each file
33+
filesToCopy.forEach(file => {
34+
const sourcePath = path.join(rootDir, file);
35+
const destPath = path.resolve(targetDir, file);
36+
37+
if (!fs.existsSync(sourcePath)) {
38+
console.error(`Error: Source file not found: ${sourcePath}`);
39+
process.exit(1);
40+
}
41+
42+
try {
43+
fs.copyFileSync(sourcePath, destPath);
44+
console.log(`Copied ${file}`);
45+
console.log(` From: ${sourcePath}`);
46+
console.log(` To: ${destPath}`);
47+
} catch (error) {
48+
console.error(`Error copying ${file}:`, error.message);
49+
process.exit(1);
50+
}
51+
});
52+
53+
console.log('All files copied successfully!');
54+
}
55+
56+
// Get target directory from command line arguments
57+
const targetDir = process.argv[2];
58+
copyFiles(targetDir);

packages/agents-a365-notifications/package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"lint:fix": "eslint src/**/*.ts --fix",
1818
"prepublishOnly": "npm run clean && npm run build",
1919
"ci": "npm ci",
20-
"pack": "cp ../../CHANGELOG.md . && cp ../../LICENSE.md . && npm pack --pack-destination=../"
20+
"pack": "node ../../copyFiles.js . && pnpm pack --pack-destination=../"
2121
},
2222
"keywords": [
2323
"ai",
@@ -34,21 +34,21 @@
3434
},
3535
"dependencies": {
3636
"@microsoft/agents-a365-runtime": "workspace:*",
37-
"@microsoft/agents-activity": "*",
38-
"@microsoft/agents-hosting": "*"
37+
"@microsoft/agents-activity": "catalog:",
38+
"@microsoft/agents-hosting": "catalog:"
3939
},
4040
"devDependencies": {
41-
"@eslint/js": "^9.39.1",
42-
"@types/jest": "workspace:*",
43-
"@types/node": "^20.0.0",
44-
"@typescript-eslint/eslint-plugin": "^8.47.0",
45-
"@typescript-eslint/parser": "^8.47.0",
46-
"eslint": "^9.39.1",
47-
"jest": "workspace:*",
48-
"rimraf": "^5.0.0",
49-
"ts-jest": "workspace:*",
50-
"typescript": "^5.9.3",
51-
"typescript-eslint": "^8.47.0"
41+
"@eslint/js": "catalog:",
42+
"@types/jest": "catalog:",
43+
"@types/node": "catalog:",
44+
"@typescript-eslint/eslint-plugin": "catalog:",
45+
"@typescript-eslint/parser": "catalog:",
46+
"eslint": "catalog:",
47+
"jest": "catalog:",
48+
"rimraf": "catalog:",
49+
"ts-jest": "catalog:",
50+
"typescript": "catalog:",
51+
"typescript-eslint": "catalog:"
5252
},
5353
"engines": {
5454
"node": ">=18.0.0"

packages/agents-a365-observability-extensions-openai/package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,29 +42,29 @@
4242
"test": "jest",
4343
"test:watch": "jest --watch",
4444
"test:coverage": "jest --coverage",
45-
"pack": "cp ../../CHANGELOG.md . && cp ../../LICENSE.md . && npm pack --pack-destination=../"
45+
"pack": "node ../../copyFiles.js . && pnpm pack --pack-destination=../"
4646
},
4747
"dependencies": {
4848
"@microsoft/agents-a365-observability": "workspace:*",
49-
"@openai/agents": "*",
50-
"@opentelemetry/api": "*",
51-
"@opentelemetry/instrumentation": "*"
49+
"@openai/agents": "catalog:",
50+
"@opentelemetry/api": "catalog:",
51+
"@opentelemetry/instrumentation": "catalog:"
5252
},
5353
"devDependencies": {
54-
"@eslint/js": "^9.39.1",
55-
"@types/jest": "^29.5.12",
56-
"@types/node": "^20.0.0",
57-
"@typescript-eslint/eslint-plugin": "^8.47.0",
58-
"@typescript-eslint/parser": "^8.47.0",
59-
"eslint": "^9.39.1",
60-
"jest": "^29.7.0",
61-
"rimraf": "^6.0.0",
62-
"ts-jest": "^29.2.0",
63-
"typescript": "^5.9.3",
64-
"typescript-eslint": "^8.47.0"
54+
"@eslint/js": "catalog:",
55+
"@types/jest": "catalog:",
56+
"@types/node": "catalog:",
57+
"@typescript-eslint/eslint-plugin": "catalog:",
58+
"@typescript-eslint/parser": "catalog:",
59+
"eslint": "catalog:",
60+
"jest": "catalog:",
61+
"rimraf": "catalog:",
62+
"ts-jest": "catalog:",
63+
"typescript": "catalog:",
64+
"typescript-eslint": "catalog:"
6565
},
6666
"peerDependencies": {
67-
"@openai/agents": "^0.1.5"
67+
"@openai/agents": "catalog:"
6868
},
6969
"engines": {
7070
"node": ">=18.0.0"

packages/agents-a365-observability-hosting/package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,25 @@
3939
"test": "jest --passWithNoTests",
4040
"test:watch": "jest --watch",
4141
"test:coverage": "jest --coverage",
42-
"pack": "npm pack --pack-destination=../"
42+
"pack": "node ../../copyFiles.js . && pnpm pack --pack-destination=../"
4343
},
4444
"dependencies": {
4545
"@microsoft/agents-a365-observability": "workspace:*",
4646
"@microsoft/agents-a365-runtime": "workspace:*",
47-
"@microsoft/agents-hosting": "^1.1.0-alpha.85"
47+
"@microsoft/agents-hosting": "catalog:"
4848
},
4949
"devDependencies": {
50-
"@eslint/js": "^9.39.1",
51-
"@types/jest": "workspace:*",
52-
"@types/node": "^20.0.0",
53-
"@typescript-eslint/eslint-plugin": "^8.47.0",
54-
"@typescript-eslint/parser": "^8.47.0",
55-
"eslint": "^9.39.1",
56-
"jest": "workspace:*",
57-
"rimraf": "^6.0.0",
58-
"ts-jest": "workspace:*",
59-
"typescript": "^5.9.3",
60-
"typescript-eslint": "^8.47.0"
50+
"@eslint/js": "catalog:",
51+
"@types/jest": "catalog:",
52+
"@types/node": "catalog:",
53+
"@typescript-eslint/eslint-plugin": "catalog:",
54+
"@typescript-eslint/parser": "catalog:",
55+
"eslint": "catalog:",
56+
"jest": "catalog:",
57+
"rimraf": "catalog:",
58+
"ts-jest": "catalog:",
59+
"typescript": "catalog:",
60+
"typescript-eslint": "catalog:"
6161
},
6262
"engines": {
6363
"node": ">=18.0.0"

packages/agents-a365-observability/package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"lint:fix": "eslint src/**/*.ts --fix",
1818
"prepublishOnly": "npm run clean && npm run build",
1919
"ci": "npm ci",
20-
"pack": "cp ../../CHANGELOG.md . && cp ../../LICENSE.md . && npm pack --pack-destination=../"
20+
"pack": "node ../../copyFiles.js . && pnpm pack --pack-destination=../"
2121
},
2222
"keywords": [
2323
"Agent365",
@@ -37,28 +37,28 @@
3737
"directory": "packages/agents-a365-observability"
3838
},
3939
"dependencies": {
40-
"@azure/monitor-opentelemetry-exporter": "*",
40+
"@azure/monitor-opentelemetry-exporter": "catalog:",
4141
"@microsoft/agents-a365-runtime": "workspace:*",
42-
"@opentelemetry/api": "*",
43-
"@opentelemetry/exporter-trace-otlp-http": "*",
44-
"@opentelemetry/instrumentation": "*",
45-
"@opentelemetry/resources": "*",
46-
"@opentelemetry/sdk-node": "*",
47-
"@opentelemetry/sdk-trace-base": "*",
48-
"@opentelemetry/semantic-conventions": "*"
42+
"@opentelemetry/api": "catalog:",
43+
"@opentelemetry/exporter-trace-otlp-http": "catalog:",
44+
"@opentelemetry/instrumentation": "catalog:",
45+
"@opentelemetry/resources": "catalog:",
46+
"@opentelemetry/sdk-node": "catalog:",
47+
"@opentelemetry/sdk-trace-base": "catalog:",
48+
"@opentelemetry/semantic-conventions": "catalog:"
4949
},
5050
"devDependencies": {
51-
"@eslint/js": "^9.39.1",
52-
"@types/jest": "workspace:*",
53-
"@types/node": "^20.0.0",
54-
"@typescript-eslint/eslint-plugin": "^8.47.0",
55-
"@typescript-eslint/parser": "^8.47.0",
56-
"eslint": "^9.39.1",
57-
"jest": "workspace:*",
58-
"rimraf": "^5.0.0",
59-
"ts-jest": "workspace:*",
60-
"typescript": "^5.9.3",
61-
"typescript-eslint": "^8.47.0"
51+
"@eslint/js": "catalog:",
52+
"@types/jest": "catalog:",
53+
"@types/node": "catalog:",
54+
"@typescript-eslint/eslint-plugin": "catalog:",
55+
"@typescript-eslint/parser": "catalog:",
56+
"eslint": "catalog:",
57+
"jest": "catalog:",
58+
"rimraf": "catalog:",
59+
"ts-jest": "catalog:",
60+
"typescript": "catalog:",
61+
"typescript-eslint": "catalog:"
6262
},
6363
"engines": {
6464
"node": ">=18.0.0"

packages/agents-a365-runtime/package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"lint:fix": "eslint src/**/*.ts --fix",
1919
"prepublishOnly": "npm run clean && npm run build",
2020
"ci": "npm ci",
21-
"pack": "cp ../../CHANGELOG.md . && cp ../../LICENSE.md . && npm pack --pack-destination=../"
21+
"pack": "node ../../copyFiles.js . && pnpm pack --pack-destination=../"
2222
},
2323
"keywords": [
2424
"ai",
@@ -34,23 +34,23 @@
3434
"directory": "packages/agents-a365-runtime"
3535
},
3636
"dependencies": {
37-
"@azure/identity": "^4.12.1",
38-
"@microsoft/agents-hosting": "*",
39-
"jsonwebtoken": "^9.0.2"
37+
"@azure/identity": "catalog:",
38+
"@microsoft/agents-hosting": "catalog:",
39+
"jsonwebtoken": "catalog:"
4040
},
4141
"devDependencies": {
42-
"@eslint/js": "^9.39.1",
43-
"@types/jest": "workspace:*",
44-
"@types/jsonwebtoken": "^9.0.10",
45-
"@types/node": "^20.0.0",
46-
"@typescript-eslint/eslint-plugin": "^8.47.0",
47-
"@typescript-eslint/parser": "^8.47.0",
48-
"eslint": "^9.39.1",
49-
"jest": "workspace:*",
50-
"rimraf": "^5.0.0",
51-
"ts-jest": "workspace:*",
52-
"typescript": "^5.9.3",
53-
"typescript-eslint": "^8.47.0"
42+
"@eslint/js": "catalog:",
43+
"@types/jest": "catalog:",
44+
"@types/jsonwebtoken": "catalog:",
45+
"@types/node": "catalog:",
46+
"@typescript-eslint/eslint-plugin": "catalog:",
47+
"@typescript-eslint/parser": "catalog:",
48+
"eslint": "catalog:",
49+
"jest": "catalog:",
50+
"rimraf": "catalog:",
51+
"ts-jest": "catalog:",
52+
"typescript": "catalog:",
53+
"typescript-eslint": "catalog:"
5454
},
5555
"engines": {
5656
"node": ">=18.0.0"

packages/agents-a365-tooling-extensions-claude/package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"lint:fix": "eslint src/**/*.ts --fix",
1818
"prepublishOnly": "npm run clean && npm run build",
1919
"ci": "npm ci",
20-
"pack": "cp ../../CHANGELOG.md . && cp ../../LICENSE.md . && npm pack --pack-destination=../"
20+
"pack": "node ../../copyFiles.js . && pnpm pack --pack-destination=../"
2121
},
2222
"keywords": [
2323
"ai",
@@ -34,24 +34,24 @@
3434
"directory": "packages/agents-a365-tooling-extensions-claude"
3535
},
3636
"dependencies": {
37-
"@anthropic-ai/claude-agent-sdk": "*",
37+
"@anthropic-ai/claude-agent-sdk": "catalog:",
3838
"@microsoft/agents-a365-runtime": "workspace:*",
3939
"@microsoft/agents-a365-tooling": "workspace:*",
40-
"@microsoft/agents-hosting": "*",
41-
"@modelcontextprotocol/sdk": "workspace:*"
40+
"@microsoft/agents-hosting": "catalog:",
41+
"@modelcontextprotocol/sdk": "catalog:"
4242
},
4343
"devDependencies": {
44-
"@eslint/js": "^9.39.1",
45-
"@types/jest": "workspace:*",
46-
"@types/node": "^20.0.0",
47-
"@typescript-eslint/eslint-plugin": "^8.47.0",
48-
"@typescript-eslint/parser": "^8.47.0",
49-
"eslint": "^9.39.1",
50-
"jest": "workspace:*",
51-
"rimraf": "^5.0.0",
52-
"ts-jest": "workspace:*",
53-
"typescript": "^5.9.3",
54-
"typescript-eslint": "^8.47.0"
44+
"@eslint/js": "catalog:",
45+
"@types/jest": "catalog:",
46+
"@types/node": "catalog:",
47+
"@typescript-eslint/eslint-plugin": "catalog:",
48+
"@typescript-eslint/parser": "catalog:",
49+
"eslint": "catalog:",
50+
"jest": "catalog:",
51+
"rimraf": "catalog:",
52+
"ts-jest": "catalog:",
53+
"typescript": "catalog:",
54+
"typescript-eslint": "catalog:"
5555
},
5656
"engines": {
5757
"node": ">=18.0.0"

packages/agents-a365-tooling-extensions-langchain/package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"lint:fix": "eslint src/**/*.ts --fix",
1818
"prepublishOnly": "npm run clean && npm run build",
1919
"ci": "npm ci",
20-
"pack": "cp ../../CHANGELOG.md . && cp ../../LICENSE.md . && npm pack --pack-destination=../"
20+
"pack": "node ../../copyFiles.js . && pnpm pack --pack-destination=../"
2121
},
2222
"keywords": [
2323
"ai",
@@ -34,24 +34,24 @@
3434
"directory": "packages/agents-a365-tooling-extensions-langchain"
3535
},
3636
"dependencies": {
37-
"@langchain/mcp-adapters": "*",
37+
"@langchain/mcp-adapters": "catalog:",
3838
"@microsoft/agents-a365-runtime": "workspace:*",
3939
"@microsoft/agents-a365-tooling": "workspace:*",
40-
"@microsoft/agents-hosting": "*",
41-
"langchain": "^1.0.1"
40+
"@microsoft/agents-hosting": "catalog:",
41+
"langchain": "catalog:"
4242
},
4343
"devDependencies": {
44-
"@eslint/js": "^9.39.1",
45-
"@types/jest": "workspace:*",
46-
"@types/node": "^20.0.0",
47-
"@typescript-eslint/eslint-plugin": "^8.47.0",
48-
"@typescript-eslint/parser": "^8.47.0",
49-
"eslint": "^9.39.1",
50-
"jest": "workspace:*",
51-
"rimraf": "^5.0.0",
52-
"ts-jest": "workspace:*",
53-
"typescript": "^5.9.3",
54-
"typescript-eslint": "^8.47.0"
44+
"@eslint/js": "catalog:",
45+
"@types/jest": "catalog:",
46+
"@types/node": "catalog:",
47+
"@typescript-eslint/eslint-plugin": "catalog:",
48+
"@typescript-eslint/parser": "catalog:",
49+
"eslint": "catalog:",
50+
"jest": "catalog:",
51+
"rimraf": "catalog:",
52+
"ts-jest": "catalog:",
53+
"typescript": "catalog:",
54+
"typescript-eslint": "catalog:"
5555
},
5656
"engines": {
5757
"node": ">=18.0.0"

0 commit comments

Comments
 (0)