Skip to content

Commit b5e47a8

Browse files
committed
[momentjs] - enabledES6 modules import and changed accordingly
Signed-off-by: Ashish Patel <[email protected]> Signed-off-by: ashish <[email protected]>
1 parent adcd768 commit b5e47a8

File tree

10 files changed

+18
-17
lines changed

10 files changed

+18
-17
lines changed

src/commands/avro.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {Command, flags} from '@oclif/command'
2-
import * as avro from 'avsc'
3-
import * as chalk from 'chalk'
4-
import * as fs from 'fs' // includes all from avro-js and some more
5-
import * as Json2Csv from 'json-2-csv'
2+
import avro from 'avsc'
3+
import chalk from 'chalk'
4+
import fs from 'fs' // includes all from avro-js and some more
5+
import Json2Csv from 'json-2-csv'
66

77
import Logger from '../utilities/logger'
88
import Utilities from '../utilities/utilities'

src/commands/bundlephobia.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {Command, flags} from '@oclif/command'
22
import axios from 'axios'
3-
import * as chalk from 'chalk'
3+
import chalk from 'chalk'
44

55
import Logger from '../utilities/logger'
66
import Utilities from '../utilities/utilities'

src/commands/crypto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {Command, flags} from '@oclif/command'
2-
import * as CryptoJS from 'crypto-js'
2+
import CryptoJS from 'crypto-js'
33

44
import Logger from '../utilities/logger'
55
import Utilities from '../utilities/utilities'

src/commands/datetime.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {Command, flags} from '@oclif/command'
2-
import * as chalk from 'chalk'
3-
import * as moment from 'moment-timezone' //has both momentjs and timezone support
2+
import chalk from 'chalk'
3+
import moment from 'moment-timezone' //has both momentjs and timezone support
44

55
// @ts-ignore
66
moment.suppressDeprecationWarnings = true

src/commands/hash.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import {Command, flags} from '@oclif/command'
2-
import * as CryptoJS from 'crypto-js'
2+
import CryptoJS from 'crypto-js'
33

44
import Logger from '../utilities/logger'
55
import Utilities from '../utilities/utilities'
6-
// import * as Hashes from 'jshashes'
6+
// import Hashes from 'jshashes'
77

88
// TODO: all are Hexadecimal encoding for now, can also add b64
99

src/commands/view.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// code here to write the tool for csv tool show
22
import {Command, flags} from '@oclif/command'
3-
import * as chalk from 'chalk'
3+
import chalk from 'chalk'
44

55
import Logger from '../utilities/logger'
66
import Utilities from '../utilities/utilities'

src/utilities/logger.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// tslint:disable-next-line:file-name-casing
2-
import * as Ora from 'ora'
3-
import * as signale from 'signale'
2+
import Ora from 'ora'
3+
import signale from 'signale'
44

55
// tslint:disable-next-line:no-unnecessary-class
66
export default class Logger {

src/utilities/utilities.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// tslint:disable-next-line:file-name-casing
22
import {Command} from '@oclif/command'
3-
import * as chalk from 'chalk'
4-
import * as fs from 'fs'
3+
import chalk from 'chalk'
4+
import fs from 'fs'
55

66
import Logger from './logger'
77
// tslint:disable-next-line:no-unnecessary-class

test/commands/datetime.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {expect, test} from '@oclif/test'
2-
import * as moment from 'moment-timezone' //has both momentjs and timezone support
2+
import moment from 'moment-timezone' //has both momentjs and timezone support
33

44
describe('datetime', () => {
55
test

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"strict": true,
99
"target": "es2017",
1010
"sourceMap": true,
11-
"composite": true
11+
"composite": true,
12+
"esModuleInterop": true
1213
},
1314
"include": [
1415
"src/**/*"

0 commit comments

Comments
 (0)