IF Commons GitHub

link

The links of the libraries (commons 0001-libraries FR-011): every package of commons linked under commons/node_modules/@intellectual-frontiers, so that a library imports another by its package name and reads the checkout's source. It is the first command of every script that imports a library of commons (dev:check, release, the plan of CI), and it imports none: a fresh checkout has no link yet, and the command that makes them cannot itself need one.

bun commons/libraries/src/link.ts link what is not linked, from the repository above this folder (or --repo DIR)

A folder of commons/ whose package.json is named @intellectual-frontiers/<name> is linked as that name (the metapackage commons/commons bears @intellectual-frontiers/commons). A link that is there is left as it is. Only the built-ins of Node are used, so it runs on Bun and on Node 26 before anything is installed.

import { linksOf } from "./link.ts";
linksOf(".").get("@intellectual-frontiers/commons"); // the path of commons/commons

Spec: 0001-libraries FR-011

Source: commons/libraries/src/link.ts

1 of 3 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

linksOffunction
function linksOf(repo: string): ReadonlyMap<string, string>

The packages of commons by name and the folder of each.

Imported by 7 tests of the run (7 passed, 0 failed): the library's results

linkAllfunctionno test imports it
function linkAll(repo: string): { readonly made: number; } | { readonly problem: string; }

Links each package that is not linked yet, and gives how many it linked, or why it could not.

rootAbovefunctionno test imports it
function rootAbove(from: string): string | undefined

The repository above a folder: the nearest one that has commons/libraries/library.ts.

Titles, headings, exports, tables, columns and requirements. Esc closes.