Skip to content

Commit

Permalink
include es2019.object lib
Browse files Browse the repository at this point in the history
  • Loading branch information
iartemiev committed Feb 21, 2021
1 parent 6a22b59 commit f4d5516
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/datastore/__tests__/outbox.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('Outbox tests', () => {
beforeAll(async () => {
jest.resetAllMocks();

await initializeOutbox();
await instantiateOutbox();

const newModel = new Model({
field1: 'Some value',
Expand Down Expand Up @@ -231,7 +231,7 @@ describe('Outbox tests', () => {

// performs all the required dependency injection
// in order to have a functional Outbox without the Sync Engine
async function initializeOutbox(): Promise<void> {
async function instantiateOutbox(): Promise<void> {
({ initSchema, DataStore } = require('../src/datastore/datastore'));
const classes = initSchema(testSchema());
const ownSymbol = Symbol('sync');
Expand Down
5 changes: 4 additions & 1 deletion packages/datastore/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,10 @@ export function objectsEqual(objA: object, objB: object): boolean {
let a = objA;
let b = objB;

if (Array.isArray(a) && !Array.isArray(b)) {
if (
(Array.isArray(a) && !Array.isArray(b)) ||
(Array.isArray(b) && !Array.isArray(a))
) {
return false;
}

Expand Down
16 changes: 14 additions & 2 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,13 @@ async function buildES5(typeScriptCompiler) {
let compilerOptions = {
esModuleInterop: true,
noImplicitAny: false,
lib: ['dom', 'es2017', 'esnext.asynciterable', 'es2018.asyncgenerator'],
lib: [
'dom',
'es2017',
'esnext.asynciterable',
'es2018.asyncgenerator',
'es2019.object',
],
downlevelIteration: true,
jsx: jsx,
sourceMap: true,
Expand Down Expand Up @@ -202,7 +208,13 @@ function buildES6(typeScriptCompiler) {
let compilerOptions = {
esModuleInterop: true,
noImplicitAny: false,
lib: ['dom', 'es2017', 'esnext.asynciterable', 'es2018.asyncgenerator'],
lib: [
'dom',
'es2017',
'esnext.asynciterable',
'es2018.asyncgenerator',
'es2019.object',
],
downlevelIteration: true,
jsx: jsx,
sourceMap: true,
Expand Down

0 comments on commit f4d5516

Please sign in to comment.