@alwatr/global-this 5.6.9 → 5.6.10

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,16 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [5.6.10](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.6.9...@alwatr/global-this@5.6.10) (2026-03-16)
7
+
8
+ ### 🔨 Code Refactoring
9
+
10
+ * migrate build scripts from yarn to bun across multiple packages ([d90e962](https://github.com/Alwatr/nanolib/commit/d90e962f15e5c951e191d5f02341279b6472abc3))
11
+
12
+ ### 🔗 Dependencies update
13
+
14
+ * bump the npm-dependencies group with 10 updates ([c48d9ba](https://github.com/Alwatr/nanolib/commit/c48d9baa1cd7c2dc144b3e01e0fda60bf87c074c))
15
+
6
16
  ## [5.6.9](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.6.8...@alwatr/global-this@5.6.9) (2026-02-18)
7
17
 
8
18
  ### 🔗 Dependencies update
package/dist/main.cjs CHANGED
@@ -1,4 +1,3 @@
1
- /** 📦 @alwatr/global-this v5.6.9 */
2
- __dev_mode__: console.debug("📦 @alwatr/global-this v5.6.9");
3
- "use strict";var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:true})};var __copyProps=(to,from,except,desc)=>{if(from&&typeof from==="object"||typeof from==="function"){for(let key of __getOwnPropNames(from))if(!__hasOwnProp.call(to,key)&&key!==except)__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable})}return to};var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:true}),mod);var main_exports={};__export(main_exports,{getGlobalThis:()=>getGlobalThis});module.exports=__toCommonJS(main_exports);var globalThis__=(()=>{if(typeof globalThis==="object"&&globalThis)return globalThis;if(typeof window==="object"&&window)return window;if(typeof global==="object"&&global)return global;if(typeof self==="object"&&self)return self;throw new Error(`${"@alwatr/global-this"} v${"5.6.9"}: Could not find global object.`)})();function getGlobalThis(){return globalThis__}0&&(module.exports={getGlobalThis});
1
+ /** 📦 @alwatr/global-this v5.6.10 */
2
+ "use strict";var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:true})};var __copyProps=(to,from,except,desc)=>{if(from&&typeof from==="object"||typeof from==="function"){for(let key of __getOwnPropNames(from))if(!__hasOwnProp.call(to,key)&&key!==except)__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable})}return to};var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:true}),mod);var main_exports={};__export(main_exports,{getGlobalThis:()=>getGlobalThis});module.exports=__toCommonJS(main_exports);var globalThis__=(()=>{if(typeof globalThis==="object"&&globalThis)return globalThis;if(typeof window==="object"&&window)return window;if(typeof global==="object"&&global)return global;if(typeof self==="object"&&self)return self;throw new Error(`${"@alwatr/global-this"} v${"5.6.10"}: Could not find global object.`)})();function getGlobalThis(){return globalThis__}0&&(module.exports={getGlobalThis});
4
3
  //# sourceMappingURL=main.cjs.map
package/dist/main.cjs.map CHANGED
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../src/main.ts"],
4
4
  "sourcesContent": ["import type {} from '@alwatr/nano-build';\nimport type {} from '@alwatr/type-helper';\n\nexport type GlobalThis = typeof globalThis;\n\n/**\n * The global object in various JavaScript environments.\n * It checks for `globalThis`, `window`, `global`, and `self` in that order.\n * @private\n */\nconst globalThis__: GlobalThis = (() => {\n if (typeof globalThis === 'object' && globalThis) return globalThis;\n if (typeof window === 'object' && window) return window;\n if (typeof global === 'object' && global) return global;\n if (typeof self === 'object' && self) return self;\n throw new Error(`${__package_name__} v${__package_version__}: Could not find global object.`);\n})();\n\n/**\n * Provides access to `globalThis`, ensuring cross-platform compatibility.\n *\n * @example\n * ```typescript\n * getGlobalThis<{alwatr:{foo: string}}>().alwatr = {\n * foo: 'bar',\n * }\n * ```\n */\nexport function getGlobalThis<T extends DictionaryOpt = GlobalThis>(): GlobalThis & T {\n return globalThis__ as GlobalThis & T;\n}\n"],
