Skip to content

Commit 0ba4bcf

Browse files
committed
cleanup: removes deprecation warnings
1 parent 365a59a commit 0ba4bcf

File tree

3 files changed

+2
-42
lines changed

3 files changed

+2
-42
lines changed

app-config-encryption/src/index.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,10 @@ export * from './secret-agent';
88
export * from './secret-agent-tls';
99

1010
/** Decrypts inline encrypted values */
11-
export default function encryptedDirective(
12-
symmetricKey?: DecryptedSymmetricKey,
13-
shouldShowDeprecationNotice?: true,
14-
): ParsingExtension {
11+
export default function encryptedDirective(symmetricKey?: DecryptedSymmetricKey): ParsingExtension {
1512
return named('encryption', (value) => {
1613
if (typeof value === 'string' && value.startsWith('enc:')) {
1714
return async (parse) => {
18-
if (shouldShowDeprecationNotice) {
19-
logger.warn(
20-
'Detected deprecated use of @app-config/encryption parsing extension. Please install @app-config/encryption and add it to your meta file "parsingExtensions".',
21-
);
22-
}
23-
2415
const decrypted = await decryptValue(value, symmetricKey);
2516

2617
return parse(decrypted, { fromSecrets: true, parsedFromEncryptedValue: true });

app-config-git/src/index.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ class GitError extends Fallbackable {}
88
/** Access to the git branch and commit ref */
99
export default function gitRefDirectives(
1010
getStatus: typeof gitStatus = gitStatus,
11-
shouldShowDeprecationNotice?: true,
1211
): ParsingExtension {
1312
return named(
1413
'$git',
@@ -17,12 +16,6 @@ export default function gitRefDirectives(
1716
validateOptions(
1817
(SchemaBuilder) => SchemaBuilder.stringSchema(),
1918
(value) => async (parse) => {
20-
if (shouldShowDeprecationNotice) {
21-
logger.warn(
22-
'Detected deprecated use of @app-config/git parsing extension. Please install @app-config/git and add it to your meta file "parsingExtensions".',
23-
);
24-
}
25-
2619
switch (value) {
2720
case 'commit':
2821
return getStatus().then(({ commitRef }) => parse(commitRef, { shouldFlatten: true }));

app-config-v1-compat/src/index.ts

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { FileSource } from '@app-config/node';
77
import { logger } from '@app-config/logging';
88

99
/** V1 app-config compatibility */
10-
export default function v1Compat(shouldShowDeprecationNotice?: true): ParsingExtension {
10+
export default function v1Compat(): ParsingExtension {
1111
return named('v1-compat', (value, [_, key], parentKeys) => {
1212
// only apply in top-level app-config property
1313
if (parentKeys[parentKeys.length - 1]?.[0] !== Root) {
@@ -46,25 +46,13 @@ export default function v1Compat(shouldShowDeprecationNotice?: true): ParsingExt
4646
// TODO: multiple properties defined
4747

4848
if ('extends' in value) {
49-
if (shouldShowDeprecationNotice) {
50-
logger.warn(
51-
'Detected deprecated use of @app-config/v1-compat parsing extension. Please install @app-config/v1-compat and add it to your meta file "parsingExtensions".',
52-
);
53-
}
54-
5549
return parse(
5650
{ $extends: await resolveAmbiguousFilename(value.extends as string) },
5751
{ shouldMerge: true },
5852
);
5953
}
6054

6155
if ('extendsOptional' in value) {
62-
if (shouldShowDeprecationNotice) {
63-
logger.warn(
64-
'Detected deprecated use of @app-config/v1-compat parsing extension. Please install @app-config/v1-compat and add it to your meta file "parsingExtensions".',
65-
);
66-
}
67-
6856
return parse(
6957
{
7058
$extends: {
@@ -77,25 +65,13 @@ export default function v1Compat(shouldShowDeprecationNotice?: true): ParsingExt
7765
}
7866

7967
if ('override' in value) {
80-
if (shouldShowDeprecationNotice) {
81-
logger.warn(
82-
'Detected deprecated use of @app-config/v1-compat parsing extension. Please install @app-config/v1-compat and add it to your meta file "parsingExtensions".',
83-
);
84-
}
85-
8668
return parse(
8769
{ $override: await resolveAmbiguousFilename(value.override as string) },
8870
{ shouldOverride: true },
8971
);
9072
}
9173

9274
if ('overrideOptional' in value) {
93-
if (shouldShowDeprecationNotice) {
94-
logger.warn(
95-
'Detected deprecated use of @app-config/v1-compat parsing extension. Please install @app-config/v1-compat and add it to your meta file "parsingExtensions".',
96-
);
97-
}
98-
9975
return parse(
10076
{
10177
$override: {

0 commit comments

Comments
 (0)