Skip to content

Commit 7c267c8

Browse files
jsvdclaude
andcommitted
Fix cross-platform cheatsheet sort order with LC_ALL=C
The type name sorting in generate-declarations.sh used locale-aware sort, producing different order on macOS vs Linux CI. Force LC_ALL=C for deterministic byte-order sorting across platforms. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e7a98ed commit 7c267c8

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

scripts/generate-declarations.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ CHEATSHEET="$OUT_DIR/cheatsheet.txt"
148148
echo "=== $dir (@arcane/runtime/$dir) ==="
149149

150150
# Extract type names (one-liner summary)
151-
type_names=$(grep -E '^\s+export type \w+ ' "$module_file" 2>/dev/null | sed 's/.*export type \([A-Za-z_][A-Za-z0-9_]*\).*/\1/' | sort -u | tr '\n' ', ' | sed 's/, $//') || true
151+
type_names=$(grep -E '^\s+export type \w+ ' "$module_file" 2>/dev/null | sed 's/.*export type \([A-Za-z_][A-Za-z0-9_]*\).*/\1/' | LC_ALL=C sort -u | tr '\n' ', ' | sed 's/, $//') || true
152152
if [ -n "$type_names" ]; then
153153
echo "Types: $type_names"
154154
fi

templates/default/types/cheatsheet.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ One-liner signatures for every exported function, grouped by module.
66
For full JSDoc, argument types, and examples, see the per-module .d.ts files in types/.
77

88
=== rendering (@arcane/runtime/rendering) ===
9-
Types: AnimatedTileDef,AnimationDef,AnimationFinishedCondition,AnimationId,AnimationState,AudioBus,AutotileMapping,AutotileRule,BitmapFont,BlendState,BooleanCondition,CameraBounds,CameraDeadzone,CameraState,EffectId,FloatingTextOptions,FrameEvent,FrameEventCallback,FSMConfig,FSMParams,FSMState,FSMStateDef,FSMTransition,HexConfig,HexCoord,HexOrientation,HexTile,HexTilemap,HexTilemapConfig,ImpactConfig,ImpactFlash,ImpactParticles,ImpactShake,ImpactSound,InstanceId,IsoConfig,IsoTile,IsoTilemap,IsoTilemapConfig,KeyName,LayeredTilemap,LayerOptions,MousePosition,MSDFFont,MSDFGlyph,NeighborCheck,NineSliceBorder,NineSliceOptions,OffsetType,ParallaxSpriteOptions,PlayOptions,PoolConfig,RenderTargetId,ScreenTransitionConfig,ScreenTransitionType,ShaderId,SoundId,SpatialOptions,SpriteOptions,StaggeredIsoConfig,TextAlign,TextLayoutOptions,TextMeasurement,TextOptions,TextOutline,TextShadow,TextureId,ThresholdCondition,TilemapId,TilemapLayer,TilemapOptions,TileProperties,Trail,TrailConfig,TrailPoint,TransitionCondition,TriggerCondition,Typewriter,TypewriterConfig,TypewriterDrawOptions,
9+
Types: AnimatedTileDef,AnimationDef,AnimationFinishedCondition,AnimationId,AnimationState,AudioBus,AutotileMapping,AutotileRule,BitmapFont,BlendState,BooleanCondition,CameraBounds,CameraDeadzone,CameraState,EffectId,FSMConfig,FSMParams,FSMState,FSMStateDef,FSMTransition,FloatingTextOptions,FrameEvent,FrameEventCallback,HexConfig,HexCoord,HexOrientation,HexTile,HexTilemap,HexTilemapConfig,ImpactConfig,ImpactFlash,ImpactParticles,ImpactShake,ImpactSound,InstanceId,IsoConfig,IsoTile,IsoTilemap,IsoTilemapConfig,KeyName,LayerOptions,LayeredTilemap,MSDFFont,MSDFGlyph,MousePosition,NeighborCheck,NineSliceBorder,NineSliceOptions,OffsetType,ParallaxSpriteOptions,PlayOptions,PoolConfig,RenderTargetId,ScreenTransitionConfig,ScreenTransitionType,ShaderId,SoundId,SpatialOptions,SpriteOptions,StaggeredIsoConfig,TextAlign,TextLayoutOptions,TextMeasurement,TextOptions,TextOutline,TextShadow,TextureId,ThresholdCondition,TileProperties,TilemapId,TilemapLayer,TilemapOptions,Trail,TrailConfig,TrailPoint,TransitionCondition,TriggerCondition,Typewriter,TypewriterConfig,TypewriterDrawOptions,
1010
declare function createAnimationFSM(config: FSMConfig): FSMState;
1111
declare function getCurrentState(fsm: FSMState): string;
1212
declare function isBlending(fsm: FSMState): boolean;
@@ -266,7 +266,7 @@ declare function getVisibleText(tw: Typewriter): string;
266266
declare function isTypewriterComplete(tw: Typewriter): boolean;
267267