5
- "mappings": ";;qqBAAA,uHAUA,IAAM,cAA4B,IAAM,CACtC,GAAI,OAAO,aAAe,UAAY,WAAY,OAAO,WACzD,GAAI,OAAO,SAAW,UAAY,OAAQ,OAAO,OACjD,GAAI,OAAO,SAAW,UAAY,OAAQ,OAAO,OACjD,GAAI,OAAO,OAAS,UAAY,KAAM,OAAO,KAC7C,MAAM,IAAI,MAAM,GAAG,qBAAgB,KAAK,OAAmB,iCAAiC,CAC9F,GAAG,EAYI,SAAS,eAAsE,CACpF,OAAO,YACT",
5
+ "mappings": ";qqBAAA,uHAUA,IAAM,cAA4B,IAAM,CACtC,GAAI,OAAO,aAAe,UAAY,WAAY,OAAO,WACzD,GAAI,OAAO,SAAW,UAAY,OAAQ,OAAO,OACjD,GAAI,OAAO,SAAW,UAAY,OAAQ,OAAO,OACjD,GAAI,OAAO,OAAS,UAAY,KAAM,OAAO,KAC7C,MAAM,IAAI,MAAM,GAAG,qBAAgB,KAAK,QAAmB,iCAAiC,CAC9F,GAAG,EAYI,SAAS,eAAsE,CACpF,OAAO,YACT",
6
6
  "names": []
7
7
  }
package/dist/main.mjs CHANGED
@@ -1,4 +1,3 @@
1
- /** 📦 @alwatr/global-this v5.6.9 */
2
- __dev_mode__: console.debug("📦 @alwatr/global-this v5.6.9");
3
- var globalThis__=(()=>{if(typeof globalThis==="object"&&globalThis)return globalThis;if(typeof window==="object"&&window)return window;if(typeof global==="object"&&global)return global;if(typeof self==="object"&&self)return self;throw new Error(`${"@alwatr/global-this"} v${"5.6.9"}: Could not find global object.`)})();function getGlobalThis(){return globalThis__}export{getGlobalThis};
1
+ /** 📦 @alwatr/global-this v5.6.10 */
2
+ var globalThis__=(()=>{if(typeof globalThis==="object"&&globalThis)return globalThis;if(typeof window==="object"&&window)return window;if(typeof global==="object"&&global)return global;if(typeof self==="object"&&self)return self;throw new Error(`${"@alwatr/global-this"} v${"5.6.10"}: Could not find global object.`)})();function getGlobalThis(){return globalThis__}export{getGlobalThis};
4
3
  //# sourceMappingURL=main.mjs.map
package/dist/main.mjs.map CHANGED
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../src/main.ts"],
4
4
  "sourcesContent": ["import type {} from '@alwatr/nano-build';\nimport type {} from '@alwatr/type-helper';\n\nexport type GlobalThis = typeof globalThis;\n\n/**\n * The global object in various JavaScript environments.\n * It checks for `globalThis`, `window`, `global`, and `self` in that order.\n * @private\n */\nconst globalThis__: GlobalThis = (() => {\n if (typeof globalThis === 'object' && globalThis) return globalThis;\n if (typeof window === 'object' && window) return window;\n if (typeof global === 'object' && global) return global;\n if (typeof self === 'object' && self) return self;\n throw new Error(`${__package_name__} v${__package_version__}: Could not find global object.`);\n})();\n\n/**\n * Provides access to `globalThis`, ensuring cross-platform compatibility.\n *\n * @example\n * ```typescript\n * getGlobalThis<{alwatr:{foo: string}}>().alwatr = {\n * foo: 'bar',\n * }\n * ```\n */\nexport function getGlobalThis<T extends DictionaryOpt = GlobalThis>(): GlobalThis & T {\n return globalThis__ as GlobalThis & T;\n}\n"],
