From 300297c2fb5e09ae4270e5fd4cb9faee75292e2a Mon Sep 17 00:00:00 2001 From: dmail Date: Mon, 30 Dec 2024 18:17:21 +0100 Subject: [PATCH] publish latest --- dist/jsenv_core.js | 9 ++++----- packages/related/cli/package.json | 2 +- packages/related/cli/template-node-package/package.json | 2 +- .../related/cli/template-web-components/package.json | 2 +- packages/related/cli/template-web-preact/package.json | 2 +- packages/related/cli/template-web-react/package.json | 2 +- packages/related/cli/template-web/package.json | 2 +- .../0_js_module/0_js_module.md | 2 +- .../1_js_module_fallback/1_js_module_fallback.md | 2 +- 9 files changed, 12 insertions(+), 13 deletions(-) diff --git a/dist/jsenv_core.js b/dist/jsenv_core.js index f7f3b1dfe5..482d6fd376 100644 --- a/dist/jsenv_core.js +++ b/dist/jsenv_core.js @@ -11510,7 +11510,6 @@ const watchSourceFiles = ( callback, { sourceFileConfig = {}, keepProcessAlive, cooldownBetweenFileEvents }, ) => { - let rootDirectoryUrl = sourceDirectoryUrl; // Project should use a dedicated directory (usually "src/") // passed to the dev server via "sourceDirectoryUrl" param // In that case all files inside the source directory should be watched @@ -11518,7 +11517,7 @@ const watchSourceFiles = ( // In that case source directory might contain files matching "node_modules/*" or ".git/*" // And jsenv should not consider these as source files and watch them (to not hurt performances) const watchPatterns = {}; - const addDirectoryToWatch = (watchPatterns, directoryUrlRelativeToRoot) => { + const addDirectoryToWatch = (directoryUrlRelativeToRoot) => { Object.assign(watchPatterns, { [`${directoryUrlRelativeToRoot}**/*`]: true, // by default watch everything inside the source directory // line below is commented until @jsenv/url-meta fixes the fact that is matches @@ -11575,20 +11574,20 @@ const watchSourceFiles = ( break npm_workspaces; } const { workspaces } = packageContent; - if (workspaces.length === 0) { + if (!workspaces || !Array.isArray(workspaces) || workspaces.length === 0) { break npm_workspaces; } for (const workspace of workspaces) { if (workspace.endsWith("*")) { const workspaceRelativeUrl = urlToRelativeUrl( new URL(workspace.slice(0, -1), packageDirectoryUrl), - rootDirectoryUrl, + packageDirectoryUrl, ); addDirectoryToWatch(workspaceRelativeUrl); } else { const workspaceRelativeUrl = urlToRelativeUrl( new URL(workspace, packageDirectoryUrl), - rootDirectoryUrl, + packageDirectoryUrl, ); addDirectoryToWatch(workspaceRelativeUrl); } diff --git a/packages/related/cli/package.json b/packages/related/cli/package.json index 4204765962..5bafe2a381 100644 --- a/packages/related/cli/package.json +++ b/packages/related/cli/package.json @@ -1,6 +1,6 @@ { "name": "@jsenv/cli", - "version": "0.2.30", + "version": "0.2.31", "description": "Command Line Interface for jsenv", "license": "MIT", "repository": { diff --git a/packages/related/cli/template-node-package/package.json b/packages/related/cli/template-node-package/package.json index 1d134f1874..baf9fcc6d4 100644 --- a/packages/related/cli/template-node-package/package.json +++ b/packages/related/cli/template-node-package/package.json @@ -12,7 +12,7 @@ }, "devDependencies": { "@jsenv/assert": "4.4.2", - "@jsenv/core": "39.9.1", + "@jsenv/core": "39.9.2", "@jsenv/eslint-config-relax": "1.3.9", "@jsenv/test": "3.5.34", "eslint": "9.17.0", diff --git a/packages/related/cli/template-web-components/package.json b/packages/related/cli/template-web-components/package.json index b7058208e2..ee995e6ae8 100644 --- a/packages/related/cli/template-web-components/package.json +++ b/packages/related/cli/template-web-components/package.json @@ -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.1", + "@jsenv/core": "39.9.2", "@jsenv/plugin-bundling": "2.7.21", "@jsenv/plugin-minification": "1.5.12", "@jsenv/eslint-config-relax": "1.3.9", diff --git a/packages/related/cli/template-web-preact/package.json b/packages/related/cli/template-web-preact/package.json index 3029c6a71d..b017990cb3 100644 --- a/packages/related/cli/template-web-preact/package.json +++ b/packages/related/cli/template-web-preact/package.json @@ -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.1", + "@jsenv/core": "39.9.2", "@jsenv/plugin-preact": "1.6.32", "@jsenv/plugin-bundling": "2.7.21", "@jsenv/plugin-minification": "1.5.12", diff --git a/packages/related/cli/template-web-react/package.json b/packages/related/cli/template-web-react/package.json index 32c8160c75..a8d7c32315 100644 --- a/packages/related/cli/template-web-react/package.json +++ b/packages/related/cli/template-web-react/package.json @@ -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.1", + "@jsenv/core": "39.9.2", "@jsenv/plugin-react": "1.5.54", "@jsenv/plugin-bundling": "2.7.21", "@jsenv/plugin-minification": "1.5.12", diff --git a/packages/related/cli/template-web/package.json b/packages/related/cli/template-web/package.json index f2d5e8f444..e8535d1c80 100644 --- a/packages/related/cli/template-web/package.json +++ b/packages/related/cli/template-web/package.json @@ -16,7 +16,7 @@ "devDependencies": { "@babel/plugin-syntax-import-attributes": "7.26.0", "@jsenv/assert": "4.4.2", - "@jsenv/core": "39.9.1", + "@jsenv/core": "39.9.2", "@jsenv/eslint-config-relax": "1.3.9", "@jsenv/plugin-bundling": "2.7.21", "@jsenv/plugin-minification": "1.5.12", diff --git a/packages/related/plugin-preact/tests/preact_and_redux/_preact_and_redux_build.test.mjs/0_js_module/0_js_module.md b/packages/related/plugin-preact/tests/preact_and_redux/_preact_and_redux_build.test.mjs/0_js_module/0_js_module.md index c3bdbc80a2..edf85c8c81 100644 --- a/packages/related/plugin-preact/tests/preact_and_redux/_preact_and_redux_build.test.mjs/0_js_module/0_js_module.md +++ b/packages/related/plugin-preact/tests/preact_and_redux/_preact_and_redux_build.test.mjs/0_js_module/0_js_module.md @@ -1,4 +1,4 @@ -# [0_js_module](../../preact_and_redux_build.test.mjs#L56) +# [0_js_module](../../preact_and_redux_build.test.mjs#L60) ```js run({ diff --git a/packages/related/plugin-preact/tests/preact_and_redux/_preact_and_redux_build.test.mjs/1_js_module_fallback/1_js_module_fallback.md b/packages/related/plugin-preact/tests/preact_and_redux/_preact_and_redux_build.test.mjs/1_js_module_fallback/1_js_module_fallback.md index 6049118e3c..07a5616440 100644 --- a/packages/related/plugin-preact/tests/preact_and_redux/_preact_and_redux_build.test.mjs/1_js_module_fallback/1_js_module_fallback.md +++ b/packages/related/plugin-preact/tests/preact_and_redux/_preact_and_redux_build.test.mjs/1_js_module_fallback/1_js_module_fallback.md @@ -1,4 +1,4 @@ -# [1_js_module_fallback](../../preact_and_redux_build.test.mjs#L71) +# [1_js_module_fallback](../../preact_and_redux_build.test.mjs#L75) ```js run({