Migrate @azure-rest/batch to import subpath design#38476
Merged
Conversation
c69bed8 to
4817191
Compare
- 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 This enables proper type separation with no mixing of node/dom/RN types. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4817191 to
8801f7a
Compare
jeremymeng
approved these changes
May 8, 2026
Member
jeremymeng
left a comment
There was a problem hiding this comment.
This is going to be removed in favor of @azure/batch
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates @azure-rest/batch to the import-subpath (#platform/*) design by moving TS configs under config/, updating Warp to use those configs, and aligning browser testing/linting setup with other migrated packages.
Changes:
- Switch Warp to extend the repo base config and point each target at
config/tsconfig.*.json(droppingpolyfillSuffix). - Update package scripts/config to use
config/tsconfigs, add#platform/*condition mappings, and adjust Vitest browser config to useeng/vitestconfigs/browser.config.ts. - Add new
config/tsconfigs (src/test/samples/snippets/lint) and remove the legacy root-level tsconfig files.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/batch/batch-rest/warp.config.yml | Extends base Warp config and points targets at new config/ tsconfigs. |
| sdk/batch/batch-rest/vitest.browser.config.ts | Switches to the shared browser Vitest config under eng/vitestconfigs/. |
| sdk/batch/batch-rest/tsconfig.test.node.json | Removes legacy test-node tsconfig in favor of config/ layout. |
| sdk/batch/batch-rest/tsconfig.test.json | Removes legacy test tsconfig replaced by referenced config/ tsconfigs. |
| sdk/batch/batch-rest/tsconfig.src.json | Removes legacy src tsconfig replaced by referenced config/ tsconfigs. |
| sdk/batch/batch-rest/tsconfig.snippets.json | Removes legacy snippets tsconfig replaced by config/ version. |
| sdk/batch/batch-rest/tsconfig.samples.json | Removes legacy samples tsconfig replaced by config/ version. |
| sdk/batch/batch-rest/tsconfig.browser.config.json | Removes legacy browser config tsconfig replaced by new test/browser approach. |
| sdk/batch/batch-rest/tsconfig.json | Updates project references to the new config/ tsconfigs. |
| sdk/batch/batch-rest/test/browser/batchSharedKeyCredentials.spec.ts | Updates browser test import to use #platform/* resolution. |
| sdk/batch/batch-rest/package.json | Updates scripts (samples/test/lint), adds conditional #platform/* mappings for browser/react-native. |
| sdk/batch/batch-rest/eslint.config.mjs | Pins ESLint TS parser to config/tsconfig.lint.json with projectService: false. |
| sdk/batch/batch-rest/config/tsconfig.test.node.json | New node-test tsconfig extending eng/tsconfigs/test.node.json. |
| sdk/batch/batch-rest/config/tsconfig.test.browser.json | New browser-test tsconfig extending eng/tsconfigs/test.browser.json. |
| sdk/batch/batch-rest/config/tsconfig.src.react-native.json | New RN src tsconfig extending eng/tsconfigs/src.react-native.json. |
| sdk/batch/batch-rest/config/tsconfig.src.esm.json | New ESM src tsconfig extending eng/tsconfigs/src.esm.json. |
| sdk/batch/batch-rest/config/tsconfig.src.cjs.json | New CJS src tsconfig extending eng/tsconfigs/src.cjs.json. |
| sdk/batch/batch-rest/config/tsconfig.src.browser.json | New browser src tsconfig extending eng/tsconfigs/src.browser.json. |
| sdk/batch/batch-rest/config/tsconfig.snippets.json | New snippets tsconfig extending eng/tsconfigs/snippets.json. |
| sdk/batch/batch-rest/config/tsconfig.samples.json | New samples tsconfig extending eng/tsconfigs/samples.json. |
| sdk/batch/batch-rest/config/tsconfig.lint.json | New lint tsconfig used by ESLint project-based rules. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Migrates the @azure-rest/batch package to the import subpath design pattern using
#platform/*wildcard imports.Changes
config/directory with tsconfigs extending fromeng/tsconfigs/warp.config.ymlto extend base and use local tsconfigspolyfillSuffixin favor of#platform/*wildcard importspackage.jsonimports field with browser/react-native mappingseslint.config.mjswithprojectService: falsevitest.browser.config.tsto useeng/vitestconfigs/browser.config.tsBenefits
config/folderVerification
pnpm turbo build --filter=@azure-rest/batch...tsc -b --noEmitnpm run lint