Skip to content

Commit

Permalink
Update dependency prettier to v3 (#835)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Francisco Giordano <[email protected]>
  • Loading branch information
renovate[bot] and frangio authored Jul 29, 2023
1 parent 6dba456 commit ea87958
Show file tree
Hide file tree
Showing 9 changed files with 199 additions and 17 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
"@typescript-eslint/parser": "^5.0.0",
"eslint": "^8.0.0",
"eslint-config-prettier": "^8.0.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-unicorn": "^46.0.0",
"ethers": "^6.6.0",
"lerna": "^5.0.0",
"nyc": "^15.1.0",
"prettier": "^2.0.5",
"prettier": "^3.0.0",
"typescript": "^4.0.0",
"wsrun": "^5.2.4"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/cli/validate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ test('withDefaults - all', t => {
t.is(opts.unsafeSkipStorageCheck, true);
t.is(opts.unsafeAllowCustomTypes, true);
t.is(opts.unsafeAllowLinkedLibraries, true);
t.true(opts.unsafeAllow.every((kind: string) => errorKinds.includes(kind as typeof errorKinds[number])));
t.true(opts.unsafeAllow.every((kind: string) => errorKinds.includes(kind as (typeof errorKinds)[number])));
});

test('withDefaults - invalid unsafeAllow', t => {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/cli/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function validateOptions(parsedArgs: minimist.ParsedArgs) {
}

function getUnsafeAllowKinds(unsafeAllow: string | undefined): ValidationError['kind'][] {
type errorKindsType = typeof errorKinds[number];
type errorKindsType = (typeof errorKinds)[number];

if (unsafeAllow === undefined) {
return [];
Expand Down
6 changes: 5 additions & 1 deletion packages/core/src/deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,11 @@ export async function waitAndValidateDeployment(
}

export class TransactionMinedTimeout extends UpgradesError {
constructor(readonly deployment: Deployment & RemoteDeploymentId, type?: string, configurableTimeout?: boolean) {
constructor(
readonly deployment: Deployment & RemoteDeploymentId,
type?: string,
configurableTimeout?: boolean,
) {
super(
`Timed out waiting for ${type ? type + ' ' : ''}contract deployment to address ${deployment.address} with ${
deployment.remoteDeploymentId
Expand Down
7 changes: 6 additions & 1 deletion packages/core/src/standalone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ export class UpgradeableContract {
readonly errors: ValidationError[];
readonly layout: StorageLayout;

constructor(readonly name: string, solcInput: SolcInput, solcOutput: SolcOutput, opts: ValidationOptions = {}) {
constructor(
readonly name: string,
solcInput: SolcInput,
solcOutput: SolcOutput,
opts: ValidationOptions = {},
) {
const decodeSrc = solcInputOutputDecoder(solcInput, solcOutput);
const validation = validate(solcOutput, decodeSrc);
this.version = getContractVersion(validation, name);
Expand Down
5 changes: 4 additions & 1 deletion packages/core/src/storage/compare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ export class StorageLayoutComparator {
stack = new Set<string>();
cache = new Map<string, TypeChange | undefined>();

constructor(readonly unsafeAllowCustomTypes = false, readonly unsafeAllowRenames = false) {}
constructor(
readonly unsafeAllowCustomTypes = false,
readonly unsafeAllowRenames = false,
) {}

compareLayouts(original: StorageItem[], updated: StorageItem[]): LayoutCompatibilityReport {
return new LayoutCompatibilityReport(this.layoutLevenshtein(original, updated, { allowAppend: true }));
Expand Down
5 changes: 4 additions & 1 deletion packages/core/src/validate/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ import { UpgradesError } from '../error';
import { UpgradeableContractErrorReport } from './report';

export class ValidationErrors extends UpgradesError {
constructor(contractName: string, readonly errors: ValidationError[]) {
constructor(
contractName: string,
readonly errors: ValidationError[],
) {
super(`Contract \`${contractName}\` is not upgrade safe`, () =>
new UpgradeableContractErrorReport(errors).explain(),
);
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/validate/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export type ValidationError =

interface ValidationErrorBase {
src: string;
kind: typeof errorKinds[number];
kind: (typeof errorKinds)[number];
}

interface ValidationErrorWithName extends ValidationErrorBase {
Expand Down
Loading

0 comments on commit ea87958

Please sign in to comment.