Skip to content

Commit 3f6537e

Browse files
authored
Fix/retrieval include paths correctly (#31)
1 parent 204d5a6 commit 3f6537e

File tree

8 files changed

+1679
-483
lines changed

8 files changed

+1679
-483
lines changed

.github/workflows/ci-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
submodules: true
1515
- uses: actions/setup-node@v3
1616
with:
17-
node-version: 20
17+
node-version: 22
1818

1919
- run: npm ci
2020
- run: sudo apt-get install libgtest-dev

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
- uses: actions/setup-node@v3
1717
with:
18-
node-version: 20
18+
node-version: 22
1919

2020
- run: npm ci
2121

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
/build*
77
/transform/listFunctions.mjs
8+
/transform/tsconfig.tsbuildinfo
89

910
/coverage
1011
/coverage-ts

package-lock.json

Lines changed: 1669 additions & 469 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"chalk": "^5.2.0",
3030
"commander": "^8.3.0",
3131
"cross-spawn": "^7.0.3",
32-
"fast-glob": "^3.3.3",
32+
"glob": "^11.0.0",
3333
"ignore": "^7.0.3",
3434
"fs-extra": "^11.1.1",
3535
"semver": "^7.5.3",
@@ -41,10 +41,9 @@
4141
"devDependencies": {
4242
"@schleifner/eslint-config-base": "^2.0.0",
4343
"@schleifner/prettier-config": "^1.0.0",
44-
"@types/cross-spawn": "^6.0.2",
45-
"@types/fs-extra": "^9.0.13",
46-
"@types/jest": "^29.5.2",
47-
"@types/node": "^20.9.1",
44+
"@types/fs-extra": "^11.0.4",
45+
"@types/jest": "^29.5.0",
46+
"@types/node": "^22.0.0",
4847
"assemblyscript-prettier": "^3.0.1",
4948
"cross-env": "^7.0.3",
5049
"jest": "^29.5.0",

src/utils/pathResolver.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import assert from "node:assert";
22
import fs from "fs-extra";
3+
import { glob } from "glob";
34
import { dirname, join, relative, resolve } from "node:path";
4-
import fastGlob from "fast-glob";
55

66
export function splitCommand(cmdline: string): { cmd: string; argv: string[] } {
77
const res = new Array<string>();
@@ -79,10 +79,7 @@ export function findRoot(filePaths: string[]): string {
7979

8080
export function getIncludeFiles(includePatterns: string[], filter: (path: string) => boolean): string[] {
8181
const flatPatterns = includePatterns.flatMap((pattern) => {
82-
// Append '/*' if the pattern is a folder name
83-
const adjustedPattern = fs.statSync(pattern).isDirectory() ? `${pattern}/*` : pattern;
84-
const res = fastGlob.sync(adjustedPattern);
85-
return res;
82+
return glob.sync(pattern);
8683
});
8784
const files = flatPatterns.flatMap((flatPattern) => {
8885
const st = fs.statSync(flatPattern);

tests/ts/test/utils/wasmparser.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ test("parseImportFunctionInfo", () => {
4949
},
5050
];
5151

52-
expect(parseImportFunctionInfo(arrayBuffer as ArrayBuffer)).toEqual(expectedInfo); // Pass ArrayBuffer
52+
expect(parseImportFunctionInfo(arrayBuffer)).toEqual(expectedInfo); // Pass ArrayBuffer
5353
});

transform/tsconfig.tsbuildinfo

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)