Commit e1a94c5
feat: improve module provider validation and dispose handling (#3597)
* feat: improve BaseModuleProvider instanceof validation
- Enhance Symbol.hasInstance to validate version as valid semver
- Ensure dispose property is a function
- Add proper TSDoc documentation
- Create changeset for patch release
* fix: ensure dispose method proxy binding in AuthProvider
- Fix dispose method proxy handling to ensure proper binding when accessed through proxy
- Create changeset for patch release
* Update packages/modules/module/src/lib/provider/BaseModuleProvider.ts
Co-authored-by: Copilot <[email protected]>
* docs: add comment explaining use of 'in' operator in Symbol.hasInstance
- Clarify why we check prototype chain instead of own properties
- Explain duck-typing behavior for instanceof checks
* fix: resolve TypeScript errors in BaseModuleProvider Symbol.hasInstance
Use Record<string, unknown> type assertion instead of casting to BaseModuleProvider
to avoid accessing properties on object type errors reported by reviewdog.
---------
Co-authored-by: Copilot <[email protected]>1 parent dcdec9f commit e1a94c5
File tree
4 files changed
+44
-3
lines changed- .changeset
- packages/modules
- module/src/lib/provider
- msal/src/v2
4 files changed
+44
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 29 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | 5 | | |
3 | 6 | | |
4 | 7 | | |
5 | | - | |
6 | | - | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
18 | 45 | | |
19 | 46 | | |
20 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
150 | 152 | | |
151 | 153 | | |
152 | 154 | | |
| |||
170 | 172 | | |
171 | 173 | | |
172 | 174 | | |
| 175 | + | |
| 176 | + | |
173 | 177 | | |
174 | 178 | | |
0 commit comments