@gjsify/path 0.3.21 → 0.4.0

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.
@@ -1 +1 @@
1
- var e=Object.defineProperty,__exportAll=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};export{__exportAll};
1
+ var e=Object.defineProperty,__name=(t,n)=>e(t,`name`,{value:n,configurable:!0}),__exportAll=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};export{__exportAll,__name};
package/lib/esm/util.js CHANGED
@@ -1 +1 @@
1
- import"./constants.js";function assertPath(e){if(typeof e!=`string`)throw TypeError(`The "path" argument must be of type string. Received type `+typeof e)}function isPosixPathSeparator(e){return e===47}function isPathSeparator(e){return e===47||e===92}function isWindowsDeviceRoot(e){return e>=65&&e<=90||e>=97&&e<=122}function normalizeString(e,t,n,r){let i=``,a=0,o=-1,s=0,c;for(let l=0;l<=e.length;++l){if(l<e.length)c=e.charCodeAt(l);else if(r(c))break;else c=47;if(r(c)){if(!(o===l-1||s===1))if(o!==l-1&&s===2){if(i.length<2||a!==2||i.charCodeAt(i.length-1)!==46||i.charCodeAt(i.length-2)!==46){if(i.length>2){let e=i.lastIndexOf(n);e===-1?(i=``,a=0):(i=i.slice(0,e),a=i.length-1-i.lastIndexOf(n)),o=l,s=0;continue}else if(i.length===2||i.length===1){i=``,a=0,o=l,s=0;continue}}t&&(i.length>0?i+=`${n}..`:i=`..`,a=2)}else i.length>0?i+=n+e.slice(o+1,l):i=e.slice(o+1,l),a=l-o-1;o=l,s=0}else c===46&&s!==-1?++s:s=-1}return i}function _format(e,t){if(typeof t!=`object`||!t)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof t);let n=t.dir||t.root,r=t.base||(t.name||``)+formatExt(t.ext);return n?n===t.root?n+r:n+e+r:r}function formatExt(e){return e?`${e[0]===`.`?``:`.`}${e}`:``}export{_format,assertPath,isPathSeparator,isPosixPathSeparator,isWindowsDeviceRoot,normalizeString};
1
+ import"./_virtual/_rolldown/runtime.js";import"./constants.js";function assertPath(e){if(typeof e!=`string`)throw TypeError(`The "path" argument must be of type string. Received type `+typeof e)}function isPosixPathSeparator(e){return e===47}function isPathSeparator(e){return e===47||e===92}function isWindowsDeviceRoot(e){return e>=65&&e<=90||e>=97&&e<=122}function normalizeString(e,t,n,r){let i=``,a=0,o=-1,s=0,c;for(let l=0;l<=e.length;++l){if(l<e.length)c=e.charCodeAt(l);else if(r(c))break;else c=47;if(r(c)){if(!(o===l-1||s===1))if(o!==l-1&&s===2){if(i.length<2||a!==2||i.charCodeAt(i.length-1)!==46||i.charCodeAt(i.length-2)!==46){if(i.length>2){let e=i.lastIndexOf(n);e===-1?(i=``,a=0):(i=i.slice(0,e),a=i.length-1-i.lastIndexOf(n)),o=l,s=0;continue}else if(i.length===2||i.length===1){i=``,a=0,o=l,s=0;continue}}t&&(i.length>0?i+=`${n}..`:i=`..`,a=2)}else i.length>0?i+=n+e.slice(o+1,l):i=e.slice(o+1,l),a=l-o-1;o=l,s=0}else c===46&&s!==-1?++s:s=-1}return i}function _format(e,t){if(typeof t!=`object`||!t)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof t);let n=t.dir||t.root,r=t.base||(t.name||``)+formatExt(t.ext);return n?n===t.root?n+r:n+e+r:r}function formatExt(e){return e?`${e[0]===`.`?``:`.`}${e}`:``}export{_format,assertPath,isPathSeparator,isPosixPathSeparator,isWindowsDeviceRoot,normalizeString};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/path",
3
- "version": "0.3.21",
3
+ "version": "0.4.0",
4
4
  "description": "Node.js path module for Gjs",
5
5
  "type": "module",
6
6
  "module": "lib/esm/index.js",
@@ -38,8 +38,8 @@
38
38
  "path"
39
39
  ],
40
40
  "devDependencies": {
41
- "@gjsify/cli": "^0.3.21",
42
- "@gjsify/unit": "^0.3.21",
41
+ "@gjsify/cli": "^0.4.0",
42
+ "@gjsify/unit": "^0.4.0",
43
43
  "@types/node": "^25.6.2",
44
44
  "typescript": "^6.0.3"
45
45
  }