@visulima/package 2.0.0 → 3.0.0
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 +26 -0
- package/README.md +0 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +0 -1199
- package/dist/index.d.mts +0 -1199
- package/dist/index.d.ts +0 -1199
- package/dist/index.mjs +1 -1
- package/package.json +2 -15
- package/dist/find-cache-dir.cjs +0 -1
- package/dist/find-cache-dir.d.cts +0 -9
- package/dist/find-cache-dir.d.mts +0 -9
- package/dist/find-cache-dir.d.ts +0 -9
- package/dist/find-cache-dir.mjs +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as
|
|
1
|
+
import{u as n}from"./shared/package.DvbNGF15.mjs";import{findMonorepoRoot as r,findMonorepoRootSync as c}from"./monorepo.mjs";import{findPackageRoot as g,findPackageRootSync as f}from"./package.mjs";import{findPackageJson as k,findPackageJsonSync as d,parsePackageJson as P,writePackageJson as p,writePackageJsonSync as s}from"./package-json.mjs";import{findLockFile as M,findLockFileSync as S,findPackageManager as m,findPackageManagerSync as x,getPackageManagerVersion as J,identifyInitiatingPackageManager as R}from"./package-manager.mjs";export{n as PackageNotFoundError,M as findLockFile,S as findLockFileSync,r as findMonorepoRoot,c as findMonorepoRootSync,k as findPackageJson,d as findPackageJsonSync,m as findPackageManager,x as findPackageManagerSync,g as findPackageRoot,f as findPackageRootSync,J as getPackageManagerVersion,R as identifyInitiatingPackageManager,P as parsePackageJson,p as writePackageJson,s as writePackageJsonSync};
|
package/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/package",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "One Package to rule them all, finds your root-dir, monorepo, or package manager.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
7
7
|
"find",
|
|
8
|
-
"find-cache",
|
|
9
|
-
"find-cache-dir",
|
|
10
|
-
"find-cache-directory",
|
|
11
8
|
"find-monorepo-root",
|
|
12
9
|
"find-up-pkg",
|
|
13
10
|
"find-package-manager",
|
|
@@ -81,16 +78,6 @@
|
|
|
81
78
|
"default": "./dist/package.mjs"
|
|
82
79
|
}
|
|
83
80
|
},
|
|
84
|
-
"./cache": {
|
|
85
|
-
"require": {
|
|
86
|
-
"types": "./dist/find-cache-dir.d.cts",
|
|
87
|
-
"default": "./dist/find-cache-dir.cjs"
|
|
88
|
-
},
|
|
89
|
-
"import": {
|
|
90
|
-
"types": "./dist/find-cache-dir.d.mts",
|
|
91
|
-
"default": "./dist/find-cache-dir.mjs"
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
81
|
"./package-json": {
|
|
95
82
|
"require": {
|
|
96
83
|
"types": "./dist/package-json.d.cts",
|
|
@@ -143,7 +130,7 @@
|
|
|
143
130
|
"@anolilab/semantic-release-pnpm": "^1.1.3",
|
|
144
131
|
"@anolilab/semantic-release-preset": "^9.0.0",
|
|
145
132
|
"@babel/core": "^7.24.7",
|
|
146
|
-
"@pnpm/exe": "^9.
|
|
133
|
+
"@pnpm/exe": "^9.4.0",
|
|
147
134
|
"@rushstack/eslint-plugin-security": "^0.8.1",
|
|
148
135
|
"@total-typescript/ts-reset": "^0.5.1",
|
|
149
136
|
"@types/node": "18.19.15",
|
package/dist/find-cache-dir.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var C=Object.defineProperty;var y=(n,e)=>C(n,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("node:fs"),r=require("node:process"),i=require("@visulima/fs"),l=require("@visulima/fs/error"),c=require("@visulima/path");var w=Object.defineProperty,f=y((n,e)=>w(n,"name",{value:e,configurable:!0}),"u");const u=f((n,e)=>(e?.create&&i.ensureDirSync(n),n),"useDirectory"),S=f(async(n,e)=>{if(r.env.CACHE_DIR&&!["0","1","false","true"].includes(r.env.CACHE_DIR))return u(c.join(r.env.CACHE_DIR,n),e);const d=await i.findUp("package.json",{cwd:e?.cwd??r.cwd(),type:"file"});if(!d){if(e?.throwError)throw new l.NotFoundError("No such file or directory found.");return}const o=c.join(c.dirname(d),"node_modules"),s=c.join(o,".cache"),t=c.join(s,n);if(!(a.existsSync(t)&&!await i.isAccessible(t,i.W_OK))&&!(a.existsSync(s)&&!await i.isAccessible(s,i.W_OK))&&!(a.existsSync(o)&&!await i.isAccessible(o,i.W_OK)))return u(t,e)},"findCacheDirectory"),_=f((n,e)=>{if(r.env.CACHE_DIR&&!["0","1","false","true"].includes(r.env.CACHE_DIR))return u(c.join(r.env.CACHE_DIR,n),e);const d=i.findUpSync("package.json",{cwd:e?.cwd??r.cwd(),type:"file"});if(!d){if(e?.throwError)throw new l.NotFoundError("No such file or directory found.");return}const o=c.join(c.dirname(d),"node_modules"),s=c.join(o,".cache"),t=c.join(s,n);if(!(a.existsSync(t)&&!i.isAccessibleSync(t,i.W_OK))&&!(a.existsSync(s)&&!i.isAccessibleSync(s,i.W_OK))&&!(a.existsSync(o)&&!i.isAccessibleSync(o,i.W_OK)))return u(t,e)},"findCacheDirectorySync");exports.findCacheDirectory=S;exports.findCacheDirectorySync=_;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
type Options = {
|
|
2
|
-
create?: boolean;
|
|
3
|
-
cwd?: URL | string;
|
|
4
|
-
throwError?: boolean;
|
|
5
|
-
};
|
|
6
|
-
declare const findCacheDirectory: (name: string, options?: Options) => Promise<string | undefined>;
|
|
7
|
-
declare const findCacheDirectorySync: (name: string, options?: Options) => string | undefined;
|
|
8
|
-
|
|
9
|
-
export { findCacheDirectory, findCacheDirectorySync };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
type Options = {
|
|
2
|
-
create?: boolean;
|
|
3
|
-
cwd?: URL | string;
|
|
4
|
-
throwError?: boolean;
|
|
5
|
-
};
|
|
6
|
-
declare const findCacheDirectory: (name: string, options?: Options) => Promise<string | undefined>;
|
|
7
|
-
declare const findCacheDirectorySync: (name: string, options?: Options) => string | undefined;
|
|
8
|
-
|
|
9
|
-
export { findCacheDirectory, findCacheDirectorySync };
|
package/dist/find-cache-dir.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
type Options = {
|
|
2
|
-
create?: boolean;
|
|
3
|
-
cwd?: URL | string;
|
|
4
|
-
throwError?: boolean;
|
|
5
|
-
};
|
|
6
|
-
declare const findCacheDirectory: (name: string, options?: Options) => Promise<string | undefined>;
|
|
7
|
-
declare const findCacheDirectorySync: (name: string, options?: Options) => string | undefined;
|
|
8
|
-
|
|
9
|
-
export { findCacheDirectory, findCacheDirectorySync };
|
package/dist/find-cache-dir.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var h=Object.defineProperty;var m=(e,r)=>h(e,"name",{value:r,configurable:!0});import{existsSync as n}from"node:fs";import{env as a,cwd as w}from"node:process";import{ensureDirSync as D,findUp as E,isAccessible as u,W_OK as f,findUpSync as _,isAccessibleSync as y}from"@visulima/fs";import{NotFoundError as l}from"@visulima/fs/error";import{join as o,dirname as p}from"@visulima/path";var A=Object.defineProperty,C=m((e,r)=>A(e,"name",{value:r,configurable:!0}),"u");const d=C((e,r)=>(r?.create&&D(e),e),"useDirectory"),v=C(async(e,r)=>{if(a.CACHE_DIR&&!["0","1","false","true"].includes(a.CACHE_DIR))return d(o(a.CACHE_DIR,e),r);const s=await E("package.json",{cwd:r?.cwd??w(),type:"file"});if(!s){if(r?.throwError)throw new l("No such file or directory found.");return}const i=o(p(s),"node_modules"),c=o(i,".cache"),t=o(c,e);if(!(n(t)&&!await u(t,f))&&!(n(c)&&!await u(c,f))&&!(n(i)&&!await u(i,f)))return d(t,r)},"findCacheDirectory"),g=C((e,r)=>{if(a.CACHE_DIR&&!["0","1","false","true"].includes(a.CACHE_DIR))return d(o(a.CACHE_DIR,e),r);const s=_("package.json",{cwd:r?.cwd??w(),type:"file"});if(!s){if(r?.throwError)throw new l("No such file or directory found.");return}const i=o(p(s),"node_modules"),c=o(i,".cache"),t=o(c,e);if(!(n(t)&&!y(t,f))&&!(n(c)&&!y(c,f))&&!(n(i)&&!y(i,f)))return d(t,r)},"findCacheDirectorySync");export{v as findCacheDirectory,g as findCacheDirectorySync};
|