From 331e1c102d0a5eda21b7c7941e7b14d3fd6917d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Harrtell?= Date: Sun, 29 Mar 2026 14:13:34 +0200 Subject: [PATCH 1/5] Use pnpm at TypeScriptTest.py --- tests/ts/TypeScriptTest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ts/TypeScriptTest.py b/tests/ts/TypeScriptTest.py index 9c1765f092..1fbf743ffb 100755 --- a/tests/ts/TypeScriptTest.py +++ b/tests/ts/TypeScriptTest.py @@ -70,7 +70,7 @@ def esbuild(input, output): print("Removing node_modules/ directory...") shutil.rmtree(Path(tests_path, "node_modules"), ignore_errors=True) -check_call(["npm", "install", "--silent"]) +check_call(["pnpm", "i"]) flatc( options=[ From afda46770985f8d62096463607a5e24bb64d2b15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Harrtell?= Date: Sun, 29 Mar 2026 14:16:31 +0200 Subject: [PATCH 2/5] Migrate lockfile --- tests/ts/pnpm-lock.yaml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/ts/pnpm-lock.yaml b/tests/ts/pnpm-lock.yaml index 730e4d7b22..7082ba2311 100644 --- a/tests/ts/pnpm-lock.yaml +++ b/tests/ts/pnpm-lock.yaml @@ -1,10 +1,13 @@ -lockfileVersion: '6.0' +lockfileVersion: '9.0' settings: autoInstallPeers: true excludeLinksFromLockfile: false -dependencies: - flatbuffers: - specifier: ../../ - version: link:../.. +importers: + + .: + dependencies: + flatbuffers: + specifier: ../../ + version: link:../.. From 1d2163a834b04f1942abbb095892368a07547841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Harrtell?= Date: Mon, 30 Mar 2026 12:25:16 +0200 Subject: [PATCH 3/5] Use root dep bins --- tests/ts/TypeScriptTest.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/ts/TypeScriptTest.py b/tests/ts/TypeScriptTest.py index 1fbf743ffb..7bf4317f0b 100755 --- a/tests/ts/TypeScriptTest.py +++ b/tests/ts/TypeScriptTest.py @@ -62,16 +62,10 @@ def flatc( # Execute esbuild with the specified parameters def esbuild(input, output): - cmd = ["esbuild", input, "--outfile=" + output] + cmd = ["../../node_modules/.bin/esbuild", input, "--outfile=" + output] cmd += ["--format=cjs", "--bundle", "--external:flatbuffers"] check_call(cmd) - -print("Removing node_modules/ directory...") -shutil.rmtree(Path(tests_path, "node_modules"), ignore_errors=True) - -check_call(["pnpm", "i"]) - flatc( options=[ "--ts", @@ -228,12 +222,12 @@ def esbuild(input, output): ) print("Running TypeScript Compiler...") -check_call(["tsc"]) +check_call(["../../node_modules/.bin/tsc"]) print( "Running TypeScript Compiler in old node resolution mode for" " no_import_ext..." ) -check_call(["tsc", "-p", "./tsconfig.node.json"]) +check_call(["../../node_modules/.bin/tsc", "-p", "./tsconfig.node.json"]) NODE_CMD = ["node"] From 400859d666d51d6b79e9d06fd9a6efdc8bec63ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Harrtell?= Date: Mon, 30 Mar 2026 12:53:14 +0200 Subject: [PATCH 4/5] Fixup --- .github/workflows/build.yml | 2 -- pnpm-lock.yaml | 6 ++++++ pnpm-workspace.yaml | 2 ++ tests/ts/package.json | 2 +- tests/ts/pnpm-lock.yaml | 13 ------------- 5 files changed, 9 insertions(+), 16 deletions(-) create mode 100644 pnpm-workspace.yaml delete mode 100644 tests/ts/pnpm-lock.yaml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c50c6af2f3..df4eec1c3c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -544,8 +544,6 @@ jobs: - name: flatc # FIXME: make test script not rely on flatc run: cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DFLATBUFFERS_BUILD_TESTS=OFF -DFLATBUFFERS_INSTALL=OFF -DFLATBUFFERS_BUILD_FLATLIB=OFF -DFLATBUFFERS_BUILD_FLATHASH=OFF . && make -j - - name: pnpm - run: npm install -g pnpm esbuild - name: deps run: pnpm i - name: compile diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9d5791710b..315c14cebf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -33,6 +33,12 @@ importers: specifier: ^8.34.1 version: 8.34.1(eslint@9.29.0)(typescript@5.8.3) + tests/ts: + dependencies: + flatbuffers: + specifier: workspace:* + version: link:../.. + packages: '@esbuild/aix-ppc64@0.25.5': diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000000..340c44e007 --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +packages: + - tests/ts diff --git a/tests/ts/package.json b/tests/ts/package.json index 1639cf831e..6afc785443 100644 --- a/tests/ts/package.json +++ b/tests/ts/package.json @@ -1,6 +1,6 @@ { "type": "module", "dependencies": { - "flatbuffers": "../../" + "flatbuffers": "workspace:*" } } diff --git a/tests/ts/pnpm-lock.yaml b/tests/ts/pnpm-lock.yaml deleted file mode 100644 index 7082ba2311..0000000000 --- a/tests/ts/pnpm-lock.yaml +++ /dev/null @@ -1,13 +0,0 @@ -lockfileVersion: '9.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -importers: - - .: - dependencies: - flatbuffers: - specifier: ../../ - version: link:../.. From d30ce6c51e01461027f43719b8c55d169f60da18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Harrtell?= Date: Mon, 30 Mar 2026 12:55:50 +0200 Subject: [PATCH 5/5] Keep install of pnpm --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index df4eec1c3c..c7cae714c7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -544,6 +544,8 @@ jobs: - name: flatc # FIXME: make test script not rely on flatc run: cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DFLATBUFFERS_BUILD_TESTS=OFF -DFLATBUFFERS_INSTALL=OFF -DFLATBUFFERS_BUILD_FLATLIB=OFF -DFLATBUFFERS_BUILD_FLATHASH=OFF . && make -j + - name: pnpm + run: npm install -g pnpm - name: deps run: pnpm i - name: compile