forked from BigfootDev/flatbuffers
[TS] Fixup TS test run at CI (#9004)
This commit is contained in:
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -545,7 +545,7 @@ jobs:
|
|||||||
# FIXME: make test script not rely on 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
|
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
|
- name: pnpm
|
||||||
run: npm install -g pnpm esbuild
|
run: npm install -g pnpm
|
||||||
- name: deps
|
- name: deps
|
||||||
run: pnpm i
|
run: pnpm i
|
||||||
- name: compile
|
- name: compile
|
||||||
|
|||||||
6
pnpm-lock.yaml
generated
6
pnpm-lock.yaml
generated
@@ -33,6 +33,12 @@ importers:
|
|||||||
specifier: ^8.34.1
|
specifier: ^8.34.1
|
||||||
version: 8.34.1(eslint@9.29.0)(typescript@5.8.3)
|
version: 8.34.1(eslint@9.29.0)(typescript@5.8.3)
|
||||||
|
|
||||||
|
tests/ts:
|
||||||
|
dependencies:
|
||||||
|
flatbuffers:
|
||||||
|
specifier: workspace:*
|
||||||
|
version: link:../..
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
|
|
||||||
'@esbuild/aix-ppc64@0.25.5':
|
'@esbuild/aix-ppc64@0.25.5':
|
||||||
|
|||||||
2
pnpm-workspace.yaml
Normal file
2
pnpm-workspace.yaml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
packages:
|
||||||
|
- tests/ts
|
||||||
@@ -62,16 +62,10 @@ def flatc(
|
|||||||
|
|
||||||
# Execute esbuild with the specified parameters
|
# Execute esbuild with the specified parameters
|
||||||
def esbuild(input, output):
|
def esbuild(input, output):
|
||||||
cmd = ["esbuild", input, "--outfile=" + output]
|
cmd = ["../../node_modules/.bin/esbuild", input, "--outfile=" + output]
|
||||||
cmd += ["--format=cjs", "--bundle", "--external:flatbuffers"]
|
cmd += ["--format=cjs", "--bundle", "--external:flatbuffers"]
|
||||||
check_call(cmd)
|
check_call(cmd)
|
||||||
|
|
||||||
|
|
||||||
print("Removing node_modules/ directory...")
|
|
||||||
shutil.rmtree(Path(tests_path, "node_modules"), ignore_errors=True)
|
|
||||||
|
|
||||||
check_call(["npm", "install", "--silent"])
|
|
||||||
|
|
||||||
flatc(
|
flatc(
|
||||||
options=[
|
options=[
|
||||||
"--ts",
|
"--ts",
|
||||||
@@ -228,12 +222,12 @@ flatc(
|
|||||||
)
|
)
|
||||||
|
|
||||||
print("Running TypeScript Compiler...")
|
print("Running TypeScript Compiler...")
|
||||||
check_call(["tsc"])
|
check_call(["../../node_modules/.bin/tsc"])
|
||||||
print(
|
print(
|
||||||
"Running TypeScript Compiler in old node resolution mode for"
|
"Running TypeScript Compiler in old node resolution mode for"
|
||||||
" no_import_ext..."
|
" no_import_ext..."
|
||||||
)
|
)
|
||||||
check_call(["tsc", "-p", "./tsconfig.node.json"])
|
check_call(["../../node_modules/.bin/tsc", "-p", "./tsconfig.node.json"])
|
||||||
|
|
||||||
NODE_CMD = ["node"]
|
NODE_CMD = ["node"]
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"flatbuffers": "../../"
|
"flatbuffers": "workspace:*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
10
tests/ts/pnpm-lock.yaml
generated
10
tests/ts/pnpm-lock.yaml
generated
@@ -1,10 +0,0 @@
|
|||||||
lockfileVersion: '6.0'
|
|
||||||
|
|
||||||
settings:
|
|
||||||
autoInstallPeers: true
|
|
||||||
excludeLinksFromLockfile: false
|
|
||||||
|
|
||||||
dependencies:
|
|
||||||
flatbuffers:
|
|
||||||
specifier: ../../
|
|
||||||
version: link:../..
|
|
||||||
Reference in New Issue
Block a user