[Pkg-javascript-commits] [Git][js-team/node-rimraf][master] Fix glob8

Bastien Roucariès (@rouca) gitlab at salsa.debian.org
Sun Nov 2 18:09:14 GMT 2025



Bastien Roucariès pushed to branch master at Debian JavaScript Maintainers / node-rimraf


Commits:
dd0dbae3 by Bastien Roucariès at 2025-11-02T19:08:39+01:00
Fix glob8

- - - - -


1 changed file:

- debian/patches/0003-Port-to-glob-8.patch


Changes:

=====================================
debian/patches/0003-Port-to-glob-8.patch
=====================================
@@ -4,9 +4,9 @@ Subject: Port to glob at 8
 
 forwarded: not-needed
 ---
- package.json | 2 +-
- rimraf.js    | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
+ package.json |  2 +-
+ rimraf.js    | 10 ++++++++--
+ 2 files changed, 9 insertions(+), 3 deletions(-)
 
 diff --git a/package.json b/package.json
 index 1bf8d5e..da84d70 100644
@@ -22,15 +22,32 @@ index 1bf8d5e..da84d70 100644
    "files": [
      "LICENSE",
 diff --git a/rimraf.js b/rimraf.js
-index 34da417..b39676d 100644
+index 34da417..d6d254a 100644
 --- a/rimraf.js
 +++ b/rimraf.js
-@@ -110,7 +110,7 @@ const rimraf = (p, options, cb) => {
+@@ -2,8 +2,11 @@ const assert = require("assert")
+ const path = require("path")
+ const fs = require("fs")
+ let glob = undefined
++let globversion = undefined
+ try {
+   glob = require("glob")
++  const { version } = require('glob/package.json');
++  globversion = version
+ } catch (_err) {
+   // treat glob as optional.
+ }
+@@ -109,8 +112,11 @@ const rimraf = (p, options, cb) => {
+   options.lstat(p, (er, stat) => {
      if (!er)
        return afterGlob(null, [p])
- 
+-
 -    glob(p, options.glob, afterGlob)
-+    glob(p, options.glob).then(files => afterGlob(null, files)).catch(err => afterGlob(err, null));
++    if (parseInt(globversion.split('.')[0], 10) < 9) {
++         glob(p, options.glob, afterGlob);
++    } else {
++        glob(p, options.glob).then(files => afterGlob(null, files)).catch(err => afterGlob(err, null));
++    }
    })
  
  }



View it on GitLab: https://salsa.debian.org/js-team/node-rimraf/-/commit/dd0dbae390ca36b78aede02b62ef1d629429912b

-- 
View it on GitLab: https://salsa.debian.org/js-team/node-rimraf/-/commit/dd0dbae390ca36b78aede02b62ef1d629429912b
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-commits/attachments/20251102/9f5e8b0b/attachment-0001.htm>


More information about the Pkg-javascript-commits mailing list