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