@proload/core
Advanced tools
Comparing version 0.3.2-next.0 to 0.3.2-next.1
# Changelog | ||
## 0.3.2-next.1 | ||
### Patch Changes | ||
- b4553a5: Rollback `resolve` changes | ||
## 0.3.2-next.0 | ||
@@ -4,0 +10,0 @@ |
@@ -98,3 +98,3 @@ export { ProloadError } from './error.cjs'; | ||
*/ | ||
export function resolve(namespace: string, opts?: ResolveOptions): Promise<string|undefined>; | ||
export async function resolve(namespace: string, opts?: ResolveOptions): Promise<string|undefined>; | ||
@@ -120,2 +120,3 @@ interface Load<T extends Record<any, any> = Record<any, any>> { | ||
export = load; | ||
export default load; |
{ | ||
"name": "@proload/core", | ||
"version": "0.3.2-next.0", | ||
"version": "0.3.2-next.1", | ||
"description": "Searches for and loads your tool's JavaScript configuration files with full support for CJS, ESM, TypeScript and more.", | ||
@@ -34,3 +34,4 @@ "main": "./lib/cjs/index.cjs", | ||
"deepmerge": "^4.2.2", | ||
"escalade": "^3.1.1" | ||
"escalade": "^3.1.1", | ||
"resolve-pkg": "^2.0.0" | ||
}, | ||
@@ -37,0 +38,0 @@ "repository": { |
@@ -46,5 +46,5 @@ # `@proload/core` | ||
## `load` | ||
## `resolve` | ||
The `default` export of `@proload/core` is an `async` function to load a configuration file. | ||
`resolve` is an additional named export of `@proload/core`. It is an `async` function that resolves **but does not load** a configuration file. | ||
@@ -55,8 +55,8 @@ - `namespace` is the name of your tool. As an example, `donut` would search for `donut.config.[ext]`. | ||
```ts | ||
load(namespace: string, opts?: LoadOptions); | ||
resolve(namespace: string, opts?: ResolveOptions); | ||
``` | ||
## `resolve` | ||
## `load` | ||
`resolve` is an additional named export of `@proload/core`. It is an `async` function that resolves **but does not load** a configuration file. | ||
The `default` export of `@proload/core` is an `async` function to load a configuration file. | ||
@@ -67,7 +67,6 @@ - `namespace` is the name of your tool. As an example, `donut` would search for `donut.config.[ext]`. | ||
```ts | ||
resolve(namespace: string, opts?: ResolveOptions); | ||
load(namespace: string, opts?: LoadOptions); | ||
``` | ||
## Options | ||
@@ -74,0 +73,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
3
28749
3
448
334
+ Addedresolve-pkg@^2.0.0
+ Addedresolve-from@5.0.0(transitive)
+ Addedresolve-pkg@2.0.0(transitive)