Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

find-packages

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

find-packages - npm Package Compare versions

Comparing version 5.0.1 to 5.0.2

14

lib/index.js

@@ -16,5 +16,3 @@ "use strict";

globOpts.ignore = opts.ignore || DEFAULT_IGNORE;
globOpts.patterns = opts.patterns
? normalizePatterns(opts.patterns)
: ['**/package.{json,yaml,json5}'];
globOpts.patterns = normalizePatterns(opts.patterns ? opts.patterns : ['.', '**']);
const paths = await fastGlob(globOpts.patterns, globOpts);

@@ -37,3 +35,11 @@ return pFilter(paths

function normalizePatterns(patterns) {
return patterns.map((pattern) => pattern.replace(/\/?$/, '/package.{json,yaml,json5}'));
const normalizedPatterns = [];
for (const pattern of patterns) {
// We should add separate pattern for each extension
// for some reason, fast-glob is buggy with /package.{json,yaml,json5} pattern
normalizedPatterns.push(pattern.replace(/\/?$/, '/package.json'));
normalizedPatterns.push(pattern.replace(/\/?$/, '/package.json5'));
normalizedPatterns.push(pattern.replace(/\/?$/, '/package.yaml'));
}
return normalizedPatterns;
}

@@ -40,0 +46,0 @@ // for backward compatibility

{
"name": "find-packages",
"version": "5.0.1",
"version": "5.0.2",
"description": "Find all packages inside a directory",

@@ -14,4 +14,3 @@ "main": "lib/index.js",

"tsc": "tsc",
"prepublishOnly": "pnpm run tsc",
"md": "mos"
"prepublishOnly": "pnpm run tsc"
},

@@ -23,10 +22,2 @@ "repository": "https://github.com/pnpm/pnpm/blob/master/packages/find-packages",

],
"mos": {
"plugins": [
"readme"
],
"installation": {
"useShortAlias": true
}
},
"author": {

@@ -50,4 +41,2 @@ "name": "Zoltan Kochan",

"find-packages": "link:",
"mos": "^2.0.0-alpha.3",
"mos-plugin-readme": "^1.0.4",
"tape": "^4.6.3",

@@ -59,3 +48,3 @@ "ts-node": "^8.0.1",

"dependencies": {
"@pnpm/read-importer-manifest": "1.0.1",
"@pnpm/read-importer-manifest": "1.0.2",
"fast-glob": "^2.0.4",

@@ -62,0 +51,0 @@ "p-filter": "^2.0.0"

@@ -51,2 +51,2 @@ # find-packages

[MIT](./LICENSE) © [Zoltan Kochan](https://www.kochan.io)
MIT © [Zoltan Kochan](https://www.kochan.io)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc