@alwatr/global-this 5.5.18 โ†’ 5.6.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,21 @@
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.0](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.19...@alwatr/global-this@5.6.0) (2025-09-27)
7
+
8
+ ### โœจ Features
9
+
10
+ * add type exports for '@alwatr/type-helper' and '@alwatr/nano-build' ([9646ddd](https://github.com/Alwatr/nanolib/commit/9646ddde384afcf0f578d812b8e3820559d3799b))
11
+
12
+ ### ๐Ÿงน Miscellaneous Chores
13
+
14
+ * exclude test files from package distribution ([86f4f2f](https://github.com/Alwatr/nanolib/commit/86f4f2f5985845c5cf3a3a9398de7b2f98ce53e7))
15
+ * remove unused type references from tsconfig.json ([86fac00](https://github.com/Alwatr/nanolib/commit/86fac003599fe0aa02c3dcca65b47ec9ee643c00))
16
+
17
+ ## [5.5.19](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.18...@alwatr/global-this@5.5.19) (2025-09-22)
18
+
19
+ **Note:** Version bump only for package @alwatr/global-this
20
+
6
21
  ## [5.5.18](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.17...@alwatr/global-this@5.5.18) (2025-09-22)
7
22
 
8
23
  **Note:** Version bump only for package @alwatr/global-this
package/dist/main.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /** ๐Ÿ“ฆ @alwatr/global-this v5.5.18 */
2
- __dev_mode__: console.debug("๐Ÿ“ฆ @alwatr/global-this v5.5.18");
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: Could not find global object.")})();function getGlobalThis(){return globalThis__}0&&(module.exports={getGlobalThis});
1
+ /** ๐Ÿ“ฆ @alwatr/global-this v5.6.0 */
2
+ __dev_mode__: console.debug("๐Ÿ“ฆ @alwatr/global-this v5.6.0");
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.0"}: Could not find global object.`)})();function getGlobalThis(){return globalThis__}0&&(module.exports={getGlobalThis});
4
4
  //# sourceMappingURL=main.cjs.map
package/dist/main.cjs.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/main.ts"],
4
- "sourcesContent": ["export type GlobalThis = typeof globalThis;\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('alwatr/global-this: 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,uHAEA,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,mDAAmD,CACrE,GAAG,EAYI,SAAS,eAAsE,CACpF,OAAO,YACT",
4
+ "sourcesContent": ["/* eslint-disable import/export */\nexport type * from '@alwatr/type-helper';\nexport type * from '@alwatr/nano-build';\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,uHAWA,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",
6
6
  "names": []
7
7
  }
package/dist/main.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ export type * from '@alwatr/type-helper';
2
+ export type * from '@alwatr/nano-build';
1
3
  export type GlobalThis = typeof globalThis;
2
4
  /**
3
5
  * Provides access to `globalThis`, ensuring cross-platform compatibility.
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC;AAU3C;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,aAAa,GAAG,UAAU,KAAK,UAAU,GAAG,CAAC,CAEpF"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AACA,mBAAmB,qBAAqB,CAAC;AACzC,mBAAmB,oBAAoB,CAAC;AAExC,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC;AAe3C;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,aAAa,GAAG,UAAU,KAAK,UAAU,GAAG,CAAC,CAEpF"}
package/dist/main.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /** ๐Ÿ“ฆ @alwatr/global-this v5.5.18 */
2
- __dev_mode__: console.debug("๐Ÿ“ฆ @alwatr/global-this v5.5.18");
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: Could not find global object.")})();function getGlobalThis(){return globalThis__}export{getGlobalThis};
1
+ /** ๐Ÿ“ฆ @alwatr/global-this v5.6.0 */
2
+ __dev_mode__: console.debug("๐Ÿ“ฆ @alwatr/global-this v5.6.0");
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.0"}: Could not find global object.`)})();function getGlobalThis(){return globalThis__}export{getGlobalThis};
4
4
  //# sourceMappingURL=main.mjs.map
package/dist/main.mjs.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/main.ts"],
4
- "sourcesContent": ["export type GlobalThis = typeof globalThis;\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('alwatr/global-this: 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": ";;AAEA,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,mDAAmD,CACrE,GAAG,EAYI,SAAS,eAAsE,CACpF,OAAO,YACT",
4
+ "sourcesContent": ["/* eslint-disable import/export */\nexport type * from '@alwatr/type-helper';\nexport type * from '@alwatr/nano-build';\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": ";;AAWA,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",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,14 +1,14 @@
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.5.18",
4
+ "version": "5.6.0",
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.3.2",
9
- "@alwatr/prettier-config": "5.0.4",
10
- "@alwatr/tsconfig-base": "6.0.2",
11
- "@alwatr/type-helper": "6.1.2",
8
+ "@alwatr/nano-build": "6.3.4",
9
+ "@alwatr/prettier-config": "5.0.5",
10
+ "@alwatr/tsconfig-base": "6.0.3",
11
+ "@alwatr/type-helper": "6.1.4",
12
12
  "@types/node": "^22.18.6",
13
13
  "typescript": "^5.9.2"
14
14
  },
@@ -22,7 +22,8 @@
22
22
  "files": [
23
23
  "**/*.{js,mjs,cjs,map,d.ts,html,md,LEGAL.txt}",
24
24
  "LICENSE",
25
- "!demo/**/*"
25
+ "!demo/**/*",
26
+ "!**/*.test.js"
26
27
  ],
27
28
  "homepage": "https://github.com/Alwatr/nanolib/tree/next/packages/global-this#readme",
28
29
  "keywords": [
@@ -76,5 +77,5 @@
76
77
  "sideEffects": false,
77
78
  "type": "module",
78
79
  "types": "./dist/main.d.ts",
79
- "gitHead": "8e3b59b7a2d9b9ab28f1ee9da21849e60f7eeb07"
80
+ "gitHead": "c013ded43aff3937cf347de4e99125ab807d99e1"
80
81
  }