From 2f44bca92f850a28033f0cb2247d333f8e3e9b8a Mon Sep 17 00:00:00 2001 From: Thomas Bouldin Date: Wed, 8 Jul 2026 12:07:14 -0700 Subject: [PATCH 1/4] refactor: remove lodash dependency from firebase-functions-test Removes lodash and @types/lodash as direct dependencies and replaces all usages with modern native ES6+ features and the existing ts-deepmerge library. - Compiled and ran the unit and integration tests: npm test - Validated with ESLint checks: npm run lint --- package-lock.json | 11 ++----- package.json | 2 -- spec/main.spec.ts | 18 +++++------- src/index.ts | 6 ++-- src/lifecycle.ts | 8 ++--- src/providers/firestore.ts | 60 ++++++++++++++++++++++++++------------ src/v1.ts | 26 +++++++++++------ 7 files changed, 75 insertions(+), 56 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3bdd9807..88c1399c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,8 +9,6 @@ "version": "3.5.0", "license": "MIT", "dependencies": { - "@types/lodash": "^4.14.202", - "lodash": "^4.17.21", "ts-deepmerge": "^8.0.0" }, "devDependencies": { @@ -2223,12 +2221,6 @@ "@types/node": "*" } }, - "node_modules/@types/lodash": { - "version": "4.17.24", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.24.tgz", - "integrity": "sha512-gIW7lQLZbue7lRSWEFql49QJJWThrTFFeIMJdp3eH4tKoxm1OvEPg02rm4wCCSHS0cL3/Fizimb35b7k8atwsQ==", - "license": "MIT" - }, "node_modules/@types/long": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", @@ -8734,7 +8726,8 @@ "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true }, "node_modules/lodash._objecttypes": { "version": "2.4.1", diff --git a/package.json b/package.json index 2337d542..945a0df4 100644 --- a/package.json +++ b/package.json @@ -38,8 +38,6 @@ }, "homepage": "https://github.com/firebase/firebase-functions-test#readme", "dependencies": { - "@types/lodash": "^4.14.202", - "lodash": "^4.17.21", "ts-deepmerge": "^8.0.0" }, "devDependencies": { diff --git a/spec/main.spec.ts b/spec/main.spec.ts index 703495c8..8baa367f 100644 --- a/spec/main.spec.ts +++ b/spec/main.spec.ts @@ -22,8 +22,6 @@ import { expect } from 'chai'; import * as functions from 'firebase-functions/v1'; -import { set } from 'lodash'; - import { mockConfig, makeChange, wrap } from '../src/main'; import { _makeResourceName, _extractParams } from '../src/v1'; import { features } from '../src/features'; @@ -36,10 +34,10 @@ describe('main', () => { describe('background functions', () => { const constructBackgroundCF = (eventType?: string) => { const cloudFunction = (input) => input; - set(cloudFunction, 'run', (data, context) => { + (cloudFunction as any).run = (data, context) => { return { data, context }; - }); - set(cloudFunction, '__endpoint', { + }; + (cloudFunction as any).__endpoint = { eventTrigger: { eventFilters: { resource: 'ref/{wildcard}/nested/{anotherWildcard}', @@ -47,7 +45,7 @@ describe('main', () => { eventType: eventType || 'event', retry: false, }, - }); + }; return cloudFunction as functions.CloudFunction; }; @@ -244,12 +242,12 @@ describe('main', () => { before(() => { const cloudFunction = (input) => input; - set(cloudFunction, 'run', (data, context) => { + (cloudFunction as any).run = (data, context) => { return { data, context }; - }); - set(cloudFunction, '__endpoint', { + }; + (cloudFunction as any).__endpoint = { callableTrigger: {}, - }); + }; wrappedCF = wrap(cloudFunction as functions.CloudFunction); }); diff --git a/src/index.ts b/src/index.ts index 3d1f8e47..a76de684 100644 --- a/src/index.ts +++ b/src/index.ts @@ -21,7 +21,6 @@ // SOFTWARE. import { AppOptions } from 'firebase-admin'; -import { merge } from 'lodash'; import { FirebaseFunctionsTest } from './lifecycle'; import { FeaturesList } from './features'; @@ -35,8 +34,9 @@ export = ( // Ensure other files get loaded after init function, since they load `firebase-functions` // which will issue warning if process.env.FIREBASE_CONFIG is not yet set. let features = require('./features').features; - features = merge({}, features, { + features = { + ...features, cleanup: () => test.cleanup(), - }); + }; return features; }; diff --git a/src/lifecycle.ts b/src/lifecycle.ts index a02e0574..54a4d7ab 100644 --- a/src/lifecycle.ts +++ b/src/lifecycle.ts @@ -20,9 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import { isEmpty } from 'lodash'; import { AppOptions } from 'firebase-admin'; -import { forEach } from 'lodash'; import { testApp } from './app'; @@ -53,7 +51,7 @@ export class FirebaseFunctionsTest { CLOUD_RUNTIME_CONFIG: process.env.CLOUD_RUNTIME_CONFIG, }; - if (isEmpty(firebaseConfig)) { + if (!firebaseConfig || Object.keys(firebaseConfig).length === 0) { process.env.FIREBASE_CONFIG = JSON.stringify({ databaseURL: 'https://not-a-project.firebaseio.com', storageBucket: 'not-a-project.appspot.com', @@ -72,13 +70,13 @@ export class FirebaseFunctionsTest { /** Complete clean up tasks. */ cleanup() { - forEach(this._oldEnv, (val, varName) => { + for (const [varName, val] of Object.entries(this._oldEnv)) { if (typeof val !== 'undefined') { process.env[varName] = val; } else { delete process.env[varName]; } - }); + } testApp().deleteApp(); } } diff --git a/src/providers/firestore.ts b/src/providers/firestore.ts index b5d587c5..60cb2508 100644 --- a/src/providers/firestore.ts +++ b/src/providers/firestore.ts @@ -22,8 +22,27 @@ import { Change } from 'firebase-functions/v1'; import { firestore, app } from 'firebase-admin'; -import { has, get, isEmpty, isPlainObject, mapValues } from 'lodash'; -import { inspect } from 'util'; + +function isPlainObject(value: any): boolean { + return ( + typeof value === 'object' && + value !== null && + Object.getPrototypeOf(value) === Object.prototype + ); +} + +function mapValues( + obj: Record, + fn: (val: T) => U +): Record { + const res: Record = {}; + for (const key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + res[key] = fn(obj[key]); + } + } + return res; +} import { testApp } from '../app'; @@ -85,21 +104,22 @@ export function makeDocumentSnapshot( } const resource = `projects/${project}/databases/(default)/documents/${refPath}`; - const proto = isEmpty(data) - ? resource - : { - fields: objectToValueProto(data), - createTime: dateToTimestampProto( - get(options, 'createTime', new Date().toISOString()) - ), - updateTime: dateToTimestampProto( - get(options, 'updateTime', new Date().toISOString()) - ), - name: resource, - }; + const proto = + !data || Object.keys(data).length === 0 + ? resource + : { + fields: objectToValueProto(data), + createTime: dateToTimestampProto( + options?.createTime ?? new Date().toISOString() + ), + updateTime: dateToTimestampProto( + options?.updateTime ?? new Date().toISOString() + ), + name: resource, + }; const readTimeProto = dateToTimestampProto( - get(options, 'readTime') || new Date().toISOString() + options?.readTime || new Date().toISOString() ); return firestoreService.snapshot_(proto, readTimeProto, 'json'); } @@ -206,8 +226,8 @@ export function objectToValueProto(data: object) { }; } if (val instanceof firestore.DocumentReference) { - const projectId: string = get(val, '_referencePath.projectId'); - const database: string = get(val, '_referencePath.databaseId'); + const projectId: string = (val as any)._referencePath?.projectId; + const database: string = (val as any)._referencePath?.databaseId; const referenceValue: string = [ 'projects', projectId, @@ -266,7 +286,11 @@ export function clearFirestoreData(options: { projectId: string } | string) { if (typeof options === 'string') { projectId = options; - } else if (typeof options === 'object' && has(options, 'projectId')) { + } else if ( + typeof options === 'object' && + options && + 'projectId' in options + ) { projectId = options.projectId; } else { throw new Error('projectId not specified'); diff --git a/src/v1.ts b/src/v1.ts index 6fed427d..8d97b003 100644 --- a/src/v1.ts +++ b/src/v1.ts @@ -20,7 +20,11 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import { has, merge, random, get } from 'lodash'; +import { merge } from 'ts-deepmerge'; + +function random(min: number, max: number): number { + return Math.floor(Math.random() * (max - min + 1)) + min; +} import { CloudFunction, @@ -124,13 +128,16 @@ export function wrapV1( export function wrapV1( cloudFunction: CloudFunction ): WrappedScheduledFunction | WrappedFunction> { - if (!has(cloudFunction, '__endpoint')) { + if (!cloudFunction || !('__endpoint' in cloudFunction)) { throw new Error( 'Wrap can only be called on functions written with the firebase-functions SDK.' ); } - if (has(cloudFunction, '__endpoint.scheduleTrigger')) { + if ( + cloudFunction?.__endpoint && + 'scheduleTrigger' in cloudFunction.__endpoint + ) { const scheduledWrapped: WrappedScheduledFunction = ( options: ContextOptions ) => { @@ -147,19 +154,21 @@ export function wrapV1( return scheduledWrapped; } - if (has(cloudFunction, '__endpoint.httpsTrigger')) { + if (cloudFunction?.__endpoint && 'httpsTrigger' in cloudFunction.__endpoint) { throw new Error( 'Wrap function is only available for `onCall` HTTP functions, not `onRequest`.' ); } - if (!has(cloudFunction, 'run')) { + if (!cloudFunction || !('run' in cloudFunction)) { throw new Error( 'This library can only be used with functions written with firebase-functions v1.0.0 and above' ); } - const isCallableFunction = has(cloudFunction, '__endpoint.callableTrigger'); + const isCallableFunction = + !!cloudFunction?.__endpoint && + 'callableTrigger' in cloudFunction.__endpoint; let wrapped: WrappedFunction = (data, options) => { // Although in Typescript we require `options` some of our JS samples do not pass it. @@ -183,8 +192,7 @@ export function wrapV1( const defaultContext = _makeDefaultContext(cloudFunction, _options, data); if ( - has(defaultContext, 'eventType') && - defaultContext.eventType !== undefined && + defaultContext?.eventType && defaultContext.eventType.match(/firebase.database/) ) { defaultContext.authType = 'UNAUTHENTICATED'; @@ -208,7 +216,7 @@ export function _makeResourceName( const wildcardRegex = new RegExp('{[^/{}]*}', 'g'); let resourceName = resource.replace(wildcardRegex, (wildcard) => { let wildcardNoBraces = wildcard.slice(1, -1); // .slice removes '{' and '}' from wildcard - let sub = get(params, wildcardNoBraces); + let sub = params?.[wildcardNoBraces]; return sub || wildcardNoBraces + random(1, 9); }); return resourceName; From 7a78706e7f87acb425933f448c8d9937b3b206ed Mon Sep 17 00:00:00 2001 From: Thomas Bouldin Date: Mon, 27 Jul 2026 13:26:59 -0700 Subject: [PATCH 2/4] refactor: address PR review feedback on lodash removal --- .DS_Store | Bin 0 -> 8196 bytes src/providers/firestore.ts | 16 +++++++--------- src/v1.ts | 31 ++++++++++++++++++++++++------- 3 files changed, 31 insertions(+), 16 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..825a61c7b0680532d63a6959365c96e3516e0b1f GIT binary patch literal 8196 zcmeHMziSjh6n^8adiVnlR0x7NjfJ8|QrfLy1J(u$QB>|OChDzwTyjM~aEqXwSXpaj zQWG>&txwS8g60uAbExIDMmFY-|>Qzz5`bwC|Z2h;&|;9qe7dp5Ur!@lpMI;sQe zz<=ogzaK0*V;ZpZ=w2Nd+z|knVA?fYclZKm1Ev8>kBFcdUkdc4CLA%0FUPzMd1=7X zqc0~D4j(2kn{Yxgjveb;mrf@2sG~Zd4%8j6m`bQi%XF94qVxNW^WSAGFS4vREP9x0 zpZ#*>$tJzO6vqd<#z!mSw}CuGDIMJ6r4^b`FJh--*XkKk!=taK&$Pe2V+}jj$%{%! zb5^9sz22M;Yn0O{QnLT~1~}Lw7n2%ZUH|;>@lU5g#4Gk`@rd`(TP#g28p8ef{*x24 zRYY>mULCIo&QK@sw;ql7j=o^NBlLg@8qgBm!rk)K1PYdDRo-{!z{&1zxl+^Ro88S% z{&{FzTdMq>e5w2R2Q~wr^D6ae46jD`EF!f;=PuSWq{cT-ZS}lF>quqISyB&C$$Ap# z8Ns){^o`8D3o<4(EMyz6?{7UXp;od_i$}cXBlEVvJKo9q@>CU(oImbtbA~#}SdT`0 zt!K=~TW%V#^yqeB3~m<&hF#d@c96m~HeedC^oR(W?*GmP9n^t6bD-s!XZZZT(ER)V zp6OF!bwC~X^A4CKTg>Lcm5!z5oCK literal 0 HcmV?d00001 diff --git a/src/providers/firestore.ts b/src/providers/firestore.ts index 60cb2508..572e2bfc 100644 --- a/src/providers/firestore.ts +++ b/src/providers/firestore.ts @@ -24,11 +24,11 @@ import { Change } from 'firebase-functions/v1'; import { firestore, app } from 'firebase-admin'; function isPlainObject(value: any): boolean { - return ( - typeof value === 'object' && - value !== null && - Object.getPrototypeOf(value) === Object.prototype - ); + if (typeof value !== 'object' || value === null) { + return false; + } + const proto = Object.getPrototypeOf(value); + return proto === null || proto === Object.prototype; } function mapValues( @@ -36,10 +36,8 @@ function mapValues( fn: (val: T) => U ): Record { const res: Record = {}; - for (const key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - res[key] = fn(obj[key]); - } + for (const [key, val] of Object.entries(obj)) { + res[key] = fn(val); } return res; } diff --git a/src/v1.ts b/src/v1.ts index 8d97b003..0487b778 100644 --- a/src/v1.ts +++ b/src/v1.ts @@ -26,6 +26,10 @@ function random(min: number, max: number): number { return Math.floor(Math.random() * (max - min + 1)) + min; } +function isObjectOrFunction(val: any): boolean { + return val !== null && (typeof val === 'object' || typeof val === 'function'); +} + import { CloudFunction, EventContext, @@ -128,14 +132,14 @@ export function wrapV1( export function wrapV1( cloudFunction: CloudFunction ): WrappedScheduledFunction | WrappedFunction> { - if (!cloudFunction || !('__endpoint' in cloudFunction)) { + if (!isObjectOrFunction(cloudFunction) || !('__endpoint' in cloudFunction)) { throw new Error( 'Wrap can only be called on functions written with the firebase-functions SDK.' ); } if ( - cloudFunction?.__endpoint && + isObjectOrFunction(cloudFunction?.__endpoint) && 'scheduleTrigger' in cloudFunction.__endpoint ) { const scheduledWrapped: WrappedScheduledFunction = ( @@ -146,7 +150,12 @@ export function wrapV1( _checkOptionValidity(['eventId', 'timestamp'], options); const defaultContext = _makeDefaultContext(cloudFunction, options); - const context = merge({}, defaultContext, options); + const context = merge.withOptions( + { allowUndefinedOverrides: false }, + {}, + defaultContext, + options + ); // @ts-ignore return cloudFunction.run(context); @@ -154,20 +163,23 @@ export function wrapV1( return scheduledWrapped; } - if (cloudFunction?.__endpoint && 'httpsTrigger' in cloudFunction.__endpoint) { + if ( + isObjectOrFunction(cloudFunction?.__endpoint) && + 'httpsTrigger' in cloudFunction.__endpoint + ) { throw new Error( 'Wrap function is only available for `onCall` HTTP functions, not `onRequest`.' ); } - if (!cloudFunction || !('run' in cloudFunction)) { + if (!isObjectOrFunction(cloudFunction) || !('run' in cloudFunction)) { throw new Error( 'This library can only be used with functions written with firebase-functions v1.0.0 and above' ); } const isCallableFunction = - !!cloudFunction?.__endpoint && + isObjectOrFunction(cloudFunction?.__endpoint) && 'callableTrigger' in cloudFunction.__endpoint; let wrapped: WrappedFunction = (data, options) => { @@ -198,7 +210,12 @@ export function wrapV1( defaultContext.authType = 'UNAUTHENTICATED'; defaultContext.auth = null; } - context = merge({}, defaultContext, _options); + context = merge.withOptions( + { allowUndefinedOverrides: false }, + {}, + defaultContext, + _options + ); } return cloudFunction.run(data, context); From 6eb032f9536d4823fbb2e61f3e9cc34cb26cdf02 Mon Sep 17 00:00:00 2001 From: Thomas Bouldin Date: Mon, 27 Jul 2026 13:43:23 -0700 Subject: [PATCH 3/4] test: update mockConfig tests for firebase-functions v7 compatibility --- package-lock.json | 43 ++++++++++++++++++++++---------- package.json | 2 +- spec/main.spec.ts | 14 +++++------ spec/providers/firestore.spec.ts | 2 +- src/v1.ts | 1 - tsconfig.json | 4 ++- tsconfig.release.json | 4 ++- 7 files changed, 44 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index 88c1399c..337d076d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "eslint": "^8.57.1", "eslint-config-prettier": "^10.1.8", "firebase-admin": "^12.0.0", - "firebase-functions": "^4.9.0", + "firebase-functions": "^7.3.0", "firebase-tools": "^13.15.4", "mocha": "^11.7.6", "prettier": "^2.8.8", @@ -5919,36 +5919,53 @@ "license": "MIT" }, "node_modules/firebase-functions": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/firebase-functions/-/firebase-functions-4.9.0.tgz", - "integrity": "sha512-IqxOEsVAWGcRv9KRGzWQR5mOFuNsil3vsfkRPPiaV1U/ATC27/jbahh4z8I4rW8Xqa6cQE5xqnw0ueyMH7i7Ag==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/firebase-functions/-/firebase-functions-7.3.0.tgz", + "integrity": "sha512-S3JhjESOWMq13iDodwgUPWNQ3gLAu7oTLDwF7hTtisyjVanEeQzYezgW+JTfd8I0kCJQzjGPC/wHQ19IL7CgaA==", "dev": true, + "license": "MIT", "dependencies": { "@types/cors": "^2.8.5", - "@types/express": "4.17.3", + "@types/express": "^4.17.21", "cors": "^2.8.5", - "express": "^4.17.1", + "express": "^4.21.0", "protobufjs": "^7.2.2" }, "bin": { "firebase-functions": "lib/bin/firebase-functions.js" }, "engines": { - "node": ">=14.10.0" + "node": ">=18.0.0" }, "peerDependencies": { - "firebase-admin": "^10.0.0 || ^11.0.0 || ^12.0.0" + "@apollo/server": "^5.2.0", + "@as-integrations/express4": "^1.1.2", + "firebase-admin": "^11.10.0 || ^12.0.0 || ^13.0.0 || ^14.0.0", + "graphql": "^16.12.0" + }, + "peerDependenciesMeta": { + "@apollo/server": { + "optional": true + }, + "@as-integrations/express4": { + "optional": true + }, + "graphql": { + "optional": true + } } }, "node_modules/firebase-functions/node_modules/@types/express": { - "version": "4.17.3", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.3.tgz", - "integrity": "sha512-I8cGRJj3pyOLs/HndoP+25vOqhqWkAZsWMEmq1qXy/b/M3ppufecUwaK2/TVDVxcV61/iSdhykUjQQ2DLSrTdg==", + "version": "4.17.25", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.25.tgz", + "integrity": "sha512-dVd04UKsfpINUnK0yBoYHDF3xu7xVH4BuDotC/xGuycx4CgbP48X/KF/586bcObxT0HENHXEU8Nqtu6NR+eKhw==", "dev": true, + "license": "MIT", "dependencies": { "@types/body-parser": "*", - "@types/express-serve-static-core": "*", - "@types/serve-static": "*" + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "^1" } }, "node_modules/firebase-tools": { diff --git a/package.json b/package.json index 945a0df4..785a26b0 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "eslint": "^8.57.1", "eslint-config-prettier": "^10.1.8", "firebase-admin": "^12.0.0", - "firebase-functions": "^4.9.0", + "firebase-functions": "^7.3.0", "firebase-tools": "^13.15.4", "mocha": "^11.7.6", "prettier": "^2.8.8", diff --git a/spec/main.spec.ts b/spec/main.spec.ts index 8baa367f..a21bd401 100644 --- a/spec/main.spec.ts +++ b/spec/main.spec.ts @@ -327,17 +327,15 @@ describe('main', () => { delete process.env.CLOUD_RUNTIME_CONFIG; }); - it('should mock functions.config()', () => { + it('should set CLOUD_RUNTIME_CONFIG', () => { mockConfig(config); - expect(functions.config()).to.deep.equal(config); + expect(JSON.parse(process.env.CLOUD_RUNTIME_CONFIG!)).to.deep.equal(config); }); - it('should purge singleton config object when it is present', () => { - mockConfig(config); - config.foo = { baz: 'qux' }; - mockConfig(config); - - expect(functions.config()).to.deep.equal(config); + it('should throw because functions.config() is removed in v7', () => { + expect(() => (functions as any).config()).to.throw( + 'functions.config() has been removed in firebase-functions v7' + ); }); }); }); diff --git a/spec/providers/firestore.spec.ts b/spec/providers/firestore.spec.ts index 34cd1694..97060553 100644 --- a/spec/providers/firestore.spec.ts +++ b/spec/providers/firestore.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import * as firebase from 'firebase-admin'; import * as sinon from 'sinon'; -import * as http from 'http'; +import http = require('http'); import { FeaturesList } from '../../src/features'; import fft = require('../../src/index'); diff --git a/src/v1.ts b/src/v1.ts index 0487b778..ac6aee6d 100644 --- a/src/v1.ts +++ b/src/v1.ts @@ -35,7 +35,6 @@ import { EventContext, Change, https, - config, database, firestore, HttpsFunction, diff --git a/tsconfig.json b/tsconfig.json index 39370476..1ce0f8a2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,9 @@ "outDir": ".tmp", "sourceMap": true, "target": "es6", - "typeRoots": ["node_modules/@types"] + "typeRoots": ["node_modules/@types"], + "esModuleInterop": true, + "skipLibCheck": true }, "include": ["src/**/*.ts", "spec/**/*.ts"] } diff --git a/tsconfig.release.json b/tsconfig.release.json index 1240c94f..35dea7be 100644 --- a/tsconfig.release.json +++ b/tsconfig.release.json @@ -7,7 +7,9 @@ "outDir": "lib", "stripInternal": true, "target": "es6", - "typeRoots": ["node_modules/@types"] + "typeRoots": ["node_modules/@types"], + "esModuleInterop": true, + "skipLibCheck": true }, "files": ["src/index.ts"] } From 4c738e88190a06b7713ef719d164e8ffe6a6a5c4 Mon Sep 17 00:00:00 2001 From: Thomas Bouldin Date: Mon, 27 Jul 2026 14:04:27 -0700 Subject: [PATCH 4/4] style: run prettier format on spec/main.spec.ts --- spec/main.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/main.spec.ts b/spec/main.spec.ts index a21bd401..882c3b43 100644 --- a/spec/main.spec.ts +++ b/spec/main.spec.ts @@ -329,7 +329,9 @@ describe('main', () => { it('should set CLOUD_RUNTIME_CONFIG', () => { mockConfig(config); - expect(JSON.parse(process.env.CLOUD_RUNTIME_CONFIG!)).to.deep.equal(config); + expect(JSON.parse(process.env.CLOUD_RUNTIME_CONFIG!)).to.deep.equal( + config + ); }); it('should throw because functions.config() is removed in v7', () => {