/**
 * @license Copyright (c) 2017-2025, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */

'use strict';

const splitLongname = require( './split-longname' );

module.exports = longname => {
	if ( !longname ) {
		return '';
	}

	const parts = splitLongname( longname );

	return [ parts.packageName, ...parts.directoryNames, parts.moduleName ].join( '/' );
};
