explore-config
Advanced tools
Comparing version 3.0.8 to 3.0.9
@@ -1,8 +0,7 @@ | ||
export default function exploreConfig(source: string | string[], options?: { | ||
export interface ExploreConfigOptions { | ||
extensions?: ('js' | 'ts' | 'cjs' | 'cts' | 'mjs' | 'mts')[]; | ||
resolvedKeys?: string[]; | ||
cwd?: string; | ||
keys?: string[]; | ||
on?: { | ||
found?: (foundPath: string) => void; | ||
notFound?: () => void; | ||
}; | ||
}): any; | ||
found?: (basename: string, configPath: string) => void; | ||
} | ||
export default function exploreConfig(name: string, options?: ExploreConfigOptions): any; |
@@ -1,1 +0,1 @@ | ||
{"name":"explore-config","type":"module","scripts":{"build:main":"rollup --config rollup.config.mjs","build:type":"tsc --emitDeclarationOnly --preserveWatchOutput","build":"pnpm run \"/^build:.*/\"","dev":"pnpm run \"/^build:.*/\" --watch","test":"cross-env NODE_OPTIONS=--experimental-vm-modules jest","type-check":"tsc --noEmit","lint":"eslint src"},"license":"MIT","description":"Explore multi-format JavaScript module configuration","author":{"name":"Aron","email":"i@aron.tw","url":"https://aron.tw"},"homepage":"https://github.com/1aron/techor","bugs":{"url":"https://github.com/1aron/techor/issues"},"repository":{"type":"git","url":"https://github.com/1aron/techor.git","directory":"packages/explore-config"},"keywords":["config","esm","cjs","ts","configuration","read","find","explore"],"sideEffects":false,"main":"./dist/index.cjs","esnext":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"require":"./dist/index.cjs","import":"./dist/index.mjs","types":"./dist/index.d.ts"}},"files":["dist"],"publishConfig":{"access":"public"},"dependencies":{"@techor/extend":"^3.0.8","@techor/log":"^3.0.8","@techor/glob":"^3.0.8","cross-import":"^3.0.8"},"version":"3.0.8"} | ||
{"name":"explore-config","type":"module","scripts":{"build:main":"rollup --config rollup.config.mjs","build:type":"tsc --emitDeclarationOnly --preserveWatchOutput","build":"pnpm run \"/^build:.*/\"","dev":"pnpm run \"/^build:.*/\" --watch","test":"cross-env NODE_OPTIONS=--experimental-vm-modules jest","type-check":"tsc --noEmit","lint":"eslint src"},"license":"MIT","description":"Explore multi-format JavaScript module configuration","author":{"name":"Aron","email":"i@aron.tw","url":"https://aron.tw"},"homepage":"https://github.com/1aron/techor","bugs":{"url":"https://github.com/1aron/techor/issues"},"repository":{"type":"git","url":"https://github.com/1aron/techor.git","directory":"packages/explore-config"},"keywords":["config","esm","cjs","ts","configuration","read","find","explore"],"sideEffects":false,"main":"./dist/index.cjs","esnext":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"require":"./dist/index.cjs","import":"./dist/index.mjs","types":"./dist/index.d.ts"}},"files":["dist"],"publishConfig":{"access":"public"},"dependencies":{"cross-import":"^3.0.9"},"version":"3.0.9"} |
@@ -65,21 +65,28 @@ <br> | ||
```ts | ||
exploreConfig( | ||
sources: Pattern | Pattern[], | ||
options?: { | ||
cwd?: string, | ||
keys?: string[], | ||
on?: { | ||
found?: (foundPath: string) => void, | ||
notFound?: () => void | ||
} | ||
} | ||
): any | ||
exploreConfig(name: string, options: ExploreConfigOptions) | ||
``` | ||
```ts | ||
import exploreConfig from 'explore-config' | ||
config = exploreConfig('master.css.*') | ||
// {...} | ||
/** | ||
* 1. explore -> techor.config.js | ||
* 2. explore -> techor.config.ts | ||
* 3. explore -> techor.config.cjs | ||
* 4. explore -> techor.config.cts | ||
* 5. explore -> techor.config.mjs | ||
* 6. explore -> techor.config.mts | ||
* */ | ||
const config = exploreConfig('techor.config') | ||
console.log(config) | ||
// -> {...} | ||
``` | ||
```ts | ||
export interface ExploreConfigOptions { | ||
extensions?: ('js' | 'ts' | 'cjs' | 'cts' | 'mjs' | 'mts')[] | ||
resolvedKeys?: string[] | ||
cwd?: string | ||
found?: (basename: string, configPath: string) => void | ||
} | ||
``` | ||
@@ -86,0 +93,0 @@ <br> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
9480
1
94
101
2
- Removed@techor/extend@^3.0.8
- Removed@techor/glob@^3.0.8
- Removed@techor/log@^3.0.8
- Removed@nodelib/fs.scandir@2.1.5(transitive)
- Removed@nodelib/fs.stat@2.0.5(transitive)
- Removed@nodelib/fs.walk@1.2.8(transitive)
- Removed@techor/extend@3.1.7(transitive)
- Removed@techor/glob@3.1.7(transitive)
- Removed@techor/log@3.1.7(transitive)
- Removedbraces@3.0.3(transitive)
- Removedfast-glob@3.3.3(transitive)
- Removedfastq@1.19.0(transitive)
- Removedfill-range@7.1.1(transitive)
- Removedglob-parent@5.1.2(transitive)
- Removedis-extglob@2.1.1(transitive)
- Removedis-glob@4.0.3(transitive)
- Removedis-number@7.0.0(transitive)
- Removedmerge2@1.4.1(transitive)
- Removedmicromatch@4.0.8(transitive)
- Removedpicomatch@2.3.1(transitive)
- Removedqueue-microtask@1.2.3(transitive)
- Removedreusify@1.0.4(transitive)
- Removedrun-parallel@1.2.0(transitive)
- Removedto-regex-range@5.0.1(transitive)
- Removedupath@2.0.1(transitive)
Updatedcross-import@^3.0.9