mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-10-01 20:33:50 +00:00
Ship OpenFleet contracts and the OpenWall draft proposal (#177)
* feat: add OpenFleet membership and CoinPay rental contracts * Propose OpenWall broadcasts and direct messaging contracts * release: prepare OpenFleet and OpenWall public contracts * fix: use tested npm for compatible CLI installs
This commit is contained in:
parent
a333726a1e
commit
45c7629953
35 changed files with 2021 additions and 12 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@logicsrc/cli",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.1",
|
||||
"description": "LogicSRC CLI: every LogicSRC standard and tool as one command.",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
|
|
|
|||
25
packages/cli/src/install-npm.test.ts
Normal file
25
packages/cli/src/install-npm.test.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import { createRequire } from "node:module";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
const require = createRequire(import.meta.url);
|
||||
const { selectNpm } = require("../../../scripts/install-npm.cjs") as {
|
||||
selectNpm: (nodeVersion: string, packageManager: string) => string | null;
|
||||
};
|
||||
|
||||
describe("installer npm compatibility", () => {
|
||||
it.each(["18.20.8", "20.16.0", "21.7.3", "22.8.0"])("preserves the host npm on Node %s", (version) => {
|
||||
expect(selectNpm(version, "npm@11.11.0")).toBeNull();
|
||||
});
|
||||
|
||||
it.each(["20.17.0", "20.19.0", "22.9.0", "23.0.0", "24.18.1", "25.0.0"])(
|
||||
"selects the tested npm on Node %s", (version) => {
|
||||
expect(selectNpm(version, "npm@11.11.0")).toBe("npm@11.11.0");
|
||||
}
|
||||
);
|
||||
|
||||
it("does not assume compatibility for a different package manager or npm major", () => {
|
||||
expect(selectNpm("24.18.1", "pnpm@11.11.0")).toBeNull();
|
||||
expect(selectNpm("24.18.1", "npm@12.0.0")).toBeNull();
|
||||
expect(selectNpm("unknown", "npm@11.11.0")).toBeNull();
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue