@alwatr/global-this 5.4.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 +33 -13
- 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 +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
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
|
+
|
|
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)
|
|
17
|
+
|
|
18
|
+
### Miscellaneous Chores
|
|
19
|
+
|
|
20
|
+
* update username casing in changelog entries ([9722ac9](https://github.com/Alwatr/nanolib/commit/9722ac9a078438a4e8ebfa5826ea70e0e3a52ca6)) by @
|
|
21
|
+
|
|
22
|
+
### Dependencies update
|
|
23
|
+
|
|
24
|
+
* bump the development-dependencies group across 1 directory with 11 updates ([720c395](https://github.com/Alwatr/nanolib/commit/720c3954da55c929fe8fb16957121f4c51fb7f0c)) by @dependabot[bot]
|
|
25
|
+
|
|
6
26
|
## [5.4.0](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@1.0.3...@alwatr/global-this@5.4.0) (2025-02-18)
|
|
7
27
|
|
|
8
28
|
### Dependencies update
|
|
@@ -64,7 +84,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
64
84
|
|
|
65
85
|
### Dependencies update
|
|
66
86
|
|
|
67
|
-
* update ([4434ba6](https://github.com/Alwatr/nanolib/commit/4434ba67c3f576bb1a0c307fbdb263c43cd9733a)) by @
|
|
87
|
+
* update ([4434ba6](https://github.com/Alwatr/nanolib/commit/4434ba67c3f576bb1a0c307fbdb263c43cd9733a)) by @alimd
|
|
68
88
|
|
|
69
89
|
## [1.0.2](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@1.0.1...@alwatr/global-this@1.0.2) (2024-10-25)
|
|
70
90
|
|
|
@@ -85,18 +105,18 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
85
105
|
|
|
86
106
|
### Code Refactoring
|
|
87
107
|
|
|
88
|
-
- **global-scope:** Remove global-scope module and replace with global-this ([b194b27](https://github.com/Alwatr/nanolib/commit/b194b2772628fec30cd41d677232e7393fcded61)) by @
|
|
108
|
+
- **global-scope:** Remove global-scope module and replace with global-this ([b194b27](https://github.com/Alwatr/nanolib/commit/b194b2772628fec30cd41d677232e7393fcded61)) by @alimd
|
|
89
109
|
- use new `global-this` package ([42510b9](https://github.com/Alwatr/nanolib/commit/42510b9ae0e385206a902db093d188949f1cb84e)) by @mohammadhonarvar
|
|
90
110
|
|
|
91
111
|
## [1.1.26](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.25...@alwatr/global-scope@1.1.26) (2024-10-11)
|
|
92
112
|
|
|
93
113
|
### Bug Fixes
|
|
94
114
|
|
|
95
|
-
- **global-scope:** prevent duplicate global scope module throw, just log error ([e67ffec](https://github.com/Alwatr/nanolib/commit/e67ffec77cbf5ae9de75d532be0062444486790b)) by @
|
|
115
|
+
- **global-scope:** prevent duplicate global scope module throw, just log error ([e67ffec](https://github.com/Alwatr/nanolib/commit/e67ffec77cbf5ae9de75d532be0062444486790b)) by @alimd
|
|
96
116
|
|
|
97
117
|
### Miscellaneous Chores
|
|
98
118
|
|
|
99
|
-
- include LICENSE and LEGAL files to publish ([09f366f](https://github.com/Alwatr/nanolib/commit/09f366f680bfa9fb26acb2cd1ccbc68c5a9e9ad8)) by @
|
|
119
|
+
- include LICENSE and LEGAL files to publish ([09f366f](https://github.com/Alwatr/nanolib/commit/09f366f680bfa9fb26acb2cd1ccbc68c5a9e9ad8)) by @alimd
|
|
100
120
|
|
|
101
121
|
## [1.1.25](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.24...@alwatr/global-scope@1.1.25) (2024-10-11)
|
|
102
122
|
|
|
@@ -120,12 +140,12 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
120
140
|
|
|
121
141
|
### Code Refactoring
|
|
122
142
|
|
|
123
|
-
- **global-scope:** Improve shared scope definition ([4704a02](https://github.com/Alwatr/nanolib/commit/4704a02497848a18ace8ae27830834d6322d6624)), closes [#123](https://github.com/Alwatr/nanolib/issues/123) by @
|
|
143
|
+
- **global-scope:** Improve shared scope definition ([4704a02](https://github.com/Alwatr/nanolib/commit/4704a02497848a18ace8ae27830834d6322d6624)), closes [#123](https://github.com/Alwatr/nanolib/issues/123) by @alimd
|
|
124
144
|
|
|
125
145
|
### Miscellaneous Chores
|
|
126
146
|
|
|
127
147
|
- **global-scop:** change the license to AGPL-3.0 ([ad7c262](https://github.com/Alwatr/nanolib/commit/ad7c2629743115af18b9298c6a9ccb5172c27333)) by @ArmanAsadian
|
|
128
|
-
- Update build and lint scripts ([392d0b7](https://github.com/Alwatr/nanolib/commit/392d0b71f446bce336b0256119a80f07aff794ba)) by @
|
|
148
|
+
- Update build and lint scripts ([392d0b7](https://github.com/Alwatr/nanolib/commit/392d0b71f446bce336b0256119a80f07aff794ba)) by @alimd
|
|
129
149
|
|
|
130
150
|
### Dependencies update
|
|
131
151
|
|
|
@@ -140,7 +160,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
140
160
|
### Dependencies update
|
|
141
161
|
|
|
142
162
|
- bump the development-dependencies group across 1 directory with 10 updates ([9ed98ff](https://github.com/Alwatr/nanolib/commit/9ed98ffd0668d5a36e255c82edab3af53bffda8f)) by @dependabot[bot]
|
|
143
|
-
- update ([c36ed50](https://github.com/Alwatr/nanolib/commit/c36ed50f68da2f5608ccd96119963a16cfacb4ce)) by @
|
|
163
|
+
- update ([c36ed50](https://github.com/Alwatr/nanolib/commit/c36ed50f68da2f5608ccd96119963a16cfacb4ce)) by @alimd
|
|
144
164
|
|
|
145
165
|
## [1.1.19](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.18...@alwatr/global-scope@1.1.19) (2024-08-31)
|
|
146
166
|
|
|
@@ -152,7 +172,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
152
172
|
|
|
153
173
|
### Dependencies update
|
|
154
174
|
|
|
155
|
-
- update all dependencies ([1e0c30e](https://github.com/Alwatr/nanolib/commit/1e0c30e6a3a8e19deb5185814e24ab6c08dca573)) by @
|
|
175
|
+
- update all dependencies ([1e0c30e](https://github.com/Alwatr/nanolib/commit/1e0c30e6a3a8e19deb5185814e24ab6c08dca573)) by @alimd
|
|
156
176
|
|
|
157
177
|
## [1.1.17](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.16...@alwatr/global-scope@1.1.17) (2024-07-04)
|
|
158
178
|
|
|
@@ -164,7 +184,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
164
184
|
|
|
165
185
|
### Dependencies update
|
|
166
186
|
|
|
167
|
-
- upgrade ([6dbd300](https://github.com/Alwatr/nanolib/commit/6dbd300642c9bcc9e7d0b281e244bf1b06eb1c38)) by @
|
|
187
|
+
- upgrade ([6dbd300](https://github.com/Alwatr/nanolib/commit/6dbd300642c9bcc9e7d0b281e244bf1b06eb1c38)) by @alimd
|
|
168
188
|
|
|
169
189
|
## [1.1.15](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.14...@alwatr/global-scope@1.1.15) (2024-04-25)
|
|
170
190
|
|
|
@@ -178,7 +198,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
178
198
|
|
|
179
199
|
### Miscellaneous Chores
|
|
180
200
|
|
|
181
|
-
- **deps:** update ([1a45030](https://github.com/Alwatr/nanolib/commit/1a450305440b710a300787d4ca24b1ed8c6a39d7)) by @
|
|
201
|
+
- **deps:** update ([1a45030](https://github.com/Alwatr/nanolib/commit/1a450305440b710a300787d4ca24b1ed8c6a39d7)) by @alimd
|
|
182
202
|
|
|
183
203
|
## [1.1.12](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.11...@alwatr/global-scope@1.1.12) (2024-01-24)
|
|
184
204
|
|
|
@@ -236,7 +256,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
236
256
|
|
|
237
257
|
### Features
|
|
238
258
|
|
|
239
|
-
- **global-scope:** polyfill for globalThis ([17ac530](https://github.com/Alwatr/nanolib/commit/17ac530922c4b4300f370ece38b155d2b3d6713a)) by @
|
|
259
|
+
- **global-scope:** polyfill for globalThis ([17ac530](https://github.com/Alwatr/nanolib/commit/17ac530922c4b4300f370ece38b155d2b3d6713a)) by @alimd
|
|
240
260
|
|
|
241
261
|
## [1.0.1](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.0.0...@alwatr/global-scope@1.0.1) (2023-12-22)
|
|
242
262
|
|
|
@@ -246,5 +266,5 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
246
266
|
|
|
247
267
|
### Features
|
|
248
268
|
|
|
249
|
-
- **global-scope:** Add globalScope and sharedScope\_ variables ([9e9f2ee](https://github.com/Alwatr/nanolib/commit/9e9f2ee77a48cd1451a80be72d33f40cbef33a52)) by @
|
|
250
|
-
- **global-scope:** new package ([b3cd89e](https://github.com/Alwatr/nanolib/commit/b3cd89ef0172d65a50772c5137a8f9bef440b306)) by @
|
|
269
|
+
- **global-scope:** Add globalScope and sharedScope\_ variables ([9e9f2ee](https://github.com/Alwatr/nanolib/commit/9e9f2ee77a48cd1451a80be72d33f40cbef33a52)) by @alimd
|
|
270
|
+
- **global-scope:** new package ([b3cd89e](https://github.com/Alwatr/nanolib/commit/b3cd89ef0172d65a50772c5137a8f9bef440b306)) by @alimd
|
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.
|
|
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.
|
|
73
|
+
"@alwatr/package-tracer": "^5.5.1"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@alwatr/nano-build": "^5.
|
|
76
|
+
"@alwatr/nano-build": "^5.5.1",
|
|
77
77
|
"@alwatr/prettier-config": "^5.0.0",
|
|
78
78
|
"@alwatr/tsconfig-base": "^5.0.0",
|
|
79
|
-
"@alwatr/type-helper": "^5.
|
|
80
|
-
"@types/node": "^22.13.
|
|
81
|
-
"typescript": "^5.
|
|
79
|
+
"@alwatr/type-helper": "^5.4.0",
|
|
80
|
+
"@types/node": "^22.13.10",
|
|
81
|
+
"typescript": "^5.8.2"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "21cb1fe0f26a580944d9e72a313fc99308cd8be7"
|
|
84
84
|
}
|