Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions common/tools/dev-tool/src/checks/scripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ import { scriptCheck, workingTreeUnchangedCheck } from "../framework/check";

export const format = scriptCheck({
description: "Run format command",
tags: ["ci"],
checkCommand: "pnpm check-format",
fixCommand: "pnpm format",
});

export const lint = scriptCheck({
description: "Run lint command",
tags: ["ci"],
checkCommand: "pnpm lint",
fixCommand: "pnpm lint:fix",
});
Expand Down
8 changes: 2 additions & 6 deletions eng/pipelines/templates/steps/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,8 @@ steps:
- pwsh: |
pnpm build --filter @azure/eslint-plugin-azure-sdk...
$env:FORCE_COLOR = "1"
node eng/tools/ci-runner/index.js lint "$(ChangedServices)"
displayName: "Build ESLint Plugin and Lint Libraries"

- pwsh: |
node eng/tools/ci-runner/index.js check-format $(ChangedServices) -packages "$(ArtifactPackageNames)"
displayName: "Check Format in Libraries"
node eng/tools/ci-runner/index.js check:ci $(ChangedServices) -packages "$(ArtifactPackageNames)"
displayName: "Check Libraries"
Copy link
Member

Choose a reason for hiding this comment

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

is there a condition in pipeline build that we can check for whether we should run check:release?


- pwsh: |
node eng/tools/ci-runner/index.js update-snippets $(ChangedServices) -packages "$(ArtifactPackageNames)"
Expand Down
7 changes: 7 additions & 0 deletions eng/tools/ci-runner/src/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ export function executeActions(
);
});
break;
case "check":
exitCode = runInPackageDirs(action, packageDirs, (packageDir) => {
console.log(
`\nInvoke "npm run check --fix" inside ${tryGetPkgRelativePath(packageDir)} to try to fix failures\n`,
);
});
break;

