Socket
Socket
Sign inDemoInstall

picomatch

Package Overview
Dependencies
Maintainers
3
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

picomatch - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

4

CHANGELOG.md

@@ -35,2 +35,6 @@ # Release history

## 2.2.1 (2020-01-04)
* Fixes [#49](https://github.com/micromatch/picomatch/issues/49), so that braces with no sets or ranges are now propertly treated as literals.
## 2.2.0 (2020-01-04)

@@ -37,0 +41,0 @@

@@ -134,2 +134,3 @@ 'use strict';

const extglobs = [];
const braces = [];
const stack = [];

@@ -231,2 +232,4 @@ let prev = bos;

increment('parens');
push({ type, value, output: state.output ? '' : ONE_CHAR });

@@ -541,3 +544,13 @@ push({ type: 'paren', extglob: true, value: advance(), output });

increment('braces');
push({ type: 'brace', value, output: '(' });
const open = {
type: 'brace',
value,
output: '(',
outputIndex: state.output.length,
tokensIndex: state.tokens.length
};
braces.push(open);
push(open);
continue;

@@ -547,3 +560,5 @@ }

if (value === '}') {
if (opts.nobrace === true || state.braces === 0) {
const brace = braces[braces.length - 1];
if (opts.nobrace === true || !brace) {
push({ type: 'text', value, output: value });

@@ -555,3 +570,3 @@ continue;

if (state.dots === true) {
if (brace.dots === true) {
const arr = tokens.slice();

@@ -574,4 +589,16 @@ const range = [];

if (brace.comma !== true && brace.dots !== true) {
const out = state.output.slice(0, brace.outputIndex);
const toks = state.tokens.slice(brace.tokensIndex);
brace.value = brace.output = '\\{';
value = output = `\\}`;
state.output = out;
for (const t of toks) {
state.output += (t.output || t.value);
}
}
push({ type: 'brace', value, output });
decrement('braces');
braces.pop();
continue;

@@ -599,3 +626,5 @@ }

if (state.braces > 0 && stack[stack.length - 1] === 'braces') {
const brace = braces[braces.length - 1];
if (brace && stack[stack.length - 1] === 'braces') {
brace.comma = true;
output = '|';

@@ -637,6 +666,7 @@ }

if (prev.value === '.') prev.output = DOT_LITERAL;
const brace = braces[braces.length - 1];
prev.type = 'dots';
prev.output += value;
prev.value += value;
state.dots = true;
brace.dots = true;
continue;

@@ -643,0 +673,0 @@ }

4

package.json
{
"name": "picomatch",
"description": "Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.",
"version": "2.2.0",
"version": "2.2.1",
"homepage": "https://github.com/micromatch/picomatch",

@@ -81,2 +81,2 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

}
}
}
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