268268
=== game (@arcane/runtime/game) ===
269-
Types: CollisionCallback,CollisionRegistry,ColorSpriteOptions,Entity,EntityOptions,EntitySprite,FrameCallback,FrameInput,Game,GameConfig,GameContext,HUDBarOptions,HUDLabelOptions,HUDOverlayOptions,HUDTextOptions,Platform,PlatformerConfig,PlatformerState,PlatformerStateType,PlatformType,SceneNode,SceneNodeId,SpriteGroup,SpriteGroupDrawOptions,SpriteGroupType,SpritePart,WorldTransform,
269+
Types: CollisionCallback,CollisionRegistry,ColorSpriteOptions,Entity,EntityOptions,EntitySprite,FrameCallback,FrameInput,Game,GameConfig,GameContext,HUDBarOptions,HUDLabelOptions,HUDOverlayOptions,HUDTextOptions,Platform,PlatformType,PlatformerConfig,PlatformerState,PlatformerStateType,SceneNode,SceneNodeId,SpriteGroup,SpriteGroupDrawOptions,SpriteGroupType,SpritePart,WorldTransform,
270270
declare function createCollisionRegistry(): CollisionRegistry;
271271
declare function onBodyCollision(registry: CollisionRegistry, bodyId: BodyId, callback: CollisionCallback): void;
272272
declare function onCollision(registry: CollisionRegistry, bodyA: BodyId, bodyB: BodyId, callback: CollisionCallback): void;
@@ -332,7 +332,7 @@ declare function consumeCombo(buffer: InputBuffer, combo: ComboDef): void;
332332
declare function updateInputBuffer(buffer: InputBuffer, map: InputMap, time: number, poller?: InputPoller): void;
333333

334334
=== ui (@arcane/runtime/ui) ===
335-
Types: Anchor,ArcOptions,BarOptions,ButtonState,ButtonStyle,ButtonVisual,CapsuleOptions,CheckboxState,CheckboxStyle,Color,EllipseOptions,Focusable,FocusManagerState,LabelOptions,LayoutPosition,LineOptions,Palette,PanelOptions,PolygonOptions,RadioGroupState,RadioGroupStyle,RectOptions,RingOptions,SectorOptions,ShapeOptions,SliderState,SliderStyle,TextInputKeyEvent,TextInputState,TextInputStyle,
335+
Types: Anchor,ArcOptions,BarOptions,ButtonState,ButtonStyle,ButtonVisual,CapsuleOptions,CheckboxState,CheckboxStyle,Color,EllipseOptions,FocusManagerState,Focusable,LabelOptions,LayoutPosition,LineOptions,Palette,PanelOptions,PolygonOptions,RadioGroupState,RadioGroupStyle,RectOptions,RingOptions,SectorOptions,ShapeOptions,SliderState,SliderStyle,TextInputKeyEvent,TextInputState,TextInputStyle,
336336
declare function rgb(r: number, g: number, b: number, a?: number): Color;
337337
declare function createButton(x: number, y: number, w: number, h: number, label: string, style?: ButtonStyle): ButtonState;
338338
declare function hitTest(px: number, py: number, rx: number, ry: number, rw: number, rh: number): boolean;
@@ -394,7 +394,7 @@ declare function updateRadioGroup(rg: RadioGroupState, mouseX: number, mouseY: n
394394
declare function drawRadioGroup(rg: RadioGroupState): void;
395395

396396
=== state (@arcane/runtime/state) ===
397-
Types: ArcaneError,DiceNotation,DiceSpec,Diff,DiffEntry,Effect,EntityId,ObserverContext,PathPattern,PRNGState,Unsubscribe,Vec2,
397+
Types: ArcaneError,DiceNotation,DiceSpec,Diff,DiffEntry,Effect,EntityId,ObserverContext,PRNGState,PathPattern,Unsubscribe,Vec2,
398398
declare function entityId(id: string): EntityId;
399399
declare function generateId(): EntityId;
400400
declare function createError(code: string, message: string, context: ArcaneError["context"]): ArcaneError;

0 commit comments

Comments
 (0)