Skip to content

Migrate @azure-rest/batch to import subpath design#38476

Merged
deyaaeldeen merged 1 commit into
mainfrom
deyaaeldeen/batch-rest-platform-imports
May 9, 2026
Merged

Migrate @azure-rest/batch to import subpath design#38476
deyaaeldeen merged 1 commit into
mainfrom
deyaaeldeen/batch-rest-platform-imports

Conversation

@deyaaeldeen
Copy link
Copy Markdown
Member

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

@deyaaeldeen deyaaeldeen force-pushed the deyaaeldeen/batch-rest-platform-imports branch 4 times, most recently from c69bed8 to 4817191 Compare May 8, 2026 23:42
- 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>
@deyaaeldeen deyaaeldeen force-pushed the deyaaeldeen/batch-rest-platform-imports branch from 4817191 to 8801f7a Compare May 8, 2026 23:45
@deyaaeldeen deyaaeldeen marked this pull request as ready for review May 8, 2026 23:48
Copilot AI review requested due to automatic review settings May 8, 2026 23:48
Copy link
Copy Markdown
Member

@jeremymeng jeremymeng left a comment

Choose a reason for hiding this comment

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

This is going to be removed in favor of @azure/batch

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 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 (dropping polyfillSuffix).
  • Update package scripts/config to use config/ tsconfigs, add #platform/* condition mappings, and adjust Vitest browser config to use eng/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.

Comment thread sdk/batch/batch-rest/config/tsconfig.lint.json
Comment thread sdk/batch/batch-rest/config/tsconfig.test.browser.json
@deyaaeldeen deyaaeldeen merged commit e198231 into main May 9, 2026
20 checks passed
@deyaaeldeen deyaaeldeen deleted the deyaaeldeen/batch-rest-platform-imports branch May 9, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants