vike 0.4.181-commit-ee50efa → 0.4.181-commit-2f53249

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.
@@ -31,6 +31,10 @@ function fileEnv() {
31
31
  order: 'pre',
32
32
  */
33
33
  async handler(source, importer, options) {
34
+ // It seems like Vite's scan doesn't apply transformers. (We need the `.telefunc.js` transformer to apply for our analysis to be correct.)
35
+ // @ts-expect-error Vite's type is wrong
36
+ if (options.scan)
37
+ return;
34
38
  // TODO/v1-release: remove
35
39
  if (extractAssetsPlugin_js_1.extractAssetsRE.test(source) || extractExportNamesPlugin_js_1.extractExportNamesRE.test(source))
36
40
  return;
@@ -58,14 +62,14 @@ function fileEnv() {
58
62
  const envActual = isServerSide ? 'server' : 'client';
59
63
  const envExpect = isServerSide ? 'client' : 'server';
60
64
  const suffix = `.${envExpect}.`;
61
- // Everything nonimal
65
+ // Everything is good
62
66
  if (!modulePath.includes(suffix))
63
67
  return;
64
68
  // Show error message
65
69
  let errMsg;
66
70
  let modulePathPretty = (0, getFilePath_js_1.getModuleFilePath)(moduleId, config);
67
71
  modulePathPretty = modulePathPretty.replaceAll(suffix, picocolors_1.default.bold(suffix));
68
- errMsg = `${(0, utils_js_1.capitalizeFirstLetter)(envExpect)}-only module ${modulePathPretty} (https://vike.dev/file-env) imported on the ${envActual}-side`;
72
+ errMsg = `${(0, utils_js_1.capitalizeFirstLetter)(envExpect)}-only file ${modulePathPretty} (https://vike.dev/file-env) imported on the ${envActual}-side`;
69
73
  if (importer &&
70
74
  // Don't show Vike's virtual modules that import the entry plus files such as /pages/about/+Page.js
71
75
  !importer.includes('virtual:vike:') &&
@@ -75,10 +79,7 @@ function fileEnv() {
75
79
  errMsg += ` by ${importerPath}`;
76
80
  }
77
81
  if (isDev) {
78
- errMsg += ' (building your app for production will be prevented and an error will be thrown)';
79
- }
80
- errMsg += '.';
81
- if (isDev) {
82
+ errMsg += ' and, therefore, Vike will prevent building your app for production.';
82
83
  (0, utils_js_1.assertWarning)(false, errMsg, { onlyOnce: true });
83
84
  }
84
85
  else {
@@ -42,3 +42,4 @@ __exportStar(require("../../utils/pLimit.js"), exports);
42
42
  __exportStar(require("../../utils/assertVersion.js"), exports);
43
43
  __exportStar(require("../../utils/assertPathFilesystemAbsolute.js"), exports);
44
44
  __exportStar(require("../../utils/isArray.js"), exports);
45
+ __exportStar(require("../../utils/PROJECT_VERSION.js"), exports);
@@ -72,3 +72,4 @@ __exportStar(require("../../utils/escapeHtml.js"), exports);
72
72
  __exportStar(require("../../utils/normalizeHeaders.js"), exports);
73
73
  __exportStar(require("../../utils/isVikeReactApp.js"), exports);
74
74
  __exportStar(require("../../utils/getPropAccessNotation.js"), exports);
75
+ __exportStar(require("../../utils/PROJECT_VERSION.js"), exports);
@@ -36,6 +36,5 @@ __exportStar(require("../../utils/isBrowser.js"), exports);
36
36
  __exportStar(require("../../utils/parseUrl.js"), exports);
37
37
  __exportStar(require("../../utils/checkType.js"), exports);
38
38
  __exportStar(require("../../utils/joinEnglish.js"), exports);
39
- __exportStar(require("../../utils/projectInfo.js"), exports);
40
39
  __exportStar(require("../../utils/truncateString.js"), exports);
41
40
  __exportStar(require("../../utils/isCallable.js"), exports);
@@ -34,7 +34,6 @@ __exportStar(require("../utils/isNotNullish.js"), exports);
34
34
  __exportStar(require("../utils/stringifyStringArray.js"), exports);
35
35
  __exportStar(require("../utils/filesystemPathHandling.js"), exports);
36
36
  __exportStar(require("../utils/cast.js"), exports);
37
- __exportStar(require("../utils/projectInfo.js"), exports);
38
37
  __exportStar(require("../utils/isPropertyGetter.js"), exports);
39
38
  __exportStar(require("../utils/isPromise.js"), exports);
40
39
  __exportStar(require("../utils/checkType.js"), exports);
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PROJECT_VERSION = void 0;
4
+ // Automatically updated by @brillout/release-me
5
+ exports.PROJECT_VERSION = '0.4.181-commit-2f53249';
@@ -1,10 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PROJECT_VERSION = exports.projectInfo = void 0;
4
- const PROJECT_VERSION = '0.4.181-commit-ee50efa';
5
- exports.PROJECT_VERSION = PROJECT_VERSION;
6
- const projectInfo = {
3
+ exports.projectInfo = void 0;
4
+ const PROJECT_VERSION_js_1 = require("./PROJECT_VERSION.js");
5
+ exports.projectInfo = {
7
6
  projectName: 'Vike',
8
- projectVersion: PROJECT_VERSION
7
+ projectVersion: PROJECT_VERSION_js_1.PROJECT_VERSION
9
8
  };
10
- exports.projectInfo = projectInfo;
@@ -13,7 +13,6 @@ export * from '../../utils/isReact.js';
13
13
  export * from '../../utils/isSameErrorMessage.js';
14
14
  export * from '../../utils/objectAssign.js';
15
15
  export * from '../../utils/parseUrl.js';
16
- export * from '../../utils/projectInfo.js';
17
16
  export * from '../../utils/PromiseType.js';
18
17
  export * from '../../utils/redirectHard.js';
19
18
  export * from '../../utils/sleep.js';
@@ -22,3 +21,4 @@ export * from '../../utils/throttle.js';
22
21
  export * from '../../utils/assertRoutingType.js';
23
22
  export * from '../../utils/onPageVisibilityChange.js';
24
23
  export * from '../../utils/augmentType.js';
24
+ export * from '../../utils/PROJECT_VERSION.js';
@@ -19,7 +19,6 @@ export * from '../../utils/isReact.js';
19
19
  export * from '../../utils/isSameErrorMessage.js';
20
20
  export * from '../../utils/objectAssign.js';
21
21
  export * from '../../utils/parseUrl.js';
22
- export * from '../../utils/projectInfo.js';
23
22
  export * from '../../utils/PromiseType.js';
24
23
  export * from '../../utils/redirectHard.js';
25
24
  export * from '../../utils/sleep.js';
@@ -28,3 +27,4 @@ export * from '../../utils/throttle.js';
28
27
  export * from '../../utils/assertRoutingType.js';
29
28
  export * from '../../utils/onPageVisibilityChange.js';
30
29
  export * from '../../utils/augmentType.js';
30
+ export * from '../../utils/PROJECT_VERSION.js';
@@ -9,7 +9,6 @@ export * from '../../utils/isCallable.js';
9
9
  export * from '../../utils/isObject.js';
10
10
  export * from '../../utils/objectAssign.js';
11
11
  export * from '../../utils/parseUrl.js';
12
- export * from '../../utils/projectInfo.js';
13
12
  export * from '../../utils/slice.js';
14
13
  export * from '../../utils/unique.js';
15
14
  export * from '../../utils/getPropAccessNotation.js';
@@ -13,7 +13,6 @@ export * from '../../utils/isCallable.js';
13
13
  export * from '../../utils/isObject.js';
14
14
  export * from '../../utils/objectAssign.js';
15
15
  export * from '../../utils/parseUrl.js';
16
- export * from '../../utils/projectInfo.js';
17
16
  export * from '../../utils/slice.js';
18
17
  export * from '../../utils/unique.js'; // Only used by Server Routing (not needed for Client Routing)
19
18
  export * from '../../utils/getPropAccessNotation.js';
@@ -26,6 +26,10 @@ function fileEnv() {
26
26
  order: 'pre',
27
27
  */
28
28
  async handler(source, importer, options) {
29
+ // It seems like Vite's scan doesn't apply transformers. (We need the `.telefunc.js` transformer to apply for our analysis to be correct.)
30
+ // @ts-expect-error Vite's type is wrong
31
+ if (options.scan)
32
+ return;
29
33
  // TODO/v1-release: remove
30
34
  if (extractAssetsRE.test(source) || extractExportNamesRE.test(source))
31
35
  return;
@@ -53,14 +57,14 @@ function fileEnv() {
53
57
  const envActual = isServerSide ? 'server' : 'client';
54
58
  const envExpect = isServerSide ? 'client' : 'server';
55
59
  const suffix = `.${envExpect}.`;
56
- // Everything nonimal
60
+ // Everything is good
57
61
  if (!modulePath.includes(suffix))
58
62
  return;
59
63
  // Show error message
60
64
  let errMsg;
61
65
  let modulePathPretty = getModuleFilePath(moduleId, config);
62
66
  modulePathPretty = modulePathPretty.replaceAll(suffix, pc.bold(suffix));
63
- errMsg = `${capitalizeFirstLetter(envExpect)}-only module ${modulePathPretty} (https://vike.dev/file-env) imported on the ${envActual}-side`;
67
+ errMsg = `${capitalizeFirstLetter(envExpect)}-only file ${modulePathPretty} (https://vike.dev/file-env) imported on the ${envActual}-side`;
64
68
  if (importer &&
65
69
  // Don't show Vike's virtual modules that import the entry plus files such as /pages/about/+Page.js
66
70
  !importer.includes('virtual:vike:') &&
@@ -70,10 +74,7 @@ function fileEnv() {
70
74
  errMsg += ` by ${importerPath}`;
71
75
  }
72
76
  if (isDev) {
73
- errMsg += ' (building your app for production will be prevented and an error will be thrown)';
74
- }
75
- errMsg += '.';
76
- if (isDev) {
77
+ errMsg += ' and, therefore, Vike will prevent building your app for production.';
77
78
  assertWarning(false, errMsg, { onlyOnce: true });
78
79
  }
79
80
  else {
@@ -20,3 +20,4 @@ export * from '../../utils/pLimit.js';
20
20
  export * from '../../utils/assertVersion.js';
21
21
  export * from '../../utils/assertPathFilesystemAbsolute.js';
22
22
  export * from '../../utils/isArray.js';
23
+ export * from '../../utils/PROJECT_VERSION.js';
@@ -26,3 +26,4 @@ export * from '../../utils/pLimit.js';
26
26
  export * from '../../utils/assertVersion.js';
27
27
  export * from '../../utils/assertPathFilesystemAbsolute.js';
28
28
  export * from '../../utils/isArray.js';
29
+ export * from '../../utils/PROJECT_VERSION.js';
@@ -53,3 +53,4 @@ export * from '../../utils/escapeHtml.js';
53
53
  export * from '../../utils/normalizeHeaders.js';
54
54
  export * from '../../utils/isVikeReactApp.js';
55
55
  export * from '../../utils/getPropAccessNotation.js';
56
+ export * from '../../utils/PROJECT_VERSION.js';
@@ -56,3 +56,4 @@ export * from '../../utils/escapeHtml.js';
56
56
  export * from '../../utils/normalizeHeaders.js';
57
57
  export * from '../../utils/isVikeReactApp.js';
58
58
  export * from '../../utils/getPropAccessNotation.js';
59
+ export * from '../../utils/PROJECT_VERSION.js';
@@ -11,6 +11,5 @@ export * from '../../utils/isBrowser.js';
11
11
  export * from '../../utils/parseUrl.js';
12
12
  export * from '../../utils/checkType.js';
13
13
  export * from '../../utils/joinEnglish.js';
14
- export * from '../../utils/projectInfo.js';
15
14
  export * from '../../utils/truncateString.js';
16
15
  export * from '../../utils/isCallable.js';
@@ -20,6 +20,5 @@ export * from '../../utils/isBrowser.js';
20
20
  export * from '../../utils/parseUrl.js';
21
21
  export * from '../../utils/checkType.js';
22
22
  export * from '../../utils/joinEnglish.js';
23
- export * from '../../utils/projectInfo.js';
24
23
  export * from '../../utils/truncateString.js';
25
24
  export * from '../../utils/isCallable.js';
@@ -14,7 +14,6 @@ export * from '../utils/isNotNullish.js';
14
14
  export * from '../utils/stringifyStringArray.js';
15
15
  export * from '../utils/filesystemPathHandling.js';
16
16
  export * from '../utils/cast.js';
17
- export * from '../utils/projectInfo.js';
18
17
  export * from '../utils/isPropertyGetter.js';
19
18
  export * from '../utils/isPromise.js';
20
19
  export * from '../utils/checkType.js';
@@ -18,7 +18,6 @@ export * from '../utils/isNotNullish.js';
18
18
  export * from '../utils/stringifyStringArray.js';
19
19
  export * from '../utils/filesystemPathHandling.js';
20
20
  export * from '../utils/cast.js';
21
- export * from '../utils/projectInfo.js';
22
21
  export * from '../utils/isPropertyGetter.js';
23
22
  export * from '../utils/isPromise.js';
24
23
  export * from '../utils/checkType.js';
@@ -0,0 +1 @@
1
+ export declare const PROJECT_VERSION: "0.4.181-commit-2f53249";
@@ -0,0 +1,2 @@
1
+ // Automatically updated by @brillout/release-me
2
+ export const PROJECT_VERSION = '0.4.181-commit-2f53249';
@@ -1,7 +1,4 @@
1
- export { projectInfo };
2
- export { PROJECT_VERSION };
3
- declare const PROJECT_VERSION: "0.4.181-commit-ee50efa";
4
- declare const projectInfo: {
1
+ export declare const projectInfo: {
5
2
  projectName: "Vike";
6
- projectVersion: "0.4.181-commit-ee50efa";
3
+ projectVersion: "0.4.181-commit-2f53249";
7
4
  };
@@ -1,7 +1,5 @@
1
- export { projectInfo };
2
- export { PROJECT_VERSION };
3
- const PROJECT_VERSION = '0.4.181-commit-ee50efa';
4
- const projectInfo = {
1
+ import { PROJECT_VERSION } from './PROJECT_VERSION.js';
2
+ export const projectInfo = {
5
3
  projectName: 'Vike',
6
4
  projectVersion: PROJECT_VERSION
7
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vike",
3
- "version": "0.4.181-commit-ee50efa",
3
+ "version": "0.4.181-commit-2f53249",
4
4
  "scripts": {
5
5
  "dev": "tsc --watch",
6
6
  "build": "rimraf dist/ && pnpm run build:esm && pnpm run build:cjs",
@@ -211,7 +211,7 @@
211
211
  "@brillout/import": "^0.2.3",
212
212
  "@brillout/json-serializer": "^0.5.8",
213
213
  "@brillout/picocolors": "^1.0.13",
214
- "@brillout/release-me": "^0.3.8",
214
+ "@brillout/release-me": "^0.4.0",
215
215
  "@brillout/require-shim": "^0.1.2",
216
216
  "@brillout/vite-plugin-server-entry": "^0.4.0",
217
217
  "@types/estree": "^1.0.5",
@@ -229,7 +229,7 @@
229
229
  "sirv": "^2.0.4",
230
230
  "source-map-support": "^0.5.21",
231
231
  "typescript": "^5.4.5",
232
- "vite": "npm:@brillout/vite@5.1.0-commit-3dc7abd"
232
+ "vite": "^5.3.5"
233
233
  },
234
234
  "engines": {
235
235
  "node": ">=18.0.0"