elm-pages 3.0.0-beta.37 → 3.0.0-beta.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -75,7 +75,7 @@ console.elmlog = (str) => logs.push(str + "\n");
75
75
  const { Elm } = require("./Runner.elm.js");
76
76
 
77
77
  // Start the Elm app
78
- const flags = { initialSeed: 203591880, fuzzRuns: 100, filter: null };
78
+ const flags = { initialSeed: 3708163480, fuzzRuns: 100, filter: null };
79
79
  const app = Elm.Runner.init({ flags: flags });
80
80
 
81
81
  // Record the timing at which we received the last "runTest" message
@@ -82,7 +82,7 @@ const verbosity = 0;
82
82
  // Create a long lived reporter worker
83
83
  const { Elm } = require("./Reporter.elm.js");
84
84
  const flags = {
85
- initialSeed: 203591880,
85
+ initialSeed: 3708163480,
86
86
  fuzzRuns: 100,
87
87
  mode: "consoleColor",
88
88
  verbosity: verbosity,
@@ -75,7 +75,7 @@ console.elmlog = (str) => logs.push(str + "\n");
75
75
  const { Elm } = require("./Runner.elm.js");
76
76
 
77
77
  // Start the Elm app
78
- const flags = { initialSeed: 2714937880, fuzzRuns: 100, filter: null };
78
+ const flags = { initialSeed: 1574590184, fuzzRuns: 100, filter: null };
79
79
  const app = Elm.Runner.init({ flags: flags });
80
80
 
81
81
  // Record the timing at which we received the last "runTest" message
@@ -82,7 +82,7 @@ const verbosity = 0;
82
82
  // Create a long lived reporter worker
83
83
  const { Elm } = require("./Reporter.elm.js");
84
84
  const flags = {
85
- initialSeed: 2714937880,
85
+ initialSeed: 1574590184,
86
86
  fuzzRuns: 100,
87
87
  mode: "consoleColor",
88
88
  verbosity: verbosity,
@@ -67,6 +67,14 @@ async function ensureRequiredExecutables() {
67
67
  }
68
68
 
69
69
  export async function run(options) {
70
+ console.warn = function (...messages) {
71
+ // This is a temporary hack to avoid this warning. elm-pages manages compiling the Elm code without Vite's involvement, so it is external to Vite.
72
+ // There is a pending issue to allow having external scripts in Vite, once this issue is fixed we can remove this hack:
73
+ // https://github.com/vitejs/vite/issues/3533
74
+ if (!messages[0]?.startsWith(`<script src="/elm.js">`)) {
75
+ console.info(...messages);
76
+ }
77
+ };
70
78
  try {
71
79
  await ensureRequiredDirs();
72
80
  await ensureRequiredExecutables();
@@ -114,11 +122,9 @@ export async function run(options) {
114
122
  withoutExtension
115
123
  );
116
124
  const assetManifestPath = path.join(process.cwd(), "dist/manifest.json");
117
- const manifest = (
118
- await import(assetManifestPath, {
119
- assert: { type: "json" },
120
- })
121
- ).default;
125
+ const manifest = JSON.parse(
126
+ await fsPromises.readFile(assetManifestPath, { encoding: "utf-8" })
127
+ );
122
128
  const indexTemplate = await fsPromises.readFile(
123
129
  "dist/elm-stuff/elm-pages/index.html",
124
130
  "utf-8"
@@ -1,3 +1,3 @@
1
1
  export const compatibilityKey = 15;
2
2
 
3
- export const packageVersion = "3.0.0-beta.37";
3
+ export const packageVersion = "3.0.0-beta.38";
@@ -36,6 +36,12 @@ const __dirname = path.dirname(__filename);
36
36
  * @param {{ port: string; base: string; https: boolean; debug: boolean; }} options
37
37
  */
38
38
  export async function start(options) {
39
+ console.error = function (...messages) {
40
+ if (!messages[0]?.startsWith("Failed to load url")) {
41
+ console.info(...messages);
42
+ }
43
+ };
44
+
39
45
  let threadReadyQueue = [];
40
46
  let pool = [];
41
47
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "elm-pages",
3
3
  "type": "module",
4
- "version": "3.0.0-beta.37",
4
+ "version": "3.0.0-beta.38",
5
5
  "homepage": "https://elm-pages.com",
6
6
  "moduleResolution": "node",
7
7
  "description": "Type-safe static sites, written in pure elm with your own custom elm-markup syntax.",