From e827cb126f3251c7316dd6f198dd4aaf6286e81e Mon Sep 17 00:00:00 2001 From: Thomas Wilkerling Date: Wed, 21 May 2025 15:52:15 +0200 Subject: [PATCH] fix github action --- test/async.js | 2 +- test/basic.js | 2 +- test/cache.js | 2 +- test/context.js | 2 +- test/debug.js | 2 +- test/document.js | 2 +- test/document.tag.js | 2 +- test/encoder.js | 2 +- test/highlight.js | 2 +- test/issues.js | 4 ++-- test/keystore.js | 2 +- test/persistent.clickhouse.js | 2 +- test/persistent.js | 2 +- test/persistent.mongo.js | 2 +- test/persistent.postgres.js | 2 +- test/persistent.redis.js | 2 +- test/persistent.sqlite.js | 2 +- test/resolver.js | 2 +- test/scoring.js | 2 +- test/serialize.js | 2 +- test/tokenize.js | 2 +- test/worker.js | 2 +- 22 files changed, 23 insertions(+), 23 deletions(-) diff --git a/test/async.js b/test/async.js index 2083fbe..46d6b02 100644 --- a/test/async.js +++ b/test/async.js @@ -1,5 +1,5 @@ global.self = global; -const env = process.argv[process.argv.length - 1]; +const env = process.argv[process.argv.length - 1] === "--exit" ? "" : process.argv[process.argv.length - 1]; import { expect } from "chai"; console.log("--RELEASE-------------"); console.log(env ? "dist/" + env + ".js" : "src/bundle.js") diff --git a/test/basic.js b/test/basic.js index 9076b2d..acd3ded 100644 --- a/test/basic.js +++ b/test/basic.js @@ -1,5 +1,5 @@ global.self = global; -const env = process.argv[process.argv.length - 1]; +const env = process.argv[process.argv.length - 1] === "--exit" ? "" : process.argv[process.argv.length - 1]; import { expect } from "chai"; let FlexSearch = await import(env ? "../dist/" + env + ".js" : "../src/bundle.js"); if(FlexSearch.default) FlexSearch = FlexSearch.default; diff --git a/test/cache.js b/test/cache.js index c7e7d62..74db1be 100644 --- a/test/cache.js +++ b/test/cache.js @@ -1,5 +1,5 @@ global.self = global; -const env = process.argv[process.argv.length - 1]; +const env = process.argv[process.argv.length - 1] === "--exit" ? "" : process.argv[process.argv.length - 1]; import { expect } from "chai"; let FlexSearch = await import(env ? "../dist/" + env + ".js" : "../src/bundle.js"); if(FlexSearch.default) FlexSearch = FlexSearch.default; diff --git a/test/context.js b/test/context.js index be358f5..59bafd8 100644 --- a/test/context.js +++ b/test/context.js @@ -1,5 +1,5 @@ global.self = global; -const env = process.argv[process.argv.length - 1]; +const env = process.argv[process.argv.length - 1] === "--exit" ? "" : process.argv[process.argv.length - 1]; import { expect } from "chai"; let FlexSearch = await import(env ? "../dist/" + env + ".js" : "../src/bundle.js"); if(FlexSearch.default) FlexSearch = FlexSearch.default; diff --git a/test/debug.js b/test/debug.js index ee98756..1542c88 100644 --- a/test/debug.js +++ b/test/debug.js @@ -1,5 +1,5 @@ global.self = global; -const env = process.argv[process.argv.length - 1]; +const env = process.argv[process.argv.length - 1] === "--exit" ? "" : process.argv[process.argv.length - 1]; import { expect } from "chai"; let FlexSearch = await import(env ? "../dist/" + env + ".js" : "../src/bundle.js"); if(FlexSearch.default) FlexSearch = FlexSearch.default; diff --git a/test/document.js b/test/document.js index 3ccc15d..7597f88 100644 --- a/test/document.js +++ b/test/document.js @@ -1,5 +1,5 @@ global.self = global; -const env = process.argv[process.argv.length - 1]; +const env = process.argv[process.argv.length - 1] === "--exit" ? "" : process.argv[process.argv.length - 1]; import { expect } from "chai"; let FlexSearch = await import(env ? "../dist/" + env + ".js" : "../src/bundle.js"); if(FlexSearch.default) FlexSearch = FlexSearch.default; diff --git a/test/document.tag.js b/test/document.tag.js index d8b3dc9..3e376ae 100644 --- a/test/document.tag.js +++ b/test/document.tag.js @@ -1,5 +1,5 @@ global.self = global; -const env = process.argv[process.argv.length - 1]; +const env = process.argv[process.argv.length - 1] === "--exit" ? "" : process.argv[process.argv.length - 1]; import { expect } from "chai"; let FlexSearch = await import(env ? "../dist/" + env + ".js" : "../src/bundle.js"); if(FlexSearch.default) FlexSearch = FlexSearch.default; diff --git a/test/encoder.js b/test/encoder.js index 96e5b44..1273e9a 100644 --- a/test/encoder.js +++ b/test/encoder.js @@ -1,5 +1,5 @@ global.self = global; -const env = process.argv[process.argv.length - 1]; +const env = process.argv[process.argv.length - 1] === "--exit" ? "" : process.argv[process.argv.length - 1]; import { expect } from "chai"; let FlexSearch = await import(env ? "../dist/" + env + ".js" : "../src/bundle.js"); if(FlexSearch.default) FlexSearch = FlexSearch.default; diff --git a/test/highlight.js b/test/highlight.js index 6796d29..d80d3db 100644 --- a/test/highlight.js +++ b/test/highlight.js @@ -1,5 +1,5 @@ global.self = global; -const env = process.argv[process.argv.length - 1]; +const env = process.argv[process.argv.length - 1] === "--exit" ? "" : process.argv[process.argv.length - 1]; import { expect } from "chai"; let FlexSearch = await import(env ? "../dist/" + env + ".js" : "../src/bundle.js"); if(FlexSearch.default) FlexSearch = FlexSearch.default; diff --git a/test/issues.js b/test/issues.js index 5d970d4..4e193b6 100644 --- a/test/issues.js +++ b/test/issues.js @@ -1,5 +1,5 @@ global.self = global; -const env = process.argv[process.argv.length - 1]; +const env = process.argv[process.argv.length - 1] === "--exit" ? "" : process.argv[process.argv.length - 1]; import { expect } from "chai"; let FlexSearch = await import(env ? "../dist/" + env + ".js" : "../src/bundle.js"); if(FlexSearch.default) FlexSearch = FlexSearch.default; @@ -9,7 +9,7 @@ const build_light = env && env.includes(".light"); const build_compact = env && env.includes(".compact"); const build_esm = !env || env.startsWith("module"); const Charset = _Charset || (await import("../src/charset.js")).default; -const EnglishPreset = await import("../src/lang/en.js"); +const EnglishPreset = (await import("../src/lang/en.js")).default; describe("Github Issues", function(){ diff --git a/test/keystore.js b/test/keystore.js index 0b50f6d..f94be18 100644 --- a/test/keystore.js +++ b/test/keystore.js @@ -1,5 +1,5 @@ global.self = global; -const env = process.argv[process.argv.length - 1]; +const env = process.argv[process.argv.length - 1] === "--exit" ? "" : process.argv[process.argv.length - 1]; import { expect } from "chai"; let FlexSearch = await import(env ? "../dist/" + env + ".js" : "../src/bundle.js"); if(FlexSearch.default) FlexSearch = FlexSearch.default; diff --git a/test/persistent.clickhouse.js b/test/persistent.clickhouse.js index b68ce51..194d1b0 100644 --- a/test/persistent.clickhouse.js +++ b/test/persistent.clickhouse.js @@ -1,5 +1,5 @@ global.self = global; -const env = process.argv[process.argv.length - 1]; +const env = process.argv[process.argv.length - 1] === "--exit" ? "" : process.argv[process.argv.length - 1]; import { expect } from "chai"; let FlexSearch = await import(env ? "../dist/" + env + ".js" : "../src/bundle.js"); if(FlexSearch.default) FlexSearch = FlexSearch.default; diff --git a/test/persistent.js b/test/persistent.js index 042343b..0cd89fb 100644 --- a/test/persistent.js +++ b/test/persistent.js @@ -1,5 +1,5 @@ global.self = global; -const env = process.argv[process.argv.length - 1]; +const env = process.argv[process.argv.length - 1] === "--exit" ? "" : process.argv[process.argv.length - 1]; import { expect } from "chai"; let FlexSearch = await import(env ? "../dist/" + env + ".js" : "../src/bundle.js"); if(FlexSearch.default) FlexSearch = FlexSearch.default; diff --git a/test/persistent.mongo.js b/test/persistent.mongo.js index e76b223..43d1e9b 100644 --- a/test/persistent.mongo.js +++ b/test/persistent.mongo.js @@ -1,5 +1,5 @@ global.self = global; -const env = process.argv[process.argv.length - 1]; +const env = process.argv[process.argv.length - 1] === "--exit" ? "" : process.argv[process.argv.length - 1]; import { expect } from "chai"; let FlexSearch = await import(env ? "../dist/" + env + ".js" : "../src/bundle.js"); if(FlexSearch.default) FlexSearch = FlexSearch.default; diff --git a/test/persistent.postgres.js b/test/persistent.postgres.js index 7026ef7..1c417c2 100644 --- a/test/persistent.postgres.js +++ b/test/persistent.postgres.js @@ -1,5 +1,5 @@ global.self = global; -const env = process.argv[process.argv.length - 1]; +const env = process.argv[process.argv.length - 1] === "--exit" ? "" : process.argv[process.argv.length - 1]; import { expect } from "chai"; let FlexSearch = await import(env ? "../dist/" + env + ".js" : "../src/bundle.js"); if(FlexSearch.default) FlexSearch = FlexSearch.default; diff --git a/test/persistent.redis.js b/test/persistent.redis.js index e884177..4bacde2 100644 --- a/test/persistent.redis.js +++ b/test/persistent.redis.js @@ -1,5 +1,5 @@ global.self = global; -const env = process.argv[process.argv.length - 1]; +const env = process.argv[process.argv.length - 1] === "--exit" ? "" : process.argv[process.argv.length - 1]; import { expect } from "chai"; let FlexSearch = await import(env ? "../dist/" + env + ".js" : "../src/bundle.js"); if(FlexSearch.default) FlexSearch = FlexSearch.default; diff --git a/test/persistent.sqlite.js b/test/persistent.sqlite.js index 2b9c08b..946e022 100644 --- a/test/persistent.sqlite.js +++ b/test/persistent.sqlite.js @@ -1,5 +1,5 @@ global.self = global; -const env = process.argv[process.argv.length - 1]; +const env = process.argv[process.argv.length - 1] === "--exit" ? "" : process.argv[process.argv.length - 1]; import { expect } from "chai"; let FlexSearch = await import(env ? "../dist/" + env + ".js" : "../src/bundle.js"); if(FlexSearch.default) FlexSearch = FlexSearch.default; diff --git a/test/resolver.js b/test/resolver.js index ceb38e1..0ee44e3 100644 --- a/test/resolver.js +++ b/test/resolver.js @@ -1,5 +1,5 @@ global.self = global; -const env = process.argv[process.argv.length - 1]; +const env = process.argv[process.argv.length - 1] === "--exit" ? "" : process.argv[process.argv.length - 1]; import { expect } from "chai"; let FlexSearch = await import(env ? "../dist/" + env + ".js" : "../src/bundle.js"); if(FlexSearch.default) FlexSearch = FlexSearch.default; diff --git a/test/scoring.js b/test/scoring.js index 7c5ec0f..e73ccd3 100644 --- a/test/scoring.js +++ b/test/scoring.js @@ -1,5 +1,5 @@ global.self = global; -const env = process.argv[process.argv.length - 1]; +const env = process.argv[process.argv.length - 1] === "--exit" ? "" : process.argv[process.argv.length - 1]; import { expect } from "chai"; let FlexSearch = await import(env ? "../dist/" + env + ".js" : "../src/bundle.js"); if(FlexSearch.default) FlexSearch = FlexSearch.default; diff --git a/test/serialize.js b/test/serialize.js index 50ee766..9c665f5 100644 --- a/test/serialize.js +++ b/test/serialize.js @@ -1,5 +1,5 @@ global.self = global; -const env = process.argv[process.argv.length - 1]; +const env = process.argv[process.argv.length - 1] === "--exit" ? "" : process.argv[process.argv.length - 1]; import { expect } from "chai"; let FlexSearch = await import(env ? "../dist/" + env + ".js" : "../src/bundle.js"); if(FlexSearch.default) FlexSearch = FlexSearch.default; diff --git a/test/tokenize.js b/test/tokenize.js index 68df434..927ffbf 100644 --- a/test/tokenize.js +++ b/test/tokenize.js @@ -1,5 +1,5 @@ global.self = global; -const env = process.argv[process.argv.length - 1]; +const env = process.argv[process.argv.length - 1] === "--exit" ? "" : process.argv[process.argv.length - 1]; import { expect } from "chai"; let FlexSearch = await import(env ? "../dist/" + env + ".js" : "../src/bundle.js"); if(FlexSearch.default) FlexSearch = FlexSearch.default; diff --git a/test/worker.js b/test/worker.js index 749be44..58c5d4b 100644 --- a/test/worker.js +++ b/test/worker.js @@ -1,5 +1,5 @@ global.self = global; -const env = process.argv[process.argv.length - 1]; +const env = process.argv[process.argv.length - 1] === "--exit" ? "" : process.argv[process.argv.length - 1]; import { expect } from "chai"; let FlexSearch = await import(env ? "../dist/" + env + ".js" : "../src/bundle.js"); if(FlexSearch.default) FlexSearch = FlexSearch.default;