-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Post release automated changes for ai releases #36784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 is an automated post-release PR that bumps the version from 2.0.0-beta.2 to 2.0.0-beta.3 and includes several maintenance changes. However, the automated changes have introduced critical bugs in JavaScript samples by attempting to use ES module syntax (import.meta.url) in CommonJS files.
Key Changes:
- Version bump to
2.0.0-beta.3in package.json and constants - Dependency update:
@azure/identityfrom^4.11.1to^4.13.0 - Bug fixes: Removed incorrect
awaitkeywords beforelistVersions()calls (correct change) - Bug introduction: Added
import.meta.urlusage in JavaScript CommonJS files (incorrect change) - Documentation updates to README files
- Deleted TypeScript training data file
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/ai/ai-projects/src/constants.ts | Updates SDK version constant from 2.0.0-beta.2 to 2.0.0-beta.3 |
| sdk/ai/ai-projects/package.json | Bumps package version to 2.0.0-beta.3 |
| sdk/ai/ai-projects/CHANGELOG.md | Adds template for 2.0.0-beta.3 release notes |
| sdk/ai/ai-projects/samples/v2-beta/typescript/package.json | Updates @azure/identity dependency to ^4.13.0 |
| sdk/ai/ai-projects/samples/v2-beta/typescript/src/datasets/datasetsBasics.ts | Fixes incorrect await usage before listVersions() call |
| sdk/ai/ai-projects/samples/v2-beta/typescript/src/files/data/training_set.jsonl | Deletes training data file (may break filesBasic.ts sample) |
| sdk/ai/ai-projects/samples/v2-beta/typescript/README.md | Updates documentation table structure |
| sdk/ai/ai-projects/samples/v2-beta/javascript/package.json | Updates @azure/identity dependency to ^4.13.0 |
| sdk/ai/ai-projects/samples/v2-beta/javascript/datasets/datasetsBasics.js | Fixes incorrect await usage and incorrectly adds import.meta.url to CommonJS |
| sdk/ai/ai-projects/samples/v2-beta/javascript/files/filesBasic.js | Incorrectly adds import.meta.url to CommonJS file |
| sdk/ai/ai-projects/samples/v2-beta/javascript/agents/tools/computerUseUtil.js | Incorrectly adds import.meta.url to CommonJS file |
| sdk/ai/ai-projects/samples/v2-beta/javascript/agents/tools/agentImageGeneration.js | Incorrectly adds import.meta.url to CommonJS file |
| sdk/ai/ai-projects/samples/v2-beta/javascript/agents/tools/agentFileSearch.js | Incorrectly adds import.meta.url to CommonJS file |
| sdk/ai/ai-projects/samples/v2-beta/javascript/agents/agentFileSearch.js | Incorrectly adds import.meta.url to CommonJS file |
| sdk/ai/ai-projects/samples/v2-beta/javascript/README.md | Updates documentation table |
| const { fileURLToPath } = require("url"); | ||
| require("dotenv/config"); | ||
|
|
||
| const __filename = fileURLToPath(import.meta.url); | ||
| const __dirname = path.dirname(__filename); | ||
|
|
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using import.meta.url in CommonJS modules will cause a runtime error. Since this package uses CommonJS (no "type": "module" in package.json), use __dirname directly instead, which is available natively in CommonJS.
Remove these lines:
const { fileURLToPath } = require("url");
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);And use __dirname directly since it's already available in CommonJS.
| const { fileURLToPath } = require("url"); | |
| require("dotenv/config"); | |
| const __filename = fileURLToPath(import.meta.url); | |
| const __dirname = path.dirname(__filename); | |
| require("dotenv/config"); |
| const { fileURLToPath } = require("url"); | ||
|
|
||
| const __filename = fileURLToPath(import.meta.url); | ||
| const __dirname = path.dirname(__filename); |
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using import.meta.url in CommonJS modules will cause a runtime error. Since this package uses CommonJS (no "type": "module" in package.json), use __dirname directly instead, which is available natively in CommonJS.
Remove these lines:
const { fileURLToPath } = require("url");
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);And use __dirname directly since it's already available in CommonJS.
| const { fileURLToPath } = require("url"); | |
| const __filename = fileURLToPath(import.meta.url); | |
| const __dirname = path.dirname(__filename); |
| const __filename = fileURLToPath(import.meta.url); | ||
| const __dirname = path.dirname(__filename); |
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using import.meta.url in CommonJS modules will cause a runtime error. Since this package uses CommonJS (no "type": "module" in package.json), use __dirname directly instead, which is available natively in CommonJS.
Remove these lines:
const { fileURLToPath } = require("url");
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);And use __dirname directly since it's already available in CommonJS.
| const { fileURLToPath } = require("url"); | ||
| require("dotenv/config"); | ||
|
|
||
| const projectEndpoint = process.env["AZURE_AI_PROJECT_ENDPOINT"] || "<project endpoint>"; | ||
| const deploymentName = process.env["MODEL_DEPLOYMENT_NAME"] || "<model deployment name>"; | ||
|
|
||
| async function main() { | ||
| // Load the file to be indexed for search | ||
| const __filename = fileURLToPath(import.meta.url); | ||
| const __dirname = path.dirname(__filename); |
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using import.meta.url in CommonJS modules will cause a runtime error. Since this package uses CommonJS (no "type": "module" in package.json), use __dirname directly instead, which is available natively in CommonJS.
Remove line 19:
const { fileURLToPath } = require("url");And instead of:
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);Use __dirname directly since it's already available in CommonJS.
| const { fileURLToPath } = require("url"); | ||
| require("dotenv/config"); | ||
|
|
||
| const projectEndpoint = process.env["AZURE_AI_PROJECT_ENDPOINT"] || "<project endpoint>"; | ||
| const deploymentName = process.env["MODEL_DEPLOYMENT_NAME"] || "<model deployment name>"; | ||
| const __dirname = path.dirname(fileURLToPath(import.meta.url)); |
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using import.meta.url in CommonJS modules will cause a runtime error. Since this package uses CommonJS (no "type": "module" in package.json), use __dirname directly instead, which is available natively in CommonJS.
Remove these lines:
const { fileURLToPath } = require("url");
const __dirname = path.dirname(fileURLToPath(import.meta.url));And use __dirname directly since it's already available in CommonJS.
| const { fileURLToPath } = require("url"); | |
| require("dotenv/config"); | |
| const projectEndpoint = process.env["AZURE_AI_PROJECT_ENDPOINT"] || "<project endpoint>"; | |
| const deploymentName = process.env["MODEL_DEPLOYMENT_NAME"] || "<model deployment name>"; | |
| const __dirname = path.dirname(fileURLToPath(import.meta.url)); | |
| require("dotenv/config"); | |
| const projectEndpoint = process.env["AZURE_AI_PROJECT_ENDPOINT"] || "<project endpoint>"; | |
| const deploymentName = process.env["MODEL_DEPLOYMENT_NAME"] || "<model deployment name>"; |
| const { fileURLToPath } = require("url"); | ||
| const fs = require("fs"); | ||
| const path = require("path"); | ||
| require("dotenv/config"); | ||
|
|
||
| const projectEndpoint = process.env["AZURE_AI_PROJECT_ENDPOINT"] || "<project endpoint string>"; | ||
| const __dirname = path.dirname(fileURLToPath(import.meta.url)); |
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using import.meta.url in CommonJS modules will cause a runtime error. Since this package uses CommonJS (no "type": "module" in package.json), use __dirname directly instead, which is available natively in CommonJS.
Remove these lines:
const { fileURLToPath } = require("url");
const __dirname = path.dirname(fileURLToPath(import.meta.url));And use __dirname directly since it's already available in CommonJS:
const filePath = path.join(__dirname, "data", "training_set.jsonl");| const { fileURLToPath } = require("url"); | |
| const fs = require("fs"); | |
| const path = require("path"); | |
| require("dotenv/config"); | |
| const projectEndpoint = process.env["AZURE_AI_PROJECT_ENDPOINT"] || "<project endpoint string>"; | |
| const __dirname = path.dirname(fileURLToPath(import.meta.url)); | |
| const fs = require("fs"); | |
| const path = require("path"); | |
| require("dotenv/config"); | |
| const projectEndpoint = process.env["AZURE_AI_PROJECT_ENDPOINT"] || "<project endpoint string>"; |
Post release automated changes for azure-ai-projects