marko 5.35.2 → 5.35.4
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.
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// This is a noop in Marko 5 and should eventually be removed.
|
|
2
|
+
// In Marko 5 `browser-refresh` is automatically enabled if you use the require hook, and
|
|
3
|
+
// browser refresh is running. We still expose this API to simplify the upgrade process from
|
|
4
|
+
// Marko 4 to Marko 5.
|
|
5
|
+
exports.enable = () => {};
|
|
@@ -53,18 +53,6 @@ function register(type, def) {
|
|
|
53
53
|
function addPendingDef(def, type, meta, host, runtimeId) {
|
|
54
54
|
if (!pendingDefs) {
|
|
55
55
|
pendingDefs = {};
|
|
56
|
-
|
|
57
|
-
// eslint-disable-next-line no-constant-condition
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
56
|
}
|
|
69
57
|
(pendingDefs[type] = pendingDefs[type] || []).push([
|
|
70
58
|
def,
|
|
@@ -499,7 +487,6 @@ function initServerRendered(renderedComponents, host) {
|
|
|
499
487
|
var typeName = meta._B_[componentDef[1]];
|
|
500
488
|
|
|
501
489
|
return registered[typeName] ||
|
|
502
|
-
document.readyState === "complete" ||
|
|
503
490
|
req.e(typeName) ?
|
|
504
491
|
tryHydrateComponent(componentDef, meta, host, runtimeId) :
|
|
505
492
|
addPendingDef(componentDef, typeName, meta, host, runtimeId);
|
package/docs/marko-5-upgrade.md
CHANGED
|
@@ -28,7 +28,7 @@ Run your application and tests to ensure your project is in a working state. The
|
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
30
|
# Update Marko, and related ecosystem dependencies
|
|
31
|
-
npx -y
|
|
31
|
+
npx -y npm-check-updates -u \
|
|
32
32
|
marko \
|
|
33
33
|
`# for webpack projects` \
|
|
34
34
|
@marko/webpack \
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "marko",
|
|
3
|
-
"version": "5.35.
|
|
3
|
+
"version": "5.35.4",
|
|
4
4
|
"description": "UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"front-end",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"build": "babel ./src --out-dir ./dist --extensions .js --copy-files --config-file ../../babel.config.js --env-name=production"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@marko/compiler": "^5.37.
|
|
69
|
-
"@marko/translator-default": "^6.0.
|
|
68
|
+
"@marko/compiler": "^5.37.3",
|
|
69
|
+
"@marko/translator-default": "^6.0.4",
|
|
70
70
|
"app-module-path": "^2.2.0",
|
|
71
71
|
"argly": "^1.2.0",
|
|
72
72
|
"browser-refresh-client": "1.1.4",
|
|
@@ -53,18 +53,6 @@ function register(type, def) {
|
|
|
53
53
|
function addPendingDef(def, type, meta, host, runtimeId) {
|
|
54
54
|
if (!pendingDefs) {
|
|
55
55
|
pendingDefs = {};
|
|
56
|
-
|
|
57
|
-
// eslint-disable-next-line no-constant-condition
|
|
58
|
-
if ("MARKO_DEBUG") {
|
|
59
|
-
document.addEventListener("load", function () {
|
|
60
|
-
var pendingComponentIds = Object.keys(pendingDefs);
|
|
61
|
-
if (pendingComponentIds.length) {
|
|
62
|
-
complain(
|
|
63
|
-
"Marko templates were never loaded for: " + pendingComponentIds
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
56
|
}
|
|
69
57
|
(pendingDefs[type] = pendingDefs[type] || []).push([
|
|
70
58
|
def,
|
|
@@ -499,7 +487,6 @@ function initServerRendered(renderedComponents, host) {
|
|
|
499
487
|
var typeName = meta.___types[componentDef[1]];
|
|
500
488
|
|
|
501
489
|
return registered[typeName] ||
|
|
502
|
-
document.readyState === "complete" ||
|
|
503
490
|
req.e(typeName)
|
|
504
491
|
? tryHydrateComponent(componentDef, meta, host, runtimeId)
|
|
505
492
|
: addPendingDef(componentDef, typeName, meta, host, runtimeId);
|