Skip to content

enable esModuleInterop repo-wide #2849

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
],
"module": "ES2015",
"moduleResolution": "node",
"esModuleInterop": true,
"resolveJsonModule": true,
"sourceMap": true,
"target": "es5",
Expand Down
2 changes: 1 addition & 1 deletion packages-exp/app-exp/test/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import { use } from 'chai';
import { restore } from 'sinon';
import * as sinonChai from 'sinon-chai';
import sinonChai from 'sinon-chai';

use(sinonChai);

Expand Down
6 changes: 3 additions & 3 deletions packages/analytics/testing/setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @license
* Copyright 2019 Google Inc.
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,9 +16,9 @@
*/

import { use } from 'chai';
import * as chaiAsPromised from 'chai-as-promised';
import chaiAsPromised from 'chai-as-promised';
import { restore } from 'sinon';
import * as sinonChai from 'sinon-chai';
import sinonChai from 'sinon-chai';

use(chaiAsPromised);
use(sinonChai);
Expand Down
4 changes: 2 additions & 2 deletions packages/app/test/setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @license
* Copyright 2019 Google Inc.
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,7 +17,7 @@

import { use } from 'chai';
import { restore } from 'sinon';
import * as sinonChai from 'sinon-chai';
import sinonChai from 'sinon-chai';

use(sinonChai);

Expand Down
6 changes: 3 additions & 3 deletions packages/component/test/setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @license
* Copyright 2019 Google Inc.
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,9 +16,9 @@
*/

import { use } from 'chai';
import * as chaiAsPromised from 'chai-as-promised';
import chaiAsPromised from 'chai-as-promised';
import { restore } from 'sinon';
import * as sinonChai from 'sinon-chai';
import sinonChai from 'sinon-chai';

use(chaiAsPromised);
use(sinonChai);
Expand Down
2 changes: 1 addition & 1 deletion packages/firestore/test/integration/api/database.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import * as chaiAsPromised from 'chai-as-promised';
import chaiAsPromised from 'chai-as-promised';

import * as firestore from '@firebase/firestore-types';
import { expect, use } from 'chai';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @license
* Copyright 2019 Google Inc.
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,7 +15,7 @@
* limitations under the License.
*/

import * as chaiAsPromised from 'chai-as-promised';
import chaiAsPromised from 'chai-as-promised';

import { expect, use } from 'chai';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @license
* Copyright 2017 Google Inc.
* Copyright 2017 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,7 +18,7 @@
import { expect, use } from 'chai';
import { PersistencePromise } from '../../../src/local/persistence_promise';

import * as chaiAsPromised from 'chai-as-promised';
import chaiAsPromised from 'chai-as-promised';

use(chaiAsPromised);

Expand Down
4 changes: 2 additions & 2 deletions packages/firestore/test/unit/local/simple_db.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @license
* Copyright 2017 Google Inc.
* Copyright 2017 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,7 +15,7 @@
* limitations under the License.
*/

import * as chaiAsPromised from 'chai-as-promised';
import chaiAsPromised from 'chai-as-promised';

import { expect, use } from 'chai';
import {
Expand Down
6 changes: 3 additions & 3 deletions packages/installations/src/testing/setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @license
* Copyright 2019 Google Inc.
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,9 +16,9 @@
*/

import { use } from 'chai';
import * as chaiAsPromised from 'chai-as-promised';
import chaiAsPromised from 'chai-as-promised';
import { restore } from 'sinon';
import * as sinonChai from 'sinon-chai';
import sinonChai from 'sinon-chai';
import { clear } from '../helpers/idb-manager';

use(chaiAsPromised);
Expand Down
6 changes: 3 additions & 3 deletions packages/messaging/src/testing/setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @license
* Copyright 2019 Google Inc.
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,9 +16,9 @@
*/

import { use } from 'chai';
import * as chaiAsPromised from 'chai-as-promised';
import chaiAsPromised from 'chai-as-promised';
import { restore } from 'sinon';
import * as sinonChai from 'sinon-chai';
import sinonChai from 'sinon-chai';
import { dbDelete } from '../helpers/idb-manager';
import { deleteDb } from 'idb';

Expand Down
4 changes: 2 additions & 2 deletions packages/performance/src/services/transport_service.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @license
* Copyright 2019 Google Inc.
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,7 +17,7 @@

import { stub, useFakeTimers, SinonStub, SinonFakeTimers } from 'sinon';
import { use, expect } from 'chai';
import * as sinonChai from 'sinon-chai';
import sinonChai from 'sinon-chai';
import { transportHandler, setupTransportService } from './transport_service';

use(sinonChai);
Expand Down
6 changes: 3 additions & 3 deletions packages/performance/test/setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @license
* Copyright 2019 Google Inc.
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,8 +17,8 @@

import { restore } from 'sinon';
import { use } from 'chai';
import * as chaiAsPromised from 'chai-as-promised';
import * as sinonChai from 'sinon-chai';
import chaiAsPromised from 'chai-as-promised';
import sinonChai from 'sinon-chai';

use(chaiAsPromised);
use(sinonChai);
Expand Down
6 changes: 3 additions & 3 deletions packages/remote-config/test/setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @license
* Copyright 2019 Google Inc.
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,8 +16,8 @@
*/

import { use } from 'chai';
import * as sinonChai from 'sinon-chai';
import * as chaiAsPromised from 'chai-as-promised';
import sinonChai from 'sinon-chai';
import chaiAsPromised from 'chai-as-promised';

// Normalizes Sinon assertions to Chai syntax.
use(sinonChai);
Expand Down
4 changes: 2 additions & 2 deletions packages/testing/test/database.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @license
* Copyright 2017 Google Inc.
* Copyright 2017 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,7 @@
*/

import * as chai from 'chai';
import * as chaiAsPromised from 'chai-as-promised';
import chaiAsPromised from 'chai-as-promised';
import * as firebase from '../src/api';
import { base64 } from '@firebase/util';
import { _FirebaseApp } from '@firebase/app-types/private';
Expand Down