Skip to content

Commit 28a0ba3

Browse files
authored
Merge pull request #159 from launchcodedev/pkg-upgrades
chore: dep compatible upgrades
2 parents f63c676 + 45e99f6 commit 28a0ba3

File tree

12 files changed

+3359
-1661
lines changed

12 files changed

+3359
-1661
lines changed

app-config-cli/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ enum OptionGroups {
5757

5858
type SubcommandOptions<
5959
Options extends { [name: string]: yargs.Options },
60-
PositionalOptions extends { [name: string]: yargs.PositionalOptions }
60+
PositionalOptions extends { [name: string]: yargs.PositionalOptions },
6161
> = {
6262
name: string | string[];
6363
description?: string;
@@ -72,7 +72,7 @@ type SubcommandFn<Options extends { [name: string]: yargs.Options }> = (
7272

7373
function subcommand<
7474
Options extends { [name: string]: yargs.Options },
75-
PositionalOptions extends { [name: string]: yargs.PositionalOptions }
75+
PositionalOptions extends { [name: string]: yargs.PositionalOptions },
7676
>(
7777
desc: SubcommandOptions<Options, PositionalOptions>,
7878
run: SubcommandFn<Options & PositionalOptions>,

app-config-config/src/index.ts

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -195,23 +195,21 @@ export async function loadValidatedConfig(
195195
options?: ConfigLoadingOptions,
196196
schemaOptions?: SchemaLoadingOptions,
197197
): Promise<LoadedConfiguration> {
198-
const [
199-
{ validate, validationFunctionCode, schema },
200-
{ fullConfig, parsed, ...rest },
201-
] = await Promise.all([
202-
loadSchema({
203-
directory: options?.directory,
204-
fileNameBase: options?.fileNameBase ? `${options.fileNameBase}.schema` : undefined,
205-
environmentVariableName: options?.environmentVariableName
206-
? `${options.environmentVariableName}_SCHEMA`
207-
: undefined,
208-
environmentOverride: options?.environmentOverride,
209-
environmentAliases: options?.environmentAliases,
210-
environmentSourceNames: options?.environmentSourceNames,
211-
...schemaOptions,
212-
}),
213-
loadUnvalidatedConfig(options),
214-
]);
198+
const [{ validate, validationFunctionCode, schema }, { fullConfig, parsed, ...rest }] =
199+
await Promise.all([
200+
loadSchema({
201+
directory: options?.directory,
202+
fileNameBase: options?.fileNameBase ? `${options.fileNameBase}.schema` : undefined,
203+
environmentVariableName: options?.environmentVariableName
204+
? `${options.environmentVariableName}_SCHEMA`
205+
: undefined,
206+
environmentOverride: options?.environmentOverride,
207+
environmentAliases: options?.environmentAliases,
208+
environmentSourceNames: options?.environmentSourceNames,
209+
...schemaOptions,
210+
}),
211+
loadUnvalidatedConfig(options),
212+
]);
215213

216214
if (!isObject(fullConfig)) {
217215
throw new WasNotObject('Configuration was not an object');

app-config-core/src/common.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ describe('flattenObjectTree', () => {
6767
},
6868
stegosaurus: null,
6969
// cast because undefined isn't actually possible in JsonObject
70-
unicorn: (undefined as unknown) as null,
70+
unicorn: undefined as unknown as null,
7171
};
7272

7373
it('flattens a basic object', () => {

app-config-core/src/parsed-value.test.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,15 @@ describe('parseValue', () => {
6060
return false;
6161
};
6262

63-
const appendExtension = (suffix: string): ParsingExtension => (value) => {
64-
if (typeof value === 'string') {
65-
return (parse) => parse(value + suffix);
66-
}
67-
68-
return false;
69-
};
63+
const appendExtension =
64+
(suffix: string): ParsingExtension =>
65+
(value) => {
66+
if (typeof value === 'string') {
67+
return (parse) => parse(value + suffix);
68+
}
69+
70+
return false;
71+
};
7072

7173
const namedAppendExtension = (suffix: string): ParsingExtension => {
7274
const extension = appendExtension(suffix);

app-config-encryption/src/encryption.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ async function saveNewMetaFile(mutate: (props: MetaProperties) => MetaProperties
634634
}
635635

636636
function decodeTypedArray(buf: ArrayBuffer): string {
637-
return String.fromCharCode.apply(null, (new Uint16Array(buf) as any) as number[]);
637+
return String.fromCharCode.apply(null, new Uint16Array(buf) as any as number[]);
638638
}
639639

640640
function stringAsTypedArray(str: string): Uint16Array {

app-config-extension-utils/src/index.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ import {
88

99
const foo = forKey('$foo', () => (parse) => parse('foo!'));
1010
const bar = forKey('$bar', () => (parse) => parse('bar!'));
11-
const plusOne = forKey(['+1', '$plusOne'], (value) => (parse) =>
12-
parse((value as number) + 1, { shouldFlatten: true }),
11+
const plusOne = forKey(
12+
['+1', '$plusOne'],
13+
(value) => (parse) => parse((value as number) + 1, { shouldFlatten: true }),
1314
);
1415

1516
describe('forKey', () => {

app-config-extensions/src/env-var-directive.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,16 +132,14 @@ export function envVarDirective(
132132
);
133133
}
134134

135-
const validateObject: ValidationFunction<
136-
Record<string, any>
137-
> = validationFunction(({ emptySchema }) => emptySchema().addAdditionalProperties());
135+
const validateObject: ValidationFunction<Record<string, any>> = validationFunction(
136+
({ emptySchema }) => emptySchema().addAdditionalProperties(),
137+
);
138138

139139
const validateString: ValidationFunction<string> = validationFunction(({ stringSchema }) =>
140140
stringSchema(),
141141
);
142142

143-
const validateStringOrNull: ValidationFunction<
144-
string | null
145-
> = validationFunction(({ fromJsonSchema }) =>
146-
fromJsonSchema({ type: ['null', 'string'] } as const),
143+
const validateStringOrNull: ValidationFunction<string | null> = validationFunction(
144+
({ fromJsonSchema }) => fromJsonSchema({ type: ['null', 'string'] } as const),
147145
);

app-config-extensions/src/substitute-directive.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -193,19 +193,17 @@ function selectDefined<T>(...args: (T | null | undefined)[]): T | null {
193193
if (a !== undefined) return a;
194194
}
195195

196-
return (undefined as any) as T;
196+
return undefined as any as T;
197197
}
198198

199-
const validateObject: ValidationFunction<
200-
Record<string, any>
201-
> = validationFunction(({ emptySchema }) => emptySchema().addAdditionalProperties());
199+
const validateObject: ValidationFunction<Record<string, any>> = validationFunction(
200+
({ emptySchema }) => emptySchema().addAdditionalProperties(),
201+
);
202202

203203
const validateString: ValidationFunction<string> = validationFunction(({ stringSchema }) =>
204204
stringSchema(),
205205
);
206206

207-
const validateStringOrNull: ValidationFunction<
208-
string | null
209-
> = validationFunction(({ fromJsonSchema }) =>
210-
fromJsonSchema({ type: ['null', 'string'] } as const),
207+
const validateStringOrNull: ValidationFunction<string | null> = validationFunction(
208+
({ fromJsonSchema }) => fromJsonSchema({ type: ['null', 'string'] } as const),
211209
);

app-config-node/src/environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export function environmentOptionsFromContext(
131131
context: ParsingContext,
132132
): EnvironmentOptions | undefined {
133133
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
134-
return (context.environmentOptions as unknown) as EnvironmentOptions;
134+
return context.environmentOptions as unknown as EnvironmentOptions;
135135
}
136136

137137
export function currentEnvFromContext(

app-config-react-native/src/upstream-transformer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ if (reactNativeMinorVersion >= 59) {
6363
transformer = require('metro-bundler/build/transformer') as Transformer;
6464
} else {
6565
// handle RN <= 0.45
66-
const legacyUpstreamTransformer = require('react-native/packager/transformer') as LegacyTransformer;
66+
const legacyUpstreamTransformer =
67+
require('react-native/packager/transformer') as LegacyTransformer;
6768
transformer = {
6869
transform({ src, filename, options }: TransformOptions) {
6970
return legacyUpstreamTransformer.transform(src, filename, options);

0 commit comments

Comments
 (0)