Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
09ac3c2
remove rush dependency
v-jiaodi May 23, 2025
50177de
regen code
v-jiaodi May 23, 2025
f6f09b4
Merge branch 'main' of https://github.com/Azure/autorest.typescript i…
v-jiaodi Aug 1, 2025
dd50f88
format
v-jiaodi Aug 1, 2025
c027adb
Merge branch 'main' into remove-rush-dependency
v-jiaodi Aug 4, 2025
f052884
Merge branch 'main' of https://github.com/Azure/autorest.typescript i…
v-jiaodi Aug 22, 2025
9d1cbde
regen code
v-jiaodi Aug 22, 2025
e5cac4a
update
v-jiaodi Aug 22, 2025
208a8f4
update case
v-jiaodi Aug 25, 2025
36e7ff6
Merge branch 'main' of https://github.com/Azure/autorest.typescript i…
v-jiaodi Aug 25, 2025
8c17179
revert pnpm pack
v-jiaodi Aug 25, 2025
0f8b0fe
format and regen
v-jiaodi Aug 25, 2025
1c680a7
update case
v-jiaodi Aug 25, 2025
b33d9e5
update to pnpm
v-jiaodi Aug 26, 2025
480ba09
Merge branch 'main' of https://github.com/Azure/autorest.typescript i…
v-jiaodi Aug 26, 2025
1adc6cd
update
v-jiaodi Aug 26, 2025
87f3c37
regen code
v-jiaodi Aug 26, 2025
52f64f9
regen
v-jiaodi Aug 26, 2025
0811904
Merge branch 'main' of https://github.com/Azure/autorest.typescript i…
v-jiaodi Sep 9, 2025
5d6effd
revert this change after sdk repo update
v-jiaodi Sep 9, 2025
334561c
regen code
v-jiaodi Sep 9, 2025
91f25b5
Merge branch 'main' into remove-rush-dependency
v-jiaodi Sep 24, 2025
6b990f4
update
v-jiaodi Sep 28, 2025
2b88b7b
Merge branch 'remove-rush-dependency' of https://github.com/v-jiaodi/…
v-jiaodi Sep 28, 2025
7317629
Merge branch 'main' into remove-rush-dependency
v-jiaodi Sep 28, 2025
364046b
Merge branch 'main' into remove-rush-dependency
MaryGao Oct 10, 2025
b6e7738
Merge branch 'main' into remove-rush-dependency
v-jiaodi Oct 10, 2025
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: 0 additions & 2 deletions packages/autorest.typescript/src/autorestSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ export interface AutorestOptions {
lenientModelDeduplication?: boolean;
useLegacyLro?: boolean;
flavor?: PackageFlavor;
//TODO should remove this after finish the release tool test
shouldUsePnpmDep?: boolean;
}

