Conversation
Agent-Logs-Url: https://github.com/dmno-dev/varlock/sessions/86c3a61d-4c29-49b1-b072-fecf43de4aef Co-authored-by: philmillman <3722211+philmillman@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dmno-dev/varlock/sessions/86c3a61d-4c29-49b1-b072-fecf43de4aef Co-authored-by: philmillman <3722211+philmillman@users.noreply.github.com>
|
The changes in this PR will be included in the next version bump.
|
| const msgPart = decVal.isStatic && _.isString(decVal.staticValue) | ||
| ? `: ${decVal.staticValue}` | ||
| : ''; | ||
| throw new SchemaError(`This config item is deprecated${msgPart}`, { isWarning: true }); |
There was a problem hiding this comment.
Im not sure about having a warning here. I thought it would just add it to the generated ts types?
The user knows it's likely still set, or else they would remove it from the schema altogether.
We could potentially still mark it somehow in the varlock load output, but the warning may be a bit too agressive?
There was a problem hiding this comment.
Yeah I'm on the fence there too. I could see a case for warning, especially in CI, but maybe we put it behind a flag?
| expect(g.configSchema.ALSO_NOT_DEPRECATED.isDeprecated).toBe(false); | ||
| }); | ||
|
|
||
| it('@deprecated is included in type gen info', async () => { |
There was a problem hiding this comment.
prob want one too checking the type output with just the @deprecated and no custom message
Co-authored-by: Theo Ephraim <theo@dmno.dev>
commit: |


Adds a
@deprecateddecorator for env-spec config items that surfaces a deprecation warning (never a hard error) and annotates generated TypeScript types with@deprecatedJSDoc so IDEs show strikethrough on access.Decorator behavior
warnvalidation state, noterror@deprecated=falseallows opt-out (useful for override scenarios)Changes
decorators.ts— registersdeprecatedinbuiltInItemDecorators;process()throws a warningSchemaErrorwith the optional message appended after:config-item.ts— addsisDeprecatedanddeprecationMessagegetters usingsimplifiedValuefrom the parsed decorator (no async resolution needed); extendsTypeGenItemInfowith both fieldstype-generation.ts— emits@deprecated [message]JSDoc tag wheninfo.isDeprecatedis true, enabling IDE strikethrough on deprecated env accessesdeprecated-decorator.test.ts— tests for warning-only behavior, message formatting,@deprecated=falseopt-out,validationState === 'warn', getter values, and type gen infoWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
api.iconify.design/usr/local/bin/node /usr/local/bin/node --experimental-import-meta-resolve --require /home/REDACTED/work/varlock/varlock/node_modules/vitest/suppress-warnings.cjs --conditions node --conditions development /home/REDACTED/work/varlock/varlock/node_modules/vitest/dist/workers/forks.js /home/REDACTED/.nvm/package.json /home/REDACTED/.nvm/rename_test.sh /home/REDACTED/.nvm/test k/no�� m(dns block)/usr/local/bin/node /usr/local/bin/node --experimental-import-meta-resolve --require /home/REDACTED/work/varlock/varlock/node_modules/vitest/suppress-warnings.cjs --conditions node --conditions development /home/REDACTED/work/varlock/varlock/node_modules/vitest/dist/workers/forks.js journal-or-kmsg ndor/bin/git tail bin/��(dns block)/usr/local/bin/node /usr/local/bin/node --experimental-import-meta-resolve --require /home/REDACTED/work/varlock/varlock/node_modules/vitest/suppress-warnings.cjs --conditions node --conditions development /home/REDACTED/work/varlock/varlock/node_modules/vitest/dist/workers/forks.js(dns block)If you need me to access, download, or install something from one of these locations, you can either: