mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-19 05:37:53 +00:00
Switch _.assign usage to native versions
Change-type: patch
This commit is contained in:
parent
d0cb54537f
commit
a4a9a17c1a
@ -714,7 +714,7 @@ export class Service {
|
||||
// Typings are wrong here, the docker daemon accepts a string or string[],
|
||||
Entrypoint: this.config.entrypoint as string,
|
||||
Env: conversions.envObjectToArray(
|
||||
_.assign(
|
||||
Object.assign(
|
||||
{
|
||||
RESIN_DEVICE_NAME_AT_INIT: opts.deviceName,
|
||||
BALENA_DEVICE_NAME_AT_INIT: opts.deviceName,
|
||||
@ -996,7 +996,7 @@ export class Service {
|
||||
): { [envVarName: string]: string } {
|
||||
const defaultEnv: { [envVarName: string]: string } = {};
|
||||
for (const namespace of ['BALENA', 'RESIN']) {
|
||||
_.assign(
|
||||
Object.assign(
|
||||
defaultEnv,
|
||||
_.mapKeys(
|
||||
{
|
||||
|
@ -253,7 +253,7 @@ export function getHealthcheck(
|
||||
composeHealthcheckToServiceHealthcheck(composeHealthcheck);
|
||||
|
||||
// Overlay any compose healthcheck fields on the image healthchecks
|
||||
return _.assign(
|
||||
return Object.assign(
|
||||
{ test: ['NONE'] },
|
||||
imageServiceHealthcheck,
|
||||
composeServiceHealthcheck,
|
||||
@ -556,7 +556,7 @@ export function normalizeLabels(labels: { [key: string]: string }): {
|
||||
labels,
|
||||
(_v, k) => !(_.startsWith(k, 'io.balena.') || _.startsWith(k, 'io.resin.')),
|
||||
);
|
||||
return _.assign({}, otherLabels, legacyLabels, balenaLabels);
|
||||
return Object.assign({}, otherLabels, legacyLabels, balenaLabels);
|
||||
}
|
||||
|
||||
function compareArrayField(
|
||||
|
@ -17,7 +17,7 @@ export default class ConfigJsonConfigBackend {
|
||||
private cache: { [key: string]: unknown } = {};
|
||||
|
||||
private readonly init = _.once(async () =>
|
||||
_.assign(this.cache, await this.read()),
|
||||
Object.assign(this.cache, await this.read()),
|
||||
);
|
||||
|
||||
public constructor(schema: Schema.Schema, configPath?: string) {
|
||||
|
@ -311,7 +311,7 @@ export async function getCurrent(): Promise<Dictionary<string>> {
|
||||
const backends = await getConfigBackends();
|
||||
// Add each backends configurable values
|
||||
for (const backend of backends) {
|
||||
_.assign(currentConf, await getBootConfig(backend));
|
||||
Object.assign(currentConf, await getBootConfig(backend));
|
||||
}
|
||||
// Return compiled configuration
|
||||
return currentConf;
|
||||
|
@ -87,7 +87,7 @@ export class BalenaLogBackend extends LogBackend {
|
||||
return;
|
||||
}
|
||||
|
||||
message = _.assign(
|
||||
message = Object.assign(
|
||||
{
|
||||
timestamp: Date.now(),
|
||||
message: '',
|
||||
|
@ -32,7 +32,7 @@ export class LocalLogBackend extends LogBackend {
|
||||
// we would need a way of invalidating the cache
|
||||
const serviceName = await this.serviceNameResolver(svcId);
|
||||
|
||||
_.assign({}, { serviceName }, message);
|
||||
message = Object.assign({}, { serviceName }, message);
|
||||
}
|
||||
_.each(this.globalListeners, (listener) => {
|
||||
listener.push(`${JSON.stringify(message)}\n`);
|
||||
|
Loading…
Reference in New Issue
Block a user