elm-pages 3.0.0-beta.35 → 3.0.0-beta.36

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: 1263909344, fuzzRuns: 100, filter: null };
78
+ const flags = { initialSeed: 2714937880, 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: 1263909344,
85
+ initialSeed: 2714937880,
86
86
  fuzzRuns: 100,
87
87
  mode: "consoleColor",
88
88
  verbosity: verbosity,
@@ -505,7 +505,7 @@ function runElmMake(mode, options, elmEntrypointPath, outputPath, cwd) {
505
505
  /**
506
506
  * @param {string} filePath
507
507
  */
508
- async function runTerser(filePath) {
508
+ export async function runTerser(filePath) {
509
509
  console.log("Running terser");
510
510
  const minifiedElm = await terser.minify(
511
511
  (await fsPromises.readFile(filePath)).toString(),
@@ -19,6 +19,7 @@ import * as commander from "commander";
19
19
  import { runElmCodegenInstall } from "./elm-codegen.js";
20
20
  import { packageVersion } from "./compatibility-key.js";
21
21
  import { resolveInputPathOrModuleName } from "./resolve-elm-module.js";
22
+ import { runTerser } from "./build.js";
22
23
 
23
24
  const Argument = commander.Argument;
24
25
  const Option = commander.Option;
@@ -194,6 +195,7 @@ async function main() {
194
195
 
195
196
  let executableName = await lamderaOrElmFallback();
196
197
  await build.compileCliApp({ debug: options.debug, executableName });
198
+ // await runTerser(`${projectDirectory}/elm-stuff/elm-pages/elm.js`);
197
199
  fs.renameSync(
198
200
  `${projectDirectory}/elm-stuff/elm-pages/elm.js`,
199
201
  `${projectDirectory}/elm-stuff/elm-pages/elm.cjs`
@@ -245,9 +247,29 @@ await(async()=>{let{dirname:e}=await import("path"),{fileURLToPath:i}=await impo
245
247
  outfile: path.resolve(cwd, options.output),
246
248
  external: ["node:*", ...options.external],
247
249
  minify: true,
250
+ pure: [
251
+ "A2",
252
+ "A3",
253
+ "A4",
254
+ "A5",
255
+ "A6",
256
+ "A7",
257
+ "A8",
258
+ "A9",
259
+ "F2",
260
+ "F3",
261
+ "F3",
262
+ "F4",
263
+ "F5",
264
+ "F6",
265
+ "F7",
266
+ "F8",
267
+ "F9",
268
+ ],
248
269
  absWorkingDir: projectDirectory,
249
270
  banner: { js: `#!/usr/bin/env node\n\n${ESM_REQUIRE_SHIM}` },
250
271
  });
272
+ // await runTerser(path.resolve(cwd, options.output));
251
273
  } catch (error) {
252
274
  console.log(restoreColorSafe(error));
253
275
  process.exit(1);
@@ -1,3 +1,3 @@
1
1
  export const compatibilityKey = 15;
2
2
 
3
- export const packageVersion = "3.0.0-beta.35";
3
+ export const packageVersion = "3.0.0-beta.36";
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.35",
4
+ "version": "3.0.0-beta.36",
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.",
@@ -27,45 +27,45 @@
27
27
  "dependencies": {
28
28
  "busboy": "^1.6.0",
29
29
  "chokidar": "^3.5.3",
30
- "commander": "^10.0.0",
30
+ "commander": "^10.0.1",
31
31
  "connect": "^3.7.0",
32
32
  "cookie-signature": "^1.2.1",
33
33
  "cross-spawn": "7.0.3",
34
34
  "devcert": "^1.2.2",
35
35
  "elm-doc-preview": "^5.0.5",
36
36
  "elm-hot": "^1.1.6",
37
- "esbuild": "^0.17.12",
37
+ "esbuild": "^0.17.18",
38
38
  "fs-extra": "^11.1.1",
39
- "globby": "13.1.3",
39
+ "globby": "13.1.4",
40
40
  "gray-matter": "^4.0.3",
41
41
  "jsesc": "^3.0.2",
42
42
  "kleur": "^4.1.5",
43
- "make-fetch-happen": "^11.0.3",
44
- "memfs": "^3.4.13",
43
+ "make-fetch-happen": "^11.1.1",
44
+ "memfs": "^3.5.1",
45
45
  "micromatch": "^4.0.5",
46
46
  "serve-static": "^1.15.0",
47
- "terser": "^5.16.8",
48
- "vite": "^4.2.1",
49
- "which": "^3.0.0"
47
+ "terser": "^5.17.1",
48
+ "vite": "^4.3.5",
49
+ "which": "^3.0.1"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/cross-spawn": "^6.0.2",
53
53
  "@types/fs-extra": "^11.0.1",
54
54
  "@types/make-fetch-happen": "^10.0.1",
55
55
  "@types/micromatch": "^4.0.2",
56
- "@types/node": "^18.15.7",
56
+ "@types/node": "^20.1.0",
57
57
  "@types/serve-static": "^1.15.1",
58
- "cypress": "^12.8.1",
58
+ "cypress": "^12.11.0",
59
59
  "elm-codegen": "^0.3.0",
60
60
  "elm-optimize-level-2": "^0.3.5",
61
- "elm-review": "^2.10.1",
62
- "elm-test": "^0.19.1-revision11",
63
- "elm-tooling": "^1.13.1",
61
+ "elm-review": "^2.10.2",
62
+ "elm-test": "^0.19.1-revision12",
63
+ "elm-tooling": "^1.14.0",
64
64
  "elm-verify-examples": "^5.2.0",
65
65
  "elmi-to-json": "^1.4.3",
66
- "typescript": "^5.0.2",
67
- "vite": "^4.2.1",
68
- "vitest": "^0.29.7"
66
+ "typescript": "^5.0.4",
67
+ "vite": "^4.3.5",
68
+ "vitest": "^0.31.0"
69
69
  },
70
70
  "files": [
71
71
  "generator/src/",
@@ -25,10 +25,6 @@ request ({ name, body, expect } as params) =
25
25
  expect
26
26
  |> BackendTask.onError
27
27
  (\error ->
28
- let
29
- _ =
30
- Debug.log "BackendTask.Internal.Request" error
31
- in
32
28
  -- TODO avoid crash here, this should be handled as an internal error
33
29
  request params
34
30
  )
package/src/Stub.elm ADDED
@@ -0,0 +1,56 @@
1
+ module Stub exposing (..)
2
+
3
+ import Json.Decode as Decode
4
+ import Set exposing (Set)
5
+
6
+
7
+ type alias Id =
8
+ Int
9
+
10
+
11
+ type alias Model =
12
+ { nextId : Id
13
+ , sentIds : Set Id
14
+ }
15
+
16
+
17
+
18
+ --task : Task error value
19
+ --task =
20
+ -- Pending
21
+ -- (\id -> id)
22
+ -- (\value model -> ( model, Done (Ok value) ))
23
+
24
+
25
+ type Task error value
26
+ = Pending (Id -> Id) (Decode.Value -> Model -> ( Model, Task error value ))
27
+ | Done (Result error value)
28
+
29
+
30
+ map2 : (value1 -> value2 -> combined) -> Task error value1 -> Task error value2 -> Task error combined
31
+ map2 mapFn task1 task2 =
32
+ case ( task1, task2 ) of
33
+ ( Done resolved1, Done resolved2 ) ->
34
+ Debug.todo ""
35
+
36
+ ( Pending toId1 resolved1, Pending toId2 resolved2 ) ->
37
+ Pending
38
+ (\id ->
39
+ max (toId1 id) (toId2 id)
40
+ |> nextId
41
+ )
42
+ (\value id ->
43
+ Debug.todo ""
44
+ )
45
+
46
+ _ ->
47
+ Debug.todo ""
48
+
49
+
50
+ nextId id =
51
+ id + 1
52
+
53
+
54
+
55
+ --(Task toId1 resolve1)
56
+ --(Task toId2 resolve2)