cross-import
Advanced tools
Comparing version 2.2.9 to 2.2.10
@@ -1,3 +0,1 @@ | ||
import fg from 'fast-glob'; | ||
export default function crossImport(source: string | fg.Pattern[], options?: fg.Options): any; | ||
export { crossImport }; | ||
export default function crossImport(modulePath: string): any; |
@@ -1,1 +0,1 @@ | ||
{"name":"cross-import","scripts":{"build:cjs":"esbuild src/index.ts --bundle --outfile=dist/index.js --format=cjs --minify --sourcemap --platform=node --external:esbuild --external:fast-glob --external:jiti --external:@techor/extend --external:sucrase --external:upath","build:type":"tsc --emitDeclarationOnly --preserveWatchOutput","build":"npm run build:cjs && npm run build:type","dev":"conc 'npm:build:* -- --watch'","test":"node -r sucrase/register ./tests/real && jest","type-check":"tsc --noEmit","lint":"eslint src"},"license":"MIT","description":"Import .ts, .mjs, .cjs files across environments as JavaScript modules","author":{"name":"Aron","email":"i@aron.tw","url":"http://aron.tw"},"homepage":"https://aron.tw","bugs":{"url":"https://github.com/1aron/utils/issues"},"repository":{"type":"git","url":"https://github.com/1aron/utils.git","directory":"packages/read-module"},"keywords":["cjs","mjs","config","utils","module","read","cross","environments","commonjs","ts","typescript"],"sideEffects":false,"publishConfig":{"access":"public"},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"require":"./dist/index.js","import":"./dist/index.js","types":"./dist/index.d.ts"}},"files":["dist"],"dependencies":{"@techor/extend":"^2.2.9","fast-glob":"^3.2.12","jiti":"^1.18.2","sucrase":"^3.32.0","upath":"^2.0.1"},"version":"2.2.9"} | ||
{"name":"cross-import","scripts":{"build:cjs":"esbuild src/index.ts --bundle --outfile=dist/index.js --format=cjs --minify --sourcemap --platform=node","build:type":"tsc --emitDeclarationOnly --preserveWatchOutput","build":"npm run build:cjs && npm run build:type","dev":"conc 'npm:build:* -- --watch'","test":"node -r sucrase/register ./tests/real && jest","type-check":"tsc --noEmit","lint":"eslint src"},"license":"MIT","description":"Import .ts, .mjs, .cjs files across environments as JavaScript modules","author":{"name":"Aron","email":"i@aron.tw","url":"http://aron.tw"},"homepage":"https://aron.tw","bugs":{"url":"https://github.com/1aron/utils/issues"},"repository":{"type":"git","url":"https://github.com/1aron/utils.git","directory":"packages/read-module"},"keywords":["cjs","mjs","config","utils","module","read","cross","environments","commonjs","ts","typescript"],"sideEffects":false,"publishConfig":{"access":"public"},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"require":"./dist/index.js","import":"./dist/index.js","types":"./dist/index.d.ts"}},"files":["dist"],"devDependencies":{"sucrase":"^3.32.0","jiti":"^1.18.2"},"version":"2.2.10"} |
@@ -71,6 +71,3 @@ <br> | ||
```ts | ||
crossImport( | ||
source: string | fg.Pattern[], | ||
options?: fg.Options | ||
): any | ||
crossImport(modulePath: string): any | ||
``` | ||
@@ -96,21 +93,3 @@ | ||
``` | ||
And so on... | ||
### Import format-multiple JS config | ||
This is often used to read various user-defined configuration files like `master.css.ts`, `next.config.js`, `vite.config.mjs` ... | ||
`index.js` | ||
```js | ||
crossImport('master.css.{js,ts,cjs,mjs}') | ||
// {"bar": "bar", "foo": "foo"} | ||
``` | ||
## Options | ||
Inherited from [fast-glob options](https://github.com/mrmlnc/fast-glob#options-3) | ||
```js | ||
{ | ||
cwd: process.cwd() | ||
} | ||
``` | ||
<br> | ||
@@ -117,0 +96,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 4 instances 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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 12 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
High entropy strings
Supply chain riskContains high entropy strings. This could be a sign of encrypted data, leaked secrets or obfuscated code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
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
1977454
0
1963
2
102
32
- Removed@techor/extend@^2.2.9
- Removedfast-glob@^3.2.12
- Removedjiti@^1.18.2
- Removedsucrase@^3.32.0
- Removedupath@^2.0.1
- Removed@isaacs/cliui@8.0.2(transitive)
- Removed@jridgewell/gen-mapping@0.3.8(transitive)
- Removed@jridgewell/resolve-uri@3.1.2(transitive)
- Removed@jridgewell/set-array@1.2.1(transitive)
- Removed@jridgewell/sourcemap-codec@1.5.0(transitive)
- Removed@jridgewell/trace-mapping@0.3.25(transitive)
- 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@pkgjs/parseargs@0.11.0(transitive)
- Removed@techor/extend@2.6.7(transitive)
- Removedansi-regex@5.0.16.1.0(transitive)
- Removedansi-styles@4.3.06.2.1(transitive)
- Removedany-promise@1.3.0(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@2.0.1(transitive)
- Removedbraces@3.0.3(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedcommander@4.1.1(transitive)
- Removedcross-spawn@7.0.6(transitive)
- Removedeastasianwidth@0.2.0(transitive)
- Removedemoji-regex@8.0.09.2.2(transitive)
- Removedfast-glob@3.3.3(transitive)
- Removedfastq@1.18.0(transitive)
- Removedfill-range@7.1.1(transitive)
- Removedforeground-child@3.3.0(transitive)
- Removedglob@10.4.5(transitive)
- Removedglob-parent@5.1.2(transitive)
- Removedis-extglob@2.1.1(transitive)
- Removedis-fullwidth-code-point@3.0.0(transitive)
- Removedis-glob@4.0.3(transitive)
- Removedis-number@7.0.0(transitive)
- Removedisexe@2.0.0(transitive)
- Removedjackspeak@3.4.3(transitive)
- Removedjiti@1.21.7(transitive)
- Removedlines-and-columns@1.2.4(transitive)
- Removedlru-cache@10.4.3(transitive)
- Removedmerge2@1.4.1(transitive)
- Removedmicromatch@4.0.8(transitive)
- Removedminimatch@9.0.5(transitive)
- Removedminipass@7.1.2(transitive)
- Removedmz@2.7.0(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedpackage-json-from-dist@1.0.1(transitive)
- Removedpath-key@3.1.1(transitive)
- Removedpath-scurry@1.11.1(transitive)
- Removedpicomatch@2.3.1(transitive)
- Removedpirates@4.0.6(transitive)
- Removedqueue-microtask@1.2.3(transitive)
- Removedreusify@1.0.4(transitive)
- Removedrun-parallel@1.2.0(transitive)
- Removedshebang-command@2.0.0(transitive)
- Removedshebang-regex@3.0.0(transitive)
- Removedsignal-exit@4.1.0(transitive)
- Removedstring-width@4.2.35.1.2(transitive)
- Removedstrip-ansi@6.0.17.1.0(transitive)
- Removedsucrase@3.35.0(transitive)
- Removedthenify@3.3.1(transitive)
- Removedthenify-all@1.6.0(transitive)
- Removedto-regex-range@5.0.1(transitive)
- Removedts-interface-checker@0.1.13(transitive)
- Removedupath@2.0.1(transitive)
- Removedwhich@2.0.2(transitive)
- Removedwrap-ansi@7.0.08.1.0(transitive)