vike 0.4.229-commit-a19745d → 0.4.229-commit-2dbbc8d

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.
@@ -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.229-commit-a19745d';
5
+ exports.PROJECT_VERSION = '0.4.229-commit-2dbbc8d';
@@ -40,16 +40,17 @@ function requireResolve_(importPath, importerFilePath, { userRootDir, doNotHandl
40
40
  addExtraContextForNpmPackageImport(contexts, { importPath, userRootDir });
41
41
  let importPathResolvedFilePath;
42
42
  let failure;
43
- for (let context of contexts) {
43
+ for (const context of contexts) {
44
44
  (0, path_js_1.assertPosixPath)(context);
45
- context = ensureFilePrefix(context);
46
- const require_ = (0, node_module_1.createRequire)(context);
45
+ const contextNode = makeNodeFriendly(ensureFilePrefix(context));
46
+ let importPathNode = makeNodeFriendly(importPath);
47
+ const require_ = (0, node_module_1.createRequire)(contextNode);
47
48
  if (!doNotHandleFileExtension) {
48
49
  addFileExtensionsToRequireResolve(require_);
49
- importPath = removeFileExtention(importPath);
50
+ importPathNode = removeFileExtention(importPathNode);
50
51
  }
51
52
  try {
52
- importPathResolvedFilePath = require_.resolve(importPath);
53
+ importPathResolvedFilePath = require_.resolve(importPathNode);
53
54
  }
54
55
  catch (err) {
55
56
  if (debug.isActivated) {
@@ -111,7 +112,7 @@ function requireResolveVikeDistFile(vikeDistFile) {
111
112
  const vikeNodeModulesRoot = getVikeNodeModulesRoot();
112
113
  (0, path_js_1.assertPosixPath)(vikeNodeModulesRoot);
113
114
  (0, path_js_1.assertPosixPath)(vikeDistFile);
114
- const importPathResolvedFilePath = node_path_1.default.posix.join(vikeNodeModulesRoot, vikeDistFile);
115
+ const importPathResolvedFilePath = makeNodeFriendly(node_path_1.default.posix.join(vikeNodeModulesRoot, vikeDistFile));
115
116
  // Double check
116
117
  {
117
118
  const res = requireResolve_(importPathResolvedFilePath,
@@ -205,3 +206,7 @@ function getFilePrefix() {
205
206
  prefix += '/';
206
207
  return prefix;
207
208
  }
209
+ function makeNodeFriendly(filePath) {
210
+ // https://github.com/vikejs/vike/issues/2436#issuecomment-2849145340
211
+ return decodeURIComponent(filePath);
212
+ }
@@ -1 +1 @@
1
- export declare const PROJECT_VERSION: "0.4.229-commit-a19745d";
1
+ export declare const PROJECT_VERSION: "0.4.229-commit-2dbbc8d";
@@ -1,2 +1,2 @@
1
1
  // Automatically updated by @brillout/release-me
2
- export const PROJECT_VERSION = '0.4.229-commit-a19745d';
2
+ export const PROJECT_VERSION = '0.4.229-commit-2dbbc8d';
@@ -35,16 +35,17 @@ function requireResolve_(importPath, importerFilePath, { userRootDir, doNotHandl
35
35
  addExtraContextForNpmPackageImport(contexts, { importPath, userRootDir });
36
36
  let importPathResolvedFilePath;
37
37
  let failure;
38
- for (let context of contexts) {
38
+ for (const context of contexts) {
39
39
  assertPosixPath(context);
40
- context = ensureFilePrefix(context);
41
- const require_ = createRequire(context);
40
+ const contextNode = makeNodeFriendly(ensureFilePrefix(context));
41
+ let importPathNode = makeNodeFriendly(importPath);
42
+ const require_ = createRequire(contextNode);
42
43
  if (!doNotHandleFileExtension) {
43
44
  addFileExtensionsToRequireResolve(require_);
44
- importPath = removeFileExtention(importPath);
45
+ importPathNode = removeFileExtention(importPathNode);
45
46
  }
46
47
  try {
47
- importPathResolvedFilePath = require_.resolve(importPath);
48
+ importPathResolvedFilePath = require_.resolve(importPathNode);
48
49
  }
49
50
  catch (err) {
50
51
  if (debug.isActivated) {
@@ -106,7 +107,7 @@ function requireResolveVikeDistFile(vikeDistFile) {
106
107
  const vikeNodeModulesRoot = getVikeNodeModulesRoot();
107
108
  assertPosixPath(vikeNodeModulesRoot);
108
109
  assertPosixPath(vikeDistFile);
109
- const importPathResolvedFilePath = path.posix.join(vikeNodeModulesRoot, vikeDistFile);
110
+ const importPathResolvedFilePath = makeNodeFriendly(path.posix.join(vikeNodeModulesRoot, vikeDistFile));
110
111
  // Double check
111
112
  {
112
113
  const res = requireResolve_(importPathResolvedFilePath,
@@ -200,3 +201,7 @@ function getFilePrefix() {
200
201
  prefix += '/';
201
202
  return prefix;
202
203
  }
204
+ function makeNodeFriendly(filePath) {
205
+ // https://github.com/vikejs/vike/issues/2436#issuecomment-2849145340
206
+ return decodeURIComponent(filePath);
207
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vike",
3
- "version": "0.4.229-commit-a19745d",
3
+ "version": "0.4.229-commit-2dbbc8d",
4
4
  "repository": "https://github.com/vikejs/vike",
5
5
  "exports": {
6
6
  "./server": {