Correct #platform subpath mappings in generated package metadata and emitted helper imports#3997
Open
Copilot wants to merge 2 commits into
Open
Correct #platform subpath mappings in generated package metadata and emitted helper imports#3997Copilot wants to merge 2 commits into
#platform subpath mappings in generated package metadata and emitted helper imports#3997Copilot wants to merge 2 commits into
Conversation
… imports Agent-Logs-Url: https://github.com/Azure/autorest.typescript/sessions/2d603179-9c3b-465f-a2a0-60f5faa2f36d Co-authored-by: jeremymeng <7583839+jeremymeng@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix package.json incorrect #platform imports
Correct May 21, 2026
#platform subpath mappings in generated package metadata and emitted helper imports
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.
Generated Azure monorepo package metadata was emitting
#platformimports with.js-suffixed keys/targets, while emitted helper imports also used.jssuffixes that do not match the intended subpath pattern. This updates both metadata generation and emitted/import-rewritten specifiers to use extensionless#platform/*subpaths with source.ts/.mtstargets.Package.json
importsgeneration (rlc-common)#platform/*.jsto#platform/*.browser:./src/*-browser.mtsreact-native:./src/*-react-native.mtsdefault:./src/*.tsEmitter subpath import specifiers (
typespec-ts).jssuffix from generated#platform/...helper imports in binder logic.platform-typesto emit#platform/static-helpers/platform-types(no extension).Focused coverage updates
importsshape for default and react-native variants.#platform/...specifiers.{ "imports": { "#platform/*": { "browser": "./src/*-browser.mts", "react-native": "./src/*-react-native.mts", "default": "./src/*.ts" } } }