@visulima/package 5.0.0-alpha.3 → 5.0.0-alpha.5

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/CHANGELOG.md CHANGED
@@ -1,3 +1,51 @@
1
+ ## @visulima/package [5.0.0-alpha.5](https://github.com/visulima/visulima/compare/@visulima/package@5.0.0-alpha.4...@visulima/package@5.0.0-alpha.5) (2026-03-26)
2
+
3
+ ### Bug Fixes
4
+
5
+ * **package:** use workspace:* for internal [@visulima](https://github.com/visulima) deps ([e409128](https://github.com/visulima/visulima/commit/e409128c02a6d801dd385ae845c1ab28ca5c09da))
6
+ * **web:** improve build setup with incremental stats caching and prod install ([fe33e75](https://github.com/visulima/visulima/commit/fe33e75827586779b4b3a0c6d57b39f889ee6207))
7
+
8
+ ### Miscellaneous Chores
9
+
10
+ * **package:** migrate deps to pnpm catalogs ([301fac4](https://github.com/visulima/visulima/commit/301fac41be88df7469155649467921a72ca740a6))
11
+ * **package:** update dependencies ([fb1a43d](https://github.com/visulima/visulima/commit/fb1a43de0fd345806d76aec660d48c627d576083))
12
+ * visulima website ([#591](https://github.com/visulima/visulima/issues/591)) ([59ab2e2](https://github.com/visulima/visulima/commit/59ab2e2befb03e51cd2088956f83d9b87de6d033))
13
+
14
+
15
+ ### Dependencies
16
+
17
+ * **@visulima/fs:** upgraded to 5.0.0-alpha.5
18
+ * **@visulima/path:** upgraded to 3.0.0-alpha.6
19
+
20
+ ## @visulima/package [5.0.0-alpha.4](https://github.com/visulima/visulima/compare/@visulima/package@5.0.0-alpha.3...@visulima/package@5.0.0-alpha.4) (2026-03-06)
21
+
22
+ ### Bug Fixes
23
+
24
+ * **package:** update packem to 2.0.0-alpha.54 ([e5b3249](https://github.com/visulima/visulima/commit/e5b3249026a425b7a42443f66a08f8f68c3d62e4))
25
+ * **package:** use intentionally malformed JSON in bad workspace fixture ([a6680e7](https://github.com/visulima/visulima/commit/a6680e7a97aeae643c26b69bc5eb6c64c28de278))
26
+
27
+ ### Documentation
28
+
29
+ * **humanizer,html,iso-locale,package,tsconfig:** add comprehensive Fumadocs documentation ([19781ce](https://github.com/visulima/visulima/commit/19781ce5d27605971a9f2fdf0a99863effd98091))
30
+
31
+ ### Miscellaneous Chores
32
+
33
+ * **package:** update dependencies ([d89cde6](https://github.com/visulima/visulima/commit/d89cde6792e9036d0690cfaf9b771e26b24faac8))
34
+ * **package:** update dependencies ([4b62cf8](https://github.com/visulima/visulima/commit/4b62cf85e6ef4deac4ef01c8a7e15bcf49ecbe80))
35
+ * **tooling:** update dependencies ([7f6f9d3](https://github.com/visulima/visulima/commit/7f6f9d3c41b170c53659ab34b79ceb23e4e9660a))
36
+ * update lock file maintenance ([d83e716](https://github.com/visulima/visulima/commit/d83e71697b75d24704185b66bb521a934d2db02d))
37
+ * year update ([47f4105](https://github.com/visulima/visulima/commit/47f410596ce7190cfea36a073db32e0cec50bbcd))
38
+
39
+ ### Tests
40
+
41
+ * **package:** fix broken JSON test fixture ([46141d6](https://github.com/visulima/visulima/commit/46141d6472d8de20512109200a12e79c48ddc33c))
42
+
43
+
44
+ ### Dependencies
45
+
46
+ * **@visulima/fs:** upgraded to 5.0.0-alpha.4
47
+ * **@visulima/path:** upgraded to 3.0.0-alpha.5
48
+
1
49
  ## @visulima/package [5.0.0-alpha.3](https://github.com/visulima/visulima/compare/@visulima/package@5.0.0-alpha.2...@visulima/package@5.0.0-alpha.3) (2025-12-27)
2
50
 
3
51
  ### Bug Fixes
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 visulima
3
+ Copyright (c) 2026 visulima
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/dist/error.js CHANGED
@@ -1 +1 @@
1
- import{default as a}from"./packem_shared/PackageNotFoundError-BictYTIA.js";export{a as PackageNotFoundError};
1
+ export { default as PackageNotFoundError } from './packem_shared/PackageNotFoundError-CJmAqa_k.js';
package/dist/index.js CHANGED
@@ -1 +1,6 @@
1
- import{default as n}from"./packem_shared/PackageNotFoundError-BictYTIA.js";import{findMonorepoRoot as r,findMonorepoRootSync as c}from"./monorepo.js";import{findPackageRoot as s,findPackageRootSync as t}from"./package.js";import{ensurePackages as P,findPackageJson as k,findPackageJsonSync as f,getPackageJsonProperty as d,hasPackageJsonAnyDependency as p,hasPackageJsonProperty as l,parsePackageJson as y,parsePackageJsonSync as J,writePackageJson as m,writePackageJsonSync as M}from"./package-json.js";import{findLockFile as R,findLockFileSync as x,findPackageManager as C,findPackageManagerSync as u,generateMissingPackagesInstallMessage as v,getPackageManagerVersion as F,identifyInitiatingPackageManager as I}from"./package-manager.js";import{isPackageInWorkspace as w,readPnpmCatalogs as D,readPnpmCatalogsSync as L,resolveCatalogReference as A,resolveCatalogReferences as E,resolveDependenciesCatalogReferences as N}from"./pnpm.js";export{n as PackageNotFoundError,P as ensurePackages,R as findLockFile,x as findLockFileSync,r as findMonorepoRoot,c as findMonorepoRootSync,k as findPackageJson,f as findPackageJsonSync,C as findPackageManager,u as findPackageManagerSync,s as findPackageRoot,t as findPackageRootSync,v as generateMissingPackagesInstallMessage,d as getPackageJsonProperty,F as getPackageManagerVersion,p as hasPackageJsonAnyDependency,l as hasPackageJsonProperty,I as identifyInitiatingPackageManager,w as isPackageInWorkspace,y as parsePackageJson,J as parsePackageJsonSync,D as readPnpmCatalogs,L as readPnpmCatalogsSync,A as resolveCatalogReference,E as resolveCatalogReferences,N as resolveDependenciesCatalogReferences,m as writePackageJson,M as writePackageJsonSync};
1
+ export { default as PackageNotFoundError } from './packem_shared/PackageNotFoundError-CJmAqa_k.js';
2
+ export { findMonorepoRoot, findMonorepoRootSync } from './monorepo.js';
3
+ export { findPackageRoot, findPackageRootSync } from './package.js';
4
+ export { ensurePackages, findPackageJson, findPackageJsonSync, getPackageJsonProperty, hasPackageJsonAnyDependency, hasPackageJsonProperty, parsePackageJson, parsePackageJsonSync, writePackageJson, writePackageJsonSync } from './package-json.js';
5
+ export { findLockFile, findLockFileSync, findPackageManager, findPackageManagerSync, generateMissingPackagesInstallMessage, getPackageManagerVersion, identifyInitiatingPackageManager } from './package-manager.js';
6
+ export { isPackageInWorkspace, readPnpmCatalogs, readPnpmCatalogsSync, resolveCatalogReference, resolveCatalogReferences, resolveDependenciesCatalogReferences } from './pnpm.js';
package/dist/monorepo.js CHANGED
@@ -1 +1,118 @@
1
- var l=Object.defineProperty;var p=(r,e)=>l(r,"name",{value:e,configurable:!0});import{createRequire as y}from"node:module";import{findUp as j,readJson as w,findUpSync as b,readJsonSync as k}from"@visulima/fs";import{NotFoundError as u}from"@visulima/fs/error";import{dirname as d,join as a}from"@visulima/path";import{findPackageManager as _,findPackageManagerSync as M}from"./package-manager.js";const g=y(import.meta.url),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,h=p(r=>{if(typeof i<"u"&&i.versions&&i.versions.node){const[e,t]=i.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return i.getBuiltinModule(r)}return g(r)},"__cjs_getBuiltinModule"),{existsSync:c,readFileSync:f}=h("node:fs");var S=Object.defineProperty,m=p((r,e)=>S(r,"name",{value:e,configurable:!0}),"i");const E=m(async r=>{const e=await j(["lerna.json","turbo.json"],{type:"file",...r&&{cwd:r}});if(e?.endsWith("lerna.json")){const o=await w(e);if(o.useWorkspaces||o.packages)return{path:d(e),strategy:"lerna"}}const t=e?.endsWith("turbo.json");try{const{packageManager:o,path:n}=await _(r);if(["npm","yarn"].includes(o)){const s=a(n,"package.json");if(c(s)&&f(a(n,"package.json"),"utf8").includes("workspaces"))return{path:n,strategy:t?"turbo":o}}else if(o==="pnpm"){const s=a(n,"pnpm-workspace.yaml");if(c(s))return{path:n,strategy:t?"turbo":"pnpm"}}}catch(o){if(!(o instanceof u))throw o}throw new Error(`No monorepo root could be found upwards from the directory ${r} using lerna, yarn, pnpm, or npm as indicators.`)},"findMonorepoRoot"),T=m(r=>{const e=b(["lerna.json","turbo.json"],{type:"file",...r&&{cwd:r}});if(e?.endsWith("lerna.json")){const o=k(e);if(o.useWorkspaces||o.packages)return{path:d(e),strategy:"lerna"}}const t=e?.endsWith("turbo.json");try{const{packageManager:o,path:n}=M(r);if(["npm","yarn"].includes(o)){const s=a(n,"package.json");if(c(s)&&f(a(n,"package.json"),"utf8").includes("workspaces"))return{path:n,strategy:t?"turbo":o}}else if(o==="pnpm"){const s=a(n,"pnpm-workspace.yaml");if(c(s))return{path:n,strategy:t?"turbo":"pnpm"}}}catch(o){if(!(o instanceof u))throw o}throw new Error(`No monorepo root could be found upwards from the directory ${r} using lerna, yarn, pnpm, or npm as indicators.`)},"findMonorepoRootSync");export{E as findMonorepoRoot,T as findMonorepoRootSync};
1
+ import { createRequire as __cjs_createRequire } from "node:module";
2
+
3
+ const __cjs_require = __cjs_createRequire(import.meta.url);
4
+
5
+ const __cjs_getProcess = typeof globalThis !== "undefined" && typeof globalThis.process !== "undefined" ? globalThis.process : process;
6
+
7
+ const __cjs_getBuiltinModule = (module) => {
8
+ // Check if we're in Node.js and version supports getBuiltinModule
9
+ if (typeof __cjs_getProcess !== "undefined" && __cjs_getProcess.versions && __cjs_getProcess.versions.node) {
10
+ const [major, minor] = __cjs_getProcess.versions.node.split(".").map(Number);
11
+ // Node.js 20.16.0+ and 22.3.0+
12
+ if (major > 22 || (major === 22 && minor >= 3) || (major === 20 && minor >= 16)) {
13
+ return __cjs_getProcess.getBuiltinModule(module);
14
+ }
15
+ }
16
+ // Fallback to createRequire
17
+ return __cjs_require(module);
18
+ };
19
+
20
+ const {
21
+ existsSync,
22
+ readFileSync
23
+ } = __cjs_getBuiltinModule("node:fs");
24
+ import { findUp, readJson, findUpSync, readJsonSync } from '@visulima/fs';
25
+ import { NotFoundError } from '@visulima/fs/error';
26
+ import { dirname, join } from '@visulima/path';
27
+ import { findPackageManager, findPackageManagerSync } from './package-manager.js';
28
+
29
+ const findMonorepoRoot = async (cwd) => {
30
+ const workspaceFilePath = await findUp(["lerna.json", "turbo.json"], {
31
+ type: "file",
32
+ ...cwd && { cwd }
33
+ });
34
+ if (workspaceFilePath?.endsWith("lerna.json")) {
35
+ const lerna = await readJson(workspaceFilePath);
36
+ if (lerna.useWorkspaces || lerna.packages) {
37
+ return {
38
+ path: dirname(workspaceFilePath),
39
+ strategy: "lerna"
40
+ };
41
+ }
42
+ }
43
+ const isTurbo = workspaceFilePath?.endsWith("turbo.json");
44
+ try {
45
+ const { packageManager, path } = await findPackageManager(cwd);
46
+ if (["npm", "yarn"].includes(packageManager)) {
47
+ const packageJsonFilePath = join(path, "package.json");
48
+ if (existsSync(packageJsonFilePath)) {
49
+ const packageJson = readFileSync(join(path, "package.json"), "utf8");
50
+ if (packageJson.includes("workspaces")) {
51
+ return {
52
+ path,
53
+ strategy: isTurbo ? "turbo" : packageManager
54
+ };
55
+ }
56
+ }
57
+ } else if (packageManager === "pnpm") {
58
+ const pnpmWorkspacesFilePath = join(path, "pnpm-workspace.yaml");
59
+ if (existsSync(pnpmWorkspacesFilePath)) {
60
+ return {
61
+ path,
62
+ strategy: isTurbo ? "turbo" : "pnpm"
63
+ };
64
+ }
65
+ }
66
+ } catch (error) {
67
+ if (!(error instanceof NotFoundError)) {
68
+ throw error;
69
+ }
70
+ }
71
+ throw new Error(`No monorepo root could be found upwards from the directory ${cwd} using lerna, yarn, pnpm, or npm as indicators.`);
72
+ };
73
+ const findMonorepoRootSync = (cwd) => {
74
+ const workspaceFilePath = findUpSync(["lerna.json", "turbo.json"], {
75
+ type: "file",
76
+ ...cwd && { cwd }
77
+ });
78
+ if (workspaceFilePath?.endsWith("lerna.json")) {
79
+ const lerna = readJsonSync(workspaceFilePath);
80
+ if (lerna.useWorkspaces || lerna.packages) {
81
+ return {
82
+ path: dirname(workspaceFilePath),
83
+ strategy: "lerna"
84
+ };
85
+ }
86
+ }
87
+ const isTurbo = workspaceFilePath?.endsWith("turbo.json");
88
+ try {
89
+ const { packageManager, path } = findPackageManagerSync(cwd);
90
+ if (["npm", "yarn"].includes(packageManager)) {
91
+ const packageJsonFilePath = join(path, "package.json");
92
+ if (existsSync(packageJsonFilePath)) {
93
+ const packageJson = readFileSync(join(path, "package.json"), "utf8");
94
+ if (packageJson.includes("workspaces")) {
95
+ return {
96
+ path,
97
+ strategy: isTurbo ? "turbo" : packageManager
98
+ };
99
+ }
100
+ }
101
+ } else if (packageManager === "pnpm") {
102
+ const pnpmWorkspacesFilePath = join(path, "pnpm-workspace.yaml");
103
+ if (existsSync(pnpmWorkspacesFilePath)) {
104
+ return {
105
+ path,
106
+ strategy: isTurbo ? "turbo" : "pnpm"
107
+ };
108
+ }
109
+ }
110
+ } catch (error) {
111
+ if (!(error instanceof NotFoundError)) {
112
+ throw error;
113
+ }
114
+ }
115
+ throw new Error(`No monorepo root could be found upwards from the directory ${cwd} using lerna, yarn, pnpm, or npm as indicators.`);
116
+ };
117
+
118
+ export { findMonorepoRoot, findMonorepoRootSync };