mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-28 03:51:40 -04:00
* refactor: store link values before converting to references * fix: use .sort() without localeCompare https://github.com/pnpm/pnpm/pull/8128#discussion_r1614031566 > Nit, but you probably just want to call sort without a comparison > function; these are already strings and locale compare is not a good > comparison for anything but human readable strings since it will > differ on different people's machines based on their language setting. > I've hit this too many times before for code gen. * feat: configure meta-updater to write test/tsconfig.json files * fix: relative imports for __typings__ * chore: `pnpm run meta-updater` * fix: explicitly use test/tsconfig.json for ts-jest
@pnpm/deps.graph-sequencer
Sort items in a graph using a topological sort
Install
pnpm add @pnpm/deps.graph-sequencer
Usage
expect(graphSequencer(new Map([
[0, [1]],
[1, [2]],
[2, [3]],
[3, [0]],
]), [0, 1, 2, 3])).toStrictEqual(
{
safe: false,
chunks: [[0, 1, 2, 3]],
cycles: [[0, 1, 2, 3]],
}
)