5
- "mappings": ";;AAUA,IAAM,cAA4B,IAAM,CACtC,GAAI,OAAO,aAAe,UAAY,WAAY,OAAO,WACzD,GAAI,OAAO,SAAW,UAAY,OAAQ,OAAO,OACjD,GAAI,OAAO,SAAW,UAAY,OAAQ,OAAO,OACjD,GAAI,OAAO,OAAS,UAAY,KAAM,OAAO,KAC7C,MAAM,IAAI,MAAM,GAAG,qBAAgB,KAAK,OAAmB,iCAAiC,CAC9F,GAAG,EAYI,SAAS,eAAsE,CACpF,OAAO,YACT",
5
+ "mappings": ";AAUA,IAAM,cAA4B,IAAM,CACtC,GAAI,OAAO,aAAe,UAAY,WAAY,OAAO,WACzD,GAAI,OAAO,SAAW,UAAY,OAAQ,OAAO,OACjD,GAAI,OAAO,SAAW,UAAY,OAAQ,OAAO,OACjD,GAAI,OAAO,OAAS,UAAY,KAAM,OAAO,KAC7C,MAAM,IAAI,MAAM,GAAG,qBAAgB,KAAK,QAAmB,iCAAiC,CAC9F,GAAG,EAYI,SAAS,eAAsE,CACpF,OAAO,YACT",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@alwatr/global-this",
3
3
  "description": "Provides access to `globalThis`, ensuring cross-platform compatibility, including browsers (`window`), Node.js (`global`), and Web Workers (`self`).",
4
- "version": "5.6.9",
4
+ "version": "5.6.10",
5
5
  "author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>",
6
6
  "bugs": "https://github.com/Alwatr/nanolib/issues",
7
7
  "devDependencies": {
8
- "@alwatr/nano-build": "6.4.1",
8
+ "@alwatr/nano-build": "6.4.2",
9
9
  "@alwatr/prettier-config": "6.0.2",
10
10
  "@alwatr/tsconfig-base": "6.0.4",
11
- "@alwatr/type-helper": "7.0.1",
12
- "@types/node": "^24.10.13",
11
+ "@alwatr/type-helper": "7.0.2",
12
+ "@types/node": "^24.12.0",
13
13
  "typescript": "^5.9.3"
14
14
  },
15
15
  "exports": {
@@ -61,21 +61,21 @@
61
61
  "directory": "packages/global-this"
62
62
  },
63
63
  "scripts": {
64
- "b": "yarn run build",
65
- "build": "yarn run build:ts && yarn run build:es",
64
+ "b": "bun run build",
65
+ "build": "bun run build:ts && bun run build:es",
66
66
  "build:es": "nano-build --preset=module",
67
67
  "build:ts": "tsc --build",
68
- "c": "yarn run clean",
69
- "cb": "yarn run clean && yarn run build",
68
+ "c": "bun run clean",
69
+ "cb": "bun run clean && bun run build",
70
70
  "clean": "rm -rfv dist *.tsbuildinfo",
71
- "d": "yarn run build:es && yarn node --enable-source-maps --trace-warnings",
72
- "w": "yarn run watch",
73
- "watch": "yarn run watch:ts & yarn run watch:es",
74
- "watch:es": "yarn run build:es --watch",
75
- "watch:ts": "yarn run build:ts --watch --preserveWatchOutput"
71
+ "d": "bun run build:es && bun --enable-source-maps --trace-warnings",
72
+ "w": "bun run watch",
73
+ "watch": "bun run watch:ts & bun run watch:es",
74
+ "watch:es": "bun run build:es --watch",
75
+ "watch:ts": "bun run build:ts --watch --preserveWatchOutput"
76
76
  },
77
77
  "sideEffects": false,
78
78
  "type": "module",
79
79
  "types": "./dist/main.d.ts",
80
- "gitHead": "f9f9ba54b319ce8ccc6968059b222e89f4b5d149"
80
+ "gitHead": "c3889e3756b0a0f9b935a1b702a1373ac52cb379"
81
81
  }