Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: isaacs/node-glob
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f5a57d3d6e19b324522a3fa5bdd5075fd1aa79d1
Choose a base ref
...
head repository: isaacs/node-glob
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a68703e61894ef260323dcc9f95b21f17197d951
Choose a head ref

Commits on May 6, 2021

  1. use tap 15

    isaacs committed May 6, 2021
    Copy the full SHA
    37b44c1 View commit details
  2. Copy the full SHA
    66c102e View commit details
  3. 7.1.7

    isaacs committed May 6, 2021
    Copy the full SHA
    ce43ea0 View commit details

Commits on Sep 22, 2021

  1. Add fs option to allow passing virtual filesystem

    PR-URL: #430
    Credit: @mmkal
    Close: #430
    Reviewed-by: @isaacs
    mmkal authored and isaacs committed Sep 22, 2021
    Copy the full SHA
    df4598a View commit details
  2. 7.2.0

    isaacs committed Sep 22, 2021
    Copy the full SHA
    3bfec21 View commit details

Commits on Feb 13, 2022

  1. Copy the full SHA
    73feafd View commit details
  2. 7.2.1

    isaacs committed Feb 13, 2022
    Copy the full SHA
    965f939 View commit details

Commits on Feb 27, 2022

  1. Copy the full SHA
    bd836b7 View commit details
  2. chore: add copyright year to license

    License Year Bot committed Feb 27, 2022
    Copy the full SHA
    6d02131 View commit details

Commits on Mar 18, 2022

  1. Update LICENSE to remove logo text

    Remove the glob logo licensing information from LICENSE as this
    information is already in README.md. See #459.
    
    PR-URL: #463
    Credit: @kellertk
    Close: #463
    Reviewed-by: @isaacs
    kellertk authored and isaacs committed Mar 18, 2022
    Copy the full SHA
    8b5eb93 View commit details

Commits on Mar 21, 2022

  1. require node >= 12

    isaacs committed Mar 21, 2022
    Copy the full SHA
    3d6c4cd View commit details
  2. minimatch@5

    Fix: #464
    isaacs committed Mar 21, 2022
    Copy the full SHA
    6ad3bbf View commit details
  3. 8.0.0

    isaacs committed Mar 21, 2022
    Copy the full SHA
    0004d83 View commit details

Commits on Apr 11, 2022

  1. Copy the full SHA
    af3eb8a View commit details
  2. 8.0.1

    isaacs committed Apr 11, 2022
    Copy the full SHA
    55ebc0b View commit details

Commits on Apr 12, 2022

  1. changelog updates

    Fix: #467
    isaacs committed Apr 12, 2022
    Copy the full SHA
    7eab927 View commit details

Commits on May 6, 2022

  1. ci: test on node 18

    isaacs committed May 6, 2022
    Copy the full SHA
    5630197 View commit details
  2. remove path-is-absolute

    isaacs committed May 6, 2022
    Copy the full SHA
    a8a3682 View commit details

Commits on May 12, 2022

  1. always coerce cwd, root to '/' separated paths

    Re: #467
    
    PR-URL: #469
    Credit: @isaacs
    Close: #469
    Reviewed-by: @isaacs
    isaacs committed May 12, 2022
    Copy the full SHA
    0049e9a View commit details
  2. Copy the full SHA
    af4207b View commit details
  3. 8.0.2

    isaacs committed May 12, 2022
    Copy the full SHA
    d13cb06 View commit details

Commits on May 13, 2022

  1. [Refactor] use more explicit assert.ok

    PR-URL: #451
    Credit: @ljharb
    Close: #451
    Reviewed-by: @nicolas377
    ljharb authored and isaacs committed May 13, 2022
    Copy the full SHA
    fc717ba View commit details
  2. 8.0.3

    isaacs committed May 13, 2022
    Copy the full SHA
    d844b2c View commit details

Commits on May 16, 2022

  1. Remove dependency on path-is-absolute

    Per https://www.npmjs.com/package/path-is-absolute:
    
    > This package is no longer relevant as Node.js 0.12 is unmaintained.
    
    PR-URL: #477
    Credit: @jsha
    Close: #477
    Reviewed-by: @isaacs
    jsha authored and isaacs committed May 16, 2022
    Copy the full SHA
    e19db65 View commit details
  2. update tap, libtap

    isaacs committed May 16, 2022
    Copy the full SHA
    af57da2 View commit details

Commits on Jan 14, 2023

  1. add windowsPathsNoEscape option

    Fix: #468
    
    PR-URL: #470
    Credit: @isaacs
    Close: #470
    Reviewed-by: @isaacs
    isaacs committed Jan 14, 2023
    Copy the full SHA
    1756fcc View commit details
  2. 8.1.0

    isaacs committed Jan 14, 2023
    Copy the full SHA
    1b6bf20 View commit details
  3. chore: add copyright year to license

    License Year Bot committed Jan 14, 2023
    Copy the full SHA
    3a5a70a View commit details

