Skip to content

Commit 5ab9103

Browse files
committed
Revert "Add createRequire"
This reverts commit b260614.
1 parent d2b37a2 commit 5ab9103

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

packages/firestore/src/platform/node/grpc_connection.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,13 @@
1515
* limitations under the License.
1616
*/
1717

18-
import module from 'module';
19-
2018
import {
2119
Metadata,
2220
GrpcObject,
2321
credentials as GrpcCredentials,
2422
ServiceError
2523
} from '@grpc/grpc-js';
24+
import { version as grpcVersion } from '@grpc/grpc-js/package.json';
2625

2726
import { Token } from '../../api/credentials';
2827
import { DatabaseInfo } from '../../core/database_info';
@@ -36,11 +35,6 @@ import { logError, logDebug, logWarn } from '../../util/log';
3635
import { NodeCallback, nodePromise } from '../../util/node_api';
3736
import { Deferred } from '../../util/promise';
3837

39-
const require = module.createRequire(import.meta.url);
40-
41-
// eslint-disable-next-line @typescript-eslint/no-require-imports
42-
const { version: grpcVersion } = require('@grpc/grpc-js/package.json');
43-
4438
const LOG_TAG = 'Connection';
4539
const X_GOOG_API_CLIENT_VALUE = `gl-node/${process.versions.node} fire/${SDK_VERSION} grpc/${grpcVersion}`;
4640

packages/firestore/tsconfig.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
{
22
"extends": "../../config/tsconfig.base.json",
33
"compilerOptions": {
4-
"outDir": "dist",
5-
"allowSyntheticDefaultImports": true,
6-
"module": "es2020"
4+
"outDir": "dist"
75
},
86
"exclude": [
97
"scripts/**/*",

0 commit comments

Comments
 (0)