File: 0005-Fix-for-glob10.patch

package info (click to toggle)
node-ast-types 0.16.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,348 kB
  • sloc: javascript: 7,563; sh: 20; makefile: 7
file content (61 lines) | stat: -rw-r--r-- 1,622 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
From: =?utf-8?q?Bastien_Roucari=C3=A8s?= <rouca@debian.org>
Date: Thu, 4 Dec 2025 11:06:36 +0100
Subject: Fix for glob10

forwarded: not-needed
---
 src/test/typescript.ts | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/src/test/typescript.ts b/src/test/typescript.ts
index e037068..0194fc2 100644
--- a/src/test/typescript.ts
+++ b/src/test/typescript.ts
@@ -29,10 +29,8 @@ const babelTSFixturesDir =
 
 glob("**/input.ts", {
   cwd: babelTSFixturesDir,
-}, (error, files) => {
-  if (error) {
-    throw error;
-  }
+}).catch((error) => { throw error; })
+  .then((files) => {
 
   if (files.length < 10) {
     throw new Error(`Unexpectedly few **/input.ts files matched (${
@@ -43,10 +41,6 @@ glob("**/input.ts", {
   }
 
   describe("Whole-program validation for Babel TypeScript tests", function () {
-    if (error) {
-      throw error;
-    }
-
     files.forEach((tsPath: any) => {
       const fullPath = path.join(babelTSFixturesDir, tsPath);
       const pkgRootRelPath = path.relative(pkgRootDir, fullPath);
@@ -182,10 +176,8 @@ var tsCompilerDir = path.resolve(
 
 glob("**/*.ts", {
   cwd: tsCompilerDir,
-}, (error, files) => {
-  if (error) {
-    throw error;
-  }
+}).catch((error) => { throw error; })
+  .then((files) => {
 
   if (files.length < 10) {
     throw new Error(`Unexpectedly few **/*.ts files matched (${
@@ -196,10 +188,6 @@ glob("**/*.ts", {
   }
 
   describe("Whole-program validation for TypeScript codebase", function () {
-    if (error) {
-      throw error;
-    }
-
     this.timeout(20000);
 
     files.forEach((tsPath: string) => {