@jay-framework/plugin-validator 0.24.3 → 0.24.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.
Files changed (2) hide show
  1. package/dist/index.js +3 -2
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -2015,11 +2015,12 @@ async function validatePackageJson(context, result) {
2015
2015
  }
2016
2016
  if (!packageJson.exports["./client"]) {
2017
2017
  const interactivity = detectInteractivePhase(context);
2018
- const needsClient = context.manifest.contexts !== void 0 || interactivity === true;
2018
+ const providesRoute = Array.isArray(context.manifest.routes) && context.manifest.routes.length > 0;
2019
+ const needsClient = context.manifest.contexts !== void 0 || interactivity === true || providesRoute;
2019
2020
  if (needsClient) {
2020
2021
  result.errors.push({
2021
2022
  type: "export-mismatch",
2022
- message: 'package.json exports missing "./client" entry point, but the plugin ' + (context.manifest.contexts !== void 0 ? "declares contexts (client-side by definition)" : "provides an interactive component"),
2023
+ message: 'package.json exports missing "./client" entry point, but the plugin ' + (context.manifest.contexts !== void 0 ? "declares contexts (client-side by definition)" : providesRoute && interactivity !== true ? "provides a route (hydrated in the browser)" : "provides an interactive component"),
2023
2024
  location: packageJsonPath,
2024
2025
  suggestion: 'Add "./client": "./dist/index.client.js" to exports. The client bundle provides components for hydration and client-side contexts. Build with: vite build (client) + vite build --ssr (server)'
2025
2026
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jay-framework/plugin-validator",
3
- "version": "0.24.3",
3
+ "version": "0.24.4",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "Validation tool for Jay Stack plugins",
@@ -25,14 +25,14 @@
25
25
  "test:watch": "vitest"
26
26
  },
27
27
  "dependencies": {
28
- "@jay-framework/compiler-jay-html": "^0.24.3",
29
- "@jay-framework/compiler-shared": "^0.24.3",
30
- "@jay-framework/typescript-bridge": "^0.24.3",
28
+ "@jay-framework/compiler-jay-html": "^0.24.4",
29
+ "@jay-framework/compiler-shared": "^0.24.4",
30
+ "@jay-framework/typescript-bridge": "^0.24.4",
31
31
  "chalk": "^4.1.2",
32
32
  "yaml": "^2.3.4"
33
33
  },
34
34
  "devDependencies": {
35
- "@jay-framework/dev-environment": "^0.24.3",
35
+ "@jay-framework/dev-environment": "^0.24.4",
36
36
  "@types/node": "^22.15.21",
37
37
  "rimraf": "^5.0.5",
38
38
  "tsup": "^8.0.1",