Skip to content

Commit fe1ca23

Browse files
committed
Disable options.ignoreCircularDependencies by default.
1 parent 063d587 commit fe1ca23

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.0.0
2+
3+
- Disable ```options.ignoreCircularDependencies``` by default.
4+
15
## 1.1.0
26

37
- Throw an error when detecting a circular dependency (thanks to @huang64). Add option ```ignoreCircularDependencies``` to disable this behavior.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Circular dependencies are either silently ignored or emit an error (thanks to [@
5858
#### options.pattern
5959
Type: `RegExp`
6060

61-
The matching pattern (defaults to ```/\* @requires [\s-]*(.*?\.js)/g``).
61+
The matching pattern (defaults to ```/\* @requires [\s-]*(.*?\.js)/g```).
6262

6363
#### options.log
6464
Type: `Boolean`
@@ -68,5 +68,5 @@ Whether to log the resolved dependencies (defaults to ```false```).
6868
#### options.ignoreCircularDependencies
6969
Type: `Boolean`
7070

71-
Whether to just continue instead of emitting an error if circular dependencies are detected (defaults to ```true```).
71+
Whether to just continue instead of emitting an error if circular dependencies are detected (defaults to ```false```).
7272

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function resolveDependencies(config) {
1313
var defaults = {
1414
pattern: /\* @requires [\s-]*(.*\.js)/g,
1515
log: false,
16-
ignoreCircularDependencies: true
16+
ignoreCircularDependencies: false
1717
},
1818
stream,
1919
dag = new DAG(),

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gulp-resolve-dependencies",
3-
"version": "1.1.0",
3+
"version": "2.0.0",
44
"description": "Resolve dependency directives in assets (e.g. \"@requires\" or \"//= require\" in JavaScript)",
55
"license": "MIT",
66
"repository": "backflip/gulp-resolve-dependencies",

test/main.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ describe('gulp-resolve-dependencies', function() {
2626

2727
it('should throw error due to circular dependency', function(done) {
2828
gulp.src(__dirname + '/circular/a.js')
29-
.pipe(resolveDependencies({
30-
ignoreCircularDependencies: false
31-
}))
29+
.pipe(resolveDependencies())
3230
.on('error', function() {
3331
done();
3432
});

0 commit comments

Comments
 (0)