@alwatr/global-this 5.5.0 → 5.5.2
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 +16 -0
- package/dist/main.cjs +1 -1
- package/dist/main.cjs.map +2 -2
- package/dist/main.d.ts +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.mjs +1 -1
- package/dist/main.mjs.map +2 -2
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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.2](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.1...@alwatr/global-this@5.5.2) (2025-04-01)
|
|
7
|
+
|
|
8
|
+
### Dependencies update
|
|
9
|
+
|
|
10
|
+
* bump the development-dependencies group across 1 directory with 2 updates ([c1320b4](https://github.com/Alwatr/nanolib/commit/c1320b447a492c5e720e25ad71e9df81eeea3670)) by @dependabot[bot]
|
|
11
|
+
|
|
12
|
+
## [5.5.1](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.0...@alwatr/global-this@5.5.1) (2025-03-18)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* **global-this:** update generic type in getGlobalThis function for improved type inference ([e3c449e](https://github.com/Alwatr/nanolib/commit/e3c449e8720080ccb4718e5097a8f3a845daaae8)) by @alimd
|
|
17
|
+
|
|
18
|
+
### Dependencies update
|
|
19
|
+
|
|
20
|
+
* bump the development-dependencies group with 9 updates ([7290aa3](https://github.com/Alwatr/nanolib/commit/7290aa3b52ce66ca237d2a12d28a7687b113f83d)) by @dependabot[bot]
|
|
21
|
+
|
|
6
22
|
## [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
23
|
|
|
8
24
|
### Miscellaneous Chores
|
package/dist/main.cjs
CHANGED
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 =
|
|
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,
|
|
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 =
|
|
12
|
+
export declare function getGlobalThis<T extends DictionaryOpt = GlobalThis>(): GlobalThis & T;
|
|
13
13
|
//# sourceMappingURL=main.d.ts.map
|
package/dist/main.d.ts.map
CHANGED
|
@@ -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,
|
|
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
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 =
|
|
5
|
-
"mappings": ";;;AAEA,IAAM,eACH,OAAO,eAAe,YAAY,cAClC,OAAO,WAAW,YAAY,UAC9B,OAAO,WAAW,YAAY,UAC/B;AAYK,SAAS,
|
|
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.
|
|
3
|
+
"version": "5.5.2",
|
|
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.
|
|
73
|
+
"@alwatr/package-tracer": "^5.5.2"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@alwatr/nano-build": "^5.5.
|
|
76
|
+
"@alwatr/nano-build": "^5.5.2",
|
|
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.
|
|
80
|
+
"@types/node": "^22.13.13",
|
|
81
81
|
"typescript": "^5.8.2"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "2756475ba2fa108bae7af6d8d9747e0c7815dfa2"
|
|
84
84
|
}
|