Skip to content

Commit e198231

Browse files
deyaaeldeenCopilot
andauthored
Migrate @azure-rest/batch to import subpath design (#38476)
## Description Migrates the @azure-rest/batch package to the import subpath design pattern using `#platform/*` wildcard imports. ### Changes - Create `config/` directory with tsconfigs extending from `eng/tsconfigs/` - Update `warp.config.yml` to extend base and use local tsconfigs - Remove `polyfillSuffix` in favor of `#platform/*` wildcard imports - Update `package.json` imports field with browser/react-native mappings - Update `eslint.config.mjs` with `projectService: false` - Update `vitest.browser.config.ts` to use `eng/vitestconfigs/browser.config.ts` - Delete old root tsconfig files ### Benefits - Enables proper type separation with no mixing of node/dom/RN types - Warp now references tsconfigs under the `config/` folder - Consistent with other migrated packages (identity, storage-common, etc.) ### Verification - ✅ Build passes: `pnpm turbo build --filter=@azure-rest/batch...` - ✅ TypeScript validation passes: `tsc -b --noEmit` - ✅ Lint passes: `npm run lint` Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c12db0c commit e198231

21 files changed

Lines changed: 58 additions & 69 deletions
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"include": ["../src", "../test", "../samples-dev", "../package.json"]
4+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "../../../../eng/tsconfigs/samples.json"
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "../../../../eng/tsconfigs/snippets.json"
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "../../../../eng/tsconfigs/src.browser.json"
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "../../../../eng/tsconfigs/src.cjs.json"
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "../../../../eng/tsconfigs/src.esm.json"
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "../../../../eng/tsconfigs/src.react-native.json"
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "../../../../eng/tsconfigs/test.browser.json"
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "../../../../eng/tsconfigs/test.node.json"
3+
}

sdk/batch/batch-rest/eslint.config.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,11 @@ export default azsdkEslint.config([
1010
"@azure/azure-sdk/ts-package-json-main-is-cjs": "off",
1111
"tsdoc/syntax": "warn",
1212
},
13+
languageOptions: {
14+
parserOptions: {
15+
projectService: false,
16+
project: "./config/tsconfig.lint.json",
17+
},
18+
},
1319
},
1420
]);

0 commit comments

Comments
 (0)