Commits on Feb 27, 2023

  1. Copy the full SHA
    187305f View commit details
  2. two tests passing!

    isaacs committed Feb 27, 2023
    Copy the full SHA
    c8a000f View commit details
  3. Copy the full SHA
    e294d2a View commit details
  4. Copy the full SHA
    edd85fa View commit details
  5. Copy the full SHA
    d77081a View commit details
  6. Copy the full SHA
    cf01af4 View commit details
  7. Copy the full SHA
    9c3ec00 View commit details
  8. hybrid module setup tweaks

    isaacs committed Feb 27, 2023
    Copy the full SHA
    8d16dfe View commit details
  9. Copy the full SHA
    d3b9bd1 View commit details
  10. do not clean up fixtures

    Too annoying to keep having to run test-regen in dev.
    
    Also, use t.testdir() in the one test that was writing and tearing down
    its fixture manually.
    isaacs committed Feb 27, 2023
    Copy the full SHA
    392c4b7 View commit details
  11. Copy the full SHA
    9b11879 View commit details
  12. Copy the full SHA
    622a8d0 View commit details
  13. minimatch@6.1.4

    isaacs committed Feb 27, 2023
    Copy the full SHA
    a0db317 View commit details
  14. Copy the full SHA
    c381907 View commit details
  15. Copy the full SHA
    f66a08a View commit details
  16. fix: bundling library using webpack

    this change ensures "default" conditions are last, fixing the following
    webpack bundling error:
    
    ```
    Module not found: Error: Default condition should be last one
    ```
    
    Re: isaacs/minimatch#190
    Credit: @AviVahl
    Reviewed-by: @isaacs
    isaacs committed Feb 27, 2023
    Copy the full SHA
    9bc4065 View commit details
  17. update benchmark script

    Only show the real time, and include glob v7/v8 for comparison.
    isaacs committed Feb 27, 2023
    Copy the full SHA
    0142c85 View commit details
  18. Avoid creating unnecessary stack traces

    This makes the glob.sync method MUCH faster, like >30% faster in the
    benchmark.
    
    This implementation is now considerably ahead of v7 and v8.
    isaacs committed Feb 27, 2023
    Copy the full SHA
    a9bbbaa View commit details
  19. Copy the full SHA
    59a9700 View commit details
  20. improve performance somewhat

    Quite a lot, actually.
    
    Still a pathological case where a '**' pattern is followed by multiple
    glob patterns, especially if the subsequent set of patterns includes
    another globstar with the same problem, it seems to grow geometrically.
    
    So '**/*/*.txt' takes about twice as long as it should, and
    '**/*/**/*/*.txt' takes about twice as long again, increasining
    geometrically.
    
    Need to rethink the globstar handling approach, maybe the whole shape of
    the walker class.  Currently, it's pretty naive, and the proof of
    concept I added to test my assumption only works if there'e exactly 1
    path portion following the globstar.  That is, it makes **/*.txt go as
    fast as it should, but **/*/*.txt is still slow.
    
    Right now, a test for **/*/*.txt in a path a/b/c, with directory child
    paths [d, e] will create child walkers for the following paths/patterns:
    
    */*.txt a/b/c      Test without the ** portion, against this path
    **/*/*.txt a/b/c/d Test with the globstar in each child directory
    **/*/*.txt a/b/c/e
    */*.txt a/b/c/d    Test without globstar in each child directory
    */*.txt a/b/c/e
    
    This happens at each directory level, so if d and e both have directory
    children x and y, you get:
    
    */*.txt a/b/c/d
    **/*/*.txt a/b/c/d/x
    **/*/*.txt a/b/c/d/y
    */*.txt a/b/c/d/x
    */*.txt a/b/c/d/y
    */*.txt a/b/c/e
    **/*/*.txt a/b/c/e/x
    **/*/*.txt a/b/c/e/y
    */*.txt a/b/c/e/x
    */*.txt a/b/c/e/y
    
    Added a check when there's exactly 1 entry after the globstar, but this
    actually has a bug and isn't scalable anyway.
    isaacs committed Feb 27, 2023
    Copy the full SHA
    fe5efba View commit details
  21. fix many bugs

    isaacs committed Feb 27, 2023
    Copy the full SHA
    8e7291e View commit details
  22. fix benchclean script

    isaacs committed Feb 27, 2023
    Copy the full SHA
    732430a View commit details
Showing with 11,250 additions and 7,407 deletions.
  1. +0 −3 .github/.github/FUNDING.yml
  2. +39 −0 .github/workflows/ci.yml
  3. +13 −0 .github/workflows/commit-if-modified.sh
  4. +15 −0 .github/workflows/copyright-year.sh
  5. +37 −0 .github/workflows/isaacs-makework.yml
  6. +16 −0 .github/workflows/package-json-repo.js
  7. +50 −0 .github/workflows/typedoc.yml
  8. +11 −6 .gitignore
  9. +9 −0 .prettierignore
  10. +0 −14 .travis.yml
  11. +1 −5 CONTRIBUTING.md
  12. +1 −7 LICENSE
  13. +832 −280 README.md
  14. +2 −5 benchclean.js
  15. +170 −47 benchmark.sh
  16. +115 −0 changelog.md
  17. +0 −240 common.js
  18. +8 −5 examples/g.js
  19. +5 −5 examples/usr-local.js
  20. +13 −0 fixup.sh
  21. +0 −790 glob.js
  22. +19 −4 make-benchmark-fixture.sh
  23. +5,583 −3,422 package-lock.json
  24. +75 −25 package.json
  25. +47 −0 patterns.sh
  26. +26 −13 prof.sh
  27. +433 −0 src/glob.ts
  28. +18 −0 src/has-magic.ts
  29. +107 −0 src/ignore.ts
  30. +3 −0 src/index-cjs.ts
  31. +202 −0 src/index.ts
  32. +266 −0 src/pattern.ts
  33. +314 −0 src/processor.ts
  34. +467 −0 src/walker.ts
  35. +0 −486 sync.js
  36. +0 −180 test/00-setup.js
  37. +185 −0 test/00-setup.ts
  38. +0 −19 test/abort.js
  39. +8 −0 test/absolute-must-be-strings.ts
  40. +0 −49 test/absolute.js
  41. +45 −0 test/absolute.ts
  42. +0 −79 test/bash-comparison.js
  43. +56 −0 test/bash-comparison.ts
  44. +0 −140 test/bash-results.json
  45. +247 −0 test/bash-results.ts
  46. +0 −82 test/broken-symlink.js
  47. +66 −0 test/broken-symlink.ts
  48. +80 −0 test/cwd-noent.ts
  49. +0 −91 test/cwd-test.js
  50. +44 −0 test/cwd-test.ts
  51. +0 −21 test/empty-set.js
  52. +18 −0 test/empty-set.ts
  53. +0 −65 test/enotsup.js
  54. +0 −112 test/eperm-stat.js
  55. +0 −38 test/error-callback.js
  56. +0 −32 test/follow.js
  57. +25 −0 test/follow.ts
  58. +0 −20 test/global-leakage.js
  59. +0 −18 test/globstar-match.js
  60. +0 −34 test/has-magic.js
  61. +30 −0 test/has-magic.ts
  62. +0 −111 test/ignore.js
  63. +386 −0 test/ignore.ts
  64. +0 −200 test/mark.js
  65. +181 −0 test/mark.ts
  66. +0 −49 test/match-base.js
  67. +105 −0 test/match-base.ts
  68. +25 −0 test/match-parent.ts
  69. +8 −0 test/match-root.ts
  70. +0 −15 test/multiple-weird-error.js
  71. +0 −12 test/new-glob-optional-options.js
  72. +0 −149 test/nocase-nomagic.js
  73. +0 −67 test/nodir.js
  74. +50 −0 test/nodir.ts
  75. +0 −31 test/nonull.js
  76. +64 −0 test/pattern.ts
  77. +0 −63 test/pause-resume.js
  78. +73 −0 test/platform.ts
  79. +0 −37 test/readme-issue.js
  80. +17 −0 test/readme-issue.ts
  81. +0 −93 test/realpath.js
  82. +96 −0 test/realpath.ts
  83. +0 −48 test/root-nomount.js
  84. +0 −81 test/root.js
  85. +89 −0 test/signal.ts
  86. +0 −20 test/slash-cwd.js
  87. +16 −0 test/slash-cwd.ts
  88. +0 −36 test/stat.js
  89. +256 −0 test/stream.ts
  90. +0 −46 test/sync-cb-throw.js
  91. +15 −0 test/url-cwd.ts
  92. +79 −0 test/windows-paths-fs.ts
  93. +52 −0 test/windows-paths-no-escape.ts
  94. +0 −12 test/zz-cleanup.js
  95. +16 −0 tsconfig-base.json
  96. +8 −0 tsconfig-esm.json
  97. +8 −0 tsconfig.json
  98. +5 −0 typedoc.json
3 changes: 0 additions & 3 deletions .github/.github/FUNDING.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI

on: [push, pull_request]

jobs:
build:
strategy:
matrix:
node-version: [16.x, 18.x, 19.x]
platform:
- os: ubuntu-latest
shell: bash
- os: macos-latest
shell: bash
- os: windows-latest
shell: bash
- os: windows-latest
shell: powershell
fail-fast: false

runs-on: ${{ matrix.platform.os }}
defaults:
run:
shell: ${{ matrix.platform.shell }}

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Use Nodejs ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm install

- name: Run Tests
run: npm test -- -c -t0 --statements=80 --branches=80 --functions=80 --lines=80
13 changes: 13 additions & 0 deletions .github/workflows/commit-if-modified.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
git config --global user.email "$1"
shift
git config --global user.name "$1"
shift
message="$1"
shift
if [ $(git status --porcelain "$@" | egrep '^ M' | wc -l) -gt 0 ]; then
git add "$@"
git commit -m "$message"
git push || git pull --rebase
git push
fi
15 changes: 15 additions & 0 deletions .github/workflows/copyright-year.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
dir=${1:-$PWD}
dates=($(git log --date=format:%Y --pretty=format:'%ad' --reverse | sort | uniq))
if [ "${#dates[@]}" -eq 1 ]; then
datestr="${dates}"
else
datestr="${dates}-${dates[${#dates[@]}-1]}"
fi

stripDate='s/^((.*)Copyright\b(.*?))((?:,\s*)?(([0-9]{4}\s*-\s*[0-9]{4})|(([0-9]{4},\s*)*[0-9]{4})))(?:,)?\s*(.*)\n$/$1$9\n/g'
addDate='s/^.*Copyright(?:\s*\(c\))? /Copyright \(c\) '$datestr' /g'
for l in $dir/LICENSE*; do
perl -pi -e "$stripDate" $l
perl -pi -e "$addDate" $l
done
37 changes: 37 additions & 0 deletions .github/workflows/isaacs-makework.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "various tidying up tasks to silence nagging"

on:
push:
branches:
- main
workflow_dispatch:

jobs:
makework:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v2.1.4
with:
node-version: 16.x
- name: put repo in package.json
run: node .github/workflows/package-json-repo.js
- name: check in package.json if modified
run: |
bash -x .github/workflows/commit-if-modified.sh \
"package-json-repo-bot@example.com" \
"package.json Repo Bot" \
"chore: add repo to package.json" \
package.json package-lock.json
- name: put all dates in license copyright line
run: bash .github/workflows/copyright-year.sh
- name: check in licenses if modified
run: |
bash .github/workflows/commit-if-modified.sh \
"license-year-bot@example.com" \
"License Year Bot" \
"chore: add copyright year to license" \
LICENSE*
16 changes: 16 additions & 0 deletions .github/workflows/package-json-repo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env node

const pf = require.resolve(`${process.cwd()}/package.json`)
const pj = require(pf)

if (!pj.repository && process.env.GITHUB_REPOSITORY) {
const fs = require('fs')
const server = process.env.GITHUB_SERVER_URL || 'https://github.com'
const repo = `${server}/${process.env.GITHUB_REPOSITORY}`
pj.repository = repo
const json = fs.readFileSync(pf, 'utf8')
const match = json.match(/^\s*\{[\r\n]+([ \t]*)"/)
const indent = match[1]
const output = JSON.stringify(pj, null, indent || 2) + '\n'
fs.writeFileSync(pf, output)
}
50 changes: 50 additions & 0 deletions .github/workflows/typedoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Nodejs ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install dependencies
run: npm install
- name: Generate typedocs
run: npm run typedoc

- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
17 changes: 11 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
.*.swp
node_modules/*
v8.log
profile.txt
nyc_output/
.nyc_output/
coverage/
/old
/*.tap
/dist
/node_modules
/v8.log
/profile.txt
/nyc_output
/.nyc_output
/coverage
/test/fixtures
/bench-working-dir
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/node_modules
/example
/.github
/dist
.env
/tap-snapshots
/.nyc_output
/coverage
/benchmark
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

6 changes: 1 addition & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
Please consider signing [the neveragain.tech pledge](http://neveragain.tech/)

## Contributing

Any change to behavior (including bugfixes) must come with a test.

Patches that fail tests or reduce performance will be rejected.

```
```sh
# to run tests
npm test

8 changes: 1 addition & 7 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The ISC License

Copyright (c) Isaac Z. Schlueter and Contributors
Copyright (c) 2009-2023 Isaac Z. Schlueter and Contributors

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -13,9 +13,3 @@ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

## Glob Logo

Glob's logo created by Tanya Brassie <http://tanyabrassie.com/>, licensed
under a Creative Commons Attribution-ShareAlike 4.0 International License
https://creativecommons.org/licenses/by-sa/4.0/
Loading