@woosh/meep-engine 2.33.16 → 2.33.20

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.
@@ -36,7 +36,10 @@ export function convertPathToURL(path) {
36
36
  scope = self;
37
37
  } else if (ENVIRONMENT_IS_NODE) {
38
38
 
39
- let normalized_path = path.replace(/\\/g, '/');
39
+ let normalized_path = `${process.cwd()}/`.replace(/\\/g, '/');
40
+
41
+ // remove multiple sequential slashes
42
+ normalized_path = normalized_path.replace(/\/+/g, '/');
40
43
 
41
44
  if (normalized_path[0] !== '/') {
42
45
  // Windows drive letter must be prefixed with a slash.
@@ -65,8 +68,8 @@ export function convertPathToURL(path) {
65
68
  */
66
69
 
67
70
  if (pathname.endsWith('/')) {
68
- //path is to a directory
69
- directoryPath = pathname;
71
+ //path is to a directory, strip last slash
72
+ directoryPath = pathname.substring(0, pathname.length - 1);
70
73
  } else {
71
74
  //path is to a file
72
75
  const i = pathname.lastIndexOf('/');
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "productName": "Meep",
5
5
  "description": "production-ready JavaScript game engine based on Entity Component System Architecture",
6
6
  "author": "Alexander Goldring",
7
- "version": "2.33.16",
7
+ "version": "2.33.20",
8
8
  "dependencies": {
9
9
  "fast-levenshtein": "2.0.6",
10
10
  "opentype.js": "1.3.3",