@yumerijs/core 3.0.1 → 3.0.2

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/context.js +5 -1
  2. package/package.json +1 -1
package/dist/context.js CHANGED
@@ -57,7 +57,11 @@ export class Context {
57
57
  * @returns Route 实例
58
58
  */
59
59
  route(routepath) {
60
- const realpath = path.join(this.childpath, routepath);
60
+ // `root` is a special fallback route name, not a filesystem path.
61
+ // URL paths must use POSIX separators even when Yumeri runs on Windows.
62
+ const realpath = routepath === 'root'
63
+ ? 'root'
64
+ : path.posix.join(this.childpath, routepath);
61
65
  if (this.core.routes[realpath]) {
62
66
  this.core.logger.warn(`Plugin "${this.pluginname}" attempt to register route "${path}", but it has already been registered.`);
63
67
  return new Route(realpath, this);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yumerijs/core",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "Core module for yumeri",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",