Skip to content

Commit

Permalink
import invalidate is now full reload
Browse files Browse the repository at this point in the history
  • Loading branch information
dmail committed Jan 13, 2025
1 parent 93008f3 commit 07b198e
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions dist/js/autoreload.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ This could be due to syntax errors or importing non-existent modules (see errors
},
);
};
reloader.changes.value.forEach((reloadMessage) => {
for (const reloadMessage of reloader.changes.value) {
if (reloadMessage.type === "hot") {
const promise = addToHotQueue(() => {
return applyHotReload(reloadMessage);
Expand All @@ -95,7 +95,7 @@ This could be due to syntax errors or importing non-existent modules (see errors
} else {
setReloadMessagePromise(reloadMessage, Promise.resolve());
}
});
}
},
};

Expand Down
1 change: 1 addition & 0 deletions dist/js/import_meta_hot.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const createImportMetaHot = (importMetaUrl) => {
});
},
invalidate: () => {
window.location.reload(true);
addUrlMeta(url, {
invalidated: true,
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsenv/core",
"version": "39.9.3",
"version": "39.9.4",
"description": "Tool to develop, test and build js projects",
"license": "MIT",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion packages/related/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsenv/cli",
"version": "0.2.33",
"version": "0.2.34",
"description": "Command Line Interface for jsenv",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/related/cli/template-node-package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"devDependencies": {
"@jsenv/assert": "4.4.2",
"@jsenv/core": "39.9.3",
"@jsenv/core": "39.9.4",
"@jsenv/eslint-config-relax": "1.3.9",
"@jsenv/test": "3.5.34",
"eslint": "9.17.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/related/cli/template-web-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@babel/plugin-syntax-import-attributes": "7.26.0",
"@jsenv/custom-elements-redefine": "0.0.1",
"@jsenv/assert": "4.4.2",
"@jsenv/core": "39.9.3",
"@jsenv/core": "39.9.4",
"@jsenv/plugin-bundling": "2.7.21",
"@jsenv/plugin-minification": "1.5.12",
"@jsenv/eslint-config-relax": "1.3.9",
Expand Down
2 changes: 1 addition & 1 deletion packages/related/cli/template-web-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@babel/plugin-syntax-import-attributes": "7.26.0",
"@babel/plugin-transform-react-jsx": "7.25.9",
"@jsenv/assert": "4.4.2",
"@jsenv/core": "39.9.3",
"@jsenv/core": "39.9.4",
"@jsenv/plugin-preact": "1.6.33",
"@jsenv/plugin-bundling": "2.7.21",
"@jsenv/plugin-minification": "1.5.12",
Expand Down
2 changes: 1 addition & 1 deletion packages/related/cli/template-web-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@babel/plugin-syntax-import-attributes": "7.26.0",
"@babel/plugin-transform-react-jsx": "7.25.9",
"@jsenv/assert": "4.4.2",
"@jsenv/core": "39.9.3",
"@jsenv/core": "39.9.4",
"@jsenv/plugin-react": "1.5.55",
"@jsenv/plugin-bundling": "2.7.21",
"@jsenv/plugin-minification": "1.5.12",
Expand Down
2 changes: 1 addition & 1 deletion packages/related/cli/template-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"devDependencies": {
"@babel/plugin-syntax-import-attributes": "7.26.0",
"@jsenv/assert": "4.4.2",
"@jsenv/core": "39.9.3",
"@jsenv/core": "39.9.4",
"@jsenv/eslint-config-relax": "1.3.9",
"@jsenv/plugin-bundling": "2.7.21",
"@jsenv/plugin-minification": "1.5.12",
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/autoreload/client/autoreload.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ This could be due to syntax errors or importing non-existent modules (see errors
},
);
};
reloader.changes.value.forEach((reloadMessage) => {
for (const reloadMessage of reloader.changes.value) {
if (reloadMessage.type === "hot") {
const promise = addToHotQueue(() => {
return applyHotReload(reloadMessage);
Expand All @@ -108,7 +108,7 @@ This could be due to syntax errors or importing non-existent modules (see errors
} else {
setReloadMessagePromise(reloadMessage, Promise.resolve());
}
});
}
},
};

Expand Down
1 change: 1 addition & 0 deletions src/plugins/import_meta_hot/client/import_meta_hot.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export const createImportMetaHot = (importMetaUrl) => {
});
},
invalidate: () => {
window.location.reload(true);
addUrlMeta(url, {
invalidated: true,
});
Expand Down

0 comments on commit 07b198e

Please sign in to comment.