default:
exitCode = runAllWithDirection(
Expand Down
8 changes: 4 additions & 4 deletions sdk/advisor/arm-advisor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@
},
"files": [
"dist/",
"README.md",
"LICENSE",
"review/",
"CHANGELOG.md"
"README.md"
],
"scripts": {
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
"build:samples": "tsc -p tsconfig.samples.json && dev-tool samples publish -f",
"check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"samples-dev/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
"check:ci": "dev-tool check --tag ci",
Copy link
Member

Choose a reason for hiding this comment

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

We need a corresponding code generator PR to add the two check NPM scripts

Copy link
Member

Choose a reason for hiding this comment

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

Yes and pls don't forget to apply this in codegen repo. Thanks!

"check:release": "dev-tool check --tag release",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"execute:samples": "echo skipped",
"extract-api": "dev-tool run extract-api",
Expand All @@ -80,7 +80,7 @@
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/advisor/arm-advisor",
"homepage": "https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/advisor/arm-advisor/README.md",
Copy link
Member

Choose a reason for hiding this comment

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

We either need to standardize on the homepage format, or relax dev-tool to allow the format that Management packages use. Standardizing is probably better.

"//sampleConfiguration": {
"productName": "",
"productSlugs": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/agricultureplatform/arm-agricultureplatform/README.md",
"homepage": "https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/agricultureplatform/arm-agricultureplatform/README.md",
"prettier": "@azure/eslint-plugin-azure-sdk/prettier.json",
"//metadata": {
"constantPaths": [
Expand Down Expand Up @@ -94,6 +94,8 @@
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
"build:samples": "tsc -p tsconfig.samples.json && dev-tool samples publish -f",
"check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"",
"check:ci": "dev-tool check --tag ci",
"check:release": "dev-tool check --tag release",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"execute:samples": "dev-tool samples run samples-dev",
"extract-api": "rimraf review && dev-tool run extract-api",
Expand Down
4 changes: 3 additions & 1 deletion sdk/agrifood/agrifood-farming-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"main": "./dist/commonjs/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/commonjs/index.d.ts",
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/agrifood/agrifood-farming/README.md",
"homepage": "https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/agrifood/agrifood-farming-rest/README.md",
"repository": "github:Azure/azure-sdk-for-js",
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
Expand Down Expand Up @@ -54,6 +54,8 @@
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
"build:samples": "tsc -p tsconfig.samples.json",
"check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
"check:ci": "dev-tool check --tag ci",
"check:release": "dev-tool check --tag release",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"execute:samples": "dev-tool samples run samples-dev",
"extract-api": "rimraf review && dev-tool run extract-api",
Expand Down
60 changes: 13 additions & 47 deletions sdk/agrifood/arm-agrifood/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
"author": "Microsoft Corporation",
"description": "A generated SDK for AgriFoodMgmtClient.",
"version": "1.0.0-beta.7",
"engines": {
"node": ">=20.0.0"
},
"engines": { "node": ">=20.0.0" },
Copy link
Member

@jeremymeng jeremymeng Dec 8, 2025

Choose a reason for hiding this comment

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

Why was Mgmt package.json formatted? it's "format" script just echo.

"dependencies": {
"@azure/abort-controller": "^2.1.2",
"@azure/core-auth": "^1.9.0",
Expand All @@ -16,14 +14,7 @@
"@azure/core-rest-pipeline": "^1.18.0",
"tslib": "^2.8.1"
},
"keywords": [
"node",
"azure",
"typescript",
"browser",
"isomorphic",
"cloud"
],
"keywords": ["node", "azure", "typescript", "browser", "isomorphic", "cloud"],
"license": "MIT",
"main": "./dist/commonjs/index.js",
"module": "./dist/esm/index.js",
Expand All @@ -43,22 +34,16 @@
"typescript": "catalog:",
"vitest": "catalog:testing"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/agrifood/arm-agrifood",
"homepage": "https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/agrifood/arm-agrifood/README.md",
"repository": "github:Azure/azure-sdk-for-js",
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"files": [
"dist/",
"README.md",
"LICENSE",
"review/",
"CHANGELOG.md"
],
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
"files": ["dist/", "README.md", "LICENSE", "review/", "CHANGELOG.md"],
"scripts": {
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
"build:samples": "tsc -p tsconfig.samples.json && dev-tool samples publish -f",
"check-format": "echo skipped",
"check:ci": "dev-tool check --tag ci",
"check:release": "dev-tool check --tag release",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"execute:samples": "echo skipped",
"extract-api": "dev-tool run extract-api",
Expand All @@ -72,46 +57,27 @@
},
"sideEffects": false,
"//metadata": {
"constantPaths": [
{
"path": "src/agriFoodMgmtClient.ts",
"prefix": "packageDetails"
}
]
"constantPaths": [{ "path": "src/agriFoodMgmtClient.ts", "prefix": "packageDetails" }]
},
"autoPublish": true,
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"productSlugs": ["azure"],
"disableDocsMs": true,
"apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-agrifood?view=azure-node-preview"
},
"type": "module",
"tshy": {
"project": "../../../tsconfig.src.build.json",
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
},
"dialects": [
"esm",
"commonjs"
],
"exports": { "./package.json": "./package.json", ".": "./src/index.ts" },
"dialects": ["esm", "commonjs"],
"selfLink": false
},
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/commonjs/index.d.ts",
"default": "./dist/commonjs/index.js"
}
"import": { "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js" },
"require": { "types": "./dist/commonjs/index.d.ts", "default": "./dist/commonjs/index.js" }
}
}
}
5 changes: 4 additions & 1 deletion sdk/ai/ai-agents/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
"build:samples": "tsc -p tsconfig.samples.json",
"check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"samples-dev/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ",
"check:ci": "dev-tool check --tag ci",
"check:release": "dev-tool check --tag release",
"clean": "rimraf --glob dist dist-* test-dist temp types *.tgz *.log",
"copy:yaml": "copy tsp-location.yaml .\\src\\generated\\tsp-location.yaml",
"execute:samples": "dev-tool samples run samples-dev",
Expand Down Expand Up @@ -153,5 +155,6 @@
},
"main": "./dist/commonjs/index.js",
"types": "./dist/commonjs/index.d.ts",
"module": "./dist/esm/index.js"
"module": "./dist/esm/index.js",
"homepage": "https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/ai/ai-agents/README.md"
}
5 changes: 3 additions & 2 deletions sdk/ai/ai-agents/src/api/agentsContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

import { logger } from "../logger.js";
import { KnownVersions } from "../models/models.js";
import { Client, ClientOptions, getClient } from "@azure-rest/core-client";
import { TokenCredential } from "@azure/core-auth";
import type { Client, ClientOptions} from "@azure-rest/core-client";
import { getClient } from "@azure-rest/core-client";
import type { TokenCredential } from "@azure/core-auth";

