Using Monroe's catalog as a reference, the front shocks for the YJ are 3" longer than the XJ when compressed, and 4" longer when extended. The YJ shocks use an eye and a bushing on the bottom instead of a cross-pin.
In the rear, the YJ shocks are half an inch shorter than the XJ when compressed, and 2+" shorter extended. The YJ shock uses an eye at the top rather than a cross-pin, and a bushing with a steel sleeve at the bottom rather than just a rubber bushing.