@visulima/package 5.0.0-alpha.4 → 5.0.0-alpha.6

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,38 @@
1
+ ## @visulima/package [5.0.0-alpha.6](https://github.com/visulima/visulima/compare/@visulima/package@5.0.0-alpha.5...@visulima/package@5.0.0-alpha.6) (2026-03-26)
2
+
3
+ ### Features
4
+
5
+ * **web:** auto-generate packages page from workspace metadata ([623e520](https://github.com/visulima/visulima/commit/623e5207693a7fe720f5f2f179593a3654c880e3))
6
+
7
+ ### Miscellaneous Chores
8
+
9
+ * update homepage URLs to visulima.com/packages/ format ([be42968](https://github.com/visulima/visulima/commit/be42968129df85fb074224435e33135ff44cab91))
10
+
11
+
12
+ ### Dependencies
13
+
14
+ * **@visulima/fs:** upgraded to 5.0.0-alpha.6
15
+ * **@visulima/path:** upgraded to 3.0.0-alpha.7
16
+
17
+ ## @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)
18
+
19
+ ### Bug Fixes
20
+
21
+ * **package:** use workspace:* for internal [@visulima](https://github.com/visulima) deps ([e409128](https://github.com/visulima/visulima/commit/e409128c02a6d801dd385ae845c1ab28ca5c09da))
22
+ * **web:** improve build setup with incremental stats caching and prod install ([fe33e75](https://github.com/visulima/visulima/commit/fe33e75827586779b4b3a0c6d57b39f889ee6207))
23
+
24
+ ### Miscellaneous Chores
25
+
26
+ * **package:** migrate deps to pnpm catalogs ([301fac4](https://github.com/visulima/visulima/commit/301fac41be88df7469155649467921a72ca740a6))
27
+ * **package:** update dependencies ([fb1a43d](https://github.com/visulima/visulima/commit/fb1a43de0fd345806d76aec660d48c627d576083))
28
+ * visulima website ([#591](https://github.com/visulima/visulima/issues/591)) ([59ab2e2](https://github.com/visulima/visulima/commit/59ab2e2befb03e51cd2088956f83d9b87de6d033))
29
+
30
+
31
+ ### Dependencies
32
+
33
+ * **@visulima/fs:** upgraded to 5.0.0-alpha.5
34
+ * **@visulima/path:** upgraded to 3.0.0-alpha.6
35
+
1
36
  ## @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)
2
37
 
3
38
  ### Bug Fixes
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 };