@gjermundgaraba/upup 0.5.3 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/main.mjs +24 -18
- package/native/dist/upup-sparkle.json +1 -1
- package/native/dist/upup-sparkle.zip +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,6 +22,8 @@ upup project [dir] # dependencies of the project containing dir
|
|
|
22
22
|
|
|
23
23
|
Vite+ environment rows show configured global defaults for Node.js, npm, pnpm, Yarn and Bun. Exact Node.js defaults update within their current major. Yarn Classic stays on Yarn 1, since modern Yarn is a different published package; migrating to it is left to you. Other package managers update to their latest stable release. Floating defaults such as `latest` and `lts` show their configured selector and stay under Vite+’s automatic version selection. Updating installs the selected version and changes that tool’s default, preserving project pins and cached versions. Each default is checked immediately before updating, checked again after downloading and before switching, and verified afterward.
|
|
24
24
|
|
|
25
|
+
A default only applies where no folder pins a version, so the system list also shows a Node.js version pinned exactly in your home folder's `.node-version` or `.nvmrc`, which Vite+ and other version managers use everywhere under it that has no closer pin. Its update moves to the newest release on the same major line from nodejs.org, as a project's pin does.
|
|
26
|
+
|
|
25
27
|
**Project** lists the registry dependencies declared across the workspace that contains the directory: Go modules, Cargo workspaces, and npm or pnpm projects including pnpm catalogs, among them a catalog entry only an override uses when it names an exact version. A Cargo dependency is listed whatever features turn it on. Path, Git and workspace references are not listed, nor is one module of a `go.work` that another requires, or a module its `replace` covers. Yarn and Bun projects are reported as unsupported.
|
|
26
28
|
|
|
27
29
|
In a git repository it also lists every project below the directory that a `package.json`, `go.mod` or `Cargo.toml` git tracks or doesn't ignore belongs to, each once, its provider named with where it is (`npm clients/voice`). A `package.json` with a lockfile beside it is a project of its own, and so is a Go module its `go.work` doesn't use. Folders under `node_modules`, subtrees vendored in with `git subtree`, and Go modules in the folders the go command skips (`testdata`, and those starting with `_` or `.`) are left out. Node projects below the directory that have no lockfile yet, or use Yarn or Bun, are named together in one notice; a workspace names the folders in it that its lockfile doesn't list. A Cargo workspace with no `Cargo.lock` yet is named in a notice too. A Go workspace whose member module paths cannot be read is reported as unavailable; unrelated projects remain listed. upup runs cargo with `RUSTUP_AUTO_INSTALL=0`, so rustup doesn't install the toolchain a Cargo workspace pins (releases of rustup too old to know the setting still do); a missing one fails with rustup's message.
|
|
@@ -32,7 +34,7 @@ It also lists the Node.js versions pinned exactly, once per version however many
|
|
|
32
34
|
|
|
33
35
|
The package manager a Node project declares, in `packageManager` (`pnpm@12.5.1`) or `devEngines.packageManager`, is listed too, each field as a row of its own, and moves like a dependency. Its current version is the one pnpm locked, or else the declared one; a range with no locked version isn't listed. Corepack's sha512 hash moves with the version, worked out from the registry's integrity for the release; a pin with another kind of hash is listed without an offer. Neither field can be removed from upup.
|
|
34
36
|
|
|
35
|
-
Current versions come from the package manager or lockfile. An offered update is the newest stable release; in a Node project, no newer than the one the registry tags `latest` and older than the project's minimum release age. When the registry can't be reached, the project's dependencies are listed without offers and one notice says why. Updating a declared range keeps its style (`^1.2.0` becomes `^1.4.0`), and the lockfile is reconciled and checked afterwards. Removing a project dependency edits the manifest and reconciles the same way.
|
|
37
|
+
Current versions come from the package manager or lockfile. An offered update is the newest stable release; in a Node project, no newer than the one the registry tags `latest` and older than the project's minimum release age. When the registry can't be reached, the project's dependencies are listed without offers and one notice says why. Updating a declared range keeps its style (`^1.2.0` becomes `^1.4.0`), and the lockfile is reconciled and checked afterwards. Removing a project dependency edits the manifest and reconciles the same way. A file upup edits through a symlink, as in a dotfiles repository, is changed where the link points, so the link stays.
|
|
36
38
|
|
|
37
39
|
## OS updates
|
|
38
40
|
|
package/dist/main.mjs
CHANGED
|
@@ -41,7 +41,7 @@ import * as ActionMcp from "@gjermundgaraba/effect-actions/ActionMcp";
|
|
|
41
41
|
import * as Action from "@gjermundgaraba/effect-actions/Action";
|
|
42
42
|
import { setup, types } from "xstate/fsm";
|
|
43
43
|
// package.json
|
|
44
|
-
var version$1 = "0.5.
|
|
44
|
+
var version$1 = "0.5.4";
|
|
45
45
|
// src/ai/Setup.ts
|
|
46
46
|
const Thinking = Schema.Literals([
|
|
47
47
|
"off",
|
|
@@ -7410,8 +7410,9 @@ const layer$5 = (cacheDir) => Layer.effect(Audits, Effect.gen(function* () {
|
|
|
7410
7410
|
const readText = Effect.fn("readText")(function* (file) {
|
|
7411
7411
|
return yield* (yield* FileSystem.FileSystem).readFileString(file).pipe(Effect.mapError(fileFailed("read", file)));
|
|
7412
7412
|
});
|
|
7413
|
-
const replaceText = Effect.fn("replaceText")(function* (
|
|
7413
|
+
const replaceText = Effect.fn("replaceText")(function* (given, text) {
|
|
7414
7414
|
const fs = yield* FileSystem.FileSystem;
|
|
7415
|
+
const file = yield* fs.realPath(given).pipe(Effect.mapError(fileFailed("resolve", given)));
|
|
7415
7416
|
const { mode } = yield* fs.stat(file).pipe(Effect.mapError(fileFailed("stat", file)));
|
|
7416
7417
|
const temporary = path.join(path.dirname(file), `.${path.basename(file)}.upup`);
|
|
7417
7418
|
yield* fs.writeFileString(temporary, text, { mode }).pipe(Effect.mapError(fileFailed("write", temporary)));
|
|
@@ -10755,8 +10756,9 @@ const filePin = (file, text) => {
|
|
|
10755
10756
|
};
|
|
10756
10757
|
const Releases = Schema.Array(Schema.Struct({ version: Schema.String }));
|
|
10757
10758
|
const releasesUrl = "https://nodejs.org/dist/index.json";
|
|
10758
|
-
const toPackage = (pins) => {
|
|
10759
|
+
const toPackage = (mode, root, pins) => {
|
|
10759
10760
|
const [first] = pins;
|
|
10761
|
+
const shown = (file) => mode === "system" ? path.join(root, file) : file;
|
|
10760
10762
|
return {
|
|
10761
10763
|
provider: providerName,
|
|
10762
10764
|
id: anchor(first),
|
|
@@ -10765,10 +10767,11 @@ const toPackage = (pins) => {
|
|
|
10765
10767
|
artifact: "node",
|
|
10766
10768
|
current: first.version,
|
|
10767
10769
|
declaration: {
|
|
10768
|
-
manifest: [...new Set(pins.map((pin) => pin.file))].join(", "),
|
|
10770
|
+
manifest: [...new Set(pins.map((pin) => shown(pin.file)))].join(", "),
|
|
10769
10771
|
section: first.path === void 0 ? path.basename(first.file) : "setup-node node-version",
|
|
10770
10772
|
selector: `${first.prefix}${first.version}`
|
|
10771
10773
|
},
|
|
10774
|
+
...mode === "system" ? { description: "Overrides global defaults under your home folder" } : {},
|
|
10772
10775
|
unremovable
|
|
10773
10776
|
};
|
|
10774
10777
|
};
|
|
@@ -10802,21 +10805,20 @@ const versionFilesOf = Effect.fn("NodePins.versionFilesOf")(function* (root, dir
|
|
|
10802
10805
|
cwd: root
|
|
10803
10806
|
}).pipe(Effect.orElseSucceed(() => ""))).split("\0").filter((file) => file !== "");
|
|
10804
10807
|
});
|
|
10805
|
-
const
|
|
10808
|
+
const filePins = Effect.fn("NodePins.filePins")(function* (root, names) {
|
|
10806
10809
|
const fs = yield* FileSystem.FileSystem;
|
|
10807
|
-
const
|
|
10808
|
-
|
|
10809
|
-
|
|
10810
|
-
|
|
10811
|
-
const
|
|
10812
|
-
|
|
10813
|
-
|
|
10814
|
-
|
|
10815
|
-
const make$6 = (root, dir = root, nested = []) => Effect.gen(function* () {
|
|
10810
|
+
const present = yield* Effect.filter(names, (file) => fs.exists(path.join(root, file)).pipe(Effect.mapError(fileFailed("stat", path.join(root, file)))), { concurrency: "unbounded" });
|
|
10811
|
+
return (yield* Effect.forEach(present.toSorted(), (file) => Effect.map(readText(path.join(root, file)), (text) => filePin(file, text)), { concurrency: "unbounded" })).flat();
|
|
10812
|
+
});
|
|
10813
|
+
const scan = Effect.fn("NodePins.scan")(function* (root, dir, nested) {
|
|
10814
|
+
const [workflows, files] = yield* Effect.all([workflowFiles(root), Effect.flatMap(versionFilesOf(root, dir, nested), (names) => filePins(root, names))], { concurrency: "unbounded" });
|
|
10815
|
+
return [...workflows.flatMap(({ file, text }) => stepPins(file, text) ?? []), ...files];
|
|
10816
|
+
});
|
|
10817
|
+
const provider = (mode, root, pinsIn) => Effect.gen(function* () {
|
|
10816
10818
|
const fs = yield* FileSystem.FileSystem;
|
|
10817
10819
|
const client = yield* HttpClient.HttpClient;
|
|
10818
10820
|
const context = yield* Effect.context();
|
|
10819
|
-
const scanned =
|
|
10821
|
+
const scanned = pinsIn(root).pipe(Effect.provideContext(context));
|
|
10820
10822
|
const list = Effect.gen(function* () {
|
|
10821
10823
|
const pins = yield* scanned;
|
|
10822
10824
|
const notices = [];
|
|
@@ -10826,7 +10828,7 @@ const make$6 = (root, dir = root, nested = []) => Effect.gen(function* () {
|
|
|
10826
10828
|
};
|
|
10827
10829
|
const releases = yield* getJson(client, releasesUrl, Releases).pipe(Effect.result);
|
|
10828
10830
|
const packages = grouped(pins).map((group) => {
|
|
10829
|
-
const pkg = toPackage(group);
|
|
10831
|
+
const pkg = toPackage(mode, root, group);
|
|
10830
10832
|
if (Result.isFailure(releases)) return pkg;
|
|
10831
10833
|
const line = semver.major(pkg.current);
|
|
10832
10834
|
const target = newestOffer(pkg.current, releases.success.flatMap(({ version }) => {
|
|
@@ -10845,7 +10847,7 @@ const make$6 = (root, dir = root, nested = []) => Effect.gen(function* () {
|
|
|
10845
10847
|
const observe = Effect.fn("NodePins.observe")(function* (pkg) {
|
|
10846
10848
|
const group = yield* find(pkg);
|
|
10847
10849
|
return Option.map(Option.fromUndefinedOr(group), (pins) => ({
|
|
10848
|
-
...toPackage(pins),
|
|
10850
|
+
...toPackage(mode, root, pins),
|
|
10849
10851
|
id: pkg.id
|
|
10850
10852
|
}));
|
|
10851
10853
|
});
|
|
@@ -10867,12 +10869,15 @@ const make$6 = (root, dir = root, nested = []) => Effect.gen(function* () {
|
|
|
10867
10869
|
});
|
|
10868
10870
|
return {
|
|
10869
10871
|
name: providerName,
|
|
10870
|
-
mode
|
|
10872
|
+
mode,
|
|
10871
10873
|
list,
|
|
10872
10874
|
observe,
|
|
10873
10875
|
update
|
|
10874
10876
|
};
|
|
10875
10877
|
});
|
|
10878
|
+
const make$6 = (root, dir = root, nested = []) => provider("project", root, (at) => scan(at, dir, nested));
|
|
10879
|
+
const makeHome = (home) => provider("system", home, (at) => filePins(at, versionFiles));
|
|
10880
|
+
const homePins = Effect.suspend(() => makeHome(homedir()));
|
|
10876
10881
|
const discover$1 = Effect.fn("NodePins.discover")(function* (dir, nested = []) {
|
|
10877
10882
|
const repository = yield* findUp(dir, ".git");
|
|
10878
10883
|
if (Option.isNone(repository)) return [];
|
|
@@ -11885,6 +11890,7 @@ const system$1 = [
|
|
|
11885
11890
|
["vp", makeVp],
|
|
11886
11891
|
["vp", make$3],
|
|
11887
11892
|
["vp", make$4],
|
|
11893
|
+
["node", homePins],
|
|
11888
11894
|
["cargo", make$10],
|
|
11889
11895
|
["go", make$8],
|
|
11890
11896
|
["uv", make]
|
|
Binary file
|
package/package.json
CHANGED