let host: AutorestExtensionHost;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ function regularAutorestPackage(
clientDetails: ClientDetails,
packageDetails: PackageDetails
) {
//TODO should remove all the shouldUsePnpmDep codes after finish the release tool test
const {
srcPath,
useCoreV2,
Expand All @@ -62,8 +61,7 @@ function regularAutorestPackage(
generateSample,
coreHttpCompatMode,
azureSdkForJs,
isTestPackage,
shouldUsePnpmDep
isTestPackage
} = getAutorestOptions();
const { model } = getSession();
const { addCredentials } = getSecurityInfoFromModel(model.security);
Expand All @@ -88,19 +86,20 @@ function regularAutorestPackage(
engines: {
node: ">=20.0.0"
},
// revert this change after sdk repo update.
dependencies: {
...(hasLro && { "@azure/core-lro": shouldUsePnpmDep && azureSdkForJs ? "catalog:corelrov2" : "^2.5.4" }),
...(hasLro && { "@azure/abort-controller": shouldUsePnpmDep && azureSdkForJs ? "workspace:^" : "^2.1.2" }),
...(hasAsyncIterators && { "@azure/core-paging": shouldUsePnpmDep && azureSdkForJs ? "workspace:^" : "^1.6.2" }),
...(useCoreV2 && { "@azure/core-client": shouldUsePnpmDep && azureSdkForJs ? "workspace:^" : "^1.9.3" }),
...(useCoreV2 && addCredentials && { "@azure/core-auth": shouldUsePnpmDep && azureSdkForJs ? "workspace:^" : "^1.9.0" }),
...(hasLro && { "@azure/core-lro": "^2.5.4" }),
...(hasLro && { "@azure/abort-controller": "^2.1.2" }),
...(hasAsyncIterators && { "@azure/core-paging": "^1.6.2" }),
...(useCoreV2 && { "@azure/core-client": "^1.9.3" }),
...(useCoreV2 && addCredentials && { "@azure/core-auth": "^1.9.0" }),
...(useCoreV2 && {
"@azure/core-rest-pipeline": shouldUsePnpmDep && azureSdkForJs ? "workspace:^" : "^1.19.1"
"@azure/core-rest-pipeline": "^1.19.1"
}),
...(tracingInfo && {
"@azure/core-tracing": shouldUsePnpmDep && azureSdkForJs ? "workspace:^" : "^1.2.0"
"@azure/core-tracing": "^1.2.0"
}),
tslib: shouldUsePnpmDep && azureSdkForJs ? "catalog:" : "^2.8.1"
tslib: "^2.8.1"
},
keywords: ["node", "azure", "typescript", "browser", "isomorphic", "cloud"],
license: "MIT",
Expand All @@ -111,9 +110,9 @@ function regularAutorestPackage(
devDependencies: {
"@microsoft/api-extractor": "^7.40.3",
mkdirp: "^3.0.1",
typescript: shouldUsePnpmDep && azureSdkForJs ? "catalog:" : "~5.8.2",
typescript: azureSdkForJs ? "catalog:" : "~5.8.2",
rimraf: "^5.0.0",
dotenv: shouldUsePnpmDep && azureSdkForJs ? "catalog:testing" : "^16.0.0"
dotenv: azureSdkForJs ? "catalog:testing" : "^16.0.0"
},
repository: "github:Azure/azure-sdk-for-js",
bugs: {
Expand All @@ -128,7 +127,7 @@ function regularAutorestPackage(
build:
"npm run clean && tshy && npm run extract-api",
minify: `uglifyjs -c -m --comments --source-map "content='./dist/index.js.map'" -o ./dist/index.min.js ./dist/index.js`,
pack: `${shouldUsePnpmDep && azureSdkForJs ? "pnpm" : "npm"} pack 2>&1`,
pack: `${azureSdkForJs ? "pnpm" : "npm"} pack 2>&1`,
"extract-api": "rimraf review && mkdirp ./review && api-extractor run --local",
lint: "echo skipped",
clean:
Expand Down Expand Up @@ -169,7 +168,7 @@ function regularAutorestPackage(
packageInfo.homepage = `https://github.com/Azure/azure-sdk-for-js/tree/main/${azureOutputDirectory}`;
}
if (azureSdkForJs) {
packageInfo.devDependencies["@azure/dev-tool"] = shouldUsePnpmDep && azureSdkForJs ? "workspace:^" : "^1.0.0";
packageInfo.devDependencies["@azure/dev-tool"] = azureSdkForJs ? "workspace:*" : "^1.0.0";
delete packageInfo.devDependencies["@microsoft/api-extractor"];
delete packageInfo.devDependencies["rimraf"];
delete packageInfo.devDependencies["mkdirp"];
Expand All @@ -193,19 +192,19 @@ function regularAutorestPackage(
}

if (generateTest) {
packageInfo.devDependencies["@azure/identity"] = shouldUsePnpmDep && azureSdkForJs ? "catalog:internal" : "^4.9.0";
packageInfo.devDependencies["@azure/logger"] = shouldUsePnpmDep && azureSdkForJs ? "workspace:^" : "^1.1.4";
packageInfo.devDependencies["@azure/identity"] = azureSdkForJs ? "catalog:internal" : "^4.9.0";
packageInfo.devDependencies["@azure/logger"] = azureSdkForJs ? "workspace:*" : "^1.1.4";
// TODO need unify the version when 4.1.0 released
packageInfo.devDependencies["@azure-tools/test-recorder"] = azureSdkForJs ? shouldUsePnpmDep ? "workspace:^" : "^4.1.0" : "^4.0.0";
packageInfo.devDependencies["@azure-tools/test-credential"] = shouldUsePnpmDep && azureSdkForJs ? "workspace:^" : "^2.0.0";
packageInfo.devDependencies["@azure-tools/test-recorder"] = azureSdkForJs ? "workspace:*" : "^4.0.0";
packageInfo.devDependencies["@azure-tools/test-credential"] = azureSdkForJs ? "workspace:*" : "^2.0.0";
if (azureSdkForJs) {
packageInfo.devDependencies["@azure-tools/test-utils-vitest"] = shouldUsePnpmDep && azureSdkForJs ? "workspace:^" : "^1.0.0";
packageInfo.devDependencies["@azure-tools/test-utils-vitest"] = azureSdkForJs ? "workspace:*" : "^1.0.0";
}
packageInfo.devDependencies["@types/node"] = shouldUsePnpmDep && azureSdkForJs ? "catalog:" : "^20.0.0";
packageInfo.devDependencies["@vitest/browser"] = shouldUsePnpmDep && azureSdkForJs ? "catalog:testing" : "^3.0.9";
packageInfo.devDependencies["@vitest/coverage-istanbul"] = shouldUsePnpmDep && azureSdkForJs ? "catalog:testing" : "^3.0.9";
packageInfo.devDependencies["playwright"] = shouldUsePnpmDep && azureSdkForJs ? "catalog:testing" : "^1.52.0";
packageInfo.devDependencies["vitest"] = shouldUsePnpmDep && azureSdkForJs ? "catalog:testing" : "^3.0.9";
packageInfo.devDependencies["@types/node"] = azureSdkForJs ? "catalog:" : "^20.0.0";
packageInfo.devDependencies["@vitest/browser"] = azureSdkForJs ? "catalog:testing" : "^3.0.9";
packageInfo.devDependencies["@vitest/coverage-istanbul"] = azureSdkForJs ? "catalog:testing" : "^3.0.9";
packageInfo.devDependencies["playwright"] = azureSdkForJs ? "catalog:testing" : "^1.52.0";
packageInfo.devDependencies["vitest"] = azureSdkForJs ? "catalog:testing" : "^3.0.9";
packageInfo.scripts["test"] = "npm run test:node && npm run test:browser";

if (azureSdkForJs) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export function transformOptions(model: CodeModel): RLCOptions {
azureArm,
flavor,
isTestPackage,
shouldUsePnpmDep
} = getAutorestOptions();
// TODO modulekind is a workaround for codegen test environment, should remove this when the esm test framework supported
const options: RLCOptions = { moduleKind: isTestPackage ? "cjs" : "esm" };
Expand Down Expand Up @@ -48,6 +47,5 @@ export function transformOptions(model: CodeModel): RLCOptions {
options.sourceFrom = "Swagger";
// Always enable operation group prefix for swagger
options.enableOperationGroup = true;
options.shouldUsePnpmDep = shouldUsePnpmDep;
return options;
}
10 changes: 0 additions & 10 deletions packages/autorest.typescript/src/utils/autorestOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ export async function extractAutorestOptions(): Promise<AutorestOptions> {
const azureSdkForJs = await getAzureSdkForJs(host);
const dependencyInfo = await getDependencyInfo(host);
const flavor = await getFlavor(host);
//TODO should remove this after finish the release tool test
const shouldUsePnpmDep = await shouldUsePnpm(host)

return {
azureArm,
Expand Down Expand Up @@ -82,8 +80,6 @@ export async function extractAutorestOptions(): Promise<AutorestOptions> {
dependencyInfo,
useLegacyLro,
flavor,
//TODO should remove this after finish the release tool test
shouldUsePnpmDep
};
}

Expand Down Expand Up @@ -403,9 +399,3 @@ async function getDependencyInfo(
"Invalid dependency-info. Make sure that link and description are defined"
);
}
//TODO should remove this after finish the release tool test
async function shouldUsePnpm(host: AutorestExtensionHost): Promise<boolean> {
const shouldUsePnpmDep = (await host.getValue("should-use-pnpm-dep")) === true;

return shouldUsePnpmDep;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
"types": "./dist/commonjs/index.d.ts",
"type": "module",
"devDependencies": {
"typescript": "~5.8.2",
"dotenv": "^16.0.0",
"@azure/dev-tool": "^1.0.0"
"typescript": "catalog:",
"dotenv": "catalog:testing",
"@azure/dev-tool": "workspace:*"
},
"repository": "github:Azure/azure-sdk-for-js",
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
"files": ["dist/", "README.md", "LICENSE"],
"scripts": {
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
"pack": "npm pack 2>&1",
"pack": "pnpm pack 2>&1",
"extract-api": "dev-tool run extract-api",
"lint": "echo skipped",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
"types": "./dist/commonjs/index.d.ts",
"type": "module",
"devDependencies": {
"typescript": "~5.8.2",
"dotenv": "^16.0.0",
"@azure/dev-tool": "^1.0.0"
"typescript": "catalog:",
"dotenv": "catalog:testing",
"@azure/dev-tool": "workspace:*"
},
"repository": "github:Azure/azure-sdk-for-js",
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
"files": ["dist/", "README.md", "LICENSE"],
"scripts": {
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
"pack": "npm pack 2>&1",
"pack": "pnpm pack 2>&1",
"extract-api": "dev-tool run extract-api",
"lint": "echo skipped",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
"types": "./dist/commonjs/index.d.ts",
"type": "module",
"devDependencies": {
"typescript": "~5.8.2",
"dotenv": "^16.0.0",
"@azure/dev-tool": "^1.0.0"
"typescript": "catalog:",
"dotenv": "catalog:testing",
"@azure/dev-tool": "workspace:*"
},
"repository": "github:Azure/azure-sdk-for-js",
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
"files": ["dist/", "README.md", "LICENSE"],
"scripts": {
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
"pack": "npm pack 2>&1",
"pack": "pnpm pack 2>&1",
"extract-api": "dev-tool run extract-api",
"lint": "echo skipped",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
"types": "./dist/commonjs/index.d.ts",
"type": "module",
"devDependencies": {
"typescript": "~5.8.2",
"dotenv": "^16.0.0",
"@azure/dev-tool": "^1.0.0"
"typescript": "catalog:",
"dotenv": "catalog:testing",
"@azure/dev-tool": "workspace:*"
},
"repository": "github:Azure/azure-sdk-for-js",
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
"files": ["dist/", "README.md", "LICENSE"],
"scripts": {
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
"pack": "npm pack 2>&1",
"pack": "pnpm pack 2>&1",
"extract-api": "dev-tool run extract-api",
"lint": "echo skipped",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
"types": "./dist/commonjs/index.d.ts",
"type": "module",
"devDependencies": {
"typescript": "~5.8.2",
"dotenv": "^16.0.0",
"@azure/dev-tool": "^1.0.0"
"typescript": "catalog:",
"dotenv": "catalog:testing",
"@azure/dev-tool": "workspace:*"
},
"repository": "github:Azure/azure-sdk-for-js",
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
"files": ["dist/", "README.md", "LICENSE"],
"scripts": {
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
"pack": "npm pack 2>&1",
"pack": "pnpm pack 2>&1",
"extract-api": "dev-tool run extract-api",
"lint": "echo skipped",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
"types": "./dist/commonjs/index.d.ts",
"type": "module",
"devDependencies": {
"typescript": "~5.8.2",
"dotenv": "^16.0.0",
"@azure/dev-tool": "^1.0.0"
"typescript": "catalog:",
"dotenv": "catalog:testing",
"@azure/dev-tool": "workspace:*"
},
"repository": "github:Azure/azure-sdk-for-js",
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
"files": ["dist/", "README.md", "LICENSE"],
"scripts": {
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
"pack": "npm pack 2>&1",
"pack": "pnpm pack 2>&1",
"extract-api": "dev-tool run extract-api",
"lint": "echo skipped",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
"types": "./dist/commonjs/index.d.ts",
"type": "module",
"devDependencies": {
"typescript": "~5.8.2",
"dotenv": "^16.0.0",
"@azure/dev-tool": "^1.0.0"
"typescript": "catalog:",
"dotenv": "catalog:testing",
"@azure/dev-tool": "workspace:*"
},
"repository": "github:Azure/azure-sdk-for-js",
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
"files": ["dist/", "README.md", "LICENSE"],
"scripts": {
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
"pack": "npm pack 2>&1",
"pack": "pnpm pack 2>&1",
"extract-api": "dev-tool run extract-api",
"lint": "echo skipped",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
"types": "./dist/commonjs/index.d.ts",
"type": "module",
"devDependencies": {
"typescript": "~5.8.2",
"dotenv": "^16.0.0",
"@azure/dev-tool": "^1.0.0"
"typescript": "catalog:",
"dotenv": "catalog:testing",
"@azure/dev-tool": "workspace:*"
},
"repository": "github:Azure/azure-sdk-for-js",
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
"files": ["dist/", "README.md", "LICENSE"],
"scripts": {
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
"pack": "npm pack 2>&1",
"pack": "pnpm pack 2>&1",
"extract-api": "dev-tool run extract-api",
"lint": "echo skipped",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
"types": "./dist/commonjs/index.d.ts",
"type": "module",
"devDependencies": {
"typescript": "~5.8.2",
"dotenv": "^16.0.0",
"@azure/dev-tool": "^1.0.0"
"typescript": "catalog:",
"dotenv": "catalog:testing",
"@azure/dev-tool": "workspace:*"
},
"repository": "github:Azure/azure-sdk-for-js",
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
"files": ["dist/", "README.md", "LICENSE"],
"scripts": {
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
"pack": "npm pack 2>&1",
"pack": "pnpm pack 2>&1",
"extract-api": "dev-tool run extract-api",
"lint": "echo skipped",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
"types": "./dist/commonjs/index.d.ts",
"type": "module",
"devDependencies": {
"typescript": "~5.8.2",
"dotenv": "^16.0.0",
"@azure/dev-tool": "^1.0.0"
"typescript": "catalog:",
"dotenv": "catalog:testing",
"@azure/dev-tool": "workspace:*"
},
"repository": "github:Azure/azure-sdk-for-js",
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
"files": ["dist/", "README.md", "LICENSE"],
"scripts": {
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
"pack": "npm pack 2>&1",
"pack": "pnpm pack 2>&1",
"extract-api": "dev-tool run extract-api",
"lint": "echo skipped",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
"types": "./dist/commonjs/index.d.ts",
"type": "module",
"devDependencies": {
"typescript": "~5.8.2",
"dotenv": "^16.0.0",
"@azure/dev-tool": "^1.0.0"
"typescript": "catalog:",
"dotenv": "catalog:testing",
"@azure/dev-tool": "workspace:*"
},
"repository": "github:Azure/azure-sdk-for-js",
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
"files": ["dist/", "README.md", "LICENSE"],
"scripts": {
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
"pack": "npm pack 2>&1",
"pack": "pnpm pack 2>&1",
"extract-api": "dev-tool run extract-api",
"lint": "echo skipped",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
Expand Down
Loading
Loading