@alwatr/global-this 5.5.0 → 5.5.1

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.5.1](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.0...@alwatr/global-this@5.5.1) (2025-03-18)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **global-this:** update generic type in getGlobalThis function for improved type inference ([e3c449e](https://github.com/Alwatr/nanolib/commit/e3c449e8720080ccb4718e5097a8f3a845daaae8)) by @alimd
11
+
12
+ ### Dependencies update
13
+
14
+ * bump the development-dependencies group with 9 updates ([7290aa3](https://github.com/Alwatr/nanolib/commit/7290aa3b52ce66ca237d2a12d28a7687b113f83d)) by @dependabot[bot]
15
+
6
16
  ## [5.5.0](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.4.0...@alwatr/global-this@5.5.0) (2025-03-06)
7
17
 
8
18
  ### Miscellaneous Chores
package/dist/main.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /* @alwatr/global-this v5.5.0 */
1
+ /* @alwatr/global-this v5.5.1 */
2
2
  "use strict";
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
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 (typeof globalThis === 'object' && globalThis) ||\n (typeof window === 'object' && window) ||\n (typeof global === 'object' && global) ||\n self;\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 = DictionaryOpt<unknown>>(): GlobalThis & T {\n return globalThis__ as GlobalThis & T;\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAM,eACH,OAAO,eAAe,YAAY,cAClC,OAAO,WAAW,YAAY,UAC9B,OAAO,WAAW,YAAY,UAC/B;AAYK,SAAS,gBAAkF;AAChG,SAAO;AACT;",
4
+ "sourcesContent": ["export type GlobalThis = typeof globalThis;\n\nconst globalThis__: GlobalThis =\n (typeof globalThis === 'object' && globalThis) ||\n (typeof window === 'object' && window) ||\n (typeof global === 'object' && global) ||\n self;\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": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAM,eACH,OAAO,eAAe,YAAY,cAClC,OAAO,WAAW,YAAY,UAC9B,OAAO,WAAW,YAAY,UAC/B;AAYK,SAAS,gBAAsE;AACpF,SAAO;AACT;",
6
6
  "names": []
7
7
  }
package/dist/main.d.ts CHANGED
@@ -9,5 +9,5 @@ export type GlobalThis = typeof globalThis;
9
9
  * }
10
10
  * ```
11
11
  */
12
- export declare function getGlobalThis<T extends DictionaryOpt = DictionaryOpt<unknown>>(): GlobalThis & T;
12
+ export declare function getGlobalThis<T extends DictionaryOpt = GlobalThis>(): GlobalThis & T;
13
13
  //# sourceMappingURL=main.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC;AAQ3C;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,CAAC,OAAO,CAAC,KAAK,UAAU,GAAG,CAAC,CAEhG"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC;AAQ3C;;;;;;;;;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.0 */
1
+ /* @alwatr/global-this v5.5.1 */
2
2
 
3
3
  // src/main.ts
4
4
  var globalThis__ = typeof globalThis === "object" && globalThis || typeof window === "object" && window || typeof global === "object" && global || self;
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 (typeof globalThis === 'object' && globalThis) ||\n (typeof window === 'object' && window) ||\n (typeof global === 'object' && global) ||\n self;\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 = DictionaryOpt<unknown>>(): GlobalThis & T {\n return globalThis__ as GlobalThis & T;\n}\n"],
5
- "mappings": ";;;AAEA,IAAM,eACH,OAAO,eAAe,YAAY,cAClC,OAAO,WAAW,YAAY,UAC9B,OAAO,WAAW,YAAY,UAC/B;AAYK,SAAS,gBAAkF;AAChG,SAAO;AACT;",
4
+ "sourcesContent": ["export type GlobalThis = typeof globalThis;\n\nconst globalThis__: GlobalThis =\n (typeof globalThis === 'object' && globalThis) ||\n (typeof window === 'object' && window) ||\n (typeof global === 'object' && global) ||\n self;\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,eACH,OAAO,eAAe,YAAY,cAClC,OAAO,WAAW,YAAY,UAC9B,OAAO,WAAW,YAAY,UAC/B;AAYK,SAAS,gBAAsE;AACpF,SAAO;AACT;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwatr/global-this",
3
- "version": "5.5.0",
3
+ "version": "5.5.1",
4
4
  "description": "Provides access to `globalThis`, ensuring cross-platform compatibility, including browsers (`window`), Node.js (`global`), and Web Workers (`self`).",
5
5
  "author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>",
6
6
  "keywords": [
@@ -70,15 +70,15 @@
70
70
  "clean": "rm -rfv dist *.tsbuildinfo"
71
71
  },
72
72
  "dependencies": {
73
- "@alwatr/package-tracer": "^5.5.0"
73
+ "@alwatr/package-tracer": "^5.5.1"
74
74
  },
75
75
  "devDependencies": {
76
- "@alwatr/nano-build": "^5.5.0",
76
+ "@alwatr/nano-build": "^5.5.1",
77
77
  "@alwatr/prettier-config": "^5.0.0",
78
78
  "@alwatr/tsconfig-base": "^5.0.0",
79
79
  "@alwatr/type-helper": "^5.4.0",
80
- "@types/node": "^22.13.9",
80
+ "@types/node": "^22.13.10",
81
81
  "typescript": "^5.8.2"
82
82
  },
83
- "gitHead": "fdf8e6de77cca359465110a75ff18faff0649a95"
83
+ "gitHead": "21cb1fe0f26a580944d9e72a313fc99308cd8be7"
84
84
  }