@alwatr/global-this 5.6.10 → 6.0.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/dist/main.js ADDED
@@ -0,0 +1,5 @@
1
+ /* 📦 @alwatr/global-this v6.0.0 */
2
+ var j=(()=>{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 Error("@alwatr/global-this v6.0.0: Could not find global object.")})();function k(){return j}export{k as getGlobalThis};
3
+
4
+ //# debugId=1CC0A29E0A301FFE64756E2164756E21
5
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/main.ts"],
4
+ "sourcesContent": [
5
+ "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"
6
+ ],
7
+ "mappings": ";AAUA,IAAM,GAA4B,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,MAAU,MAAM,2DAA4E,IAC3F,EAYI,SAAS,CAAmD,EAAmB,CACpF,OAAO",
8
+ "debugId": "1CC0A29E0A301FFE64756E2164756E21",
9
+ "names": []
10
+ }
package/package.json CHANGED
@@ -1,26 +1,26 @@
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.10",
4
+ "version": "6.0.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.4.2",
9
- "@alwatr/prettier-config": "6.0.2",
10
- "@alwatr/tsconfig-base": "6.0.4",
11
- "@alwatr/type-helper": "7.0.2",
8
+ "@alwatr/nano-build": "7.0.0",
9
+ "@alwatr/prettier-config": "7.0.0",
10
+ "@alwatr/tsconfig-base": "7.0.0",
11
+ "@alwatr/type-helper": "8.0.0",
12
12
  "@types/node": "^24.12.0",
13
13
  "typescript": "^5.9.3"
14
14
  },
15
15
  "exports": {
16
16
  ".": {
17
17
  "types": "./dist/main.d.ts",
18
- "import": "./dist/main.mjs",
19
- "require": "./dist/main.cjs"
18
+ "default": "./dist/main.js"
20
19
  }
21
20
  },
22
21
  "files": [
23
- "**/*.{js,mjs,cjs,map,d.ts,html,md,LEGAL.txt}",
22
+ "**/*.{js,mjs,cjs,ts,map,d.ts,html,LEGAL.txt}",
23
+ "README.md",
24
24
  "LICENSE",
25
25
  "!demo/**/*",
26
26
  "!**/*.test.js"
@@ -49,8 +49,6 @@
49
49
  "utils"
50
50
  ],
51
51
  "license": "MPL-2.0",
52
- "main": "./dist/main.cjs",
53
- "module": "./dist/main.mjs",
54
52
  "prettier": "@alwatr/prettier-config",
