{"_id":"@agebrock/globup","_rev":"1-f1c3e11cc29419893707f57bc181bb26","name":"@agebrock/globup","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@agebrock/globup","version":"1.0.0","description":"find and or import files upwards using glob pattern","keywords":["glob","up","find","import"],"type":"module","main":"build/index.js","author":{"name":"Christoph Hagenbrock","email":"agebrock@users.noreply.github.com"},"license":"Apache-2.0","scripts":{"clean":"rimraf coverage build tmp package-lock.json","build":"tsc && npm run build:cjs","build:cjs":" esbuild.cmd ./build/index.js --bundle --platform=node --format=cjs --outfile=build/cjs/index.cjs","test":"node --experimental-vm-modules --no-warnings node_modules/jest/bin/jest.js --coverage","test:watch":"node --experimental-vm-modules --no-warnings node_modules/jest/bin/jest.js --watch","dev":"npm run test:watch","link":"pwsh -Command \"New-Item -ItemType SymbolicLink -Path node_modules -Target $Env:NODE_PACKAGES_NODE_MODULES\"","unlink":"rimraf node_modules","pre":"npm set registry \"https://registry.npmjs.org/\" &&npm run clean && npm run unlink && npm i && npm run build && npm run test"},"repository":{"type":"git","url":"git+https://github.com/agebrock/globup.git"},"engines":{"node":">= 20.9"},"devDependencies":{"@types/fs-extra":"^11.0.4","@types/jest":"~29.5","@types/micromatch":"^4.0.5","@types/node":"~20","esbuild":"^0.20.2","jest":"^29.7.0","rimraf":"~5.0","ts-jest":"~29.1","ts-node":"^10.9.2","tslib":"~2.6","typescript":"~5.3"},"dependencies":{"fs-extra":"^11.2.0","micromatch":"^4.0.5"},"_id":"@agebrock/globup@1.0.0","gitHead":"0ea0862e9d50f6f9b30f111a3f51298fa26b727e","bugs":{"url":"https://github.com/agebrock/globup/issues"},"homepage":"https://github.com/agebrock/globup#readme","_nodeVersion":"21.6.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-OsghzTxZh+DEngPVvcySfvic+j8jUzmSSq87IKLcQcAm8LdGnLwnl1bQKeGtsL8qzxXtxThbfySDkLhyhJLz0A==","shasum":"842fb4251e2d4831ce6712ec0a90d894f5b769fe","tarball":"https://registry.npmjs.org/@agebrock/globup/-/globup-1.0.0.tgz","fileCount":22,"unpackedSize":214675,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICYjrKV1JI6i8o87ggG/vWnnaScK/PzX5nVUN5Bc16jjAiB3LOJwM0hzEz0GWaPc7SwnmJs75KPPsFtUYzY4oUaXpQ=="}]},"_npmUser":{"name":"chbrock","email":"christoph.hagenbrock@googlemail.com"},"directories":{},"maintainers":[{"name":"chbrock","email":"christoph.hagenbrock@googlemail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/globup_1.0.0_1711253337509_0.28031271711050465"},"_hasShrinkwrap":false},"1.0.1":{"name":"@agebrock/globup","version":"1.0.1","description":"find and or import files upwards using glob pattern","keywords":["glob","up","find","import"],"type":"module","main":"build/index.js","author":{"name":"Christoph Hagenbrock","email":"agebrock@users.noreply.github.com"},"license":"Apache-2.0","scripts":{"clean":"rimraf coverage build tmp package-lock.json","build":"tsc && npm run build:cjs","build:cjs":" esbuild.cmd ./build/index.js --bundle --platform=node --format=cjs --outfile=build/cjs/index.cjs","test":"node --experimental-vm-modules --no-warnings node_modules/jest/bin/jest.js --coverage","test:watch":"node --experimental-vm-modules --no-warnings node_modules/jest/bin/jest.js --watch","dev":"npm run test:watch","link":"pwsh -Command \"New-Item -ItemType SymbolicLink -Path node_modules -Target $Env:NODE_PACKAGES_NODE_MODULES\"","unlink":"rimraf node_modules","pre":"npm set registry \"https://registry.npmjs.org/\" &&npm run clean && npm run unlink && npm i && npm run build && npm run test"},"repository":{"type":"git","url":"git+https://github.com/agebrock/globup.git"},"engines":{"node":">= 20.9"},"devDependencies":{"@types/fs-extra":"^11.0.4","@types/jest":"~29.5","@types/micromatch":"^4.0.5","@types/node":"~20","esbuild":"^0.20.2","jest":"^29.7.0","rimraf":"~5.0","ts-jest":"~29.1","ts-node":"^10.9.2","tslib":"~2.6","typescript":"~5.3"},"dependencies":{"fs-extra":"^11.2.0","micromatch":"^4.0.5"},"_id":"@agebrock/globup@1.0.1","gitHead":"e0dea92544256183621651407cc3bc92e63fd7df","bugs":{"url":"https://github.com/agebrock/globup/issues"},"homepage":"https://github.com/agebrock/globup#readme","_nodeVersion":"21.6.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-d02xC2pK2YllKthSZ8unnt4a1Qa1Eq4ecXLWb77NQuOGJkYcXMXGtac73PwHFAZkKtY2Du2YuTadj3ok9ksflw==","shasum":"c1f4e9b638da01e57f842026d05e4c6987ee662e","tarball":"https://registry.npmjs.org/@agebrock/globup/-/globup-1.0.1.tgz","fileCount":22,"unpackedSize":214185,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBbxlD/YtqJCAWravCwe0t2lGRm3ZssYsWaYJxVj/7zTAiA/jxr+uPRMN2IDuNgCfN6B4eF1ZUUf2jXWQvoUlQT1Iw=="}]},"_npmUser":{"name":"chbrock","email":"christoph.hagenbrock@googlemail.com"},"directories":{},"maintainers":[{"name":"chbrock","email":"christoph.hagenbrock@googlemail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/globup_1.0.1_1711253789940_0.14296911827865944"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-24T04:08:57.402Z","1.0.0":"2024-03-24T04:08:57.794Z","modified":"2024-03-24T04:16:30.812Z","1.0.1":"2024-03-24T04:16:30.162Z"},"maintainers":[{"name":"chbrock","email":"christoph.hagenbrock@googlemail.com"}],"description":"find and or import files upwards using glob pattern","homepage":"https://github.com/agebrock/globup#readme","keywords":["glob","up","find","import"],"repository":{"type":"git","url":"git+https://github.com/agebrock/globup.git"},"author":{"name":"Christoph Hagenbrock","email":"agebrock@users.noreply.github.com"},"bugs":{"url":"https://github.com/agebrock/globup/issues"},"license":"Apache-2.0","readme":"# @agebrock/globup\n\n## Overview\nGlobUp is a handy tool for Node.js developers who need to work with file globs and directory structures in a hassle-free manner. With GlobUp, you can effortlessly import, parse, and navigate through files and directories in your projects.\n\n## Installation\nYou can install GlobUp via npm:\n\n```bash\nnpm install @agebrock/globup\n```\n\n## Usage\nGlobUp provides several useful methods to simplify your file and directory operations. Here's how you can use it:\n(you can find the examples in the test folder)\n\n### Importing Modules\n```typescript\nimport { importUp } from '@agebrock/globup';\n\nconst modules = await importUp('fixtures/*.js', {\n    cwd: __dirname,\n});\n\nconsole.log(modules.fileA()); // 'fileA'\nconsole.log(modules.fileB()); // 'fileB'\nconsole.log(modules.default()); // 'fileC'\nconsole.log(modules.default2()); // 'fileD'\n```\n\n### Finding Files\n```typescript\nimport { globUp, globUpSync } from '@agebrock/globup';\n\nconst filesAsync = await globUp('fixtures/package.json', {\n    cwd: __dirname,\n    depth: 2,\n});\nconsole.log(filesAsync); // ['fixtures/package.json']\n\nconst filesSync = globUpSync('fixtures/package.json', {\n    cwd: __dirname,\n    depth: 2,\n});\nconsole.log(filesSync); // ['fixtures/package.json']\n```\n\n### Parsing JSON\n```typescript\nimport { jsonParseUp, jsonParseUpSync } from '@agebrock/globup';\n\nconst jsonAsync = await jsonParseUp('fixtures/*.json', {\n    cwd: __dirname,\n});\nconsole.log(jsonAsync[0].name); // 'fixtures'\n\nconst jsonSync = jsonParseUpSync('fixtures/*.json', {\n    cwd: __dirname,\n});\nconsole.log(jsonSync[0].name); // 'fixtures'\n```\n\n### Finding Package.json\n```typescript\nimport { packageJsonUp, packageJsonUpSync } from '@agebrock/globup';\n\nconst pkgJsonAsync = await packageJsonUp({\n    cwd: __dirname,\n});\nconsole.log(pkgJsonAsync.type); // 'module'\n\nconst pkgJsonSync = packageJsonUpSync({\n    cwd: __dirname,\n});\nconsole.log(pkgJsonSync.type); // 'module'\n```\n\n## Contributing\nContributions are welcome! Feel free to submit issues and pull requests.\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.","readmeFilename":"README.md"}