export interface AgentsContext extends Client {
/** The API version to use for this operation. */
Expand Down
23 changes: 13 additions & 10 deletions sdk/ai/ai-agents/src/api/messages/operations.ts
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import { AgentsContext as Client } from "../index.js";
import {
agentV1ErrorDeserializer,
import type { AgentsContext as Client } from "../index.js";
import type {
MessageRole,
MessageInputContent,
ThreadMessage,
_AgentsPagedResultThreadMessage,
MessageDeletionStatus} from "../../models/models.js";
import {
agentV1ErrorDeserializer,
messageInputContentSerializer,
messageAttachmentArraySerializer,
ThreadMessage,
threadMessageDeserializer,
_AgentsPagedResultThreadMessage,
_agentsPagedResultThreadMessageDeserializer,
MessageDeletionStatus,
messageDeletionStatusDeserializer,
} from "../../models/models.js";
import {
import type {
MessagesDeleteOptionalParams,
MessagesUpdateMessageOptionalParams,
MessagesGetMessageOptionalParams,
MessagesListMessagesOptionalParams,
MessagesCreateMessageOptionalParams,
} from "./options.js";
import type {
PagedAsyncIterableIterator} from "../../static-helpers/pagingHelpers.js";
import {
PagedAsyncIterableIterator,
buildPagedAsyncIterator,
} from "../../static-helpers/pagingHelpers.js";
import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js";
import {
import type {
StreamableMethod,
PathUncheckedResponse,
PathUncheckedResponse} from "@azure-rest/core-client";
import {
createRestError,
operationOptionsToRequestParameters,
} from "@azure-rest/core-client";
Expand Down
4 changes: 2 additions & 2 deletions sdk/ai/ai-agents/src/api/messages/options.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import { MessageAttachment, ListSortOrder } from "../../models/models.js";
import { OperationOptions } from "@azure-rest/core-client";
import type { MessageAttachment, ListSortOrder } from "../../models/models.js";
import type { OperationOptions } from "@azure-rest/core-client";

/** Optional parameters. */
export interface MessagesDeleteOptionalParams extends OperationOptions {}
Expand Down
4 changes: 2 additions & 2 deletions sdk/ai/ai-agents/src/api/options.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import {
import type {
ToolDefinitionUnion,
ToolResources,
AgentsResponseFormatOption,
Expand All @@ -10,7 +10,7 @@ import {
AgentsToolChoiceOption,
ListSortOrder,
} from "../models/models.js";
import { OperationOptions } from "@azure-rest/core-client";
import type { OperationOptions } from "@azure-rest/core-client";

/** Optional parameters. */
export interface CreateThreadAndRunOptionalParams extends OperationOptions {
Expand Down
17 changes: 10 additions & 7 deletions sdk/ai/ai-agents/src/api/runSteps/operations.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import { AgentsContext as Client } from "../index.js";
import type { AgentsContext as Client } from "../index.js";
import type {
RunStep,
_AgentsPagedResultRunStep} from "../../models/models.js";
import {
agentV1ErrorDeserializer,
RunStep,
runStepDeserializer,
_AgentsPagedResultRunStep,
_agentsPagedResultRunStepDeserializer,
} from "../../models/models.js";
import { RunStepsListRunStepsOptionalParams, RunStepsGetRunStepOptionalParams } from "./options.js";
import type { RunStepsListRunStepsOptionalParams, RunStepsGetRunStepOptionalParams } from "./options.js";
import type {
PagedAsyncIterableIterator} from "../../static-helpers/pagingHelpers.js";
import {
PagedAsyncIterableIterator,
buildPagedAsyncIterator,
} from "../../static-helpers/pagingHelpers.js";
import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js";
import {
import type {
StreamableMethod,
PathUncheckedResponse,
PathUncheckedResponse} from "@azure-rest/core-client";
import {
createRestError,
operationOptionsToRequestParameters,
} from "@azure-rest/core-client";
Expand Down
4 changes: 2 additions & 2 deletions sdk/ai/ai-agents/src/api/runSteps/options.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import { ListSortOrder, RunAdditionalFieldList } from "../../models/models.js";
import { OperationOptions } from "@azure-rest/core-client";
import type { ListSortOrder, RunAdditionalFieldList } from "../../models/models.js";
import type { OperationOptions } from "@azure-rest/core-client";

/** Optional parameters. */
export interface RunStepsListRunStepsOptionalParams extends OperationOptions {
Expand Down
Loading
Loading