Skip to content

Commit

Permalink
Support Svelte 5 in version tests
Browse files Browse the repository at this point in the history
  • Loading branch information
EMH333 committed May 18, 2024
1 parent abd6895 commit 1cd93da
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions test/versionTests/entry5.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { mount } from "svelte";
import Test from "./index.svelte";

mount(Test, {
target: document.body,
});
4 changes: 2 additions & 2 deletions test/versionTests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if (!fs.existsSync("./dist/")) {
//build the application
esbuild
.build({
entryPoints: ["./entry.js"],
entryPoints: [Number(svelteVersion.at(0)) >= 5 ? "./entry5.js" : "./entry.js"],
mainFields: ["svelte", "browser", "module", "main"],
conditions: ["svelte", "browser"],
target: "es2016",
Expand All @@ -23,7 +23,7 @@ esbuild
minify: false, //so the resulting code is easier to understand
bundle: true,
splitting: true,
sourcemap: "inline",
sourcemap: "external",
plugins: [sveltePlugin()],
})
.then((results) => {
Expand Down
2 changes: 1 addition & 1 deletion test/versionTests/versionTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cp ../../dist/index.js .
npm init -y || exit

# array of versions
ESBUILD_VERSIONS=("0.9.6" "0.16.17" "0.18.10" "0.19.2")
ESBUILD_VERSIONS=("0.9.6" "0.16.17" "0.18.10" "0.19.2" "0.21.3")
SVELTE_VERSIONS=("3.43.0" "3.59.2" "4.0.0" "5.0.0-next.127")

# loop through versions
Expand Down

0 comments on commit 1cd93da

Please sign in to comment.