Skip to content

Commit ff329b7

Browse files
committed
v3.0.0
1 parent 1eaddf1 commit ff329b7

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
## v3.0.0
4+
5+
* All paths returned from this utility are normalized to POSIX-format by default.

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# dependency-tree
22

3-
Returns an unordered array of local paths to dependencies of a node JavaScript file (everything it or any of its dependencies `require`s).
3+
Returns an unordered array of local paths to dependencies of a CommonJS node JavaScript file (everything it or any of its dependencies `require`s).
44

5-
Reduced feature (faster) alternative to the [`dependency-tree` package](https://www.npmjs.com/package/dependency-tree) that only works with stock node JS. This is used by Eleventy to find dependencies of a JavaScript file to watch for changes to re-run Eleventy’s build.
5+
* See also: [`dependency-tree-esm`](https://github.com/11ty/eleventy-dependency-tree-esm) for ES Modules.
6+
7+
Reduced feature (faster) alternative to the [`dependency-tree` package](https://www.npmjs.com/package/dependency-tree). This is used by Eleventy to find dependencies of a JavaScript file to watch for changes to re-run Eleventy’s build.
68

79
## Big Huge Caveat
810

@@ -17,7 +19,7 @@ npm install --save-dev @11ty/dependency-tree
1719
## Features
1820

1921
* Ignores `node_modules`
20-
* Or, use `nodeModuleNamesOnly` to return a list of node_modules packages (added in v2.0.0)
22+
* Or, use `nodeModuleNames` to control whether or not `node_modules` package names are included (added in v2.0.1)
2123
* Ignores Node’s built-ins (e.g. `path`)
2224
* Handles circular dependencies (Node does this too)
2325

@@ -89,4 +91,4 @@ DependencyTree("./my-file.js", { nodeModuleNames: "only" });
8991
* `nodeModuleNamesOnly: false` is mapped to `nodeModuleNames: "exclude"`
9092
* `nodeModuleNamesOnly: true` is mapped to `nodeModuleNames: "only"`
9193

92-
If both `nodeModuleNamesOnly` and `nodeModuleNames` are included in options, `nodeModuleNames` takes precedence.
94+
If both `nodeModuleNamesOnly` and `nodeModuleNames` are included in options, `nodeModuleNames` takes precedence.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@11ty/dependency-tree",
3-
"version": "2.0.1",
3+
"version": "3.0.0",
44
"description": "Finds all JavaScript CommmonJS require() dependencies from a filename.",
55
"main": "main.js",
66
"scripts": {

0 commit comments

Comments
 (0)