feat(sdk): add bundle log level config#1341
Conversation
🦋 Changeset detectedLatest commit: 372de1a The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
📖 Docs Consistency Check✅ No inconsistencies found between documentation and implementation. Checked areas:
Implementation coverage verified:
Note: The feature applies to "deployment functions" (resolvers, executors, workflows, auth hooks, HTTP adapters). TailorDB migrations use a separate bundler and are intentionally not affected, which is consistent with the documentation's description of "deployment functions."
|
Fixed in 586da2d. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Code Metrics Report (packages/sdk)
Details | | main (a0d07a9) | #1341 (cb8d7a6) | +/- |
|--------------------|----------------|-----------------|-------|
+ | Coverage | 66.0% | 66.1% | +0.0% |
| Files | 394 | 396 | +2 |
| Lines | 13517 | 13548 | +31 |
+ | Covered | 8930 | 8961 | +31 |
+ | Code to Test Ratio | 1:0.4 | 1:0.4 | +0.0 |
| Code | 90255 | 90574 | +319 |
+ | Test | 39186 | 39339 | +153 |Code coverage of files in pull request scope (84.6% → 85.3%)
SDK Configure Bundle Size
Runtime Performance
Type Performance (instantiations)
Reported by octocov |
Summary
Adds
defineConfig({ logLevel })support to control whichconsole.*calls are retained in bundled Tailor functions.Main changes
logLevelconfig parsing, types, docs, and changeset coverage withDEBUGas the default.manualPureFunctionsacross resolver, executor, workflow, auth hook, and function test-run bundles.Supported log levels
DEBUG: keeps all checked console methods.INFO: dropsconsole.debugandconsole.trace; keeps info, warn, and error methods.WARN: drops debug and info-level methods; keepsconsole.warn,console.error, andconsole.assert.ERROR: drops debug, info, and warn methods; keepsconsole.errorandconsole.assert.SILENT: drops all configured console methods, including debug, info, warn, error, and assert.Bundle output check
WARN, generated bundled JS dropsconsole.debug,console.log, andconsole.info, while keepingconsole.warnandconsole.error.DEBUG, generated bundled JS keeps all checked console methods.