Skip to content

Commit

Permalink
Merge pull request #57 from PLhery/chore/set-allowSyntheticDefaultImp…
Browse files Browse the repository at this point in the history
…ort-to-false

chore: set allowSyntheticDefaultImport to false to improve compatibility
  • Loading branch information
alkihis authored Aug 23, 2021
2 parents 6eacc25 + 0dcc666 commit f4b4681
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion src/client-mixins/oauth1.helper.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import crypto from 'crypto';
import * as crypto from 'crypto';

// ----------------------------------------------------------
// LICENSE: This code partially belongs to oauth-1.0a package
Expand Down
2 changes: 1 addition & 1 deletion src/stream/TweetStreamEventCombiner.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import EventEmitter from 'events';
import { EventEmitter } from 'events';
import { ETwitterStreamEvent } from '../types';
import type TweetStream from './TweetStream';

Expand Down
2 changes: 1 addition & 1 deletion src/test/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TwitterApi } from '..';
import dotenv from 'dotenv';
import * as dotenv from 'dotenv';

dotenv.config({ path: __dirname + '/../../.env' });

Expand Down
2 changes: 1 addition & 1 deletion src/types/v1/tweet.v1.types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { BooleanString, NumberString } from '../shared.types';
import type fs from 'fs';
import type * as fs from 'fs';
import { UserV1 } from './user.v1.types';
import { CoordinateV1, PlaceV1, TweetEntitiesV1, TweetExtendedEntitiesV1 } from './entities.v1.types';

Expand Down
2 changes: 1 addition & 1 deletion src/v1/client.v1.write.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
TweetV1,
UploadMediaV1Params,
} from '../types';
import fs from 'fs';
import * as fs from 'fs';
import { getFileHandle, getFileSizeFromFileHandle, getMediaCategoryByMime, getMimeType, readNextPartOf, sleepSecs, TFileHandle } from './media-helpers.v1';

const UPLOAD_ENDPOINT = 'media/upload.json';
Expand Down
2 changes: 1 addition & 1 deletion src/v1/media-helpers.v1.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import fs from 'fs';
import * as fs from 'fs';
import type { TUploadableMedia, TUploadTypeV1 } from '../types';

// -------------
Expand Down
4 changes: 2 additions & 2 deletions test/media-upload.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import 'mocha';
import { expect } from 'chai';
import { TwitterApi } from '../src';
import { getUserClient } from '../src/test/utils';
import fs from 'fs';
import path from 'path';
import * as fs from 'fs';
import * as path from 'path';

let client: TwitterApi;
const dirname = __dirname;
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"allowSyntheticDefaultImports": false, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
Expand Down

0 comments on commit f4b4681

Please sign in to comment.