olum-compiler 1.9.2 → 1.9.3

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.
package/lib/changes.txt CHANGED
@@ -0,0 +1,8 @@
1
+ change /tmp/olum-dev-test-4y7l2M/src/page.html
2
+ change /tmp/olum-dev-test-4y7l2M/public/main.css
3
+ addDir /tmp/olum-dev-test-4y7l2M/src/blog
4
+ add /tmp/olum-dev-test-4y7l2M/src/blog/page.html
5
+ unlink /tmp/olum-dev-test-4y7l2M/src/blog/page.html
6
+ unlinkDir /tmp/olum-dev-test-4y7l2M/src/blog
7
+ change /tmp/olum-dev-test-4y7l2M/src/util.js
8
+ change /tmp/olum-dev-test-4y7l2M/src/page.html
package/lib/parser.js CHANGED
@@ -152,7 +152,7 @@ const parser = (str, counter, filePath) => {
152
152
  return entries.join(",");
153
153
  }
154
154
 
155
- js = js.replace(/params\(/, `params("${filePath}",location.pathname`);
155
+ js = js.replace(/params\(/g, `params("${filePath}",location.pathname`);
156
156
 
157
157
  js = js.replace(/props\(\s*\)/g, "props(_storeKey)");
158
158
  html = html.replace(/props\(\s*\)/g, "props(_storeKey)");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "olum-compiler",
3
- "version": "1.9.2",
3
+ "version": "1.9.3",
4
4
  "description": "A module for compiling/bundling olumjs projects",
5
5
  "main": "bin/index.js",
6
6
  "bin": {
@@ -238,6 +238,41 @@ check(
238
238
  (out) => /onclick\|a=[^&]*&b=/.test(tmpl(out)) && parses(out),
239
239
  );
240
240
 
241
+ check(
242
+ "several on* attributes on ONE element all survive, joined by OLUM_EVT_SEP",
243
+ comp(
244
+ `<input oninput="draft($event)" onblur="save()" />`,
245
+ `const draft = (e) => 0; const save = () => 0;`,
246
+ ),
247
+ (out) => {
248
+ const t = tmpl(out);
249
+ return (
250
+ /oninput\|draft=/.test(t) &&
251
+ /onblur\|save=/.test(t) &&
252
+ t.split("OLUM_EVT_SEP").length === 2 &&
253
+ parses(out)
254
+ );
255
+ },
256
+ );
257
+
258
+ check(
259
+ "a third event on the same element is appended too (2 separators)",
260
+ comp(
261
+ `<div onmousedown="down()" onmousemove="move()" onmouseup="up()"></div>`,
262
+ `const down = () => 0; const move = () => 0; const up = () => 0;`,
263
+ ),
264
+ (out) => {
265
+ const t = tmpl(out);
266
+ return (
267
+ /onmousedown\|down=/.test(t) &&
268
+ /onmousemove\|move=/.test(t) &&
269
+ /onmouseup\|up=/.test(t) &&
270
+ t.split("OLUM_EVT_SEP").length === 3 &&
271
+ parses(out)
272
+ );
273
+ },
274
+ );
275
+
241
276
  check(
242
277
  "$event is forwarded to the handler",
243
278
  comp(`<input oninput="setVal($event)" />`, `const setVal = (e) => 0;`),
@@ -1279,7 +1314,7 @@ if (failed) {
1279
1314
  console.log("");
1280
1315
  }
1281
1316
 
1282
- const EXPECTED_CHECKS = 108;
1317
+ const EXPECTED_CHECKS = 110;
1283
1318
  const total = passed + failed;
1284
1319
  if (total !== EXPECTED_CHECKS) {
1285
1320
  console.log(