trickle-observe 0.2.81 → 0.2.82
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/observe-register.js +12 -0
- package/dist/vite-plugin.js +10 -1
- package/dist-esm/vite-plugin.js +10 -1
- package/package.json +1 -1
- package/src/observe-register.ts +7 -0
- package/src/vite-plugin.ts +6 -1
package/dist/observe-register.js
CHANGED
|
@@ -182,6 +182,18 @@ function findVarDeclarations(source, lineOffset = 0) {
|
|
|
182
182
|
continue;
|
|
183
183
|
if (varName === '_a' || varName === '_b' || varName === '_c')
|
|
184
184
|
continue; // TS compiled vars
|
|
185
|
+
// Skip TS compiler helpers and module internals
|
|
186
|
+
if (varName === '__createBinding' || varName === '__setModuleDefault' || varName === '__importStar' || varName === '__importDefault')
|
|
187
|
+
continue;
|
|
188
|
+
if (varName === '__decorate' || varName === '__metadata' || varName === '__param' || varName === '__awaiter')
|
|
189
|
+
continue;
|
|
190
|
+
if (varName === 'ownKeys' || varName === 'desc' || varName === '_')
|
|
191
|
+
continue;
|
|
192
|
+
// Skip React Refresh / HMR internals
|
|
193
|
+
if (varName === 'prevRefreshReg' || varName === 'prevRefreshSig' || varName === 'inWebWorker' || varName === 'invalidateMessage')
|
|
194
|
+
continue;
|
|
195
|
+
if (varName === '_s' || varName === '_c2' || varName === '_s2')
|
|
196
|
+
continue;
|
|
185
197
|
// Check if this is a require() call — skip those (they're imports, not interesting values)
|
|
186
198
|
const restOfLine = source.slice(vmatch.index + vmatch[0].length - 1, vmatch.index + vmatch[0].length + 200);
|
|
187
199
|
if (/^\s*require\s*\(/.test(restOfLine))
|
package/dist/vite-plugin.js
CHANGED
|
@@ -263,9 +263,15 @@ function findVarDeclarations(source) {
|
|
|
263
263
|
// Skip trickle internals
|
|
264
264
|
if (varName.startsWith('__trickle'))
|
|
265
265
|
continue;
|
|
266
|
-
// Skip TS compiled vars
|
|
266
|
+
// Skip TS compiled vars and helpers
|
|
267
267
|
if (varName === '_a' || varName === '_b' || varName === '_c')
|
|
268
268
|
continue;
|
|
269
|
+
if (varName === '__createBinding' || varName === '__setModuleDefault' || varName === '__importStar' || varName === '__importDefault')
|
|
270
|
+
continue;
|
|
271
|
+
if (varName === '__decorate' || varName === '__metadata' || varName === '__param' || varName === '__awaiter')
|
|
272
|
+
continue;
|
|
273
|
+
if (varName === 'ownKeys' || varName === 'desc')
|
|
274
|
+
continue;
|
|
269
275
|
// Skip React Refresh / HMR internals (Vite, webpack, Next.js inject these)
|
|
270
276
|
if (varName === 'prevRefreshReg' || varName === 'prevRefreshSig' || varName === 'inWebWorker' || varName === 'invalidateMessage')
|
|
271
277
|
continue;
|
|
@@ -518,6 +524,9 @@ function findReassignments(source) {
|
|
|
518
524
|
// Skip 'this', 'self', 'super' (not reassignable in practice)
|
|
519
525
|
if (varName === 'this' || varName === 'super')
|
|
520
526
|
continue;
|
|
527
|
+
// Skip TS compiler helpers and module internals
|
|
528
|
+
if (varName === 'ownKeys' || varName === 'desc')
|
|
529
|
+
continue;
|
|
521
530
|
// Skip React Refresh / HMR internals and discard variables
|
|
522
531
|
if (varName === 'prevRefreshReg' || varName === 'prevRefreshSig' || varName === 'inWebWorker')
|
|
523
532
|
continue;
|
package/dist-esm/vite-plugin.js
CHANGED
|
@@ -251,9 +251,15 @@ function findVarDeclarations(source) {
|
|
|
251
251
|
// Skip trickle internals
|
|
252
252
|
if (varName.startsWith('__trickle'))
|
|
253
253
|
continue;
|
|
254
|
-
// Skip TS compiled vars
|
|
254
|
+
// Skip TS compiled vars and helpers
|
|
255
255
|
if (varName === '_a' || varName === '_b' || varName === '_c')
|
|
256
256
|
continue;
|
|
257
|
+
if (varName === '__createBinding' || varName === '__setModuleDefault' || varName === '__importStar' || varName === '__importDefault')
|
|
258
|
+
continue;
|
|
259
|
+
if (varName === '__decorate' || varName === '__metadata' || varName === '__param' || varName === '__awaiter')
|
|
260
|
+
continue;
|
|
261
|
+
if (varName === 'ownKeys' || varName === 'desc')
|
|
262
|
+
continue;
|
|
257
263
|
// Skip React Refresh / HMR internals (Vite, webpack, Next.js inject these)
|
|
258
264
|
if (varName === 'prevRefreshReg' || varName === 'prevRefreshSig' || varName === 'inWebWorker' || varName === 'invalidateMessage')
|
|
259
265
|
continue;
|
|
@@ -506,6 +512,9 @@ export function findReassignments(source) {
|
|
|
506
512
|
// Skip 'this', 'self', 'super' (not reassignable in practice)
|
|
507
513
|
if (varName === 'this' || varName === 'super')
|
|
508
514
|
continue;
|
|
515
|
+
// Skip TS compiler helpers and module internals
|
|
516
|
+
if (varName === 'ownKeys' || varName === 'desc')
|
|
517
|
+
continue;
|
|
509
518
|
// Skip React Refresh / HMR internals and discard variables
|
|
510
519
|
if (varName === 'prevRefreshReg' || varName === 'prevRefreshSig' || varName === 'inWebWorker')
|
|
511
520
|
continue;
|
package/package.json
CHANGED
package/src/observe-register.ts
CHANGED
|
@@ -174,6 +174,13 @@ function findVarDeclarations(source: string, lineOffset: number = 0): Array<{ li
|
|
|
174
174
|
if (varName === '__trickle_mod' || varName === '__trickle_wrap' || varName === '__trickle_tv') continue;
|
|
175
175
|
if (varName.startsWith('__trickle')) continue;
|
|
176
176
|
if (varName === '_a' || varName === '_b' || varName === '_c') continue; // TS compiled vars
|
|
177
|
+
// Skip TS compiler helpers and module internals
|
|
178
|
+
if (varName === '__createBinding' || varName === '__setModuleDefault' || varName === '__importStar' || varName === '__importDefault') continue;
|
|
179
|
+
if (varName === '__decorate' || varName === '__metadata' || varName === '__param' || varName === '__awaiter') continue;
|
|
180
|
+
if (varName === 'ownKeys' || varName === 'desc' || varName === '_') continue;
|
|
181
|
+
// Skip React Refresh / HMR internals
|
|
182
|
+
if (varName === 'prevRefreshReg' || varName === 'prevRefreshSig' || varName === 'inWebWorker' || varName === 'invalidateMessage') continue;
|
|
183
|
+
if (varName === '_s' || varName === '_c2' || varName === '_s2') continue;
|
|
177
184
|
|
|
178
185
|
// Check if this is a require() call — skip those (they're imports, not interesting values)
|
|
179
186
|
const restOfLine = source.slice(vmatch.index + vmatch[0].length - 1, vmatch.index + vmatch[0].length + 200);
|
package/src/vite-plugin.ts
CHANGED
|
@@ -255,8 +255,11 @@ function findVarDeclarations(source: string): Array<{ lineEnd: number; varName:
|
|
|
255
255
|
|
|
256
256
|
// Skip trickle internals
|
|
257
257
|
if (varName.startsWith('__trickle')) continue;
|
|
258
|
-
// Skip TS compiled vars
|
|
258
|
+
// Skip TS compiled vars and helpers
|
|
259
259
|
if (varName === '_a' || varName === '_b' || varName === '_c') continue;
|
|
260
|
+
if (varName === '__createBinding' || varName === '__setModuleDefault' || varName === '__importStar' || varName === '__importDefault') continue;
|
|
261
|
+
if (varName === '__decorate' || varName === '__metadata' || varName === '__param' || varName === '__awaiter') continue;
|
|
262
|
+
if (varName === 'ownKeys' || varName === 'desc') continue;
|
|
260
263
|
// Skip React Refresh / HMR internals (Vite, webpack, Next.js inject these)
|
|
261
264
|
if (varName === 'prevRefreshReg' || varName === 'prevRefreshSig' || varName === 'inWebWorker' || varName === 'invalidateMessage') continue;
|
|
262
265
|
if (varName === '_s' || varName === '_c2' || varName === '_s2') continue;
|
|
@@ -491,6 +494,8 @@ export function findReassignments(source: string): Array<{ lineEnd: number; varN
|
|
|
491
494
|
if (varName === '_a' || varName === '_b' || varName === '_c') continue;
|
|
492
495
|
// Skip 'this', 'self', 'super' (not reassignable in practice)
|
|
493
496
|
if (varName === 'this' || varName === 'super') continue;
|
|
497
|
+
// Skip TS compiler helpers and module internals
|
|
498
|
+
if (varName === 'ownKeys' || varName === 'desc') continue;
|
|
494
499
|
// Skip React Refresh / HMR internals and discard variables
|
|
495
500
|
if (varName === 'prevRefreshReg' || varName === 'prevRefreshSig' || varName === 'inWebWorker') continue;
|
|
496
501
|
if (varName === '_s' || varName === '_c2' || varName === '_s2' || varName === '_') continue;
|