@@ -84,19 +84,15 @@ const { values: rawOptions } = parseArgs({
8484 */
8585const options = /** @type {Options } */ ( rawOptions ) ;
8686
87- // Native release branches can edit these constants to publish a different
88- // package flavor. Main's defaults publish @typescript/native-preview .
87+ // Native release branches can edit these constants to publish a fixed stable version.
88+ // Main publishes prerelease builds of the TypeScript package .
8989const nativePreviewReleaseProfile = /** @type {"native-preview" | "typescript" } */ ( "typescript" ) ;
9090const nativePreviewReleaseVersion = /** @type {string | undefined } */ ( "7.0.2" ) ;
9191const produceNativePreviewVsix = /** @type {boolean } */ ( true ) ;
9292const produceTypeScriptNightlyVsix = /** @type {boolean } */ ( false ) ;
9393const produceAnyVsix = produceNativePreviewVsix || produceTypeScriptNightlyVsix ;
9494const publishAsTypescript = nativePreviewReleaseProfile === "typescript" ;
9595
96- if ( publishAsTypescript && ! nativePreviewReleaseVersion ) {
97- throw new Error ( "Publishing as 'typescript' requires hardcoding nativePreviewReleaseVersion." ) ;
98- }
99-
10096if ( options . forRelease && ! options . setPrerelease && ( ! nativePreviewReleaseVersion || produceAnyVsix ) ) {
10197 throw new Error ( "forRelease requires setPrerelease unless nativePreviewReleaseVersion is hardcoded and VSIX production is disabled" ) ;
10298}
@@ -1599,7 +1595,8 @@ function nodeToGOARCH(arch, os) {
15991595}
16001596
16011597const getPlatforms = memoize ( ( ) => {
1602- let supportedPlatforms = publishAsTypescript
1598+ const publishTag = getPublishTag ( ) ;
1599+ let supportedPlatforms = publishAsTypescript && publishTag !== "next"
16031600 ? platforms
16041601 : platforms . filter ( ( { vsix } ) => vsix ) ;
16051602
0 commit comments