55
53
  "publishConfig": {
56
54
  "access": "public"
@@ -63,12 +61,12 @@
63
61
  "scripts": {
64
62
  "b": "bun run build",
65
63
  "build": "bun run build:ts && bun run build:es",
66
- "build:es": "nano-build --preset=module",
64
+ "build:es": "nano-build --preset=module src/main.ts",
67
65
  "build:ts": "tsc --build",
68
66
  "c": "bun run clean",
69
67
  "cb": "bun run clean && bun run build",
70
68
  "clean": "rm -rfv dist *.tsbuildinfo",
71
- "d": "bun run build:es && bun --enable-source-maps --trace-warnings",
69
+ "d": "bun run build:es && bun",
72
70
  "w": "bun run watch",
73
71
  "watch": "bun run watch:ts & bun run watch:es",
74
72
  "watch:es": "bun run build:es --watch",
@@ -77,5 +75,5 @@
77
75
  "sideEffects": false,
78
76
  "type": "module",
79
77
  "types": "./dist/main.d.ts",
80
- "gitHead": "c3889e3756b0a0f9b935a1b702a1373ac52cb379"
78
+ "gitHead": "056102a1c8a563bbae8a290b6830450f467322a3"
81
79
  }
package/src/main.ts ADDED
@@ -0,0 +1,31 @@
1
+ import type {} from '@alwatr/nano-build';
2
+ import type {} from '@alwatr/type-helper';
3
+
4
+ export type GlobalThis = typeof globalThis;
5
+
6
+ /**
7
+ * The global object in various JavaScript environments.
8
+ * It checks for `globalThis`, `window`, `global`, and `self` in that order.
9
+ * @private
10
+ */
11
+ const globalThis__: GlobalThis = (() => {
12
+ if (typeof globalThis === 'object' && globalThis) return globalThis;
13
+ if (typeof window === 'object' && window) return window;
14
+ if (typeof global === 'object' && global) return global;
15
+ if (typeof self === 'object' && self) return self;
16
+ throw new Error(`${__package_name__} v${__package_version__}: Could not find global object.`);
17
+ })();
18
+
19
+ /**
20
+ * Provides access to `globalThis`, ensuring cross-platform compatibility.
21
+ *
22
+ * @example
23
+ * ```typescript
24
+ * getGlobalThis<{alwatr:{foo: string}}>().alwatr = {
25
+ * foo: 'bar',
26
+ * }
27
+ * ```
28
+ */
29
+ export function getGlobalThis<T extends DictionaryOpt = GlobalThis>(): GlobalThis & T {
30
+ return globalThis__ as GlobalThis & T;
31
+ }
package/CHANGELOG.md DELETED
@@ -1,455 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
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
-
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)
17
-
18
- ### 🔗 Dependencies update
19
-
20
- * update @types/node to version 24.10.13 across multiple packages ([4c6d2a3](https://github.com/Alwatr/nanolib/commit/4c6d2a37ab26b1c86812b2aa38b2eca4ee097cb6))
21
-
22
- ## [5.6.8](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.6.7...@alwatr/global-this@5.6.8) (2025-12-23)
23
-
24
- ### 🔗 Dependencies update
25
-
26
- * upgrade @types/node to version 24.10.4 and update related dependencies ([acf04df](https://github.com/Alwatr/nanolib/commit/acf04df71647f5a401ef5e6bbfffcc478e4326d2))
27
-
28
- ## [5.6.7](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.6.6...@alwatr/global-this@5.6.7) (2025-12-13)
29
-
30
- ### 🔗 Dependencies update
31
-
32
- * update `@types/node` and `[@lerna-lite](https://github.com/lerna-lite)` dependencies. ([8daa8fd](https://github.com/Alwatr/nanolib/commit/8daa8fd023d5414c9f95feb4319353c6ea34be31))
33
-
34
- ## [5.6.6](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.6.5...@alwatr/global-this@5.6.6) (2025-12-10)
35
-
36
- ### 🔗 Dependencies update
37
-
38
- * Upgrade lerna-lite, prettier, types/node, and yarn dependencies. ([42a7fca](https://github.com/Alwatr/nanolib/commit/42a7fca15430aca2ac1eaa19496c2a2ebfc8c470))
39
-
40
- ## [5.6.5](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.6.4...@alwatr/global-this@5.6.5) (2025-11-18)
41
-
42
- ### 🐛 Bug Fixes
43
-
44
- * add type imports from @alwatr/nano-build and @alwatr/type-helper across multiple packages ([5ab7f15](https://github.com/Alwatr/nanolib/commit/5ab7f159ba57788bf8df40fa96a3027f589d5a77))
45
-
46
- ## [5.6.4](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.6.3...@alwatr/global-this@5.6.4) (2025-11-15)
47
-
48
- ### 🔗 Dependencies update
49
-
50
- * bump the npm-dependencies group with 2 updates ([a80b84d](https://github.com/Alwatr/nanolib/commit/a80b84dada6c09b5e5621e7487c8ec13fff3c23a))
51
-
52
- ## [5.6.3](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.6.2...@alwatr/global-this@5.6.3) (2025-11-15)
53
-
54
- **Note:** Version bump only for package @alwatr/global-this
55
-
56
- ## [5.6.2](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.6.1...@alwatr/global-this@5.6.2) (2025-11-04)
57
-
58
- ### 🔗 Dependencies update
59
-
60
- * bump the npm-dependencies group across 1 directory with 9 updates ([fdf29d5](https://github.com/Alwatr/nanolib/commit/fdf29d5aa89983cb06f79d42650a364521f5c4b9))
61
- * update @types/node from ^22.18.12 to ^24.10.0 across multiple packages ([1169a86](https://github.com/Alwatr/nanolib/commit/1169a86001da2abfbe99a7da33c8e92183f553f6))
62
-
63
- ## [5.6.1](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.6.0...@alwatr/global-this@5.6.1) (2025-10-06)
64
-
65
- ### 🔗 Dependencies update
66
-
67
- * bump the npm-dependencies group with 4 updates ([9825815](https://github.com/Alwatr/nanolib/commit/982581552bbb4b97dca52af5e93a80937f0c3109))
68
-
69
- ## [5.6.0](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.19...@alwatr/global-this@5.6.0) (2025-09-27)
70
-
71
- ### ✨ Features
72
-
73
- * add type exports for '@alwatr/type-helper' and '@alwatr/nano-build' ([9646ddd](https://github.com/Alwatr/nanolib/commit/9646ddde384afcf0f578d812b8e3820559d3799b))
74
-
75
- ### 🧹 Miscellaneous Chores
76
-
77
- * exclude test files from package distribution ([86f4f2f](https://github.com/Alwatr/nanolib/commit/86f4f2f5985845c5cf3a3a9398de7b2f98ce53e7))
78
- * remove unused type references from tsconfig.json ([86fac00](https://github.com/Alwatr/nanolib/commit/86fac003599fe0aa02c3dcca65b47ec9ee643c00))
79
-
80
- ## [5.5.19](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.18...@alwatr/global-this@5.5.19) (2025-09-22)
81
-
82
- **Note:** Version bump only for package @alwatr/global-this
83
-
84
- ## [5.5.18](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.17...@alwatr/global-this@5.5.18) (2025-09-22)
85
-
86
- **Note:** Version bump only for package @alwatr/global-this
87
-
88
- ## [5.5.17](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.16...@alwatr/global-this@5.5.17) (2025-09-21)
89
-
90
- **Note:** Version bump only for package @alwatr/global-this
91
-
92
- ## [5.5.16](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.15...@alwatr/global-this@5.5.16) (2025-09-20)
93
-
94
- ### 🐛 Bug Fixes
95
-
96
- * add sideEffects property to package.json files for better tree-shaking ([c7b9e74](https://github.com/Alwatr/nanolib/commit/c7b9e74e1920c8e35b438742de61883ca62da58c))
97
- * add sideEffects property to package.json files for better tree-shaking ([e8402c4](https://github.com/Alwatr/nanolib/commit/e8402c481a14a1f807a37aaa862a936713d26176))
98
- * correct error message for global object retrieval in main.ts ([16b8f23](https://github.com/Alwatr/nanolib/commit/16b8f23f2438497f26b689d679bbf3317bd96b8d))
99
- * remove unnecessary pure annotations ([adeb916](https://github.com/Alwatr/nanolib/commit/adeb9166f8e911f59269032b76c36cb1888332cf))
100
-
101
- ### 🧹 Miscellaneous Chores
102
-
103
- * remove duplicate sideEffects property from multiple package.json files ([b123f86](https://github.com/Alwatr/nanolib/commit/b123f86be81481de2314aae9bb2eeb629743d24c))
104
-
105
- ## [5.5.15](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.14...@alwatr/global-this@5.5.15) (2025-09-19)
106
-
107
- **Note:** Version bump only for package @alwatr/global-this
108
-
109
- ## [5.5.14](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.13...@alwatr/global-this@5.5.14) (2025-09-15)
110
-
111
- **Note:** Version bump only for package @alwatr/global-this
112
-
113
- ## [5.5.13](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.12...@alwatr/global-this@5.5.13) (2025-09-14)
114
-
115
- ### 🐛 Bug Fixes
116
-
117
- * refactor globalThis initialization for improved clarity and error handling ([df79e21](https://github.com/Alwatr/nanolib/commit/df79e217c485adfaf806567893d78c2fada289a6))
118
-
119
- ## [5.5.12](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.11...@alwatr/global-this@5.5.12) (2025-09-13)
120
-
121
- ### 🔗 Dependencies update
122
-
123
- * update @types/node version to ^22.18.3 in multiple package.json files ([13db6fc](https://github.com/Alwatr/nanolib/commit/13db6fc176bc6cdcefedc50d77ac550bd5052c9a))
124
-
125
- ## [5.5.11](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.10...@alwatr/global-this@5.5.11) (2025-09-13)
126
-
127
- ### 🧹 Miscellaneous Chores
128
-
129
- * remove package-tracer dependency and related code from fetch package ([96fe4e9](https://github.com/Alwatr/nanolib/commit/96fe4e9552a205f218ceed187c55e4e904a07089))
130
-
131
- ## [5.5.10](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.9...@alwatr/global-this@5.5.10) (2025-09-09)
132
-
133
- **Note:** Version bump only for package @alwatr/global-this
134
-
135
- ## [5.5.9](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.8...@alwatr/global-this@5.5.9) (2025-09-06)
136
-
137
- **Note:** Version bump only for package @alwatr/global-this
138
-
139
- ## [5.5.8](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.7...@alwatr/global-this@5.5.8) (2025-09-05)
140
-
141
- ### 🔗 Dependencies update
142
-
143
- * update jest to version 30.1.3 and @types/node to version 22.18.1 ([754212b](https://github.com/Alwatr/nanolib/commit/754212b1523cfc4cfe26c9e9f6d634aa8311e0b7))
144
-
145
- ## [5.5.7](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.6...@alwatr/global-this@5.5.7) (2025-09-01)
146
-
147
- ### 🔗 Dependencies update
148
-
149
- * update lerna-lite dependencies to version 4.7.3 and jest to 30.1.2 ([95d7870](https://github.com/Alwatr/nanolib/commit/95d7870ec7ad1e6ed2688bafddcabf46857f6981))
150
-
151
- ## [5.5.6](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.5...@alwatr/global-this@5.5.6) (2025-08-23)
152
-
153
- **Note:** Version bump only for package @alwatr/global-this
154
-
155
- ## [5.5.5](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.3...@alwatr/global-this@5.5.5) (2025-08-23)
156
-
157
- ### 🐛 Bug Fixes
158
-
159
- * update license from AGPL-3.0-only to MPL-2.0 ([d20968e](https://github.com/Alwatr/nanolib/commit/d20968e60cc89b1dcdf9b96507178da6ed562f55))
160
- * update package versions in multiple package.json files ([7638b1c](https://github.com/Alwatr/nanolib/commit/7638b1cafee2b4e0f97db7a89ac9fba6384b9b10))
161
-
162
- ### 🔨 Code Refactoring
163
-
164
- * Updated all package.json files in the project to change dependency version specifiers from "workspace:^" to "workspace:*" for consistency and to allow for more flexible version resolution. ([db6a4f7](https://github.com/Alwatr/nanolib/commit/db6a4f76deec2d1d8039978144e4bc51b6f1a0e3))
165
-
166
- ### 🧹 Miscellaneous Chores
167
-
168
- * reformat all package.json files ([ceda45d](https://github.com/Alwatr/nanolib/commit/ceda45de186667790474f729cb4b161a5148ce19))
169
-
170
- ### 🔗 Dependencies update
171
-
172
- * revert @types/node version to ^22.17.2 (LTS) ([49f8101](https://github.com/Alwatr/nanolib/commit/49f8101eac5c41aa7684112f4308254dbfab9787))
173
- * update TypeScript and Jest versions across all packages to improve compatibility and performance ([31baf36](https://github.com/Alwatr/nanolib/commit/31baf366101e92e27db66a21c849fb101f19be47))
174
-
175
- ## [5.5.4](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.3...@alwatr/global-this@5.5.4) (2025-08-23)
176
-
177
- ### Code Refactoring
178
-
179
- * Updated all package.json files in the project to change dependency version specifiers from "workspace:^" to "workspace:*" for consistency and to allow for more flexible version resolution. ([db6a4f7](https://github.com/Alwatr/nanolib/commit/db6a4f76deec2d1d8039978144e4bc51b6f1a0e3)) by @alimd
180
-
181
- ## <small>5.5.3 (2025-04-15)</small>
182
-
183
- **Note:** Version bump only for package @alwatr/global-this
184
-
185
- ## [5.5.2](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.1...@alwatr/global-this@5.5.2) (2025-04-01)
186
-
187
- ### Dependencies update
188
-
189
- * bump the development-dependencies group across 1 directory with 2 updates ([c1320b4](https://github.com/Alwatr/nanolib/commit/c1320b447a492c5e720e25ad71e9df81eeea3670)) by @dependabot[bot]
190
-
191
- ## [5.5.1](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.5.0...@alwatr/global-this@5.5.1) (2025-03-18)
192
-
193
- ### Bug Fixes
194
-
195
- * **global-this:** update generic type in getGlobalThis function for improved type inference ([e3c449e](https://github.com/Alwatr/nanolib/commit/e3c449e8720080ccb4718e5097a8f3a845daaae8)) by @alimd
196
-
197
- ### Dependencies update
198
-
199
- * bump the development-dependencies group with 9 updates ([7290aa3](https://github.com/Alwatr/nanolib/commit/7290aa3b52ce66ca237d2a12d28a7687b113f83d)) by @dependabot[bot]
200
-
201
- ## [5.5.0](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@5.4.0...@alwatr/global-this@5.5.0) (2025-03-06)
202
-
203
- ### Miscellaneous Chores
204
-
205
- * update username casing in changelog entries ([9722ac9](https://github.com/Alwatr/nanolib/commit/9722ac9a078438a4e8ebfa5826ea70e0e3a52ca6)) by @
206
-
207
- ### Dependencies update
208
-
209
- * bump the development-dependencies group across 1 directory with 11 updates ([720c395](https://github.com/Alwatr/nanolib/commit/720c3954da55c929fe8fb16957121f4c51fb7f0c)) by @dependabot[bot]
210
-
211
- ## [5.4.0](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@1.0.3...@alwatr/global-this@5.4.0) (2025-02-18)
212
-
213
- ### Dependencies update
214
-
215
- * bump @types/node from ^22.13.0 to ^22.13.4 and prettier from 3.4.2 to 3.5.1; update eslint-import-resolver-typescript to 3.8.2 ([b9a8399](https://github.com/Alwatr/nanolib/commit/b9a8399add39509e90bfdc589fb5e2321718029d)) by @
216
-
217
- ## 5.3.0 (2025-02-03)
218
-
219
- ### Miscellaneous Chores
220
-
221
- * edit README ([3860b3d](https://github.com/Alwatr/nanolib/commit/3860b3df48ab82dc479d5236c2e8579df614aabf)) by @
222
-
223
- ### Dependencies update
224
-
225
- * bump the development-dependencies group across 1 directory with 11 updates ([cb79d07](https://github.com/Alwatr/nanolib/commit/cb79d072a57c79e1c01abff1a293d6757bb65350)) by @
226
- * update typescript and @types/node to version 5.7.3 and 22.13.0 respectively across multiple packages ([ddab05b](https://github.com/Alwatr/nanolib/commit/ddab05b5d767c30191f36a065e4bc88744e8e3fe)) by @
227
-
228
- ## 5.0.0 (2024-11-02)
229
-
230
- ### ⚠ BREAKING CHANGES
231
-
232
- * To simplify version management and ensure consistency, all nanolib packages now use the same version as @alwatr/nanolib. This may require updates to your project's dependencies.
233
-
234
- ### Code Refactoring
235
-
236
- * use the same version as @alwatr/nanolib ([60eb860](https://github.com/Alwatr/nanolib/commit/60eb860a0e33dfffe2d1d95e63ce54c60876be06)) by @
237
-
238
- ## [5.3.0](https://github.com/Alwatr/nanolib/compare/v5.2.1...v5.3.0) (2025-02-03)
239
-
240
- ### Miscellaneous Chores
241
-
242
- * edit README ([3860b3d](https://github.com/Alwatr/nanolib/commit/3860b3df48ab82dc479d5236c2e8579df614aabf)) by @ArmanAsadian
243
-
244
- ### Dependencies update
245
-
246
- * bump the development-dependencies group across 1 directory with 11 updates ([cb79d07](https://github.com/Alwatr/nanolib/commit/cb79d072a57c79e1c01abff1a293d6757bb65350)) by @dependabot[bot]
247
- * update typescript and @types/node to version 5.7.3 and 22.13.0 respectively across multiple packages ([ddab05b](https://github.com/Alwatr/nanolib/commit/ddab05b5d767c30191f36a065e4bc88744e8e3fe)) by @alimd
248
-
249
- ## 5.0.0 (2024-11-02)
250
-
251
- ### ⚠ BREAKING CHANGES
252
-
253
- * To simplify version management and ensure consistency, all nanolib packages now use the same version as @alwatr/nanolib. This may require updates to your project's dependencies.
254
- * **global-scope:** The global-scope module has been deprecated and should no longer be used. Please update your code to use the global-this module instead.
255
-
256
- ### Code Refactoring
257
-
258
- * **global-scope:** Remove global-scope module and replace with global-this ([b194b27](https://github.com/Alwatr/nanolib/commit/b194b2772628fec30cd41d677232e7393fcded61)) by @
259
- * use new `global-this` package ([42510b9](https://github.com/Alwatr/nanolib/commit/42510b9ae0e385206a902db093d188949f1cb84e)) by @
260
- * use the same version as @alwatr/nanolib ([60eb860](https://github.com/Alwatr/nanolib/commit/60eb860a0e33dfffe2d1d95e63ce54c60876be06)) by @
261
-
262
- ### Dependencies update
263
-
264
- * bump the development-dependencies group across 1 directory with 2 updates ([2dfda9e](https://github.com/Alwatr/nanolib/commit/2dfda9ec38a595f1fd961490d1a2fbf060f20a66)) by @
265
- * bump the development-dependencies group with 8 updates ([16847ac](https://github.com/Alwatr/nanolib/commit/16847acba91da027c422e3910d0f2dcc1f084e93)) by @
266
- * update ([4434ba6](https://github.com/Alwatr/nanolib/commit/4434ba67c3f576bb1a0c307fbdb263c43cd9733a)) by @
267
-
268
- ## [1.0.3](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@1.0.2...@alwatr/global-this@1.0.3) (2024-11-02)
269
-
270
- ### Dependencies update
271
-
272
- * update ([4434ba6](https://github.com/Alwatr/nanolib/commit/4434ba67c3f576bb1a0c307fbdb263c43cd9733a)) by @alimd
273
-
274
- ## [1.0.2](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@1.0.1...@alwatr/global-this@1.0.2) (2024-10-25)
275
-
276
- ### Dependencies update
277
-
278
- * bump the development-dependencies group across 1 directory with 2 updates ([2dfda9e](https://github.com/Alwatr/nanolib/commit/2dfda9ec38a595f1fd961490d1a2fbf060f20a66)) by @dependabot[bot]
279
- * bump the development-dependencies group with 8 updates ([16847ac](https://github.com/Alwatr/nanolib/commit/16847acba91da027c422e3910d0f2dcc1f084e93)) by @dependabot[bot]
280
-
281
- ## [1.0.1](https://github.com/Alwatr/nanolib/compare/@alwatr/global-this@1.0.0...@alwatr/global-this@1.0.1) (2024-10-12)
282
-
283
- **Note:** Version bump only for package @alwatr/global-this
284
-
285
- ## 1.0.0 (2024-10-11)
286
-
287
- ### ⚠ BREAKING CHANGES
288
-
289
- - **global-scope:** The global-scope module has been deprecated and should no longer be used. Please update your code to use the global-this module instead.
290
-
291
- ### Code Refactoring
292
-
293
- - **global-scope:** Remove global-scope module and replace with global-this ([b194b27](https://github.com/Alwatr/nanolib/commit/b194b2772628fec30cd41d677232e7393fcded61)) by @alimd
294
- - use new `global-this` package ([42510b9](https://github.com/Alwatr/nanolib/commit/42510b9ae0e385206a902db093d188949f1cb84e)) by @mohammadhonarvar
295
-
296
- ## [1.1.26](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.25...@alwatr/global-scope@1.1.26) (2024-10-11)
297
-
298
- ### Bug Fixes
299
-
300
- - **global-scope:** prevent duplicate global scope module throw, just log error ([e67ffec](https://github.com/Alwatr/nanolib/commit/e67ffec77cbf5ae9de75d532be0062444486790b)) by @alimd
301
-
302
- ### Miscellaneous Chores
303
-
304
- - include LICENSE and LEGAL files to publish ([09f366f](https://github.com/Alwatr/nanolib/commit/09f366f680bfa9fb26acb2cd1ccbc68c5a9e9ad8)) by @alimd
305
-
306
- ## [1.1.25](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.24...@alwatr/global-scope@1.1.25) (2024-10-11)
307
-
308
- **Note:** Version bump only for package @alwatr/global-scope
309
-
310
- ## [1.1.24](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.23...@alwatr/global-scope@1.1.24) (2024-10-10)
311
-
312
- ### Dependencies update
313
-
314
- - bump the development-dependencies group with 10 updates ([fa4aaf0](https://github.com/Alwatr/nanolib/commit/fa4aaf04c907ecae06aa14000ce35216170c15ad)) by @dependabot[bot]
315
-
316
- ## [1.1.23](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.22...@alwatr/global-scope@1.1.23) (2024-10-08)
317
-
318
- **Note:** Version bump only for package @alwatr/global-scope
319
-
320
- ## [1.1.22](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.21...@alwatr/global-scope@1.1.22) (2024-09-29)
321
-
322
- ### Bug Fixes
323
-
324
- - all dependeny topology ([1c17f34](https://github.com/Alwatr/nanolib/commit/1c17f349adf3e98e2a80ab2da4f0f81028dc9c5f)) by @mohammadhonarvar
325
-
326
- ### Code Refactoring
327
-
328
- - **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
329
-
330
- ### Miscellaneous Chores
331
-
332
- - **global-scop:** change the license to AGPL-3.0 ([ad7c262](https://github.com/Alwatr/nanolib/commit/ad7c2629743115af18b9298c6a9ccb5172c27333)) by @ArmanAsadian
333
- - Update build and lint scripts ([392d0b7](https://github.com/Alwatr/nanolib/commit/392d0b71f446bce336b0256119a80f07aff794ba)) by @alimd
334
-
335
- ### Dependencies update
336
-
337
- - bump @types/node ([3d80fed](https://github.com/Alwatr/nanolib/commit/3d80fedaf720af792feb060c2f81c737ebb84e11)) by @dependabot[bot]
338
-
339
- ## [1.1.21](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.20...@alwatr/global-scope@1.1.21) (2024-09-21)
340
-
341
- **Note:** Version bump only for package @alwatr/global-scope
342
-
343
- ## [1.1.20](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.19...@alwatr/global-scope@1.1.20) (2024-09-15)
344
-
345
- ### Dependencies update
346
-
347
- - bump the development-dependencies group across 1 directory with 10 updates ([9ed98ff](https://github.com/Alwatr/nanolib/commit/9ed98ffd0668d5a36e255c82edab3af53bffda8f)) by @dependabot[bot]
348
- - update ([c36ed50](https://github.com/Alwatr/nanolib/commit/c36ed50f68da2f5608ccd96119963a16cfacb4ce)) by @alimd
349
-
350
- ## [1.1.19](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.18...@alwatr/global-scope@1.1.19) (2024-08-31)
351
-
352
- ### Miscellaneous Chores
353
-
354
- - Update package.json exports for [@alwatr](https://github.com/alwatr) packages ([dacb362](https://github.com/Alwatr/nanolib/commit/dacb362b145e3c51b4aba00ff643687a3fac11d2)) by @
355
-
356
- ## [1.1.18](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.17...@alwatr/global-scope@1.1.18) (2024-08-31)
357
-
358
- ### Dependencies update
359
-
360
- - update all dependencies ([1e0c30e](https://github.com/Alwatr/nanolib/commit/1e0c30e6a3a8e19deb5185814e24ab6c08dca573)) by @alimd
361
-
362
- ## [1.1.17](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.16...@alwatr/global-scope@1.1.17) (2024-07-04)
363
-
364
- ### Dependencies update
365
-
366
- - update all dependencies ([0e908b4](https://github.com/Alwatr/nanolib/commit/0e908b476a6b976ec2447f864c8cafcbb8a0f099)) by @
367
-
368
- ## [1.1.16](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.15...@alwatr/global-scope@1.1.16) (2024-05-12)
369
-
370
- ### Dependencies update
371
-
372
- - upgrade ([6dbd300](https://github.com/Alwatr/nanolib/commit/6dbd300642c9bcc9e7d0b281e244bf1b06eb1c38)) by @alimd
373
-
374
- ## [1.1.15](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.14...@alwatr/global-scope@1.1.15) (2024-04-25)
375
-
376
- **Note:** Version bump only for package @alwatr/global-scope
377
-
378
- ## [1.1.14](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.13...@alwatr/global-scope@1.1.14) (2024-03-28)
379
-
380
- **Note:** Version bump only for package @alwatr/global-scope
381
-
382
- ## [1.1.13](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.12...@alwatr/global-scope@1.1.13) (2024-01-31)
383
-
384
- ### Miscellaneous Chores
385
-
386
- - **deps:** update ([1a45030](https://github.com/Alwatr/nanolib/commit/1a450305440b710a300787d4ca24b1ed8c6a39d7)) by @alimd
387
-
388
- ## [1.1.12](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.11...@alwatr/global-scope@1.1.12) (2024-01-24)
389
-
390
- **Note:** Version bump only for package @alwatr/global-scope
391
-
392
- ## [1.1.11](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.10...@alwatr/global-scope@1.1.11) (2024-01-20)
393
-
394
- **Note:** Version bump only for package @alwatr/global-scope
395
-
396
- ## [1.1.10](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.9...@alwatr/global-scope@1.1.10) (2024-01-16)
397
-
398
- **Note:** Version bump only for package @alwatr/global-scope
399
-
400
- ## [1.1.9](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.8...@alwatr/global-scope@1.1.9) (2024-01-08)
401
-
402
- **Note:** Version bump only for package @alwatr/global-scope
403
-
404
- ## [1.1.8](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.7...@alwatr/global-scope@1.1.8) (2024-01-03)
405
-
406
- **Note:** Version bump only for package @alwatr/global-scope
407
-
408
- ## [1.1.7](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.6...@alwatr/global-scope@1.1.7) (2024-01-03)
409
-
410
- **Note:** Version bump only for package @alwatr/global-scope
411
-
412
- ## [1.1.6](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.5...@alwatr/global-scope@1.1.6) (2023-12-26)
413
-
414
- **Note:** Version bump only for package @alwatr/global-scope
415
-
416
- ## [1.1.5](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.4...@alwatr/global-scope@1.1.5) (2023-12-26)
417
-
418
- **Note:** Version bump only for package @alwatr/global-scope
419
-
420
- ## [1.1.4](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.3...@alwatr/global-scope@1.1.4) (2023-12-23)
421
-
422
- ### Bug Fixes
423
-
424
- - tsBuildInfoFile path in tsconfig.json files ([9c4ba01](https://github.com/Alwatr/nanolib/commit/9c4ba01afdd6657de4e5feef09bb6ee03d9ce053)) by @
425
-
426
- ## [1.1.3](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.2...@alwatr/global-scope@1.1.3) (2023-12-23)
427
-
428
- **Note:** Version bump only for package @alwatr/global-scope
429
-
430
- ## [1.1.2](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.1...@alwatr/global-scope@1.1.2) (2023-12-23)
431
-
432
- **Note:** Version bump only for package @alwatr/global-scope
433
-
434
- ## [1.1.1](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.1.0...@alwatr/global-scope@1.1.1) (2023-12-23)
435
-
436
- ### Bug Fixes
437
-
438
- - update to latest nano-build with preset ([a4d3c35](https://github.com/Alwatr/nanolib/commit/a4d3c35f9d86521312bd16dd9853519f4ed2e0b4)) by @
439
-
440
- # [1.1.0](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.0.1...@alwatr/global-scope@1.1.0) (2023-12-22)
441
-
442
- ### Features
443
-
444
- - **global-scope:** polyfill for globalThis ([17ac530](https://github.com/Alwatr/nanolib/commit/17ac530922c4b4300f370ece38b155d2b3d6713a)) by @alimd
445
-
446
- ## [1.0.1](https://github.com/Alwatr/nanolib/compare/@alwatr/global-scope@1.0.0...@alwatr/global-scope@1.0.1) (2023-12-22)
447
-
448
- **Note:** Version bump only for package @alwatr/global-scope
449
-
450
- # 1.0.0 (2023-12-22)
451
-
452
- ### Features
453
-
454
- - **global-scope:** Add globalScope and sharedScope\_ variables ([9e9f2ee](https://github.com/Alwatr/nanolib/commit/9e9f2ee77a48cd1451a80be72d33f40cbef33a52)) by @alimd
455
- - **global-scope:** new package ([b3cd89e](https://github.com/Alwatr/nanolib/commit/b3cd89ef0172d65a50772c5137a8f9bef440b306)) by @alimd
package/dist/main.cjs DELETED
@@ -1,3 +0,0 @@
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});
3
- //# sourceMappingURL=main.cjs.map
package/dist/main.cjs.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/main.ts"],
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,QAAmB,iCAAiC,CAC9F,GAAG,EAYI,SAAS,eAAsE,CACpF,OAAO,YACT",
6
- "names": []
7
- }
package/dist/main.mjs DELETED
@@ -1,3 +0,0 @@
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};
3
- //# sourceMappingURL=main.mjs.map
package/dist/main.mjs.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/main.ts"],
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,QAAmB,iCAAiC,CAC9F,GAAG,EAYI,SAAS,eAAsE,CACpF,OAAO,YACT",
6
- "names": []
7
- }