Skip to content

Commit

Permalink
Merge branch 'check-build-included' of github.com:near/near-sdk-js in…
Browse files Browse the repository at this point in the history
…to check-build-included
  • Loading branch information
ailisp committed Sep 15, 2022
2 parents f0c2d89 + b3930e8 commit 4fb52fa
Show file tree
Hide file tree
Showing 44 changed files with 46 additions and 46 deletions.
2 changes: 1 addition & 1 deletion examples/__tests__/test-clean-state.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test.beforeEach(async t => {
};
});

test.afterEach(async t => {
test.afterEach.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion examples/__tests__/test-counter.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ test.beforeEach(async t => {
});

// If the environment is reused, use test.after to replace test.afterEach
test.afterEach(async t => {
test.afterEach.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed to tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion examples/__tests__/test-cross-contract-call.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ test.beforeEach(async t => {
};
});

test.afterEach(async t => {
test.afterEach.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion examples/__tests__/test-fungible-token-lockable.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ test.beforeEach(async t => {
t.context.accounts = { root, lockableFt, ali, bob };
});

test.afterEach(async t => {
test.afterEach.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed to tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion examples/__tests__/test-fungible-token.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ test.beforeEach(async (t) => {
t.context.accounts = { root, ft, ali, bob, xcc };
});

test.afterEach(async t => {
test.afterEach.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion examples/__tests__/test-non-fungible-token.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ test.beforeEach(async t => {
t.context.accounts = { root, nft, tokenReceiver, tokenId, ali, bob };
});

test.afterEach(async t => {
test.afterEach.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion examples/__tests__/test-parking-lot.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test.beforeEach(async t => {
t.context.accounts = { root, parkingLot, ali };
});

test.afterEach(async t => {
test.afterEach.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed to tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion examples/__tests__/test-status-message-collections.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test.beforeEach(async t => {
t.context.accounts = { root, statusMessage, ali, bob, carl };
});

test.afterEach(async t => {
test.afterEach.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed to tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion examples/__tests__/test-status-message.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test.before(async t => {
t.context.accounts = { root, statusMessage, ali, bob, carl };
});

test.after(async t => {
test.after.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed to tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion lib/collections/lookup-map.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/collections/lookup-map.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/collections/lookup-set.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/collections/lookup-set.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/collections/unordered-map.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/collections/unordered-map.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/collections/unordered-set.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/collections/unordered-set.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/collections/vector.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/collections/vector.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/near-bindgen.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/collections/lookup-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class LookupMap {
}

// converting plain object to class object
static deserialize(data: LookupMap): LookupMap {
static reconstruct(data: LookupMap): LookupMap {
return new LookupMap(data.keyPrefix)
}
}
2 changes: 1 addition & 1 deletion src/collections/lookup-set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class LookupSet {
}

// converting plain object to class object
static deserialize(data: LookupSet): LookupSet {
static reconstruct(data: LookupSet): LookupSet {
return new LookupSet(data.keyPrefix)
}
}
2 changes: 1 addition & 1 deletion src/collections/unordered-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class UnorderedMap {
}

// converting plain object to class object
static deserialize(data: UnorderedMap): UnorderedMap {
static reconstruct(data: UnorderedMap): UnorderedMap {
// removing readonly modifier
type MutableUnorderedMap = Mutable<UnorderedMap>;
let map = new UnorderedMap(data.prefix) as MutableUnorderedMap;
Expand Down
2 changes: 1 addition & 1 deletion src/collections/unordered-set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export class UnorderedSet {
}

// converting plain object to class object
static deserialize(data: UnorderedSet): UnorderedSet {
static reconstruct(data: UnorderedSet): UnorderedSet {
// removing readonly modifier
type MutableUnorderedSet = Mutable<UnorderedSet>;
let set = new UnorderedSet(data.prefix) as MutableUnorderedSet;
Expand Down
2 changes: 1 addition & 1 deletion src/collections/vector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export class Vector {
}

// converting plain object to class object
static deserialize(data: Vector): Vector {
static reconstruct(data: Vector): Vector {
let vector = new Vector(data.prefix);
vector.length = data.length;
return vector;
Expand Down
4 changes: 2 additions & 2 deletions src/near-bindgen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ export function NearBindgen({ requireInit = false }: { requireInit?: boolean })

static _reconstruct(classObject: any, plainObject: JSON) {
for (const item in classObject) {
if (classObject[item].constructor?.deserialize !== undefined) {
classObject[item] = classObject[item].constructor.deserialize(plainObject[item])
if (classObject[item].constructor?.reconstruct !== undefined) {
classObject[item] = classObject[item].constructor.reconstruct(plainObject[item])
} else {
classObject[item] = plainObject[item]
}
Expand Down
2 changes: 1 addition & 1 deletion tests/__tests__/bytes.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test.beforeEach(async t => {
t.context.accounts = { root, bytesContract, ali };
});

test.afterEach(async t => {
test.afterEach.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed to tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion tests/__tests__/decorators/near_bindgen.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test.beforeEach(async t => {
};
});

test.afterEach(async t => {
test.afterEach.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed to tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion tests/__tests__/decorators/payable.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test.beforeEach(async t => {
});


test.afterEach(async t => {
test.afterEach.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed to tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion tests/__tests__/decorators/private.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test.beforeEach(async t => {
});


test.afterEach(async t => {
test.afterEach.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed to tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion tests/__tests__/function-params.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test.before(async t => {
t.context.accounts = { root, functionParamsContract, ali, bob, carl };
});

test.after(async t => {
test.after.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed to tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion tests/__tests__/lookup-map.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test.beforeEach(async t => {
t.context.accounts = { root, lookupMapContract, ali, bob, carl };
});

test.afterEach(async t => {
test.afterEach.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed to tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion tests/__tests__/lookup-set.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ test.beforeEach(async t => {
t.context.accounts = { root, lookupSetContract, ali, bob, carl };
});

test.afterEach(async t => {
test.afterEach.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed to tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion tests/__tests__/test-public-key.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test.before(async t => {
t.context.accounts = { root, pkContract, ali, bob, carl };
});

test.after(async t => {
test.after.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed to tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion tests/__tests__/test_context_api.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test.before(async t => {
t.context.accounts = { root, contextApiContract, ali, bob, carl };
});

test.after(async t => {
test.after.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed to tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion tests/__tests__/test_highlevel_promise.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ test.before(async t => {
t.context.accounts = { root, highlevelPromise, ali, bob, calleeContract };
});

test.after(async t => {
test.after.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed to tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion tests/__tests__/test_log_panic_api.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ test.before(async t => {
t.context.accounts = { root, testContract, ali };
});

test.after(async t => {
test.after.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed to tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion tests/__tests__/test_math_api.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ test.before(async t => {
t.context.accounts = { root, mathApiContract, ali };
});

test.after(async t => {
test.after.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed to tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion tests/__tests__/test_promise_api.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ test.before(async t => {
t.context.accounts = { root, callerContract, calleeContract, ali, bob, caller2Contract };
});

test.after(async t => {
test.after.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed to tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion tests/__tests__/test_storage_api.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ test.beforeEach(async t => {
t.context.accounts = { root, storageApiContract, ali };
});

test.afterEach(async t => {
test.afterEach.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed to tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion tests/__tests__/typescript.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test.before(async t => {
t.context.accounts = { root, typescriptContract, ali };
});

test.after(async t => {
test.after.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed to tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion tests/__tests__/unordered-map.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ test.beforeEach(async t => {
t.context.accounts = { root, unorderedMapContract, ali, bob, carl };
});

test.afterEach(async t => {
test.afterEach.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed to tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion tests/__tests__/unordered-set.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test.beforeEach(async t => {
t.context.accounts = { root, unorderedSetContract, ali, bob, carl };
});

test.afterEach(async t => {
test.afterEach.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed to tear down the worker:', error);
});
Expand Down
2 changes: 1 addition & 1 deletion tests/__tests__/vector.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test.beforeEach(async t => {
t.context.accounts = { root, vectorContract, ali, bob, carl };
});

test.afterEach(async t => {
test.afterEach.always(async t => {
await t.context.worker.tearDown().catch(error => {
console.log('Failed to tear down the worker:', error);
});
Expand Down

0 comments on commit 4fb52fa

Please sign in to comment.