Skip to content

Commit

Permalink
Merge pull request #151 from micromatch/dev
Browse files Browse the repository at this point in the history
4.0
  • Loading branch information
jonschlinkert committed Apr 10, 2019
2 parents 09bd55c + 7c78f9a commit f3238cb
Show file tree
Hide file tree
Showing 133 changed files with 12,782 additions and 55,418 deletions.
3 changes: 1 addition & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[{**/{actual,fixtures,expected,templates}/**,*.md}]
[*.md]
trim_trailing_whitespace = false
insert_final_newline = false
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
9 changes: 2 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@ sudo: false
os:
- linux
- osx
- windows
language: node_js
node_js:
- node
- '9'
- '10'
- '8'
- '7'
- '6'
- '5'
- '4'
- '0.12'
- '0.10'
468 changes: 269 additions & 199 deletions .verb.md

Large diffs are not rendered by default.

83 changes: 55 additions & 28 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,57 @@
## History
# Release history

### key
All notable changes to this project will be documented in this file.

Changelog entries are classified using the following labels _(from [keep-a-changelog][]_):
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

- `added`: for new features
- `changed`: for changes in existing functionality
- `deprecated`: for once-stable features removed in upcoming releases
- `removed`: for deprecated features removed in this release
- `fixed`: for any bug fixes
- `bumped`: updated dependencies, only minor or higher will be listed.
<details>
<summary><strong>Guiding Principles</strong></summary>

### [3.0.0] - 2017-04-11
- Changelogs are for humans, not machines.
- There should be an entry for every single version.
- The same types of changes should be grouped.
- Versions and sections should be linkable.
- The latest version comes first.
- The release date of each versions is displayed.
- Mention whether you follow Semantic Versioning.

</details>

<details>
<summary><strong>Types of changes</strong></summary>

Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_):

- `Added` for new features.
- `Changed` for changes in existing functionality.
- `Deprecated` for soon-to-be removed features.
- `Removed` for now removed features.
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.

</details>

## [4.0.0] - 2019-03-20

### Added

- Adds support for `options.onMatch`. See the readme for details
- Adds support for `options.onIgnore`. See the readme for details
- Adds support for `options.onResult`. See the readme for details


### Breaking changes

- Removed support for passing an array of brace patterns to `micromatch.braces()`.
- To strictly enforce closing brackets (for `{`, `[`, and `(`), you must now use `strictBrackets=true` instead of `strictErrors`.
- `cache` - caching and all related options and methods have been removed
- `options.unixify` was renamed to `options.windows`
- `options.nodupes` Was removed. Duplicates are always removed by default. You can override this with custom behavior by using the `onMatch`, `onResult` and `onIgnore` functions.
- `options.snapdragon` was removed, as snapdragon is no longer used.
- `options.sourcemap` was removed, as snapdragon is no longer used, which provided sourcemap support.

## [3.0.0] - 2017-04-11

Complete overhaul, with 36,000+ new unit tests validated against actual output generated by Bash and minimatch. More specifically, 35,000+ of the tests:

Expand All @@ -32,21 +72,7 @@ Here are those sub-modules with links to related prs on those modules if you wan

**Added**

- source map support (optionally created when using parse or compile - I have no idea what the use case is yet, but they come for free) (note that source maps are not generated for brace expansion at present, since the braces compiler uses a different strategy. I'll update if/when this changes). Example:
```js
var mm = require('micromatch');
var pattern = '*(*(of*(a)x)z)';

var ast = mm.parse(pattern, {sourcemap: true});
var res = mm.compile(ast);
console.log(res);
// { map:
// { version: 3,
// sources: [ 'string' ],
// names: [],
// mappings: 'AAAA,CAAE,CAAE,EAAE,CAAE,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC',
// sourcesContent: [ '*(*(of*(a)x)z)' ] }},
```
- source map support (optionally created when using parse or compile - I have no idea what the use case is yet, but they come for free) (note that source maps are not generated for brace expansion at present, since the braces compiler uses a different strategy. I'll update if/when this changes).
- parser is exposed, so that implementors can customize or override specific micromatch parsers if necessary
- compiler is exposed, so that implementors can customize or override specific micromatch compilers if necessary

Expand All @@ -56,21 +82,22 @@ Here are those sub-modules with links to related prs on those modules if you wan
- even safer - micromatch has always generated optimized patterns so it's not subject to DoS exploits like minimatch (completely different than the regex DoS issue, minimatch and multimatch are still openly exposed to being used for DoS attacks), but more safeguards were built into this refactor

**Changed**

- the public API of this library did not change in this version and should be safe to upgrade without changing implentor code. However, we have released this as a major version for the following reasons:
- out of an abundance of caution due to the large amount of code changed in this release
- we have improved parser accuracy to such a degree that some implementors using invalid globs have noted change in behavior. If this is the case for you, please check that you are using a valid glob expression before logging a bug with this library

### [1.0.1] - 2016-12-12
## [1.0.1] - 2016-12-12

**Added**

- Support for windows path edge cases where backslashes are used in brackets or other unusual combinations.

### [1.0.0] - 2016-12-12
## [1.0.0] - 2016-12-12

Stable release.

### [0.1.0] - 2016-10-08
## [0.1.0] - 2016-10-08

First release.

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014-2018, Jon Schlinkert.
Copyright (c) 2014-present, Jon Schlinkert.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit f3238cb

Please sign in to comment.