Skip to content

Commit

Permalink
Update @balena/lint to v8.2.7
Browse files Browse the repository at this point in the history
Change-type: patch
  • Loading branch information
joshbwlng committed Aug 2, 2024
1 parent 4030ebb commit c6b6713
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"devDependencies": {
"@balena/abstract-sql-compiler": "^9.2.0",
"@balena/lint": "^8.0.2",
"@balena/lint": "^8.2.7",
"@types/bcrypt": "^5.0.2",
"@types/chai": "^4.3.16",
"@types/chai-datetime": "^0.0.39",
Expand Down
2 changes: 1 addition & 1 deletion src/types/time.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const fetchProcessing: TypeUtils.FetchProcessing<Types['Read']> = (
) => {
if (data != null) {
// We append the date of the epoch so that we can parse this as a valid date.
return new Date('Thu, 01 Jan 1970 ' + data).toISOString();
return new Date(`Thu, 01 Jan 1970 ${data}`).toISOString();
}
return data;
};
Expand Down
2 changes: 1 addition & 1 deletion src/types/web-resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export const fetchProcessing: TypeUtils.FetchProcessing<Types['Read']> = (
*
*/
export const validate: TypeUtils.Validate<Types['Write'], DbWriteType> =
TypeUtils.validate.checkRequired(async (value: WebResource) => {
TypeUtils.validate.checkRequired((value: WebResource) => {
if (typeof value !== 'object') {
throw new Error(`is not an object: ${typeof value}`);
}
Expand Down
2 changes: 1 addition & 1 deletion test/Interval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import * as helpers from './helpers';
helpers.describe('Interval', (test) => {
describe('validate', function () {
test.validate(1, true, 1);
return test.validate('1', true, 1);
test.validate('1', true, 1);
});
});
4 changes: 2 additions & 2 deletions test/SHA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { expect } from 'chai';
helpers.describe('SHA', function (test) {
const password = 'my password';
describe('validate', () => {
test.validate(password, true, async (result) => {
expect(await test.type.compare(password, result)).to.be.true;
test.validate(password, true, (result) => {
expect(test.type.compare(password, result)).to.be.true;
});
});
});
2 changes: 1 addition & 1 deletion test/WebResource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ helpers.describe('WebResource', (test) => {
filename: 'logo.png',
href: 'test',
};
test.validate(smallWebResourceInput, true, async (value) => {
test.validate(smallWebResourceInput, true, (value) => {
expect(typeof value).to.equal('string');
const asObj = JSON.parse(value);
expect(asObj.filename).to.equal(smallWebResourceInput.filename);
Expand Down
6 changes: 3 additions & 3 deletions test/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const $describe = <T extends keyof typeof types>(
};
};

describe(typeName, () =>
describe(typeName, () => {
fn({
type,
types: {
Expand All @@ -91,8 +91,8 @@ const $describe = <T extends keyof typeof types>(
},
fetch: test('fetchProcessing' in type ? type.fetchProcessing : undefined),
validate: test(type.validate),
}),
);
});
});
};

export { $describe as describe };

0 comments on commit c6b6713

Please sign in to comment.