vike 0.4.197-commit-1251ed9 → 0.4.198-commit-081c85f

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.
@@ -22,6 +22,9 @@ function fileEnv() {
22
22
  return;
23
23
  if (skip(id))
24
24
  return;
25
+ // For `.vue` files: https://github.com/vikejs/vike/issues/1912#issuecomment-2394981475
26
+ if (id.endsWith('?direct'))
27
+ id = id.slice(0, -1 * '?direct'.length);
25
28
  const moduleInfo = viteDevServer.moduleGraph.getModuleById(id);
26
29
  (0, utils_js_1.assert)(moduleInfo);
27
30
  const importers = Array.from(moduleInfo.importers)
@@ -185,7 +185,7 @@ function logErrorDebugNote() {
185
185
  return;
186
186
  store.errorDebugNoteAlreadyShown = true;
187
187
  }
188
- const msg = picocolors_1.default.dim((0, utils_js_1.formatHintLog)("Error isn't helpful? See https://vike.dev/errors#verbose"));
188
+ const msg = picocolors_1.default.dim((0, utils_js_1.formatHintLog)("Error isn't helpful? See https://vike.dev/debug#verbose-errors"));
189
189
  (0, log_js_1.logDirectly)(msg, 'error');
190
190
  }
191
191
  function getCategory(httpRequestId = null) {
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PROJECT_VERSION = void 0;
4
4
  // Automatically updated by @brillout/release-me
5
- exports.PROJECT_VERSION = '0.4.197-commit-1251ed9';
5
+ exports.PROJECT_VERSION = '0.4.198-commit-081c85f';
@@ -1,10 +1,8 @@
1
1
  export { setPageContextCurrent };
2
2
  export { getPageContextCurrent };
3
- export { getPageContextCurrentAsync };
4
3
  import type { PageContextExports } from '../../shared/getPageFiles.js';
5
4
  type PageContextCurrent = PageContextExports & {
6
5
  urlPathname: string;
7
6
  };
8
7
  declare function getPageContextCurrent(): null | PageContextCurrent;
9
- declare function getPageContextCurrentAsync(): Promise<PageContextCurrent>;
10
8
  declare function setPageContextCurrent(pageContextCurrent: PageContextCurrent): void;
@@ -1,25 +1,13 @@
1
1
  export { setPageContextCurrent };
2
2
  export { getPageContextCurrent };
3
- export { getPageContextCurrentAsync };
4
- import { genPromise, getGlobalObject } from './utils.js';
5
- const globalObject = getGlobalObject('getPageContextCurrent.ts', (() => {
6
- const { promise: pageContextCurrentPromise, resolve: pageContextCurrentPromiseResolve } = genPromise();
7
- return {
8
- pageContextCurrent: null,
9
- pageContextCurrentPromise,
10
- pageContextCurrentPromiseResolve
11
- };
12
- })());
3
+ import { getGlobalObject } from './utils.js';
4
+ const globalObject = getGlobalObject('getPageContextCurrent.ts', {
5
+ pageContextCurrent: null
6
+ });
13
7
  function getPageContextCurrent() {
14
8
  const { pageContextCurrent } = globalObject;
15
9
  return pageContextCurrent;
16
10
  }
17
- // TODO/pageContext-prefetch: I think we can remove this? Once we use Vike's default if pageContextCurrent isn't defined yet.
18
- async function getPageContextCurrentAsync() {
19
- const pageContextCurrent = await globalObject.pageContextCurrentPromise;
20
- return pageContextCurrent;
21
- }
22
11
  function setPageContextCurrent(pageContextCurrent) {
23
12
  globalObject.pageContextCurrent = pageContextCurrent;
24
- globalObject.pageContextCurrentPromiseResolve(pageContextCurrent);
25
13
  }
@@ -170,7 +170,6 @@ function addLinkPrefetchHandlers_apply() {
170
170
  entries.forEach((entry) => {
171
171
  if (entry.isIntersecting) {
172
172
  prefetchOnEvent(linkTag, 'viewport');
173
- observer.disconnect();
174
173
  }
175
174
  });
176
175
  });
@@ -17,6 +17,9 @@ function fileEnv() {
17
17
  return;
18
18
  if (skip(id))
19
19
  return;
20
+ // For `.vue` files: https://github.com/vikejs/vike/issues/1912#issuecomment-2394981475
21
+ if (id.endsWith('?direct'))
22
+ id = id.slice(0, -1 * '?direct'.length);
20
23
  const moduleInfo = viteDevServer.moduleGraph.getModuleById(id);
21
24
  assert(moduleInfo);
22
25
  const importers = Array.from(moduleInfo.importers)
@@ -180,7 +180,7 @@ function logErrorDebugNote() {
180
180
  return;
181
181
  store.errorDebugNoteAlreadyShown = true;
182
182
  }
183
- const msg = pc.dim(formatHintLog("Error isn't helpful? See https://vike.dev/errors#verbose"));
183
+ const msg = pc.dim(formatHintLog("Error isn't helpful? See https://vike.dev/debug#verbose-errors"));
184
184
  logDirectly(msg, 'error');
185
185
  }
186
186
  function getCategory(httpRequestId = null) {
@@ -105,7 +105,7 @@ type PageContextBuiltInCommon<Data> = {
105
105
  /**
106
106
  * Error that occured while rendering.
107
107
  *
108
- * https://vike.dev/errors
108
+ * https://vike.dev/error-tracking
109
109
  */
110
110
  errorWhileRendering?: unknown;
111
111
  /**
@@ -1 +1 @@
1
- export declare const PROJECT_VERSION: "0.4.197-commit-1251ed9";
1
+ export declare const PROJECT_VERSION: "0.4.198-commit-081c85f";
@@ -1,2 +1,2 @@
1
1
  // Automatically updated by @brillout/release-me
2
- export const PROJECT_VERSION = '0.4.197-commit-1251ed9';
2
+ export const PROJECT_VERSION = '0.4.198-commit-081c85f';
@@ -1,4 +1,4 @@
1
1
  export declare const projectInfo: {
2
2
  projectName: "Vike";
3
- projectVersion: "0.4.197-commit-1251ed9";
3
+ projectVersion: "0.4.198-commit-081c85f";
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vike",
3
- "version": "0.4.197-commit-1251ed9",
3
+ "version": "0.4.198-commit-081c85f",
4
4
  "repository": "https://github.com/vikejs/vike",
5
5
  "exports": {
6
6
  "./server": {