Skip to content

Commit 92bc127

Browse files
authored
Fix tsc error for legacy module resolution. (#1763)
We restore 'typesVersions' in package.json to support TypeScript projects using 'moduleResolution: node'. This legacy resolution mode ignores the 'exports' field, causing compilation errors when importing subpaths like 'firebase-functions/https'. Restoring 'typesVersions' ensures compatibility for users who haven't migrated to 'node16' or 'nodenext' resolution. Unblocks firebase/functions-samples#1227.
1 parent 7f435e2 commit 92bc127

File tree

1 file changed

+169
-0
lines changed

1 file changed

+169
-0
lines changed

package.json

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,175 @@
304304
"require": "./lib/v2/providers/dataconnect.js"
305305
}
306306
},
307+
"typesVersions": {
308+
"*": {
309+
"logger": [
310+
"lib/logger"
311+
],
312+
"logger/compat": [
313+
"lib/logger/compat"
314+
],
315+
"params": [
316+
"lib/params"
317+
],
318+
"v1": [
319+
"lib/v1"
320+
],
321+
"v1/analytics": [
322+
"lib/v1/providers/analytics"
323+
],
324+
"v1/auth": [
325+
"lib/v1/providers/auth"
326+
],
327+
"v1/database": [
328+
"lib/v1/providers/database"
329+
],
330+
"v1/firestore": [
331+
"lib/v1/providers/firestore"
332+
],
333+
"v1/https": [
334+
"lib/v1/providers/https"
335+
],
336+
"v1/pubsub": [
337+
"lib/v1/providers/pubsub"
338+
],
339+
"v1/remoteConfig": [
340+
"lib/v1/providers/remoteConfig"
341+
],
342+
"v1/storage": [
343+
"lib/v1/providers/storage"
344+
],
345+
"v1/tasks": [
346+
"lib/v1/providers/tasks"
347+
],
348+
"v1/testLab": [
349+
"lib/v1/providers/testLab"
350+
],
351+
"core": [
352+
"lib/v2/core"
353+
],
354+
"options": [
355+
"lib/v2/options"
356+
],
357+
"https": [
358+
"lib/v2/providers/https"
359+
],
360+
"pubsub": [
361+
"lib/v2/providers/pubsub"
362+
],
363+
"storage": [
364+
"lib/v2/providers/storage"
365+
],
366+
"tasks": [
367+
"lib/v2/providers/tasks"
368+
],
369+
"alerts": [
370+
"lib/v2/providers/alerts/index"
371+
],
372+
"alerts/appDistribution": [
373+
"lib/v2/providers/alerts/appDistribution"
374+
],
375+
"alerts/billing": [
376+
"lib/v2/providers/alerts/billing"
377+
],
378+
"alerts/crashlytics": [
379+
"lib/v2/providers/alerts/crashlytics"
380+
],
381+
"alerts/performance": [
382+
"lib/v2/providers/alerts/performance"
383+
],
384+
"eventarc": [
385+
"lib/v2/providers/eventarc"
386+
],
387+
"identity": [
388+
"lib/v2/providers/identity"
389+
],
390+
"database": [
391+
"lib/v2/providers/database"
392+
],
393+
"scheduler": [
394+
"lib/v2/providers/scheduler"
395+
],
396+
"remoteConfig": [
397+
"lib/v2/providers/remoteConfig"
398+
],
399+
"testLab": [
400+
"lib/v2/providers/testLab"
401+
],
402+
"firestore": [
403+
"lib/v2/providers/firestore"
404+
],
405+
"dataconnect": [
406+
"lib/v2/providers/dataconnect"
407+
],
408+
"v2": [
409+
"lib/v2"
410+
],
411+
"v2/core": [
412+
"lib/v2/core"
413+
],
414+
"v2/alerts": [
415+
"lib/v2/providers/alerts/index"
416+
],
417+
"v2/alerts/appDistribution": [
418+
"lib/v2/providers/alerts/appDistribution"
419+
],
420+
"v2/alerts/billing": [
421+
"lib/v2/providers/alerts/billing"
422+
],
423+
"v2/alerts/crashlytics": [
424+
"lib/v2/providers/alerts/crashlytics"
425+
],
426+
"v2/alerts/performance": [
427+
"lib/v2/providers/alerts/performance"
428+
],
429+
"v2/base": [
430+
"lib/v2/base"
431+
],
432+
"v2/database": [
433+
"lib/v2/providers/database"
434+
],
435+
"v2/eventarc": [
436+
"lib/v2/providers/eventarc"
437+
],
438+
"v2/identity": [
439+
"lib/v2/providers/identity"
440+
],
441+
"v2/options": [
442+
"lib/v2/options"
443+
],
444+
"v2/https": [
445+
"lib/v2/providers/https"
446+
],
447+
"v2/pubsub": [
448+
"lib/v2/providers/pubsub"
449+
],
450+
"v2/storage": [
451+
"lib/v2/providers/storage"
452+
],
453+
"v2/tasks": [
454+
"lib/v2/providers/tasks"
455+
],
456+
"v2/scheduler": [
457+
"lib/v2/providers/scheduler"
458+
],
459+
"v2/remoteConfig": [
460+
"lib/v2/providers/remoteConfig"
461+
],
462+
"v2/testLab": [
463+
"lib/v2/providers/testLab"
464+
],
465+
"v2/firestore": [
466+
"lib/v2/providers/firestore"
467+
],
468+
"v2/dataconnect": [
469+
"lib/v2/providers/dataconnect"
470+
],
471+
"*": [
472+
"lib/v2/index.d.ts"
473+
]
474+
}
475+
},
307476
"publishConfig": {
308477
"registry": "https://wombat-dressing-room.appspot.com"
309478
},

0 commit comments

Comments
 (0)